| /** |
| */ |
| 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.ClinicalImpressionFinding; |
| import org.hl7.fhir.CodeableConcept; |
| import org.hl7.fhir.FhirPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Clinical Impression Finding</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.ClinicalImpressionFindingImpl#getItem <em>Item</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ClinicalImpressionFindingImpl#getCause <em>Cause</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ClinicalImpressionFindingImpl extends BackboneElementImpl implements ClinicalImpressionFinding { |
| /** |
| * The cached value of the '{@link #getItem() <em>Item</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getItem() |
| * @generated |
| * @ordered |
| */ |
| protected CodeableConcept item; |
| |
| /** |
| * The cached value of the '{@link #getCause() <em>Cause</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getCause() |
| * @generated |
| * @ordered |
| */ |
| protected org.hl7.fhir.String cause; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ClinicalImpressionFindingImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getClinicalImpressionFinding(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CodeableConcept getItem() { |
| return item; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetItem(CodeableConcept newItem, NotificationChain msgs) { |
| CodeableConcept oldItem = item; |
| item = newItem; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLINICAL_IMPRESSION_FINDING__ITEM, oldItem, newItem); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setItem(CodeableConcept newItem) { |
| if (newItem != item) { |
| NotificationChain msgs = null; |
| if (item != null) |
| msgs = ((InternalEObject)item).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLINICAL_IMPRESSION_FINDING__ITEM, null, msgs); |
| if (newItem != null) |
| msgs = ((InternalEObject)newItem).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLINICAL_IMPRESSION_FINDING__ITEM, null, msgs); |
| msgs = basicSetItem(newItem, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLINICAL_IMPRESSION_FINDING__ITEM, newItem, newItem)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.hl7.fhir.String getCause() { |
| return cause; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetCause(org.hl7.fhir.String newCause, NotificationChain msgs) { |
| org.hl7.fhir.String oldCause = cause; |
| cause = newCause; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLINICAL_IMPRESSION_FINDING__CAUSE, oldCause, newCause); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setCause(org.hl7.fhir.String newCause) { |
| if (newCause != cause) { |
| NotificationChain msgs = null; |
| if (cause != null) |
| msgs = ((InternalEObject)cause).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLINICAL_IMPRESSION_FINDING__CAUSE, null, msgs); |
| if (newCause != null) |
| msgs = ((InternalEObject)newCause).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLINICAL_IMPRESSION_FINDING__CAUSE, null, msgs); |
| msgs = basicSetCause(newCause, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLINICAL_IMPRESSION_FINDING__CAUSE, newCause, newCause)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.CLINICAL_IMPRESSION_FINDING__ITEM: |
| return basicSetItem(null, msgs); |
| case FhirPackage.CLINICAL_IMPRESSION_FINDING__CAUSE: |
| return basicSetCause(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.CLINICAL_IMPRESSION_FINDING__ITEM: |
| return getItem(); |
| case FhirPackage.CLINICAL_IMPRESSION_FINDING__CAUSE: |
| return getCause(); |
| } |
| 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.CLINICAL_IMPRESSION_FINDING__ITEM: |
| setItem((CodeableConcept)newValue); |
| return; |
| case FhirPackage.CLINICAL_IMPRESSION_FINDING__CAUSE: |
| setCause((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.CLINICAL_IMPRESSION_FINDING__ITEM: |
| setItem((CodeableConcept)null); |
| return; |
| case FhirPackage.CLINICAL_IMPRESSION_FINDING__CAUSE: |
| setCause((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.CLINICAL_IMPRESSION_FINDING__ITEM: |
| return item != null; |
| case FhirPackage.CLINICAL_IMPRESSION_FINDING__CAUSE: |
| return cause != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ClinicalImpressionFindingImpl |