| /******************************************************************************* |
| * 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.Coding; |
| import org.eclipse.mdht.uml.fhir.core.datatype.PositiveInt; |
| |
| import org.eclipse.mdht.uml.fhir.core.datatype.impl.BackboneElementImpl; |
| |
| import org.eclipse.mdht.uml.fhir.core.resource.ClaimDiagnosis; |
| import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Claim Diagnosis</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ClaimDiagnosisImpl#getSequence <em>Sequence</em>}</li> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ClaimDiagnosisImpl#getDiagnosis <em>Diagnosis</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ClaimDiagnosisImpl extends BackboneElementImpl implements ClaimDiagnosis { |
| /** |
| * The cached value of the '{@link #getSequence() <em>Sequence</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getSequence() |
| * @generated |
| * @ordered |
| */ |
| protected PositiveInt sequence; |
| |
| /** |
| * The cached value of the '{@link #getDiagnosis() <em>Diagnosis</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDiagnosis() |
| * @generated |
| * @ordered |
| */ |
| protected Coding diagnosis; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ClaimDiagnosisImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirResourcePackage.eINSTANCE.getClaimDiagnosis(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public PositiveInt getSequence() { |
| if (sequence != null && sequence.eIsProxy()) { |
| InternalEObject oldSequence = (InternalEObject)sequence; |
| sequence = (PositiveInt)eResolveProxy(oldSequence); |
| if (sequence != oldSequence) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.CLAIM_DIAGNOSIS__SEQUENCE, oldSequence, sequence)); |
| } |
| } |
| return sequence; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public PositiveInt basicGetSequence() { |
| return sequence; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setSequence(PositiveInt newSequence) { |
| PositiveInt oldSequence = sequence; |
| sequence = newSequence; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.CLAIM_DIAGNOSIS__SEQUENCE, oldSequence, sequence)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Coding getDiagnosis() { |
| if (diagnosis != null && diagnosis.eIsProxy()) { |
| InternalEObject oldDiagnosis = (InternalEObject)diagnosis; |
| diagnosis = (Coding)eResolveProxy(oldDiagnosis); |
| if (diagnosis != oldDiagnosis) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.CLAIM_DIAGNOSIS__DIAGNOSIS, oldDiagnosis, diagnosis)); |
| } |
| } |
| return diagnosis; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Coding basicGetDiagnosis() { |
| return diagnosis; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDiagnosis(Coding newDiagnosis) { |
| Coding oldDiagnosis = diagnosis; |
| diagnosis = newDiagnosis; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.CLAIM_DIAGNOSIS__DIAGNOSIS, oldDiagnosis, diagnosis)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case FhirResourcePackage.CLAIM_DIAGNOSIS__SEQUENCE: |
| if (resolve) return getSequence(); |
| return basicGetSequence(); |
| case FhirResourcePackage.CLAIM_DIAGNOSIS__DIAGNOSIS: |
| if (resolve) return getDiagnosis(); |
| return basicGetDiagnosis(); |
| } |
| 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.CLAIM_DIAGNOSIS__SEQUENCE: |
| setSequence((PositiveInt)newValue); |
| return; |
| case FhirResourcePackage.CLAIM_DIAGNOSIS__DIAGNOSIS: |
| setDiagnosis((Coding)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirResourcePackage.CLAIM_DIAGNOSIS__SEQUENCE: |
| setSequence((PositiveInt)null); |
| return; |
| case FhirResourcePackage.CLAIM_DIAGNOSIS__DIAGNOSIS: |
| setDiagnosis((Coding)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirResourcePackage.CLAIM_DIAGNOSIS__SEQUENCE: |
| return sequence != null; |
| case FhirResourcePackage.CLAIM_DIAGNOSIS__DIAGNOSIS: |
| return diagnosis != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ClaimDiagnosisImpl |