blob: b096270c61630558eb6a9cd5c2f6e8cc50fea73e [file] [log] [blame]
/*******************************************************************************
* 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.Code;
import org.eclipse.mdht.uml.fhir.core.datatype.CodeableConcept;
import org.eclipse.mdht.uml.fhir.core.datatype.DateTime;
import org.eclipse.mdht.uml.fhir.core.datatype.impl.BackboneElementImpl;
import org.eclipse.mdht.uml.fhir.core.resource.DiagnosticOrderEvent;
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>Diagnostic Order Event</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.DiagnosticOrderEventImpl#getStatus <em>Status</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.DiagnosticOrderEventImpl#getDescription <em>Description</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.DiagnosticOrderEventImpl#getDateTime <em>Date Time</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.DiagnosticOrderEventImpl#getActor <em>Actor</em>}</li>
* </ul>
*
* @generated
*/
public class DiagnosticOrderEventImpl extends BackboneElementImpl implements DiagnosticOrderEvent {
/**
* The cached value of the '{@link #getStatus() <em>Status</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStatus()
* @generated
* @ordered
*/
protected Code status;
/**
* The cached value of the '{@link #getDescription() <em>Description</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDescription()
* @generated
* @ordered
*/
protected CodeableConcept description;
/**
* The cached value of the '{@link #getDateTime() <em>Date Time</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDateTime()
* @generated
* @ordered
*/
protected DateTime dateTime;
/**
* The cached value of the '{@link #getActor() <em>Actor</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getActor()
* @generated
* @ordered
*/
protected Resource actor;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected DiagnosticOrderEventImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirResourcePackage.eINSTANCE.getDiagnosticOrderEvent();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Code getStatus() {
if (status != null && status.eIsProxy()) {
InternalEObject oldStatus = (InternalEObject)status;
status = (Code)eResolveProxy(oldStatus);
if (status != oldStatus) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__STATUS, oldStatus, status));
}
}
return status;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Code basicGetStatus() {
return status;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setStatus(Code newStatus) {
Code oldStatus = status;
status = newStatus;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__STATUS, oldStatus, status));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept getDescription() {
if (description != null && description.eIsProxy()) {
InternalEObject oldDescription = (InternalEObject)description;
description = (CodeableConcept)eResolveProxy(oldDescription);
if (description != oldDescription) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION, oldDescription, description));
}
}
return description;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept basicGetDescription() {
return description;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDescription(CodeableConcept newDescription) {
CodeableConcept oldDescription = description;
description = newDescription;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION, oldDescription, description));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DateTime getDateTime() {
if (dateTime != null && dateTime.eIsProxy()) {
InternalEObject oldDateTime = (InternalEObject)dateTime;
dateTime = (DateTime)eResolveProxy(oldDateTime);
if (dateTime != oldDateTime) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME, oldDateTime, dateTime));
}
}
return dateTime;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DateTime basicGetDateTime() {
return dateTime;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDateTime(DateTime newDateTime) {
DateTime oldDateTime = dateTime;
dateTime = newDateTime;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME, oldDateTime, dateTime));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Resource getActor() {
if (actor != null && actor.eIsProxy()) {
InternalEObject oldActor = (InternalEObject)actor;
actor = (Resource)eResolveProxy(oldActor);
if (actor != oldActor) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__ACTOR, oldActor, actor));
}
}
return actor;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Resource basicGetActor() {
return actor;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setActor(Resource newActor) {
Resource oldActor = actor;
actor = newActor;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__ACTOR, oldActor, actor));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__STATUS:
if (resolve) return getStatus();
return basicGetStatus();
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION:
if (resolve) return getDescription();
return basicGetDescription();
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME:
if (resolve) return getDateTime();
return basicGetDateTime();
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__ACTOR:
if (resolve) return getActor();
return basicGetActor();
}
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.DIAGNOSTIC_ORDER_EVENT__STATUS:
setStatus((Code)newValue);
return;
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION:
setDescription((CodeableConcept)newValue);
return;
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME:
setDateTime((DateTime)newValue);
return;
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__ACTOR:
setActor((Resource)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__STATUS:
setStatus((Code)null);
return;
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION:
setDescription((CodeableConcept)null);
return;
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME:
setDateTime((DateTime)null);
return;
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__ACTOR:
setActor((Resource)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__STATUS:
return status != null;
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION:
return description != null;
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME:
return dateTime != null;
case FhirResourcePackage.DIAGNOSTIC_ORDER_EVENT__ACTOR:
return actor != null;
}
return super.eIsSet(featureID);
}
} //DiagnosticOrderEventImpl