| /** |
| */ |
| package org.hl7.fhir.impl; |
| |
| import java.util.Collection; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| 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.impl.ENotificationImpl; |
| |
| import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| |
| import org.hl7.fhir.CodeableConcept; |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.Identifier; |
| import org.hl7.fhir.Period; |
| import org.hl7.fhir.PractitionerQualification; |
| import org.hl7.fhir.Reference; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Practitioner Qualification</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.PractitionerQualificationImpl#getIdentifier <em>Identifier</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.PractitionerQualificationImpl#getCode <em>Code</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.PractitionerQualificationImpl#getPeriod <em>Period</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.PractitionerQualificationImpl#getIssuer <em>Issuer</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class PractitionerQualificationImpl extends BackboneElementImpl implements PractitionerQualification { |
| /** |
| * The cached value of the '{@link #getIdentifier() <em>Identifier</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getIdentifier() |
| * @generated |
| * @ordered |
| */ |
| protected EList<Identifier> identifier; |
| |
| /** |
| * The cached value of the '{@link #getCode() <em>Code</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getCode() |
| * @generated |
| * @ordered |
| */ |
| protected CodeableConcept code; |
| |
| /** |
| * The cached value of the '{@link #getPeriod() <em>Period</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPeriod() |
| * @generated |
| * @ordered |
| */ |
| protected Period period; |
| |
| /** |
| * The cached value of the '{@link #getIssuer() <em>Issuer</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getIssuer() |
| * @generated |
| * @ordered |
| */ |
| protected Reference issuer; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected PractitionerQualificationImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getPractitionerQualification(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<Identifier> getIdentifier() { |
| if (identifier == null) { |
| identifier = new EObjectContainmentEList<Identifier>(Identifier.class, this, FhirPackage.PRACTITIONER_QUALIFICATION__IDENTIFIER); |
| } |
| return identifier; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CodeableConcept getCode() { |
| return code; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetCode(CodeableConcept newCode, NotificationChain msgs) { |
| CodeableConcept oldCode = code; |
| code = newCode; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.PRACTITIONER_QUALIFICATION__CODE, oldCode, newCode); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setCode(CodeableConcept newCode) { |
| if (newCode != code) { |
| NotificationChain msgs = null; |
| if (code != null) |
| msgs = ((InternalEObject)code).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.PRACTITIONER_QUALIFICATION__CODE, null, msgs); |
| if (newCode != null) |
| msgs = ((InternalEObject)newCode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.PRACTITIONER_QUALIFICATION__CODE, null, msgs); |
| msgs = basicSetCode(newCode, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.PRACTITIONER_QUALIFICATION__CODE, newCode, newCode)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Period getPeriod() { |
| return period; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetPeriod(Period newPeriod, NotificationChain msgs) { |
| Period oldPeriod = period; |
| period = newPeriod; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.PRACTITIONER_QUALIFICATION__PERIOD, oldPeriod, newPeriod); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setPeriod(Period newPeriod) { |
| if (newPeriod != period) { |
| NotificationChain msgs = null; |
| if (period != null) |
| msgs = ((InternalEObject)period).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.PRACTITIONER_QUALIFICATION__PERIOD, null, msgs); |
| if (newPeriod != null) |
| msgs = ((InternalEObject)newPeriod).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.PRACTITIONER_QUALIFICATION__PERIOD, null, msgs); |
| msgs = basicSetPeriod(newPeriod, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.PRACTITIONER_QUALIFICATION__PERIOD, newPeriod, newPeriod)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Reference getIssuer() { |
| return issuer; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetIssuer(Reference newIssuer, NotificationChain msgs) { |
| Reference oldIssuer = issuer; |
| issuer = newIssuer; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.PRACTITIONER_QUALIFICATION__ISSUER, oldIssuer, newIssuer); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setIssuer(Reference newIssuer) { |
| if (newIssuer != issuer) { |
| NotificationChain msgs = null; |
| if (issuer != null) |
| msgs = ((InternalEObject)issuer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.PRACTITIONER_QUALIFICATION__ISSUER, null, msgs); |
| if (newIssuer != null) |
| msgs = ((InternalEObject)newIssuer).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.PRACTITIONER_QUALIFICATION__ISSUER, null, msgs); |
| msgs = basicSetIssuer(newIssuer, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.PRACTITIONER_QUALIFICATION__ISSUER, newIssuer, newIssuer)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.PRACTITIONER_QUALIFICATION__IDENTIFIER: |
| return ((InternalEList<?>)getIdentifier()).basicRemove(otherEnd, msgs); |
| case FhirPackage.PRACTITIONER_QUALIFICATION__CODE: |
| return basicSetCode(null, msgs); |
| case FhirPackage.PRACTITIONER_QUALIFICATION__PERIOD: |
| return basicSetPeriod(null, msgs); |
| case FhirPackage.PRACTITIONER_QUALIFICATION__ISSUER: |
| return basicSetIssuer(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.PRACTITIONER_QUALIFICATION__IDENTIFIER: |
| return getIdentifier(); |
| case FhirPackage.PRACTITIONER_QUALIFICATION__CODE: |
| return getCode(); |
| case FhirPackage.PRACTITIONER_QUALIFICATION__PERIOD: |
| return getPeriod(); |
| case FhirPackage.PRACTITIONER_QUALIFICATION__ISSUER: |
| return getIssuer(); |
| } |
| 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.PRACTITIONER_QUALIFICATION__IDENTIFIER: |
| getIdentifier().clear(); |
| getIdentifier().addAll((Collection<? extends Identifier>)newValue); |
| return; |
| case FhirPackage.PRACTITIONER_QUALIFICATION__CODE: |
| setCode((CodeableConcept)newValue); |
| return; |
| case FhirPackage.PRACTITIONER_QUALIFICATION__PERIOD: |
| setPeriod((Period)newValue); |
| return; |
| case FhirPackage.PRACTITIONER_QUALIFICATION__ISSUER: |
| setIssuer((Reference)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirPackage.PRACTITIONER_QUALIFICATION__IDENTIFIER: |
| getIdentifier().clear(); |
| return; |
| case FhirPackage.PRACTITIONER_QUALIFICATION__CODE: |
| setCode((CodeableConcept)null); |
| return; |
| case FhirPackage.PRACTITIONER_QUALIFICATION__PERIOD: |
| setPeriod((Period)null); |
| return; |
| case FhirPackage.PRACTITIONER_QUALIFICATION__ISSUER: |
| setIssuer((Reference)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirPackage.PRACTITIONER_QUALIFICATION__IDENTIFIER: |
| return identifier != null && !identifier.isEmpty(); |
| case FhirPackage.PRACTITIONER_QUALIFICATION__CODE: |
| return code != null; |
| case FhirPackage.PRACTITIONER_QUALIFICATION__PERIOD: |
| return period != null; |
| case FhirPackage.PRACTITIONER_QUALIFICATION__ISSUER: |
| return issuer != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //PractitionerQualificationImpl |