| /** |
| */ |
| 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.ConformanceDocument; |
| import org.hl7.fhir.DocumentMode; |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.Reference; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Conformance Document</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.ConformanceDocumentImpl#getMode <em>Mode</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ConformanceDocumentImpl#getDocumentation <em>Documentation</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ConformanceDocumentImpl#getProfile <em>Profile</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ConformanceDocumentImpl extends BackboneElementImpl implements ConformanceDocument { |
| /** |
| * The cached value of the '{@link #getMode() <em>Mode</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMode() |
| * @generated |
| * @ordered |
| */ |
| protected DocumentMode mode; |
| |
| /** |
| * The cached value of the '{@link #getDocumentation() <em>Documentation</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDocumentation() |
| * @generated |
| * @ordered |
| */ |
| protected org.hl7.fhir.String documentation; |
| |
| /** |
| * The cached value of the '{@link #getProfile() <em>Profile</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getProfile() |
| * @generated |
| * @ordered |
| */ |
| protected Reference profile; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ConformanceDocumentImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getConformanceDocument(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DocumentMode getMode() { |
| return mode; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetMode(DocumentMode newMode, NotificationChain msgs) { |
| DocumentMode oldMode = mode; |
| mode = newMode; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_DOCUMENT__MODE, oldMode, newMode); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setMode(DocumentMode newMode) { |
| if (newMode != mode) { |
| NotificationChain msgs = null; |
| if (mode != null) |
| msgs = ((InternalEObject)mode).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_DOCUMENT__MODE, null, msgs); |
| if (newMode != null) |
| msgs = ((InternalEObject)newMode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_DOCUMENT__MODE, null, msgs); |
| msgs = basicSetMode(newMode, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_DOCUMENT__MODE, newMode, newMode)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.hl7.fhir.String getDocumentation() { |
| return documentation; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetDocumentation(org.hl7.fhir.String newDocumentation, NotificationChain msgs) { |
| org.hl7.fhir.String oldDocumentation = documentation; |
| documentation = newDocumentation; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_DOCUMENT__DOCUMENTATION, oldDocumentation, newDocumentation); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDocumentation(org.hl7.fhir.String newDocumentation) { |
| if (newDocumentation != documentation) { |
| NotificationChain msgs = null; |
| if (documentation != null) |
| msgs = ((InternalEObject)documentation).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_DOCUMENT__DOCUMENTATION, null, msgs); |
| if (newDocumentation != null) |
| msgs = ((InternalEObject)newDocumentation).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_DOCUMENT__DOCUMENTATION, null, msgs); |
| msgs = basicSetDocumentation(newDocumentation, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_DOCUMENT__DOCUMENTATION, newDocumentation, newDocumentation)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Reference getProfile() { |
| return profile; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetProfile(Reference newProfile, NotificationChain msgs) { |
| Reference oldProfile = profile; |
| profile = newProfile; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_DOCUMENT__PROFILE, oldProfile, newProfile); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setProfile(Reference newProfile) { |
| if (newProfile != profile) { |
| NotificationChain msgs = null; |
| if (profile != null) |
| msgs = ((InternalEObject)profile).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_DOCUMENT__PROFILE, null, msgs); |
| if (newProfile != null) |
| msgs = ((InternalEObject)newProfile).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_DOCUMENT__PROFILE, null, msgs); |
| msgs = basicSetProfile(newProfile, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_DOCUMENT__PROFILE, newProfile, newProfile)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.CONFORMANCE_DOCUMENT__MODE: |
| return basicSetMode(null, msgs); |
| case FhirPackage.CONFORMANCE_DOCUMENT__DOCUMENTATION: |
| return basicSetDocumentation(null, msgs); |
| case FhirPackage.CONFORMANCE_DOCUMENT__PROFILE: |
| return basicSetProfile(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.CONFORMANCE_DOCUMENT__MODE: |
| return getMode(); |
| case FhirPackage.CONFORMANCE_DOCUMENT__DOCUMENTATION: |
| return getDocumentation(); |
| case FhirPackage.CONFORMANCE_DOCUMENT__PROFILE: |
| return getProfile(); |
| } |
| 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.CONFORMANCE_DOCUMENT__MODE: |
| setMode((DocumentMode)newValue); |
| return; |
| case FhirPackage.CONFORMANCE_DOCUMENT__DOCUMENTATION: |
| setDocumentation((org.hl7.fhir.String)newValue); |
| return; |
| case FhirPackage.CONFORMANCE_DOCUMENT__PROFILE: |
| setProfile((Reference)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirPackage.CONFORMANCE_DOCUMENT__MODE: |
| setMode((DocumentMode)null); |
| return; |
| case FhirPackage.CONFORMANCE_DOCUMENT__DOCUMENTATION: |
| setDocumentation((org.hl7.fhir.String)null); |
| return; |
| case FhirPackage.CONFORMANCE_DOCUMENT__PROFILE: |
| setProfile((Reference)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirPackage.CONFORMANCE_DOCUMENT__MODE: |
| return mode != null; |
| case FhirPackage.CONFORMANCE_DOCUMENT__DOCUMENTATION: |
| return documentation != null; |
| case FhirPackage.CONFORMANCE_DOCUMENT__PROFILE: |
| return profile != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ConformanceDocumentImpl |