blob: 12b4134beb12a443b994e1a8b3e53ce217eacb6d [file] [log] [blame]
/**
*/
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.ConformanceInteraction;
import org.hl7.fhir.FhirPackage;
import org.hl7.fhir.TypeRestfulInteraction;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Conformance Interaction</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.hl7.fhir.impl.ConformanceInteractionImpl#getCode <em>Code</em>}</li>
* <li>{@link org.hl7.fhir.impl.ConformanceInteractionImpl#getDocumentation <em>Documentation</em>}</li>
* </ul>
*
* @generated
*/
public class ConformanceInteractionImpl extends BackboneElementImpl implements ConformanceInteraction {
/**
* The cached value of the '{@link #getCode() <em>Code</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCode()
* @generated
* @ordered
*/
protected TypeRestfulInteraction code;
/**
* The cached value of the '{@link #getDocumentation() <em>Documentation</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDocumentation()
* @generated
* @ordered
*/
protected org.hl7.fhir.String documentation;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ConformanceInteractionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirPackage.eINSTANCE.getConformanceInteraction();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TypeRestfulInteraction getCode() {
return code;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetCode(TypeRestfulInteraction newCode, NotificationChain msgs) {
TypeRestfulInteraction oldCode = code;
code = newCode;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_INTERACTION__CODE, oldCode, newCode);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCode(TypeRestfulInteraction newCode) {
if (newCode != code) {
NotificationChain msgs = null;
if (code != null)
msgs = ((InternalEObject)code).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_INTERACTION__CODE, null, msgs);
if (newCode != null)
msgs = ((InternalEObject)newCode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_INTERACTION__CODE, null, msgs);
msgs = basicSetCode(newCode, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_INTERACTION__CODE, newCode, newCode));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.hl7.fhir.String getDocumentation() {
return documentation;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetDocumentation(org.hl7.fhir.String newDocumentation, NotificationChain msgs) {
org.hl7.fhir.String oldDocumentation = documentation;
documentation = newDocumentation;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_INTERACTION__DOCUMENTATION, oldDocumentation, newDocumentation);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDocumentation(org.hl7.fhir.String newDocumentation) {
if (newDocumentation != documentation) {
NotificationChain msgs = null;
if (documentation != null)
msgs = ((InternalEObject)documentation).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_INTERACTION__DOCUMENTATION, null, msgs);
if (newDocumentation != null)
msgs = ((InternalEObject)newDocumentation).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_INTERACTION__DOCUMENTATION, null, msgs);
msgs = basicSetDocumentation(newDocumentation, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_INTERACTION__DOCUMENTATION, newDocumentation, newDocumentation));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirPackage.CONFORMANCE_INTERACTION__CODE:
return basicSetCode(null, msgs);
case FhirPackage.CONFORMANCE_INTERACTION__DOCUMENTATION:
return basicSetDocumentation(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.CONFORMANCE_INTERACTION__CODE:
return getCode();
case FhirPackage.CONFORMANCE_INTERACTION__DOCUMENTATION:
return getDocumentation();
}
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.CONFORMANCE_INTERACTION__CODE:
setCode((TypeRestfulInteraction)newValue);
return;
case FhirPackage.CONFORMANCE_INTERACTION__DOCUMENTATION:
setDocumentation((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.CONFORMANCE_INTERACTION__CODE:
setCode((TypeRestfulInteraction)null);
return;
case FhirPackage.CONFORMANCE_INTERACTION__DOCUMENTATION:
setDocumentation((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.CONFORMANCE_INTERACTION__CODE:
return code != null;
case FhirPackage.CONFORMANCE_INTERACTION__DOCUMENTATION:
return documentation != null;
}
return super.eIsSet(featureID);
}
} //ConformanceInteractionImpl