| /** |
| */ |
| package org.hl7.fhir.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.common.notify.NotificationChain; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.OrderSetCustomization; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Order Set Customization</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.OrderSetCustomizationImpl#getPath <em>Path</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.OrderSetCustomizationImpl#getExpression <em>Expression</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class OrderSetCustomizationImpl extends BackboneElementImpl implements OrderSetCustomization { |
| /** |
| * The cached value of the '{@link #getPath() <em>Path</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPath() |
| * @generated |
| * @ordered |
| */ |
| protected org.hl7.fhir.String path; |
| |
| /** |
| * The cached value of the '{@link #getExpression() <em>Expression</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getExpression() |
| * @generated |
| * @ordered |
| */ |
| protected org.hl7.fhir.String expression; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected OrderSetCustomizationImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getOrderSetCustomization(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.hl7.fhir.String getPath() { |
| return path; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetPath(org.hl7.fhir.String newPath, NotificationChain msgs) { |
| org.hl7.fhir.String oldPath = path; |
| path = newPath; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.ORDER_SET_CUSTOMIZATION__PATH, oldPath, newPath); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setPath(org.hl7.fhir.String newPath) { |
| if (newPath != path) { |
| NotificationChain msgs = null; |
| if (path != null) |
| msgs = ((InternalEObject)path).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.ORDER_SET_CUSTOMIZATION__PATH, null, msgs); |
| if (newPath != null) |
| msgs = ((InternalEObject)newPath).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.ORDER_SET_CUSTOMIZATION__PATH, null, msgs); |
| msgs = basicSetPath(newPath, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.ORDER_SET_CUSTOMIZATION__PATH, newPath, newPath)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.hl7.fhir.String getExpression() { |
| return expression; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetExpression(org.hl7.fhir.String newExpression, NotificationChain msgs) { |
| org.hl7.fhir.String oldExpression = expression; |
| expression = newExpression; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.ORDER_SET_CUSTOMIZATION__EXPRESSION, oldExpression, newExpression); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setExpression(org.hl7.fhir.String newExpression) { |
| if (newExpression != expression) { |
| NotificationChain msgs = null; |
| if (expression != null) |
| msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.ORDER_SET_CUSTOMIZATION__EXPRESSION, null, msgs); |
| if (newExpression != null) |
| msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.ORDER_SET_CUSTOMIZATION__EXPRESSION, null, msgs); |
| msgs = basicSetExpression(newExpression, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.ORDER_SET_CUSTOMIZATION__EXPRESSION, newExpression, newExpression)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.ORDER_SET_CUSTOMIZATION__PATH: |
| return basicSetPath(null, msgs); |
| case FhirPackage.ORDER_SET_CUSTOMIZATION__EXPRESSION: |
| return basicSetExpression(null, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case FhirPackage.ORDER_SET_CUSTOMIZATION__PATH: |
| return getPath(); |
| case FhirPackage.ORDER_SET_CUSTOMIZATION__EXPRESSION: |
| return getExpression(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case FhirPackage.ORDER_SET_CUSTOMIZATION__PATH: |
| setPath((org.hl7.fhir.String)newValue); |
| return; |
| case FhirPackage.ORDER_SET_CUSTOMIZATION__EXPRESSION: |
| setExpression((org.hl7.fhir.String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirPackage.ORDER_SET_CUSTOMIZATION__PATH: |
| setPath((org.hl7.fhir.String)null); |
| return; |
| case FhirPackage.ORDER_SET_CUSTOMIZATION__EXPRESSION: |
| setExpression((org.hl7.fhir.String)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirPackage.ORDER_SET_CUSTOMIZATION__PATH: |
| return path != null; |
| case FhirPackage.ORDER_SET_CUSTOMIZATION__EXPRESSION: |
| return expression != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //OrderSetCustomizationImpl |