| /** |
| */ |
| package org.hl7.fhir.impl; |
| |
| import java.util.Collection; |
| |
| import org.eclipse.emf.common.notify.NotificationChain; |
| |
| import org.eclipse.emf.common.util.EList; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| |
| import org.hl7.fhir.ElementDefinition; |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.StructureDefinitionDifferential; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Structure Definition Differential</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.StructureDefinitionDifferentialImpl#getElement <em>Element</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class StructureDefinitionDifferentialImpl extends BackboneElementImpl implements StructureDefinitionDifferential { |
| /** |
| * The cached value of the '{@link #getElement() <em>Element</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getElement() |
| * @generated |
| * @ordered |
| */ |
| protected EList<ElementDefinition> element; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected StructureDefinitionDifferentialImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getStructureDefinitionDifferential(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<ElementDefinition> getElement() { |
| if (element == null) { |
| element = new EObjectContainmentEList<ElementDefinition>(ElementDefinition.class, this, FhirPackage.STRUCTURE_DEFINITION_DIFFERENTIAL__ELEMENT); |
| } |
| return element; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.STRUCTURE_DEFINITION_DIFFERENTIAL__ELEMENT: |
| return ((InternalEList<?>)getElement()).basicRemove(otherEnd, 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_DEFINITION_DIFFERENTIAL__ELEMENT: |
| return getElement(); |
| } |
| 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 FhirPackage.STRUCTURE_DEFINITION_DIFFERENTIAL__ELEMENT: |
| getElement().clear(); |
| getElement().addAll((Collection<? extends ElementDefinition>)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirPackage.STRUCTURE_DEFINITION_DIFFERENTIAL__ELEMENT: |
| getElement().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirPackage.STRUCTURE_DEFINITION_DIFFERENTIAL__ELEMENT: |
| return element != null && !element.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //StructureDefinitionDifferentialImpl |