blob: 7d9d60f8b92300e3c77aee89db13e361584fe39a [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 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.Uri;
import org.eclipse.mdht.uml.fhir.core.datatype.impl.BackboneElementImpl;
import org.eclipse.mdht.uml.fhir.core.resource.ExpansionProfileCodeSystemCodeSystemIncludeCodeSystemIncludeCodeSystem;
import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Expansion Profile Code System Code System Include Code System Include Code System</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ExpansionProfileCodeSystemCodeSystemIncludeCodeSystemIncludeCodeSystemImpl#getSystem <em>System</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ExpansionProfileCodeSystemCodeSystemIncludeCodeSystemIncludeCodeSystemImpl#getVersion <em>Version</em>}</li>
* </ul>
*
* @generated
*/
public class ExpansionProfileCodeSystemCodeSystemIncludeCodeSystemIncludeCodeSystemImpl extends BackboneElementImpl implements ExpansionProfileCodeSystemCodeSystemIncludeCodeSystemIncludeCodeSystem {
/**
* The cached value of the '{@link #getSystem() <em>System</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSystem()
* @generated
* @ordered
*/
protected Uri system;
/**
* The cached value of the '{@link #getVersion() <em>Version</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getVersion()
* @generated
* @ordered
*/
protected org.eclipse.mdht.uml.fhir.core.datatype.String version;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ExpansionProfileCodeSystemCodeSystemIncludeCodeSystemIncludeCodeSystemImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirResourcePackage.eINSTANCE.getExpansionProfileCodeSystemCodeSystemIncludeCodeSystemIncludeCodeSystem();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Uri getSystem() {
if (system != null && system.eIsProxy()) {
InternalEObject oldSystem = (InternalEObject)system;
system = (Uri)eResolveProxy(oldSystem);
if (system != oldSystem) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.EXPANSION_PROFILE_CODE_SYSTEM_CODE_SYSTEM_INCLUDE_CODE_SYSTEM_INCLUDE_CODE_SYSTEM__SYSTEM, oldSystem, system));
}
}
return system;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Uri basicGetSystem() {
return system;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSystem(Uri newSystem) {
Uri oldSystem = system;
system = newSystem;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.EXPANSION_PROFILE_CODE_SYSTEM_CODE_SYSTEM_INCLUDE_CODE_SYSTEM_INCLUDE_CODE_SYSTEM__SYSTEM, oldSystem, system));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String getVersion() {
if (version != null && version.eIsProxy()) {
InternalEObject oldVersion = (InternalEObject)version;
version = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldVersion);
if (version != oldVersion) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.EXPANSION_PROFILE_CODE_SYSTEM_CODE_SYSTEM_INCLUDE_CODE_SYSTEM_INCLUDE_CODE_SYSTEM__VERSION, oldVersion, version));
}
}
return version;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetVersion() {
return version;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setVersion(org.eclipse.mdht.uml.fhir.core.datatype.String newVersion) {
org.eclipse.mdht.uml.fhir.core.datatype.String oldVersion = version;
version = newVersion;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.EXPANSION_PROFILE_CODE_SYSTEM_CODE_SYSTEM_INCLUDE_CODE_SYSTEM_INCLUDE_CODE_SYSTEM__VERSION, oldVersion, version));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FhirResourcePackage.EXPANSION_PROFILE_CODE_SYSTEM_CODE_SYSTEM_INCLUDE_CODE_SYSTEM_INCLUDE_CODE_SYSTEM__SYSTEM:
if (resolve) return getSystem();
return basicGetSystem();
case FhirResourcePackage.EXPANSION_PROFILE_CODE_SYSTEM_CODE_SYSTEM_INCLUDE_CODE_SYSTEM_INCLUDE_CODE_SYSTEM__VERSION:
if (resolve) return getVersion();
return basicGetVersion();
}
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.EXPANSION_PROFILE_CODE_SYSTEM_CODE_SYSTEM_INCLUDE_CODE_SYSTEM_INCLUDE_CODE_SYSTEM__SYSTEM:
setSystem((Uri)newValue);
return;
case FhirResourcePackage.EXPANSION_PROFILE_CODE_SYSTEM_CODE_SYSTEM_INCLUDE_CODE_SYSTEM_INCLUDE_CODE_SYSTEM__VERSION:
setVersion((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.EXPANSION_PROFILE_CODE_SYSTEM_CODE_SYSTEM_INCLUDE_CODE_SYSTEM_INCLUDE_CODE_SYSTEM__SYSTEM:
setSystem((Uri)null);
return;
case FhirResourcePackage.EXPANSION_PROFILE_CODE_SYSTEM_CODE_SYSTEM_INCLUDE_CODE_SYSTEM_INCLUDE_CODE_SYSTEM__VERSION:
setVersion((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.EXPANSION_PROFILE_CODE_SYSTEM_CODE_SYSTEM_INCLUDE_CODE_SYSTEM_INCLUDE_CODE_SYSTEM__SYSTEM:
return system != null;
case FhirResourcePackage.EXPANSION_PROFILE_CODE_SYSTEM_CODE_SYSTEM_INCLUDE_CODE_SYSTEM_INCLUDE_CODE_SYSTEM__VERSION:
return version != null;
}
return super.eIsSet(featureID);
}
} //ExpansionProfileCodeSystemCodeSystemIncludeCodeSystemIncludeCodeSystemImpl