blob: a0609bd8af93bf16133816b46200c18e3b15214a [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.Canonical;
import org.hl7.fhir.FhirPackage;
import org.hl7.fhir.StructureMapModelMode;
import org.hl7.fhir.StructureMapStructure;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Structure Map Structure</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.hl7.fhir.impl.StructureMapStructureImpl#getUrl <em>Url</em>}</li>
* <li>{@link org.hl7.fhir.impl.StructureMapStructureImpl#getMode <em>Mode</em>}</li>
* <li>{@link org.hl7.fhir.impl.StructureMapStructureImpl#getAlias <em>Alias</em>}</li>
* <li>{@link org.hl7.fhir.impl.StructureMapStructureImpl#getDocumentation <em>Documentation</em>}</li>
* </ul>
*
* @generated
*/
public class StructureMapStructureImpl extends BackboneElementImpl implements StructureMapStructure {
/**
* The cached value of the '{@link #getUrl() <em>Url</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUrl()
* @generated
* @ordered
*/
protected Canonical url;
/**
* The cached value of the '{@link #getMode() <em>Mode</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMode()
* @generated
* @ordered
*/
protected StructureMapModelMode mode;
/**
* The cached value of the '{@link #getAlias() <em>Alias</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAlias()
* @generated
* @ordered
*/
protected org.hl7.fhir.String alias;
/**
* 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 StructureMapStructureImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirPackage.eINSTANCE.getStructureMapStructure();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Canonical getUrl() {
return url;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetUrl(Canonical newUrl, NotificationChain msgs) {
Canonical oldUrl = url;
url = newUrl;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_STRUCTURE__URL, oldUrl, newUrl);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setUrl(Canonical newUrl) {
if (newUrl != url) {
NotificationChain msgs = null;
if (url != null)
msgs = ((InternalEObject)url).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_STRUCTURE__URL, null, msgs);
if (newUrl != null)
msgs = ((InternalEObject)newUrl).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_STRUCTURE__URL, null, msgs);
msgs = basicSetUrl(newUrl, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_STRUCTURE__URL, newUrl, newUrl));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public StructureMapModelMode getMode() {
return mode;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetMode(StructureMapModelMode newMode, NotificationChain msgs) {
StructureMapModelMode oldMode = mode;
mode = newMode;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_STRUCTURE__MODE, oldMode, newMode);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMode(StructureMapModelMode newMode) {
if (newMode != mode) {
NotificationChain msgs = null;
if (mode != null)
msgs = ((InternalEObject)mode).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_STRUCTURE__MODE, null, msgs);
if (newMode != null)
msgs = ((InternalEObject)newMode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_STRUCTURE__MODE, null, msgs);
msgs = basicSetMode(newMode, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_STRUCTURE__MODE, newMode, newMode));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.hl7.fhir.String getAlias() {
return alias;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetAlias(org.hl7.fhir.String newAlias, NotificationChain msgs) {
org.hl7.fhir.String oldAlias = alias;
alias = newAlias;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_STRUCTURE__ALIAS, oldAlias, newAlias);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setAlias(org.hl7.fhir.String newAlias) {
if (newAlias != alias) {
NotificationChain msgs = null;
if (alias != null)
msgs = ((InternalEObject)alias).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_STRUCTURE__ALIAS, null, msgs);
if (newAlias != null)
msgs = ((InternalEObject)newAlias).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_STRUCTURE__ALIAS, null, msgs);
msgs = basicSetAlias(newAlias, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_STRUCTURE__ALIAS, newAlias, newAlias));
}
/**
* <!-- 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.STRUCTURE_MAP_STRUCTURE__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.STRUCTURE_MAP_STRUCTURE__DOCUMENTATION, null, msgs);
if (newDocumentation != null)
msgs = ((InternalEObject)newDocumentation).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.STRUCTURE_MAP_STRUCTURE__DOCUMENTATION, null, msgs);
msgs = basicSetDocumentation(newDocumentation, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.STRUCTURE_MAP_STRUCTURE__DOCUMENTATION, newDocumentation, newDocumentation));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirPackage.STRUCTURE_MAP_STRUCTURE__URL:
return basicSetUrl(null, msgs);
case FhirPackage.STRUCTURE_MAP_STRUCTURE__MODE:
return basicSetMode(null, msgs);
case FhirPackage.STRUCTURE_MAP_STRUCTURE__ALIAS:
return basicSetAlias(null, msgs);
case FhirPackage.STRUCTURE_MAP_STRUCTURE__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.STRUCTURE_MAP_STRUCTURE__URL:
return getUrl();
case FhirPackage.STRUCTURE_MAP_STRUCTURE__MODE:
return getMode();
case FhirPackage.STRUCTURE_MAP_STRUCTURE__ALIAS:
return getAlias();
case FhirPackage.STRUCTURE_MAP_STRUCTURE__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.STRUCTURE_MAP_STRUCTURE__URL:
setUrl((Canonical)newValue);
return;
case FhirPackage.STRUCTURE_MAP_STRUCTURE__MODE:
setMode((StructureMapModelMode)newValue);
return;
case FhirPackage.STRUCTURE_MAP_STRUCTURE__ALIAS:
setAlias((org.hl7.fhir.String)newValue);
return;
case FhirPackage.STRUCTURE_MAP_STRUCTURE__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.STRUCTURE_MAP_STRUCTURE__URL:
setUrl((Canonical)null);
return;
case FhirPackage.STRUCTURE_MAP_STRUCTURE__MODE:
setMode((StructureMapModelMode)null);
return;
case FhirPackage.STRUCTURE_MAP_STRUCTURE__ALIAS:
setAlias((org.hl7.fhir.String)null);
return;
case FhirPackage.STRUCTURE_MAP_STRUCTURE__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.STRUCTURE_MAP_STRUCTURE__URL:
return url != null;
case FhirPackage.STRUCTURE_MAP_STRUCTURE__MODE:
return mode != null;
case FhirPackage.STRUCTURE_MAP_STRUCTURE__ALIAS:
return alias != null;
case FhirPackage.STRUCTURE_MAP_STRUCTURE__DOCUMENTATION:
return documentation != null;
}
return super.eIsSet(featureID);
}
} //StructureMapStructureImpl