blob: b09685bc06b6485da99d59f35c182b437d073353 [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 java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
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.Identifier;
import org.eclipse.mdht.uml.fhir.core.resource.Composition;
import org.eclipse.mdht.uml.fhir.core.resource.CompositionAttester;
import org.eclipse.mdht.uml.fhir.core.resource.CompositionEvent;
import org.eclipse.mdht.uml.fhir.core.resource.CompositionSection;
import org.eclipse.mdht.uml.fhir.core.resource.Encounter;
import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage;
import org.eclipse.mdht.uml.fhir.core.resource.Organization;
import org.eclipse.mdht.uml.fhir.core.resource.Resource;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Composition</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getIdentifier <em>Identifier</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getDate <em>Date</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getType <em>Type</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getClass_ <em>Class</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getTitle <em>Title</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getStatus <em>Status</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getConfidentiality <em>Confidentiality</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getSubject <em>Subject</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getAuthors <em>Author</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getAttesters <em>Attester</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getCustodian <em>Custodian</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getEvents <em>Event</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getEncounter <em>Encounter</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CompositionImpl#getSections <em>Section</em>}</li>
* </ul>
*
* @generated
*/
public class CompositionImpl extends DomainResourceImpl implements Composition {
/**
* The cached value of the '{@link #getIdentifier() <em>Identifier</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIdentifier()
* @generated
* @ordered
*/
protected Identifier identifier;
/**
* The cached value of the '{@link #getDate() <em>Date</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDate()
* @generated
* @ordered
*/
protected DateTime date;
/**
* The cached value of the '{@link #getType() <em>Type</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getType()
* @generated
* @ordered
*/
protected CodeableConcept type;
/**
* The cached value of the '{@link #getClass_() <em>Class</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getClass_()
* @generated
* @ordered
*/
protected CodeableConcept class_;
/**
* The cached value of the '{@link #getTitle() <em>Title</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTitle()
* @generated
* @ordered
*/
protected org.eclipse.mdht.uml.fhir.core.datatype.String title;
/**
* 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 #getConfidentiality() <em>Confidentiality</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getConfidentiality()
* @generated
* @ordered
*/
protected Code confidentiality;
/**
* The cached value of the '{@link #getSubject() <em>Subject</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSubject()
* @generated
* @ordered
*/
protected Resource subject;
/**
* The cached value of the '{@link #getAuthors() <em>Author</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAuthors()
* @generated
* @ordered
*/
protected EList<Resource> authors;
/**
* The cached value of the '{@link #getAttesters() <em>Attester</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAttesters()
* @generated
* @ordered
*/
protected EList<CompositionAttester> attesters;
/**
* The cached value of the '{@link #getCustodian() <em>Custodian</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCustodian()
* @generated
* @ordered
*/
protected Organization custodian;
/**
* The cached value of the '{@link #getEvents() <em>Event</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEvents()
* @generated
* @ordered
*/
protected EList<CompositionEvent> events;
/**
* The cached value of the '{@link #getEncounter() <em>Encounter</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEncounter()
* @generated
* @ordered
*/
protected Encounter encounter;
/**
* The cached value of the '{@link #getSections() <em>Section</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSections()
* @generated
* @ordered
*/
protected EList<CompositionSection> sections;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CompositionImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirResourcePackage.eINSTANCE.getComposition();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Identifier getIdentifier() {
if (identifier != null && identifier.eIsProxy()) {
InternalEObject oldIdentifier = (InternalEObject)identifier;
identifier = (Identifier)eResolveProxy(oldIdentifier);
if (identifier != oldIdentifier) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.COMPOSITION__IDENTIFIER, oldIdentifier, identifier));
}
}
return identifier;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Identifier basicGetIdentifier() {
return identifier;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setIdentifier(Identifier newIdentifier) {
Identifier oldIdentifier = identifier;
identifier = newIdentifier;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.COMPOSITION__IDENTIFIER, oldIdentifier, identifier));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DateTime getDate() {
if (date != null && date.eIsProxy()) {
InternalEObject oldDate = (InternalEObject)date;
date = (DateTime)eResolveProxy(oldDate);
if (date != oldDate) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.COMPOSITION__DATE, oldDate, date));
}
}
return date;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DateTime basicGetDate() {
return date;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDate(DateTime newDate) {
DateTime oldDate = date;
date = newDate;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.COMPOSITION__DATE, oldDate, date));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept getType() {
if (type != null && type.eIsProxy()) {
InternalEObject oldType = (InternalEObject)type;
type = (CodeableConcept)eResolveProxy(oldType);
if (type != oldType) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.COMPOSITION__TYPE, oldType, type));
}
}
return type;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept basicGetType() {
return type;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setType(CodeableConcept newType) {
CodeableConcept oldType = type;
type = newType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.COMPOSITION__TYPE, oldType, type));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept getClass_() {
if (class_ != null && class_.eIsProxy()) {
InternalEObject oldClass = (InternalEObject)class_;
class_ = (CodeableConcept)eResolveProxy(oldClass);
if (class_ != oldClass) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.COMPOSITION__CLASS, oldClass, class_));
}
}
return class_;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept basicGetClass_() {
return class_;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setClass_(CodeableConcept newClass) {
CodeableConcept oldClass = class_;
class_ = newClass;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.COMPOSITION__CLASS, oldClass, class_));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String getTitle() {
if (title != null && title.eIsProxy()) {
InternalEObject oldTitle = (InternalEObject)title;
title = (org.eclipse.mdht.uml.fhir.core.datatype.String)eResolveProxy(oldTitle);
if (title != oldTitle) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.COMPOSITION__TITLE, oldTitle, title));
}
}
return title;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.eclipse.mdht.uml.fhir.core.datatype.String basicGetTitle() {
return title;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setTitle(org.eclipse.mdht.uml.fhir.core.datatype.String newTitle) {
org.eclipse.mdht.uml.fhir.core.datatype.String oldTitle = title;
title = newTitle;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.COMPOSITION__TITLE, oldTitle, title));
}
/**
* <!-- 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.COMPOSITION__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.COMPOSITION__STATUS, oldStatus, status));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Code getConfidentiality() {
if (confidentiality != null && confidentiality.eIsProxy()) {
InternalEObject oldConfidentiality = (InternalEObject)confidentiality;
confidentiality = (Code)eResolveProxy(oldConfidentiality);
if (confidentiality != oldConfidentiality) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.COMPOSITION__CONFIDENTIALITY, oldConfidentiality, confidentiality));
}
}
return confidentiality;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Code basicGetConfidentiality() {
return confidentiality;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setConfidentiality(Code newConfidentiality) {
Code oldConfidentiality = confidentiality;
confidentiality = newConfidentiality;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.COMPOSITION__CONFIDENTIALITY, oldConfidentiality, confidentiality));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Resource getSubject() {
if (subject != null && subject.eIsProxy()) {
InternalEObject oldSubject = (InternalEObject)subject;
subject = (Resource)eResolveProxy(oldSubject);
if (subject != oldSubject) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.COMPOSITION__SUBJECT, oldSubject, subject));
}
}
return subject;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Resource basicGetSubject() {
return subject;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSubject(Resource newSubject) {
Resource oldSubject = subject;
subject = newSubject;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.COMPOSITION__SUBJECT, oldSubject, subject));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Resource> getAuthors() {
if (authors == null) {
authors = new EObjectResolvingEList<Resource>(Resource.class, this, FhirResourcePackage.COMPOSITION__AUTHOR);
}
return authors;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<CompositionAttester> getAttesters() {
if (attesters == null) {
attesters = new EObjectContainmentEList<CompositionAttester>(CompositionAttester.class, this, FhirResourcePackage.COMPOSITION__ATTESTER);
}
return attesters;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Organization getCustodian() {
if (custodian != null && custodian.eIsProxy()) {
InternalEObject oldCustodian = (InternalEObject)custodian;
custodian = (Organization)eResolveProxy(oldCustodian);
if (custodian != oldCustodian) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.COMPOSITION__CUSTODIAN, oldCustodian, custodian));
}
}
return custodian;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Organization basicGetCustodian() {
return custodian;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCustodian(Organization newCustodian) {
Organization oldCustodian = custodian;
custodian = newCustodian;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.COMPOSITION__CUSTODIAN, oldCustodian, custodian));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<CompositionEvent> getEvents() {
if (events == null) {
events = new EObjectContainmentEList<CompositionEvent>(CompositionEvent.class, this, FhirResourcePackage.COMPOSITION__EVENT);
}
return events;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Encounter getEncounter() {
if (encounter != null && encounter.eIsProxy()) {
InternalEObject oldEncounter = (InternalEObject)encounter;
encounter = (Encounter)eResolveProxy(oldEncounter);
if (encounter != oldEncounter) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.COMPOSITION__ENCOUNTER, oldEncounter, encounter));
}
}
return encounter;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Encounter basicGetEncounter() {
return encounter;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setEncounter(Encounter newEncounter) {
Encounter oldEncounter = encounter;
encounter = newEncounter;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.COMPOSITION__ENCOUNTER, oldEncounter, encounter));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<CompositionSection> getSections() {
if (sections == null) {
sections = new EObjectContainmentEList<CompositionSection>(CompositionSection.class, this, FhirResourcePackage.COMPOSITION__SECTION);
}
return sections;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirResourcePackage.COMPOSITION__ATTESTER:
return ((InternalEList<?>)getAttesters()).basicRemove(otherEnd, msgs);
case FhirResourcePackage.COMPOSITION__EVENT:
return ((InternalEList<?>)getEvents()).basicRemove(otherEnd, msgs);
case FhirResourcePackage.COMPOSITION__SECTION:
return ((InternalEList<?>)getSections()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FhirResourcePackage.COMPOSITION__IDENTIFIER:
if (resolve) return getIdentifier();
return basicGetIdentifier();
case FhirResourcePackage.COMPOSITION__DATE:
if (resolve) return getDate();
return basicGetDate();
case FhirResourcePackage.COMPOSITION__TYPE:
if (resolve) return getType();
return basicGetType();
case FhirResourcePackage.COMPOSITION__CLASS:
if (resolve) return getClass_();
return basicGetClass_();
case FhirResourcePackage.COMPOSITION__TITLE:
if (resolve) return getTitle();
return basicGetTitle();
case FhirResourcePackage.COMPOSITION__STATUS:
if (resolve) return getStatus();
return basicGetStatus();
case FhirResourcePackage.COMPOSITION__CONFIDENTIALITY:
if (resolve) return getConfidentiality();
return basicGetConfidentiality();
case FhirResourcePackage.COMPOSITION__SUBJECT:
if (resolve) return getSubject();
return basicGetSubject();
case FhirResourcePackage.COMPOSITION__AUTHOR:
return getAuthors();
case FhirResourcePackage.COMPOSITION__ATTESTER:
return getAttesters();
case FhirResourcePackage.COMPOSITION__CUSTODIAN:
if (resolve) return getCustodian();
return basicGetCustodian();
case FhirResourcePackage.COMPOSITION__EVENT:
return getEvents();
case FhirResourcePackage.COMPOSITION__ENCOUNTER:
if (resolve) return getEncounter();
return basicGetEncounter();
case FhirResourcePackage.COMPOSITION__SECTION:
return getSections();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FhirResourcePackage.COMPOSITION__IDENTIFIER:
setIdentifier((Identifier)newValue);
return;
case FhirResourcePackage.COMPOSITION__DATE:
setDate((DateTime)newValue);
return;
case FhirResourcePackage.COMPOSITION__TYPE:
setType((CodeableConcept)newValue);
return;
case FhirResourcePackage.COMPOSITION__CLASS:
setClass_((CodeableConcept)newValue);
return;
case FhirResourcePackage.COMPOSITION__TITLE:
setTitle((org.eclipse.mdht.uml.fhir.core.datatype.String)newValue);
return;
case FhirResourcePackage.COMPOSITION__STATUS:
setStatus((Code)newValue);
return;
case FhirResourcePackage.COMPOSITION__CONFIDENTIALITY:
setConfidentiality((Code)newValue);
return;
case FhirResourcePackage.COMPOSITION__SUBJECT:
setSubject((Resource)newValue);
return;
case FhirResourcePackage.COMPOSITION__AUTHOR:
getAuthors().clear();
getAuthors().addAll((Collection<? extends Resource>)newValue);
return;
case FhirResourcePackage.COMPOSITION__ATTESTER:
getAttesters().clear();
getAttesters().addAll((Collection<? extends CompositionAttester>)newValue);
return;
case FhirResourcePackage.COMPOSITION__CUSTODIAN:
setCustodian((Organization)newValue);
return;
case FhirResourcePackage.COMPOSITION__EVENT:
getEvents().clear();
getEvents().addAll((Collection<? extends CompositionEvent>)newValue);
return;
case FhirResourcePackage.COMPOSITION__ENCOUNTER:
setEncounter((Encounter)newValue);
return;
case FhirResourcePackage.COMPOSITION__SECTION:
getSections().clear();
getSections().addAll((Collection<? extends CompositionSection>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirResourcePackage.COMPOSITION__IDENTIFIER:
setIdentifier((Identifier)null);
return;
case FhirResourcePackage.COMPOSITION__DATE:
setDate((DateTime)null);
return;
case FhirResourcePackage.COMPOSITION__TYPE:
setType((CodeableConcept)null);
return;
case FhirResourcePackage.COMPOSITION__CLASS:
setClass_((CodeableConcept)null);
return;
case FhirResourcePackage.COMPOSITION__TITLE:
setTitle((org.eclipse.mdht.uml.fhir.core.datatype.String)null);
return;
case FhirResourcePackage.COMPOSITION__STATUS:
setStatus((Code)null);
return;
case FhirResourcePackage.COMPOSITION__CONFIDENTIALITY:
setConfidentiality((Code)null);
return;
case FhirResourcePackage.COMPOSITION__SUBJECT:
setSubject((Resource)null);
return;
case FhirResourcePackage.COMPOSITION__AUTHOR:
getAuthors().clear();
return;
case FhirResourcePackage.COMPOSITION__ATTESTER:
getAttesters().clear();
return;
case FhirResourcePackage.COMPOSITION__CUSTODIAN:
setCustodian((Organization)null);
return;
case FhirResourcePackage.COMPOSITION__EVENT:
getEvents().clear();
return;
case FhirResourcePackage.COMPOSITION__ENCOUNTER:
setEncounter((Encounter)null);
return;
case FhirResourcePackage.COMPOSITION__SECTION:
getSections().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirResourcePackage.COMPOSITION__IDENTIFIER:
return identifier != null;
case FhirResourcePackage.COMPOSITION__DATE:
return date != null;
case FhirResourcePackage.COMPOSITION__TYPE:
return type != null;
case FhirResourcePackage.COMPOSITION__CLASS:
return class_ != null;
case FhirResourcePackage.COMPOSITION__TITLE:
return title != null;
case FhirResourcePackage.COMPOSITION__STATUS:
return status != null;
case FhirResourcePackage.COMPOSITION__CONFIDENTIALITY:
return confidentiality != null;
case FhirResourcePackage.COMPOSITION__SUBJECT:
return subject != null;
case FhirResourcePackage.COMPOSITION__AUTHOR:
return authors != null && !authors.isEmpty();
case FhirResourcePackage.COMPOSITION__ATTESTER:
return attesters != null && !attesters.isEmpty();
case FhirResourcePackage.COMPOSITION__CUSTODIAN:
return custodian != null;
case FhirResourcePackage.COMPOSITION__EVENT:
return events != null && !events.isEmpty();
case FhirResourcePackage.COMPOSITION__ENCOUNTER:
return encounter != null;
case FhirResourcePackage.COMPOSITION__SECTION:
return sections != null && !sections.isEmpty();
}
return super.eIsSet(featureID);
}
} //CompositionImpl