blob: 9cce959e24d0fbf00eaef637e1881fe46c2706a6 [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.Period;
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.HealthcareServiceNotAvailable;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Healthcare Service Not Available</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.HealthcareServiceNotAvailableImpl#getDescription <em>Description</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.HealthcareServiceNotAvailableImpl#getDuring <em>During</em>}</li>
* </ul>
*
* @generated
*/
public class HealthcareServiceNotAvailableImpl extends BackboneElementImpl implements HealthcareServiceNotAvailable {
/**
* The cached value of the '{@link #getDescription() <em>Description</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDescription()
* @generated
* @ordered
*/
protected org.eclipse.mdht.uml.fhir.core.datatype.String description;
/**
* The cached value of the '{@link #getDuring() <em>During</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDuring()
* @generated
* @ordered
*/
protected Period during;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected HealthcareServiceNotAvailableImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirResourcePackage.eINSTANCE.getHealthcareServiceNotAvailable();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String getDescription() {
if (description != null && description.eIsProxy()) {
InternalEObject oldDescription = (InternalEObject)description;
description = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldDescription);
if (description != oldDescription) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.HEALTHCARE_SERVICE_NOT_AVAILABLE__DESCRIPTION, oldDescription, description));
}
}
return description;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetDescription() {
return description;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDescription(org.eclipse.mdht.uml.fhir.core.datatype.String newDescription) {
org.eclipse.mdht.uml.fhir.core.datatype.String oldDescription = description;
description = newDescription;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.HEALTHCARE_SERVICE_NOT_AVAILABLE__DESCRIPTION, oldDescription, description));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Period getDuring() {
if (during != null && during.eIsProxy()) {
InternalEObject oldDuring = (InternalEObject)during;
during = (Period)eResolveProxy(oldDuring);
if (during != oldDuring) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.HEALTHCARE_SERVICE_NOT_AVAILABLE__DURING, oldDuring, during));
}
}
return during;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Period basicGetDuring() {
return during;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDuring(Period newDuring) {
Period oldDuring = during;
during = newDuring;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.HEALTHCARE_SERVICE_NOT_AVAILABLE__DURING, oldDuring, during));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FhirResourcePackage.HEALTHCARE_SERVICE_NOT_AVAILABLE__DESCRIPTION:
if (resolve) return getDescription();
return basicGetDescription();
case FhirResourcePackage.HEALTHCARE_SERVICE_NOT_AVAILABLE__DURING:
if (resolve) return getDuring();
return basicGetDuring();
}
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.HEALTHCARE_SERVICE_NOT_AVAILABLE__DESCRIPTION:
setDescription((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue);
return;
case FhirResourcePackage.HEALTHCARE_SERVICE_NOT_AVAILABLE__DURING:
setDuring((Period)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirResourcePackage.HEALTHCARE_SERVICE_NOT_AVAILABLE__DESCRIPTION:
setDescription((org.eclipse.mdht.uml.fhir.core.datatype.String)null);
return;
case FhirResourcePackage.HEALTHCARE_SERVICE_NOT_AVAILABLE__DURING:
setDuring((Period)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirResourcePackage.HEALTHCARE_SERVICE_NOT_AVAILABLE__DESCRIPTION:
return description != null;
case FhirResourcePackage.HEALTHCARE_SERVICE_NOT_AVAILABLE__DURING:
return during != null;
}
return super.eIsSet(featureID);
}
} //HealthcareServiceNotAvailableImpl