| /******************************************************************************* |
| * 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.ContactPoint; |
| import org.eclipse.mdht.uml.fhir.core.datatype.Uri; |
| |
| import org.eclipse.mdht.uml.fhir.core.datatype.impl.BackboneElementImpl; |
| |
| import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage; |
| import org.eclipse.mdht.uml.fhir.core.resource.MessageHeaderMessageSource; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Message Header Message Source</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.MessageHeaderMessageSourceImpl#getName <em>Name</em>}</li> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.MessageHeaderMessageSourceImpl#getSoftware <em>Software</em>}</li> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.MessageHeaderMessageSourceImpl#getVersion <em>Version</em>}</li> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.MessageHeaderMessageSourceImpl#getContact <em>Contact</em>}</li> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.MessageHeaderMessageSourceImpl#getEndpoint <em>Endpoint</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class MessageHeaderMessageSourceImpl extends BackboneElementImpl implements MessageHeaderMessageSource { |
| /** |
| * The cached value of the '{@link #getName() <em>Name</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getName() |
| * @generated |
| * @ordered |
| */ |
| protected org.eclipse.mdht.uml.fhir.core.datatype.String name; |
| |
| /** |
| * The cached value of the '{@link #getSoftware() <em>Software</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getSoftware() |
| * @generated |
| * @ordered |
| */ |
| protected org.eclipse.mdht.uml.fhir.core.datatype.String software; |
| |
| /** |
| * The cached value of the '{@link #getVersion() <em>Version</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getVersion() |
| * @generated |
| * @ordered |
| */ |
| protected org.eclipse.mdht.uml.fhir.core.datatype.String version; |
| |
| /** |
| * The cached value of the '{@link #getContact() <em>Contact</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getContact() |
| * @generated |
| * @ordered |
| */ |
| protected ContactPoint contact; |
| |
| /** |
| * The cached value of the '{@link #getEndpoint() <em>Endpoint</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getEndpoint() |
| * @generated |
| * @ordered |
| */ |
| protected Uri endpoint; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected MessageHeaderMessageSourceImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirResourcePackage.eINSTANCE.getMessageHeaderMessageSource(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String getName() { |
| if (name != null && name.eIsProxy()) { |
| InternalEObject oldName = (InternalEObject)name; |
| name = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldName); |
| if (name != oldName) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__NAME, oldName, name)); |
| } |
| } |
| return name; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetName() { |
| return name; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setName(org.eclipse.mdht.uml.fhir.core.datatype.String newName) { |
| org.eclipse.mdht.uml.fhir.core.datatype.String oldName = name; |
| name = newName; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__NAME, oldName, name)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String getSoftware() { |
| if (software != null && software.eIsProxy()) { |
| InternalEObject oldSoftware = (InternalEObject)software; |
| software = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldSoftware); |
| if (software != oldSoftware) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__SOFTWARE, oldSoftware, software)); |
| } |
| } |
| return software; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetSoftware() { |
| return software; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setSoftware(org.eclipse.mdht.uml.fhir.core.datatype.String newSoftware) { |
| org.eclipse.mdht.uml.fhir.core.datatype.String oldSoftware = software; |
| software = newSoftware; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__SOFTWARE, oldSoftware, software)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String getVersion() { |
| if (version != null && version.eIsProxy()) { |
| InternalEObject oldVersion = (InternalEObject)version; |
| version = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldVersion); |
| if (version != oldVersion) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__VERSION, oldVersion, version)); |
| } |
| } |
| return version; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetVersion() { |
| return version; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setVersion(org.eclipse.mdht.uml.fhir.core.datatype.String newVersion) { |
| org.eclipse.mdht.uml.fhir.core.datatype.String oldVersion = version; |
| version = newVersion; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__VERSION, oldVersion, version)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ContactPoint getContact() { |
| if (contact != null && contact.eIsProxy()) { |
| InternalEObject oldContact = (InternalEObject)contact; |
| contact = (ContactPoint)eResolveProxy(oldContact); |
| if (contact != oldContact) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__CONTACT, oldContact, contact)); |
| } |
| } |
| return contact; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ContactPoint basicGetContact() { |
| return contact; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setContact(ContactPoint newContact) { |
| ContactPoint oldContact = contact; |
| contact = newContact; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__CONTACT, oldContact, contact)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Uri getEndpoint() { |
| if (endpoint != null && endpoint.eIsProxy()) { |
| InternalEObject oldEndpoint = (InternalEObject)endpoint; |
| endpoint = (Uri)eResolveProxy(oldEndpoint); |
| if (endpoint != oldEndpoint) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__ENDPOINT, oldEndpoint, endpoint)); |
| } |
| } |
| return endpoint; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Uri basicGetEndpoint() { |
| return endpoint; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setEndpoint(Uri newEndpoint) { |
| Uri oldEndpoint = endpoint; |
| endpoint = newEndpoint; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__ENDPOINT, oldEndpoint, endpoint)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__NAME: |
| if (resolve) return getName(); |
| return basicGetName(); |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__SOFTWARE: |
| if (resolve) return getSoftware(); |
| return basicGetSoftware(); |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__VERSION: |
| if (resolve) return getVersion(); |
| return basicGetVersion(); |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__CONTACT: |
| if (resolve) return getContact(); |
| return basicGetContact(); |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__ENDPOINT: |
| if (resolve) return getEndpoint(); |
| return basicGetEndpoint(); |
| } |
| 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.MESSAGE_HEADER_MESSAGE_SOURCE__NAME: |
| setName((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue); |
| return; |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__SOFTWARE: |
| setSoftware((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue); |
| return; |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__VERSION: |
| setVersion((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue); |
| return; |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__CONTACT: |
| setContact((ContactPoint)newValue); |
| return; |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__ENDPOINT: |
| setEndpoint((Uri)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__NAME: |
| setName((org.eclipse.mdht.uml.fhir.core.datatype.String)null); |
| return; |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__SOFTWARE: |
| setSoftware((org.eclipse.mdht.uml.fhir.core.datatype.String)null); |
| return; |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__VERSION: |
| setVersion((org.eclipse.mdht.uml.fhir.core.datatype.String)null); |
| return; |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__CONTACT: |
| setContact((ContactPoint)null); |
| return; |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__ENDPOINT: |
| setEndpoint((Uri)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__NAME: |
| return name != null; |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__SOFTWARE: |
| return software != null; |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__VERSION: |
| return version != null; |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__CONTACT: |
| return contact != null; |
| case FhirResourcePackage.MESSAGE_HEADER_MESSAGE_SOURCE__ENDPOINT: |
| return endpoint != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //MessageHeaderMessageSourceImpl |