blob: e7bf2286f0c90589ecfa578fe295c2ce034166b2 [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.Decimal;
import org.hl7.fhir.FhirPackage;
import org.hl7.fhir.Id;
import org.hl7.fhir.StructureMapParameter;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Structure Map Parameter</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.hl7.fhir.impl.StructureMapParameterImpl#getValueId <em>Value Id</em>}</li>
* <li>{@link org.hl7.fhir.impl.StructureMapParameterImpl#getValueString <em>Value String</em>}</li>
* <li>{@link org.hl7.fhir.impl.StructureMapParameterImpl#getValueBoolean <em>Value Boolean</em>}</li>
* <li>{@link org.hl7.fhir.impl.StructureMapParameterImpl#getValueInteger <em>Value Integer</em>}</li>
* <li>{@link org.hl7.fhir.impl.StructureMapParameterImpl#getValueDecimal <em>Value Decimal</em>}</li>
* </ul>
*
* @generated
*/
public class StructureMapParameterImpl extends BackboneElementImpl implements StructureMapParameter {
/**
* The cached value of the '{@link #getValueId() <em>Value Id</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValueId()
* @generated
* @ordered
*/
protected Id valueId;
/**
* The cached value of the '{@link #getValueString() <em>Value String</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValueString()
* @generated
* @ordered
*/
protected org.hl7.fhir.String valueString;
/**
* The cached value of the '{@link #getValueBoolean() <em>Value Boolean</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValueBoolean()
* @generated
* @ordered
*/
protected org.hl7.fhir.Boolean valueBoolean;
/**
* The cached value of the '{@link #getValueInteger() <em>Value Integer</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValueInteger()
* @generated
* @ordered
*/
protected org.hl7.fhir.Integer valueInteger;
/**
* The cached value of the '{@link #getValueDecimal() <em>Value Decimal</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValueDecimal()
* @generated
* @ordered
*/
protected Decimal valueDecimal;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected StructureMapParameterImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirPackage.eINSTANCE.getStructureMapParameter();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Id getValueId() {
return valueId;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetValueId(Id newValueId, NotificationChain msgs) {
Id oldValueId = valueId;
valueId = newValueId;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_ID, oldValueId, newValueId);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValueId(Id newValueId) {
if (newValueId != valueId) {
NotificationChain msgs = null;
if (valueId != null)
msgs = ((InternalEObject)valueId).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_ID, null, msgs);
if (newValueId != null)
msgs = ((InternalEObject)newValueId).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_ID, null, msgs);
msgs = basicSetValueId(newValueId, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_ID, newValueId, newValueId));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.hl7.fhir.String getValueString() {
return valueString;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetValueString(org.hl7.fhir.String newValueString, NotificationChain msgs) {
org.hl7.fhir.String oldValueString = valueString;
valueString = newValueString;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_STRING, oldValueString, newValueString);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValueString(org.hl7.fhir.String newValueString) {
if (newValueString != valueString) {
NotificationChain msgs = null;
if (valueString != null)
msgs = ((InternalEObject)valueString).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_STRING, null, msgs);
if (newValueString != null)
msgs = ((InternalEObject)newValueString).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_STRING, null, msgs);
msgs = basicSetValueString(newValueString, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_STRING, newValueString, newValueString));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.hl7.fhir.Boolean getValueBoolean() {
return valueBoolean;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetValueBoolean(org.hl7.fhir.Boolean newValueBoolean, NotificationChain msgs) {
org.hl7.fhir.Boolean oldValueBoolean = valueBoolean;
valueBoolean = newValueBoolean;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_BOOLEAN, oldValueBoolean, newValueBoolean);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValueBoolean(org.hl7.fhir.Boolean newValueBoolean) {
if (newValueBoolean != valueBoolean) {
NotificationChain msgs = null;
if (valueBoolean != null)
msgs = ((InternalEObject)valueBoolean).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_BOOLEAN, null, msgs);
if (newValueBoolean != null)
msgs = ((InternalEObject)newValueBoolean).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_BOOLEAN, null, msgs);
msgs = basicSetValueBoolean(newValueBoolean, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_BOOLEAN, newValueBoolean, newValueBoolean));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.hl7.fhir.Integer getValueInteger() {
return valueInteger;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetValueInteger(org.hl7.fhir.Integer newValueInteger, NotificationChain msgs) {
org.hl7.fhir.Integer oldValueInteger = valueInteger;
valueInteger = newValueInteger;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_INTEGER, oldValueInteger, newValueInteger);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValueInteger(org.hl7.fhir.Integer newValueInteger) {
if (newValueInteger != valueInteger) {
NotificationChain msgs = null;
if (valueInteger != null)
msgs = ((InternalEObject)valueInteger).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_INTEGER, null, msgs);
if (newValueInteger != null)
msgs = ((InternalEObject)newValueInteger).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_INTEGER, null, msgs);
msgs = basicSetValueInteger(newValueInteger, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_INTEGER, newValueInteger, newValueInteger));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Decimal getValueDecimal() {
return valueDecimal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetValueDecimal(Decimal newValueDecimal, NotificationChain msgs) {
Decimal oldValueDecimal = valueDecimal;
valueDecimal = newValueDecimal;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_DECIMAL, oldValueDecimal, newValueDecimal);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValueDecimal(Decimal newValueDecimal) {
if (newValueDecimal != valueDecimal) {
NotificationChain msgs = null;
if (valueDecimal != null)
msgs = ((InternalEObject)valueDecimal).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_DECIMAL, null, msgs);
if (newValueDecimal != null)
msgs = ((InternalEObject)newValueDecimal).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_DECIMAL, null, msgs);
msgs = basicSetValueDecimal(newValueDecimal, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_DECIMAL, newValueDecimal, newValueDecimal));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_ID:
return basicSetValueId(null, msgs);
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_STRING:
return basicSetValueString(null, msgs);
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_BOOLEAN:
return basicSetValueBoolean(null, msgs);
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_INTEGER:
return basicSetValueInteger(null, msgs);
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_DECIMAL:
return basicSetValueDecimal(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.STRUCTURE_MAP_PARAMETER__VALUE_ID:
return getValueId();
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_STRING:
return getValueString();
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_BOOLEAN:
return getValueBoolean();
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_INTEGER:
return getValueInteger();
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_DECIMAL:
return getValueDecimal();
}
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.STRUCTURE_MAP_PARAMETER__VALUE_ID:
setValueId((Id)newValue);
return;
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_STRING:
setValueString((org.hl7.fhir.String)newValue);
return;
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_BOOLEAN:
setValueBoolean((org.hl7.fhir.Boolean)newValue);
return;
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_INTEGER:
setValueInteger((org.hl7.fhir.Integer)newValue);
return;
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_DECIMAL:
setValueDecimal((Decimal)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_ID:
setValueId((Id)null);
return;
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_STRING:
setValueString((org.hl7.fhir.String)null);
return;
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_BOOLEAN:
setValueBoolean((org.hl7.fhir.Boolean)null);
return;
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_INTEGER:
setValueInteger((org.hl7.fhir.Integer)null);
return;
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_DECIMAL:
setValueDecimal((Decimal)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_ID:
return valueId != null;
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_STRING:
return valueString != null;
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_BOOLEAN:
return valueBoolean != null;
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_INTEGER:
return valueInteger != null;
case FhirPackage.STRUCTURE_MAP_PARAMETER__VALUE_DECIMAL:
return valueDecimal != null;
}
return super.eIsSet(featureID);
}
} //StructureMapParameterImpl