| /** |
| */ |
| 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.ExpansionProfileCodeSystem2; |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.Uri; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Expansion Profile Code System2</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.ExpansionProfileCodeSystem2Impl#getSystem <em>System</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ExpansionProfileCodeSystem2Impl#getVersion <em>Version</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ExpansionProfileCodeSystem2Impl extends BackboneElementImpl implements ExpansionProfileCodeSystem2 { |
| /** |
| * The cached value of the '{@link #getSystem() <em>System</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getSystem() |
| * @generated |
| * @ordered |
| */ |
| protected Uri system; |
| |
| /** |
| * The cached value of the '{@link #getVersion() <em>Version</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getVersion() |
| * @generated |
| * @ordered |
| */ |
| protected org.hl7.fhir.String version; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ExpansionProfileCodeSystem2Impl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getExpansionProfileCodeSystem2(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Uri getSystem() { |
| return system; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetSystem(Uri newSystem, NotificationChain msgs) { |
| Uri oldSystem = system; |
| system = newSystem; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__SYSTEM, oldSystem, newSystem); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setSystem(Uri newSystem) { |
| if (newSystem != system) { |
| NotificationChain msgs = null; |
| if (system != null) |
| msgs = ((InternalEObject)system).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__SYSTEM, null, msgs); |
| if (newSystem != null) |
| msgs = ((InternalEObject)newSystem).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__SYSTEM, null, msgs); |
| msgs = basicSetSystem(newSystem, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__SYSTEM, newSystem, newSystem)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.hl7.fhir.String getVersion() { |
| return version; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetVersion(org.hl7.fhir.String newVersion, NotificationChain msgs) { |
| org.hl7.fhir.String oldVersion = version; |
| version = newVersion; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__VERSION, oldVersion, newVersion); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setVersion(org.hl7.fhir.String newVersion) { |
| if (newVersion != version) { |
| NotificationChain msgs = null; |
| if (version != null) |
| msgs = ((InternalEObject)version).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__VERSION, null, msgs); |
| if (newVersion != null) |
| msgs = ((InternalEObject)newVersion).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__VERSION, null, msgs); |
| msgs = basicSetVersion(newVersion, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__VERSION, newVersion, newVersion)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__SYSTEM: |
| return basicSetSystem(null, msgs); |
| case FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__VERSION: |
| return basicSetVersion(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_CODE_SYSTEM2__SYSTEM: |
| return getSystem(); |
| case FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__VERSION: |
| return getVersion(); |
| } |
| 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_CODE_SYSTEM2__SYSTEM: |
| setSystem((Uri)newValue); |
| return; |
| case FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__VERSION: |
| setVersion((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.EXPANSION_PROFILE_CODE_SYSTEM2__SYSTEM: |
| setSystem((Uri)null); |
| return; |
| case FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__VERSION: |
| setVersion((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.EXPANSION_PROFILE_CODE_SYSTEM2__SYSTEM: |
| return system != null; |
| case FhirPackage.EXPANSION_PROFILE_CODE_SYSTEM2__VERSION: |
| return version != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ExpansionProfileCodeSystem2Impl |