| /** |
| */ |
| 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.Code; |
| import org.hl7.fhir.Coding; |
| import org.hl7.fhir.ExpansionProfileDesignation2; |
| import org.hl7.fhir.FhirPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Expansion Profile Designation2</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.ExpansionProfileDesignation2Impl#getLanguage <em>Language</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ExpansionProfileDesignation2Impl#getUse <em>Use</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ExpansionProfileDesignation2Impl extends BackboneElementImpl implements ExpansionProfileDesignation2 { |
| /** |
| * The cached value of the '{@link #getLanguage() <em>Language</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getLanguage() |
| * @generated |
| * @ordered |
| */ |
| protected Code language; |
| |
| /** |
| * The cached value of the '{@link #getUse() <em>Use</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getUse() |
| * @generated |
| * @ordered |
| */ |
| protected Coding use; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ExpansionProfileDesignation2Impl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getExpansionProfileDesignation2(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Code getLanguage() { |
| return language; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetLanguage(Code newLanguage, NotificationChain msgs) { |
| Code oldLanguage = language; |
| language = newLanguage; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.EXPANSION_PROFILE_DESIGNATION2__LANGUAGE, oldLanguage, newLanguage); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setLanguage(Code newLanguage) { |
| if (newLanguage != language) { |
| NotificationChain msgs = null; |
| if (language != null) |
| msgs = ((InternalEObject)language).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPANSION_PROFILE_DESIGNATION2__LANGUAGE, null, msgs); |
| if (newLanguage != null) |
| msgs = ((InternalEObject)newLanguage).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPANSION_PROFILE_DESIGNATION2__LANGUAGE, null, msgs); |
| msgs = basicSetLanguage(newLanguage, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.EXPANSION_PROFILE_DESIGNATION2__LANGUAGE, newLanguage, newLanguage)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Coding getUse() { |
| return use; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetUse(Coding newUse, NotificationChain msgs) { |
| Coding oldUse = use; |
| use = newUse; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.EXPANSION_PROFILE_DESIGNATION2__USE, oldUse, newUse); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setUse(Coding newUse) { |
| if (newUse != use) { |
| NotificationChain msgs = null; |
| if (use != null) |
| msgs = ((InternalEObject)use).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPANSION_PROFILE_DESIGNATION2__USE, null, msgs); |
| if (newUse != null) |
| msgs = ((InternalEObject)newUse).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPANSION_PROFILE_DESIGNATION2__USE, null, msgs); |
| msgs = basicSetUse(newUse, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.EXPANSION_PROFILE_DESIGNATION2__USE, newUse, newUse)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.EXPANSION_PROFILE_DESIGNATION2__LANGUAGE: |
| return basicSetLanguage(null, msgs); |
| case FhirPackage.EXPANSION_PROFILE_DESIGNATION2__USE: |
| return basicSetUse(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.EXPANSION_PROFILE_DESIGNATION2__LANGUAGE: |
| return getLanguage(); |
| case FhirPackage.EXPANSION_PROFILE_DESIGNATION2__USE: |
| return getUse(); |
| } |
| 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.EXPANSION_PROFILE_DESIGNATION2__LANGUAGE: |
| setLanguage((Code)newValue); |
| return; |
| case FhirPackage.EXPANSION_PROFILE_DESIGNATION2__USE: |
| setUse((Coding)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirPackage.EXPANSION_PROFILE_DESIGNATION2__LANGUAGE: |
| setLanguage((Code)null); |
| return; |
| case FhirPackage.EXPANSION_PROFILE_DESIGNATION2__USE: |
| setUse((Coding)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirPackage.EXPANSION_PROFILE_DESIGNATION2__LANGUAGE: |
| return language != null; |
| case FhirPackage.EXPANSION_PROFILE_DESIGNATION2__USE: |
| return use != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ExpansionProfileDesignation2Impl |