| /******************************************************************************* |
| * Copyright (c) 2016 David Carlson and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * David Carlson (Clinical Cloud Solutions, LLC) - initial API and implementation |
| *******************************************************************************/ |
| /** |
| */ |
| package org.eclipse.mdht.uml.fhir.core.resource.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.mdht.uml.fhir.core.datatype.CodeableConcept; |
| |
| import org.eclipse.mdht.uml.fhir.core.datatype.impl.BackboneElementImpl; |
| |
| import org.eclipse.mdht.uml.fhir.core.resource.ClinicalImpressionRuledOut; |
| import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Clinical Impression Ruled Out</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ClinicalImpressionRuledOutImpl#getItem <em>Item</em>}</li> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ClinicalImpressionRuledOutImpl#getReason <em>Reason</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ClinicalImpressionRuledOutImpl extends BackboneElementImpl implements ClinicalImpressionRuledOut { |
| /** |
| * The cached value of the '{@link #getItem() <em>Item</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getItem() |
| * @generated |
| * @ordered |
| */ |
| protected CodeableConcept item; |
| |
| /** |
| * The cached value of the '{@link #getReason() <em>Reason</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getReason() |
| * @generated |
| * @ordered |
| */ |
| protected org.eclipse.mdht.uml.fhir.core.datatype.String reason; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ClinicalImpressionRuledOutImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirResourcePackage.eINSTANCE.getClinicalImpressionRuledOut(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CodeableConcept getItem() { |
| if (item != null && item.eIsProxy()) { |
| InternalEObject oldItem = (InternalEObject)item; |
| item = (CodeableConcept)eResolveProxy(oldItem); |
| if (item != oldItem) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.CLINICAL_IMPRESSION_RULED_OUT__ITEM, oldItem, item)); |
| } |
| } |
| return item; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CodeableConcept basicGetItem() { |
| return item; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setItem(CodeableConcept newItem) { |
| CodeableConcept oldItem = item; |
| item = newItem; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.CLINICAL_IMPRESSION_RULED_OUT__ITEM, oldItem, item)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String getReason() { |
| if (reason != null && reason.eIsProxy()) { |
| InternalEObject oldReason = (InternalEObject)reason; |
| reason = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldReason); |
| if (reason != oldReason) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.CLINICAL_IMPRESSION_RULED_OUT__REASON, oldReason, reason)); |
| } |
| } |
| return reason; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetReason() { |
| return reason; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setReason(org.eclipse.mdht.uml.fhir.core.datatype.String newReason) { |
| org.eclipse.mdht.uml.fhir.core.datatype.String oldReason = reason; |
| reason = newReason; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.CLINICAL_IMPRESSION_RULED_OUT__REASON, oldReason, reason)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case FhirResourcePackage.CLINICAL_IMPRESSION_RULED_OUT__ITEM: |
| if (resolve) return getItem(); |
| return basicGetItem(); |
| case FhirResourcePackage.CLINICAL_IMPRESSION_RULED_OUT__REASON: |
| if (resolve) return getReason(); |
| return basicGetReason(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case FhirResourcePackage.CLINICAL_IMPRESSION_RULED_OUT__ITEM: |
| setItem((CodeableConcept)newValue); |
| return; |
| case FhirResourcePackage.CLINICAL_IMPRESSION_RULED_OUT__REASON: |
| setReason((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirResourcePackage.CLINICAL_IMPRESSION_RULED_OUT__ITEM: |
| setItem((CodeableConcept)null); |
| return; |
| case FhirResourcePackage.CLINICAL_IMPRESSION_RULED_OUT__REASON: |
| setReason((org.eclipse.mdht.uml.fhir.core.datatype.String)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirResourcePackage.CLINICAL_IMPRESSION_RULED_OUT__ITEM: |
| return item != null; |
| case FhirResourcePackage.CLINICAL_IMPRESSION_RULED_OUT__REASON: |
| return reason != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ClinicalImpressionRuledOutImpl |