blob: 71ecdd2f88e66d6411f68e6dd94d8d0402088192 [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.Instant;
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.BundleEntryResponse;
import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Bundle Entry Response</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.BundleEntryResponseImpl#getStatus <em>Status</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.BundleEntryResponseImpl#getLocation <em>Location</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.BundleEntryResponseImpl#getEtag <em>Etag</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.BundleEntryResponseImpl#getLastModified <em>Last Modified</em>}</li>
* </ul>
*
* @generated
*/
public class BundleEntryResponseImpl extends BackboneElementImpl implements BundleEntryResponse {
/**
* The cached value of the '{@link #getStatus() <em>Status</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStatus()
* @generated
* @ordered
*/
protected org.eclipse.mdht.uml.fhir.core.datatype.String status;
/**
* The cached value of the '{@link #getLocation() <em>Location</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getLocation()
* @generated
* @ordered
*/
protected Uri location;
/**
* The cached value of the '{@link #getEtag() <em>Etag</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEtag()
* @generated
* @ordered
*/
protected org.eclipse.mdht.uml.fhir.core.datatype.String etag;
/**
* The cached value of the '{@link #getLastModified() <em>Last Modified</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getLastModified()
* @generated
* @ordered
*/
protected Instant lastModified;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected BundleEntryResponseImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirResourcePackage.eINSTANCE.getBundleEntryResponse();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String getStatus() {
if (status != null && status.eIsProxy()) {
InternalEObject oldStatus = (InternalEObject)status;
status = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldStatus);
if (status != oldStatus) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__STATUS, oldStatus, status));
}
}
return status;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetStatus() {
return status;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setStatus(org.eclipse.mdht.uml.fhir.core.datatype.String newStatus) {
org.eclipse.mdht.uml.fhir.core.datatype.String oldStatus = status;
status = newStatus;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__STATUS, oldStatus, status));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Uri getLocation() {
if (location != null && location.eIsProxy()) {
InternalEObject oldLocation = (InternalEObject)location;
location = (Uri)eResolveProxy(oldLocation);
if (location != oldLocation) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__LOCATION, oldLocation, location));
}
}
return location;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Uri basicGetLocation() {
return location;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setLocation(Uri newLocation) {
Uri oldLocation = location;
location = newLocation;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__LOCATION, oldLocation, location));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String getEtag() {
if (etag != null && etag.eIsProxy()) {
InternalEObject oldEtag = (InternalEObject)etag;
etag = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldEtag);
if (etag != oldEtag) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__ETAG, oldEtag, etag));
}
}
return etag;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetEtag() {
return etag;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setEtag(org.eclipse.mdht.uml.fhir.core.datatype.String newEtag) {
org.eclipse.mdht.uml.fhir.core.datatype.String oldEtag = etag;
etag = newEtag;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__ETAG, oldEtag, etag));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Instant getLastModified() {
if (lastModified != null && lastModified.eIsProxy()) {
InternalEObject oldLastModified = (InternalEObject)lastModified;
lastModified = (Instant)eResolveProxy(oldLastModified);
if (lastModified != oldLastModified) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__LAST_MODIFIED, oldLastModified, lastModified));
}
}
return lastModified;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Instant basicGetLastModified() {
return lastModified;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setLastModified(Instant newLastModified) {
Instant oldLastModified = lastModified;
lastModified = newLastModified;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__LAST_MODIFIED, oldLastModified, lastModified));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__STATUS:
if (resolve) return getStatus();
return basicGetStatus();
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__LOCATION:
if (resolve) return getLocation();
return basicGetLocation();
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__ETAG:
if (resolve) return getEtag();
return basicGetEtag();
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__LAST_MODIFIED:
if (resolve) return getLastModified();
return basicGetLastModified();
}
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.BUNDLE_ENTRY_RESPONSE__STATUS:
setStatus((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue);
return;
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__LOCATION:
setLocation((Uri)newValue);
return;
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__ETAG:
setEtag((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue);
return;
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__LAST_MODIFIED:
setLastModified((Instant)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__STATUS:
setStatus((org.eclipse.mdht.uml.fhir.core.datatype.String)null);
return;
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__LOCATION:
setLocation((Uri)null);
return;
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__ETAG:
setEtag((org.eclipse.mdht.uml.fhir.core.datatype.String)null);
return;
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__LAST_MODIFIED:
setLastModified((Instant)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__STATUS:
return status != null;
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__LOCATION:
return location != null;
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__ETAG:
return etag != null;
case FhirResourcePackage.BUNDLE_ENTRY_RESPONSE__LAST_MODIFIED:
return lastModified != null;
}
return super.eIsSet(featureID);
}
} //BundleEntryResponseImpl