blob: e3cbeb41ddae387cd3bfc05c9ef77339ab0ae1f4 [file] [log] [blame]
/*******************************************************************************
* 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 java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.mdht.uml.fhir.core.datatype.Base;
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.FhirResourcePackage;
import org.eclipse.mdht.uml.fhir.core.resource.ModuleDefinitionDataCodeFilter;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Module Definition Data Code Filter</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ModuleDefinitionDataCodeFilterImpl#getPath <em>Path</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ModuleDefinitionDataCodeFilterImpl#getValueSetx <em>Value Setx</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ModuleDefinitionDataCodeFilterImpl#getCodeableConcepts <em>Codeable Concept</em>}</li>
* </ul>
*
* @generated
*/
public class ModuleDefinitionDataCodeFilterImpl extends BackboneElementImpl implements ModuleDefinitionDataCodeFilter {
/**
* The cached value of the '{@link #getPath() <em>Path</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPath()
* @generated
* @ordered
*/
protected org.eclipse.mdht.uml.fhir.core.datatype.String path;
/**
* The cached value of the '{@link #getValueSetx() <em>Value Setx</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValueSetx()
* @generated
* @ordered
*/
protected Base valueSetx;
/**
* The cached value of the '{@link #getCodeableConcepts() <em>Codeable Concept</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCodeableConcepts()
* @generated
* @ordered
*/
protected EList<CodeableConcept> codeableConcepts;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ModuleDefinitionDataCodeFilterImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirResourcePackage.eINSTANCE.getModuleDefinitionDataCodeFilter();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String getPath() {
if (path != null && path.eIsProxy()) {
InternalEObject oldPath = (InternalEObject)path;
path = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldPath);
if (path != oldPath) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__PATH, oldPath, path));
}
}
return path;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetPath() {
return path;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPath(org.eclipse.mdht.uml.fhir.core.datatype.String newPath) {
org.eclipse.mdht.uml.fhir.core.datatype.String oldPath = path;
path = newPath;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__PATH, oldPath, path));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Base getValueSetx() {
if (valueSetx != null && valueSetx.eIsProxy()) {
InternalEObject oldValueSetx = (InternalEObject)valueSetx;
valueSetx = (Base)eResolveProxy(oldValueSetx);
if (valueSetx != oldValueSetx) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__VALUE_SETX, oldValueSetx, valueSetx));
}
}
return valueSetx;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Base basicGetValueSetx() {
return valueSetx;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValueSetx(Base newValueSetx) {
Base oldValueSetx = valueSetx;
valueSetx = newValueSetx;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__VALUE_SETX, oldValueSetx, valueSetx));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<CodeableConcept> getCodeableConcepts() {
if (codeableConcepts == null) {
codeableConcepts = new EObjectResolvingEList<CodeableConcept>(CodeableConcept.class, this, FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__CODEABLE_CONCEPT);
}
return codeableConcepts;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__PATH:
if (resolve) return getPath();
return basicGetPath();
case FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__VALUE_SETX:
if (resolve) return getValueSetx();
return basicGetValueSetx();
case FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__CODEABLE_CONCEPT:
return getCodeableConcepts();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__PATH:
setPath((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue);
return;
case FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__VALUE_SETX:
setValueSetx((Base)newValue);
return;
case FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__CODEABLE_CONCEPT:
getCodeableConcepts().clear();
getCodeableConcepts().addAll((Collection<? extends CodeableConcept>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__PATH:
setPath((org.eclipse.mdht.uml.fhir.core.datatype.String)null);
return;
case FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__VALUE_SETX:
setValueSetx((Base)null);
return;
case FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__CODEABLE_CONCEPT:
getCodeableConcepts().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__PATH:
return path != null;
case FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__VALUE_SETX:
return valueSetx != null;
case FhirResourcePackage.MODULE_DEFINITION_DATA_CODE_FILTER__CODEABLE_CONCEPT:
return codeableConcepts != null && !codeableConcepts.isEmpty();
}
return super.eIsSet(featureID);
}
} //ModuleDefinitionDataCodeFilterImpl