| /******************************************************************************* |
| * Copyright (c) 2016 David Carlson and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * David Carlson (Clinical Cloud Solutions, LLC) - initial API and implementation |
| *******************************************************************************/ |
| /** |
| */ |
| package org.eclipse.mdht.uml.fhir.core.resource.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.mdht.uml.fhir.core.datatype.Coding; |
| |
| import org.eclipse.mdht.uml.fhir.core.datatype.impl.BackboneElementImpl; |
| |
| import org.eclipse.mdht.uml.fhir.core.resource.ContractSignatory; |
| import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage; |
| import org.eclipse.mdht.uml.fhir.core.resource.Resource; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Contract Signatory</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ContractSignatoryImpl#getType <em>Type</em>}</li> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ContractSignatoryImpl#getParty <em>Party</em>}</li> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ContractSignatoryImpl#getSignature <em>Signature</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ContractSignatoryImpl extends BackboneElementImpl implements ContractSignatory { |
| /** |
| * The cached value of the '{@link #getType() <em>Type</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getType() |
| * @generated |
| * @ordered |
| */ |
| protected Coding type; |
| |
| /** |
| * The cached value of the '{@link #getParty() <em>Party</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getParty() |
| * @generated |
| * @ordered |
| */ |
| protected Resource party; |
| |
| /** |
| * The cached value of the '{@link #getSignature() <em>Signature</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getSignature() |
| * @generated |
| * @ordered |
| */ |
| protected org.eclipse.mdht.uml.fhir.core.datatype.String signature; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ContractSignatoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirResourcePackage.eINSTANCE.getContractSignatory(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Coding getType() { |
| if (type != null && type.eIsProxy()) { |
| InternalEObject oldType = (InternalEObject)type; |
| type = (Coding)eResolveProxy(oldType); |
| if (type != oldType) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.CONTRACT_SIGNATORY__TYPE, oldType, type)); |
| } |
| } |
| return type; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Coding basicGetType() { |
| return type; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setType(Coding newType) { |
| Coding oldType = type; |
| type = newType; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.CONTRACT_SIGNATORY__TYPE, oldType, type)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Resource getParty() { |
| if (party != null && party.eIsProxy()) { |
| InternalEObject oldParty = (InternalEObject)party; |
| party = (Resource)eResolveProxy(oldParty); |
| if (party != oldParty) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.CONTRACT_SIGNATORY__PARTY, oldParty, party)); |
| } |
| } |
| return party; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Resource basicGetParty() { |
| return party; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setParty(Resource newParty) { |
| Resource oldParty = party; |
| party = newParty; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.CONTRACT_SIGNATORY__PARTY, oldParty, party)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String getSignature() { |
| if (signature != null && signature.eIsProxy()) { |
| InternalEObject oldSignature = (InternalEObject)signature; |
| signature = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldSignature); |
| if (signature != oldSignature) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.CONTRACT_SIGNATORY__SIGNATURE, oldSignature, signature)); |
| } |
| } |
| return signature; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetSignature() { |
| return signature; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setSignature(org.eclipse.mdht.uml.fhir.core.datatype.String newSignature) { |
| org.eclipse.mdht.uml.fhir.core.datatype.String oldSignature = signature; |
| signature = newSignature; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.CONTRACT_SIGNATORY__SIGNATURE, oldSignature, signature)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case FhirResourcePackage.CONTRACT_SIGNATORY__TYPE: |
| if (resolve) return getType(); |
| return basicGetType(); |
| case FhirResourcePackage.CONTRACT_SIGNATORY__PARTY: |
| if (resolve) return getParty(); |
| return basicGetParty(); |
| case FhirResourcePackage.CONTRACT_SIGNATORY__SIGNATURE: |
| if (resolve) return getSignature(); |
| return basicGetSignature(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case FhirResourcePackage.CONTRACT_SIGNATORY__TYPE: |
| setType((Coding)newValue); |
| return; |
| case FhirResourcePackage.CONTRACT_SIGNATORY__PARTY: |
| setParty((Resource)newValue); |
| return; |
| case FhirResourcePackage.CONTRACT_SIGNATORY__SIGNATURE: |
| setSignature((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirResourcePackage.CONTRACT_SIGNATORY__TYPE: |
| setType((Coding)null); |
| return; |
| case FhirResourcePackage.CONTRACT_SIGNATORY__PARTY: |
| setParty((Resource)null); |
| return; |
| case FhirResourcePackage.CONTRACT_SIGNATORY__SIGNATURE: |
| setSignature((org.eclipse.mdht.uml.fhir.core.datatype.String)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirResourcePackage.CONTRACT_SIGNATORY__TYPE: |
| return type != null; |
| case FhirResourcePackage.CONTRACT_SIGNATORY__PARTY: |
| return party != null; |
| case FhirResourcePackage.CONTRACT_SIGNATORY__SIGNATURE: |
| return signature != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ContractSignatoryImpl |