| /** |
| */ |
| 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.DateTime; |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.ModuleDefinitionDateFilter; |
| import org.hl7.fhir.Period; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Module Definition Date Filter</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.ModuleDefinitionDateFilterImpl#getPath <em>Path</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ModuleDefinitionDateFilterImpl#getValueDateTime <em>Value Date Time</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ModuleDefinitionDateFilterImpl#getValuePeriod <em>Value Period</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ModuleDefinitionDateFilterImpl extends BackboneElementImpl implements ModuleDefinitionDateFilter { |
| /** |
| * The cached value of the '{@link #getPath() <em>Path</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPath() |
| * @generated |
| * @ordered |
| */ |
| protected org.hl7.fhir.String path; |
| |
| /** |
| * The cached value of the '{@link #getValueDateTime() <em>Value Date Time</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValueDateTime() |
| * @generated |
| * @ordered |
| */ |
| protected DateTime valueDateTime; |
| |
| /** |
| * The cached value of the '{@link #getValuePeriod() <em>Value Period</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValuePeriod() |
| * @generated |
| * @ordered |
| */ |
| protected Period valuePeriod; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ModuleDefinitionDateFilterImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getModuleDefinitionDateFilter(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.hl7.fhir.String getPath() { |
| return path; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetPath(org.hl7.fhir.String newPath, NotificationChain msgs) { |
| org.hl7.fhir.String oldPath = path; |
| path = newPath; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.MODULE_DEFINITION_DATE_FILTER__PATH, oldPath, newPath); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setPath(org.hl7.fhir.String newPath) { |
| if (newPath != path) { |
| NotificationChain msgs = null; |
| if (path != null) |
| msgs = ((InternalEObject)path).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.MODULE_DEFINITION_DATE_FILTER__PATH, null, msgs); |
| if (newPath != null) |
| msgs = ((InternalEObject)newPath).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.MODULE_DEFINITION_DATE_FILTER__PATH, null, msgs); |
| msgs = basicSetPath(newPath, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.MODULE_DEFINITION_DATE_FILTER__PATH, newPath, newPath)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DateTime getValueDateTime() { |
| return valueDateTime; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValueDateTime(DateTime newValueDateTime, NotificationChain msgs) { |
| DateTime oldValueDateTime = valueDateTime; |
| valueDateTime = newValueDateTime; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_DATE_TIME, oldValueDateTime, newValueDateTime); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValueDateTime(DateTime newValueDateTime) { |
| if (newValueDateTime != valueDateTime) { |
| NotificationChain msgs = null; |
| if (valueDateTime != null) |
| msgs = ((InternalEObject)valueDateTime).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_DATE_TIME, null, msgs); |
| if (newValueDateTime != null) |
| msgs = ((InternalEObject)newValueDateTime).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_DATE_TIME, null, msgs); |
| msgs = basicSetValueDateTime(newValueDateTime, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_DATE_TIME, newValueDateTime, newValueDateTime)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Period getValuePeriod() { |
| return valuePeriod; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValuePeriod(Period newValuePeriod, NotificationChain msgs) { |
| Period oldValuePeriod = valuePeriod; |
| valuePeriod = newValuePeriod; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_PERIOD, oldValuePeriod, newValuePeriod); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValuePeriod(Period newValuePeriod) { |
| if (newValuePeriod != valuePeriod) { |
| NotificationChain msgs = null; |
| if (valuePeriod != null) |
| msgs = ((InternalEObject)valuePeriod).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_PERIOD, null, msgs); |
| if (newValuePeriod != null) |
| msgs = ((InternalEObject)newValuePeriod).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_PERIOD, null, msgs); |
| msgs = basicSetValuePeriod(newValuePeriod, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_PERIOD, newValuePeriod, newValuePeriod)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__PATH: |
| return basicSetPath(null, msgs); |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_DATE_TIME: |
| return basicSetValueDateTime(null, msgs); |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_PERIOD: |
| return basicSetValuePeriod(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.MODULE_DEFINITION_DATE_FILTER__PATH: |
| return getPath(); |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_DATE_TIME: |
| return getValueDateTime(); |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_PERIOD: |
| return getValuePeriod(); |
| } |
| 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.MODULE_DEFINITION_DATE_FILTER__PATH: |
| setPath((org.hl7.fhir.String)newValue); |
| return; |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_DATE_TIME: |
| setValueDateTime((DateTime)newValue); |
| return; |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_PERIOD: |
| setValuePeriod((Period)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__PATH: |
| setPath((org.hl7.fhir.String)null); |
| return; |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_DATE_TIME: |
| setValueDateTime((DateTime)null); |
| return; |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_PERIOD: |
| setValuePeriod((Period)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__PATH: |
| return path != null; |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_DATE_TIME: |
| return valueDateTime != null; |
| case FhirPackage.MODULE_DEFINITION_DATE_FILTER__VALUE_PERIOD: |
| return valuePeriod != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ModuleDefinitionDateFilterImpl |