| /** |
| */ |
| 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.Code; |
| import org.hl7.fhir.Coding; |
| import org.hl7.fhir.ConformanceEvent; |
| import org.hl7.fhir.ConformanceEventMode; |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.MessageSignificanceCategory; |
| import org.hl7.fhir.Reference; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Conformance Event</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.ConformanceEventImpl#getCode <em>Code</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ConformanceEventImpl#getCategory <em>Category</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ConformanceEventImpl#getMode <em>Mode</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ConformanceEventImpl#getFocus <em>Focus</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ConformanceEventImpl#getRequest <em>Request</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ConformanceEventImpl#getResponse <em>Response</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ConformanceEventImpl#getDocumentation <em>Documentation</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ConformanceEventImpl extends BackboneElementImpl implements ConformanceEvent { |
| /** |
| * The cached value of the '{@link #getCode() <em>Code</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getCode() |
| * @generated |
| * @ordered |
| */ |
| protected Coding code; |
| |
| /** |
| * The cached value of the '{@link #getCategory() <em>Category</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getCategory() |
| * @generated |
| * @ordered |
| */ |
| protected MessageSignificanceCategory category; |
| |
| /** |
| * The cached value of the '{@link #getMode() <em>Mode</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMode() |
| * @generated |
| * @ordered |
| */ |
| protected ConformanceEventMode mode; |
| |
| /** |
| * The cached value of the '{@link #getFocus() <em>Focus</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFocus() |
| * @generated |
| * @ordered |
| */ |
| protected Code focus; |
| |
| /** |
| * The cached value of the '{@link #getRequest() <em>Request</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getRequest() |
| * @generated |
| * @ordered |
| */ |
| protected Reference request; |
| |
| /** |
| * The cached value of the '{@link #getResponse() <em>Response</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getResponse() |
| * @generated |
| * @ordered |
| */ |
| protected Reference response; |
| |
| /** |
| * 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 ConformanceEventImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getConformanceEvent(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Coding getCode() { |
| return code; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetCode(Coding newCode, NotificationChain msgs) { |
| Coding oldCode = code; |
| code = newCode; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__CODE, oldCode, newCode); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setCode(Coding newCode) { |
| if (newCode != code) { |
| NotificationChain msgs = null; |
| if (code != null) |
| msgs = ((InternalEObject)code).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__CODE, null, msgs); |
| if (newCode != null) |
| msgs = ((InternalEObject)newCode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__CODE, null, msgs); |
| msgs = basicSetCode(newCode, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__CODE, newCode, newCode)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public MessageSignificanceCategory getCategory() { |
| return category; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetCategory(MessageSignificanceCategory newCategory, NotificationChain msgs) { |
| MessageSignificanceCategory oldCategory = category; |
| category = newCategory; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__CATEGORY, oldCategory, newCategory); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setCategory(MessageSignificanceCategory newCategory) { |
| if (newCategory != category) { |
| NotificationChain msgs = null; |
| if (category != null) |
| msgs = ((InternalEObject)category).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__CATEGORY, null, msgs); |
| if (newCategory != null) |
| msgs = ((InternalEObject)newCategory).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__CATEGORY, null, msgs); |
| msgs = basicSetCategory(newCategory, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__CATEGORY, newCategory, newCategory)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ConformanceEventMode getMode() { |
| return mode; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetMode(ConformanceEventMode newMode, NotificationChain msgs) { |
| ConformanceEventMode oldMode = mode; |
| mode = newMode; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__MODE, oldMode, newMode); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setMode(ConformanceEventMode newMode) { |
| if (newMode != mode) { |
| NotificationChain msgs = null; |
| if (mode != null) |
| msgs = ((InternalEObject)mode).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__MODE, null, msgs); |
| if (newMode != null) |
| msgs = ((InternalEObject)newMode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__MODE, null, msgs); |
| msgs = basicSetMode(newMode, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__MODE, newMode, newMode)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Code getFocus() { |
| return focus; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetFocus(Code newFocus, NotificationChain msgs) { |
| Code oldFocus = focus; |
| focus = newFocus; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__FOCUS, oldFocus, newFocus); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setFocus(Code newFocus) { |
| if (newFocus != focus) { |
| NotificationChain msgs = null; |
| if (focus != null) |
| msgs = ((InternalEObject)focus).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__FOCUS, null, msgs); |
| if (newFocus != null) |
| msgs = ((InternalEObject)newFocus).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__FOCUS, null, msgs); |
| msgs = basicSetFocus(newFocus, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__FOCUS, newFocus, newFocus)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Reference getRequest() { |
| return request; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetRequest(Reference newRequest, NotificationChain msgs) { |
| Reference oldRequest = request; |
| request = newRequest; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__REQUEST, oldRequest, newRequest); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setRequest(Reference newRequest) { |
| if (newRequest != request) { |
| NotificationChain msgs = null; |
| if (request != null) |
| msgs = ((InternalEObject)request).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__REQUEST, null, msgs); |
| if (newRequest != null) |
| msgs = ((InternalEObject)newRequest).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__REQUEST, null, msgs); |
| msgs = basicSetRequest(newRequest, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__REQUEST, newRequest, newRequest)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Reference getResponse() { |
| return response; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetResponse(Reference newResponse, NotificationChain msgs) { |
| Reference oldResponse = response; |
| response = newResponse; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__RESPONSE, oldResponse, newResponse); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setResponse(Reference newResponse) { |
| if (newResponse != response) { |
| NotificationChain msgs = null; |
| if (response != null) |
| msgs = ((InternalEObject)response).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__RESPONSE, null, msgs); |
| if (newResponse != null) |
| msgs = ((InternalEObject)newResponse).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__RESPONSE, null, msgs); |
| msgs = basicSetResponse(newResponse, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__RESPONSE, newResponse, newResponse)); |
| } |
| |
| /** |
| * <!-- 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_EVENT__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_EVENT__DOCUMENTATION, null, msgs); |
| if (newDocumentation != null) |
| msgs = ((InternalEObject)newDocumentation).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CONFORMANCE_EVENT__DOCUMENTATION, null, msgs); |
| msgs = basicSetDocumentation(newDocumentation, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CONFORMANCE_EVENT__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_EVENT__CODE: |
| return basicSetCode(null, msgs); |
| case FhirPackage.CONFORMANCE_EVENT__CATEGORY: |
| return basicSetCategory(null, msgs); |
| case FhirPackage.CONFORMANCE_EVENT__MODE: |
| return basicSetMode(null, msgs); |
| case FhirPackage.CONFORMANCE_EVENT__FOCUS: |
| return basicSetFocus(null, msgs); |
| case FhirPackage.CONFORMANCE_EVENT__REQUEST: |
| return basicSetRequest(null, msgs); |
| case FhirPackage.CONFORMANCE_EVENT__RESPONSE: |
| return basicSetResponse(null, msgs); |
| case FhirPackage.CONFORMANCE_EVENT__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_EVENT__CODE: |
| return getCode(); |
| case FhirPackage.CONFORMANCE_EVENT__CATEGORY: |
| return getCategory(); |
| case FhirPackage.CONFORMANCE_EVENT__MODE: |
| return getMode(); |
| case FhirPackage.CONFORMANCE_EVENT__FOCUS: |
| return getFocus(); |
| case FhirPackage.CONFORMANCE_EVENT__REQUEST: |
| return getRequest(); |
| case FhirPackage.CONFORMANCE_EVENT__RESPONSE: |
| return getResponse(); |
| case FhirPackage.CONFORMANCE_EVENT__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_EVENT__CODE: |
| setCode((Coding)newValue); |
| return; |
| case FhirPackage.CONFORMANCE_EVENT__CATEGORY: |
| setCategory((MessageSignificanceCategory)newValue); |
| return; |
| case FhirPackage.CONFORMANCE_EVENT__MODE: |
| setMode((ConformanceEventMode)newValue); |
| return; |
| case FhirPackage.CONFORMANCE_EVENT__FOCUS: |
| setFocus((Code)newValue); |
| return; |
| case FhirPackage.CONFORMANCE_EVENT__REQUEST: |
| setRequest((Reference)newValue); |
| return; |
| case FhirPackage.CONFORMANCE_EVENT__RESPONSE: |
| setResponse((Reference)newValue); |
| return; |
| case FhirPackage.CONFORMANCE_EVENT__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_EVENT__CODE: |
| setCode((Coding)null); |
| return; |
| case FhirPackage.CONFORMANCE_EVENT__CATEGORY: |
| setCategory((MessageSignificanceCategory)null); |
| return; |
| case FhirPackage.CONFORMANCE_EVENT__MODE: |
| setMode((ConformanceEventMode)null); |
| return; |
| case FhirPackage.CONFORMANCE_EVENT__FOCUS: |
| setFocus((Code)null); |
| return; |
| case FhirPackage.CONFORMANCE_EVENT__REQUEST: |
| setRequest((Reference)null); |
| return; |
| case FhirPackage.CONFORMANCE_EVENT__RESPONSE: |
| setResponse((Reference)null); |
| return; |
| case FhirPackage.CONFORMANCE_EVENT__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_EVENT__CODE: |
| return code != null; |
| case FhirPackage.CONFORMANCE_EVENT__CATEGORY: |
| return category != null; |
| case FhirPackage.CONFORMANCE_EVENT__MODE: |
| return mode != null; |
| case FhirPackage.CONFORMANCE_EVENT__FOCUS: |
| return focus != null; |
| case FhirPackage.CONFORMANCE_EVENT__REQUEST: |
| return request != null; |
| case FhirPackage.CONFORMANCE_EVENT__RESPONSE: |
| return response != null; |
| case FhirPackage.CONFORMANCE_EVENT__DOCUMENTATION: |
| return documentation != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ConformanceEventImpl |