blob: 7e699889a5651b4a5f0f79db82150e6c504b9075 [file] [log] [blame]
/**
*/
package org.hl7.fhir.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.InternalEList;
import org.hl7.fhir.Annotation;
import org.hl7.fhir.Canonical;
import org.hl7.fhir.CarePlan;
import org.hl7.fhir.CarePlanActivity;
import org.hl7.fhir.CarePlanIntent;
import org.hl7.fhir.CodeableConcept;
import org.hl7.fhir.DateTime;
import org.hl7.fhir.FhirPackage;
import org.hl7.fhir.Identifier;
import org.hl7.fhir.Period;
import org.hl7.fhir.Reference;
import org.hl7.fhir.RequestStatus;
import org.hl7.fhir.Uri;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Care Plan</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getIdentifier <em>Identifier</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getInstantiatesCanonical <em>Instantiates Canonical</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getInstantiatesUri <em>Instantiates Uri</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getBasedOn <em>Based On</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getReplaces <em>Replaces</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getPartOf <em>Part Of</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getStatus <em>Status</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getIntent <em>Intent</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getCategory <em>Category</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getTitle <em>Title</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getDescription <em>Description</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getSubject <em>Subject</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getEncounter <em>Encounter</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getPeriod <em>Period</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getCreated <em>Created</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getAuthor <em>Author</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getContributor <em>Contributor</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getCareTeam <em>Care Team</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getAddresses <em>Addresses</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getSupportingInfo <em>Supporting Info</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getGoal <em>Goal</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getActivity <em>Activity</em>}</li>
* <li>{@link org.hl7.fhir.impl.CarePlanImpl#getNote <em>Note</em>}</li>
* </ul>
*
* @generated
*/
public class CarePlanImpl extends DomainResourceImpl implements CarePlan {
/**
* The cached value of the '{@link #getIdentifier() <em>Identifier</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIdentifier()
* @generated
* @ordered
*/
protected EList<Identifier> identifier;
/**
* The cached value of the '{@link #getInstantiatesCanonical() <em>Instantiates Canonical</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getInstantiatesCanonical()
* @generated
* @ordered
*/
protected EList<Canonical> instantiatesCanonical;
/**
* The cached value of the '{@link #getInstantiatesUri() <em>Instantiates Uri</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getInstantiatesUri()
* @generated
* @ordered
*/
protected EList<Uri> instantiatesUri;
/**
* The cached value of the '{@link #getBasedOn() <em>Based On</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBasedOn()
* @generated
* @ordered
*/
protected EList<Reference> basedOn;
/**
* The cached value of the '{@link #getReplaces() <em>Replaces</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getReplaces()
* @generated
* @ordered
*/
protected EList<Reference> replaces;
/**
* The cached value of the '{@link #getPartOf() <em>Part Of</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPartOf()
* @generated
* @ordered
*/
protected EList<Reference> partOf;
/**
* The cached value of the '{@link #getStatus() <em>Status</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStatus()
* @generated
* @ordered
*/
protected RequestStatus status;
/**
* The cached value of the '{@link #getIntent() <em>Intent</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIntent()
* @generated
* @ordered
*/
protected CarePlanIntent intent;
/**
* The cached value of the '{@link #getCategory() <em>Category</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCategory()
* @generated
* @ordered
*/
protected EList<CodeableConcept> category;
/**
* The cached value of the '{@link #getTitle() <em>Title</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTitle()
* @generated
* @ordered
*/
protected org.hl7.fhir.String title;
/**
* The cached value of the '{@link #getDescription() <em>Description</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDescription()
* @generated
* @ordered
*/
protected org.hl7.fhir.String description;
/**
* The cached value of the '{@link #getSubject() <em>Subject</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSubject()
* @generated
* @ordered
*/
protected Reference subject;
/**
* The cached value of the '{@link #getEncounter() <em>Encounter</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getEncounter()
* @generated
* @ordered
*/
protected Reference encounter;
/**
* The cached value of the '{@link #getPeriod() <em>Period</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPeriod()
* @generated
* @ordered
*/
protected Period period;
/**
* The cached value of the '{@link #getCreated() <em>Created</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCreated()
* @generated
* @ordered
*/
protected DateTime created;
/**
* The cached value of the '{@link #getAuthor() <em>Author</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAuthor()
* @generated
* @ordered
*/
protected Reference author;
/**
* The cached value of the '{@link #getContributor() <em>Contributor</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getContributor()
* @generated
* @ordered
*/
protected EList<Reference> contributor;
/**
* The cached value of the '{@link #getCareTeam() <em>Care Team</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCareTeam()
* @generated
* @ordered
*/
protected EList<Reference> careTeam;
/**
* The cached value of the '{@link #getAddresses() <em>Addresses</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAddresses()
* @generated
* @ordered
*/
protected EList<Reference> addresses;
/**
* The cached value of the '{@link #getSupportingInfo() <em>Supporting Info</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSupportingInfo()
* @generated
* @ordered
*/
protected EList<Reference> supportingInfo;
/**
* The cached value of the '{@link #getGoal() <em>Goal</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getGoal()
* @generated
* @ordered
*/
protected EList<Reference> goal;
/**
* The cached value of the '{@link #getActivity() <em>Activity</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getActivity()
* @generated
* @ordered
*/
protected EList<CarePlanActivity> activity;
/**
* The cached value of the '{@link #getNote() <em>Note</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getNote()
* @generated
* @ordered
*/
protected EList<Annotation> note;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CarePlanImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirPackage.eINSTANCE.getCarePlan();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Identifier> getIdentifier() {
if (identifier == null) {
identifier = new EObjectContainmentEList<Identifier>(Identifier.class, this, FhirPackage.CARE_PLAN__IDENTIFIER);
}
return identifier;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Canonical> getInstantiatesCanonical() {
if (instantiatesCanonical == null) {
instantiatesCanonical = new EObjectContainmentEList<Canonical>(Canonical.class, this, FhirPackage.CARE_PLAN__INSTANTIATES_CANONICAL);
}
return instantiatesCanonical;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Uri> getInstantiatesUri() {
if (instantiatesUri == null) {
instantiatesUri = new EObjectContainmentEList<Uri>(Uri.class, this, FhirPackage.CARE_PLAN__INSTANTIATES_URI);
}
return instantiatesUri;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Reference> getBasedOn() {
if (basedOn == null) {
basedOn = new EObjectContainmentEList<Reference>(Reference.class, this, FhirPackage.CARE_PLAN__BASED_ON);
}
return basedOn;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Reference> getReplaces() {
if (replaces == null) {
replaces = new EObjectContainmentEList<Reference>(Reference.class, this, FhirPackage.CARE_PLAN__REPLACES);
}
return replaces;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Reference> getPartOf() {
if (partOf == null) {
partOf = new EObjectContainmentEList<Reference>(Reference.class, this, FhirPackage.CARE_PLAN__PART_OF);
}
return partOf;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public RequestStatus getStatus() {
return status;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetStatus(RequestStatus newStatus, NotificationChain msgs) {
RequestStatus oldStatus = status;
status = newStatus;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__STATUS, oldStatus, newStatus);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setStatus(RequestStatus newStatus) {
if (newStatus != status) {
NotificationChain msgs = null;
if (status != null)
msgs = ((InternalEObject)status).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__STATUS, null, msgs);
if (newStatus != null)
msgs = ((InternalEObject)newStatus).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__STATUS, null, msgs);
msgs = basicSetStatus(newStatus, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__STATUS, newStatus, newStatus));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CarePlanIntent getIntent() {
return intent;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetIntent(CarePlanIntent newIntent, NotificationChain msgs) {
CarePlanIntent oldIntent = intent;
intent = newIntent;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__INTENT, oldIntent, newIntent);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setIntent(CarePlanIntent newIntent) {
if (newIntent != intent) {
NotificationChain msgs = null;
if (intent != null)
msgs = ((InternalEObject)intent).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__INTENT, null, msgs);
if (newIntent != null)
msgs = ((InternalEObject)newIntent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__INTENT, null, msgs);
msgs = basicSetIntent(newIntent, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__INTENT, newIntent, newIntent));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<CodeableConcept> getCategory() {
if (category == null) {
category = new EObjectContainmentEList<CodeableConcept>(CodeableConcept.class, this, FhirPackage.CARE_PLAN__CATEGORY);
}
return category;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.hl7.fhir.String getTitle() {
return title;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetTitle(org.hl7.fhir.String newTitle, NotificationChain msgs) {
org.hl7.fhir.String oldTitle = title;
title = newTitle;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__TITLE, oldTitle, newTitle);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setTitle(org.hl7.fhir.String newTitle) {
if (newTitle != title) {
NotificationChain msgs = null;
if (title != null)
msgs = ((InternalEObject)title).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__TITLE, null, msgs);
if (newTitle != null)
msgs = ((InternalEObject)newTitle).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__TITLE, null, msgs);
msgs = basicSetTitle(newTitle, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__TITLE, newTitle, newTitle));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.hl7.fhir.String getDescription() {
return description;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetDescription(org.hl7.fhir.String newDescription, NotificationChain msgs) {
org.hl7.fhir.String oldDescription = description;
description = newDescription;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__DESCRIPTION, oldDescription, newDescription);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDescription(org.hl7.fhir.String newDescription) {
if (newDescription != description) {
NotificationChain msgs = null;
if (description != null)
msgs = ((InternalEObject)description).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__DESCRIPTION, null, msgs);
if (newDescription != null)
msgs = ((InternalEObject)newDescription).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__DESCRIPTION, null, msgs);
msgs = basicSetDescription(newDescription, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__DESCRIPTION, newDescription, newDescription));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Reference getSubject() {
return subject;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetSubject(Reference newSubject, NotificationChain msgs) {
Reference oldSubject = subject;
subject = newSubject;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__SUBJECT, oldSubject, newSubject);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSubject(Reference newSubject) {
if (newSubject != subject) {
NotificationChain msgs = null;
if (subject != null)
msgs = ((InternalEObject)subject).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__SUBJECT, null, msgs);
if (newSubject != null)
msgs = ((InternalEObject)newSubject).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__SUBJECT, null, msgs);
msgs = basicSetSubject(newSubject, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__SUBJECT, newSubject, newSubject));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Reference getEncounter() {
return encounter;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetEncounter(Reference newEncounter, NotificationChain msgs) {
Reference oldEncounter = encounter;
encounter = newEncounter;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__ENCOUNTER, oldEncounter, newEncounter);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setEncounter(Reference newEncounter) {
if (newEncounter != encounter) {
NotificationChain msgs = null;
if (encounter != null)
msgs = ((InternalEObject)encounter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__ENCOUNTER, null, msgs);
if (newEncounter != null)
msgs = ((InternalEObject)newEncounter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__ENCOUNTER, null, msgs);
msgs = basicSetEncounter(newEncounter, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__ENCOUNTER, newEncounter, newEncounter));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Period getPeriod() {
return period;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetPeriod(Period newPeriod, NotificationChain msgs) {
Period oldPeriod = period;
period = newPeriod;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__PERIOD, oldPeriod, newPeriod);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPeriod(Period newPeriod) {
if (newPeriod != period) {
NotificationChain msgs = null;
if (period != null)
msgs = ((InternalEObject)period).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__PERIOD, null, msgs);
if (newPeriod != null)
msgs = ((InternalEObject)newPeriod).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__PERIOD, null, msgs);
msgs = basicSetPeriod(newPeriod, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__PERIOD, newPeriod, newPeriod));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DateTime getCreated() {
return created;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetCreated(DateTime newCreated, NotificationChain msgs) {
DateTime oldCreated = created;
created = newCreated;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__CREATED, oldCreated, newCreated);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCreated(DateTime newCreated) {
if (newCreated != created) {
NotificationChain msgs = null;
if (created != null)
msgs = ((InternalEObject)created).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__CREATED, null, msgs);
if (newCreated != null)
msgs = ((InternalEObject)newCreated).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__CREATED, null, msgs);
msgs = basicSetCreated(newCreated, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__CREATED, newCreated, newCreated));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Reference getAuthor() {
return author;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetAuthor(Reference newAuthor, NotificationChain msgs) {
Reference oldAuthor = author;
author = newAuthor;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__AUTHOR, oldAuthor, newAuthor);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setAuthor(Reference newAuthor) {
if (newAuthor != author) {
NotificationChain msgs = null;
if (author != null)
msgs = ((InternalEObject)author).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__AUTHOR, null, msgs);
if (newAuthor != null)
msgs = ((InternalEObject)newAuthor).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CARE_PLAN__AUTHOR, null, msgs);
msgs = basicSetAuthor(newAuthor, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CARE_PLAN__AUTHOR, newAuthor, newAuthor));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Reference> getContributor() {
if (contributor == null) {
contributor = new EObjectContainmentEList<Reference>(Reference.class, this, FhirPackage.CARE_PLAN__CONTRIBUTOR);
}
return contributor;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Reference> getCareTeam() {
if (careTeam == null) {
careTeam = new EObjectContainmentEList<Reference>(Reference.class, this, FhirPackage.CARE_PLAN__CARE_TEAM);
}
return careTeam;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Reference> getAddresses() {
if (addresses == null) {
addresses = new EObjectContainmentEList<Reference>(Reference.class, this, FhirPackage.CARE_PLAN__ADDRESSES);
}
return addresses;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Reference> getSupportingInfo() {
if (supportingInfo == null) {
supportingInfo = new EObjectContainmentEList<Reference>(Reference.class, this, FhirPackage.CARE_PLAN__SUPPORTING_INFO);
}
return supportingInfo;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Reference> getGoal() {
if (goal == null) {
goal = new EObjectContainmentEList<Reference>(Reference.class, this, FhirPackage.CARE_PLAN__GOAL);
}
return goal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<CarePlanActivity> getActivity() {
if (activity == null) {
activity = new EObjectContainmentEList<CarePlanActivity>(CarePlanActivity.class, this, FhirPackage.CARE_PLAN__ACTIVITY);
}
return activity;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Annotation> getNote() {
if (note == null) {
note = new EObjectContainmentEList<Annotation>(Annotation.class, this, FhirPackage.CARE_PLAN__NOTE);
}
return note;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirPackage.CARE_PLAN__IDENTIFIER:
return ((InternalEList<?>)getIdentifier()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__INSTANTIATES_CANONICAL:
return ((InternalEList<?>)getInstantiatesCanonical()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__INSTANTIATES_URI:
return ((InternalEList<?>)getInstantiatesUri()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__BASED_ON:
return ((InternalEList<?>)getBasedOn()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__REPLACES:
return ((InternalEList<?>)getReplaces()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__PART_OF:
return ((InternalEList<?>)getPartOf()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__STATUS:
return basicSetStatus(null, msgs);
case FhirPackage.CARE_PLAN__INTENT:
return basicSetIntent(null, msgs);
case FhirPackage.CARE_PLAN__CATEGORY:
return ((InternalEList<?>)getCategory()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__TITLE:
return basicSetTitle(null, msgs);
case FhirPackage.CARE_PLAN__DESCRIPTION:
return basicSetDescription(null, msgs);
case FhirPackage.CARE_PLAN__SUBJECT:
return basicSetSubject(null, msgs);
case FhirPackage.CARE_PLAN__ENCOUNTER:
return basicSetEncounter(null, msgs);
case FhirPackage.CARE_PLAN__PERIOD:
return basicSetPeriod(null, msgs);
case FhirPackage.CARE_PLAN__CREATED:
return basicSetCreated(null, msgs);
case FhirPackage.CARE_PLAN__AUTHOR:
return basicSetAuthor(null, msgs);
case FhirPackage.CARE_PLAN__CONTRIBUTOR:
return ((InternalEList<?>)getContributor()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__CARE_TEAM:
return ((InternalEList<?>)getCareTeam()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__ADDRESSES:
return ((InternalEList<?>)getAddresses()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__SUPPORTING_INFO:
return ((InternalEList<?>)getSupportingInfo()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__GOAL:
return ((InternalEList<?>)getGoal()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__ACTIVITY:
return ((InternalEList<?>)getActivity()).basicRemove(otherEnd, msgs);
case FhirPackage.CARE_PLAN__NOTE:
return ((InternalEList<?>)getNote()).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 FhirPackage.CARE_PLAN__IDENTIFIER:
return getIdentifier();
case FhirPackage.CARE_PLAN__INSTANTIATES_CANONICAL:
return getInstantiatesCanonical();
case FhirPackage.CARE_PLAN__INSTANTIATES_URI:
return getInstantiatesUri();
case FhirPackage.CARE_PLAN__BASED_ON:
return getBasedOn();
case FhirPackage.CARE_PLAN__REPLACES:
return getReplaces();
case FhirPackage.CARE_PLAN__PART_OF:
return getPartOf();
case FhirPackage.CARE_PLAN__STATUS:
return getStatus();
case FhirPackage.CARE_PLAN__INTENT:
return getIntent();
case FhirPackage.CARE_PLAN__CATEGORY:
return getCategory();
case FhirPackage.CARE_PLAN__TITLE:
return getTitle();
case FhirPackage.CARE_PLAN__DESCRIPTION:
return getDescription();
case FhirPackage.CARE_PLAN__SUBJECT:
return getSubject();
case FhirPackage.CARE_PLAN__ENCOUNTER:
return getEncounter();
case FhirPackage.CARE_PLAN__PERIOD:
return getPeriod();
case FhirPackage.CARE_PLAN__CREATED:
return getCreated();
case FhirPackage.CARE_PLAN__AUTHOR:
return getAuthor();
case FhirPackage.CARE_PLAN__CONTRIBUTOR:
return getContributor();
case FhirPackage.CARE_PLAN__CARE_TEAM:
return getCareTeam();
case FhirPackage.CARE_PLAN__ADDRESSES:
return getAddresses();
case FhirPackage.CARE_PLAN__SUPPORTING_INFO:
return getSupportingInfo();
case FhirPackage.CARE_PLAN__GOAL:
return getGoal();
case FhirPackage.CARE_PLAN__ACTIVITY:
return getActivity();
case FhirPackage.CARE_PLAN__NOTE:
return getNote();
}
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 FhirPackage.CARE_PLAN__IDENTIFIER:
getIdentifier().clear();
getIdentifier().addAll((Collection<? extends Identifier>)newValue);
return;
case FhirPackage.CARE_PLAN__INSTANTIATES_CANONICAL:
getInstantiatesCanonical().clear();
getInstantiatesCanonical().addAll((Collection<? extends Canonical>)newValue);
return;
case FhirPackage.CARE_PLAN__INSTANTIATES_URI:
getInstantiatesUri().clear();
getInstantiatesUri().addAll((Collection<? extends Uri>)newValue);
return;
case FhirPackage.CARE_PLAN__BASED_ON:
getBasedOn().clear();
getBasedOn().addAll((Collection<? extends Reference>)newValue);
return;
case FhirPackage.CARE_PLAN__REPLACES:
getReplaces().clear();
getReplaces().addAll((Collection<? extends Reference>)newValue);
return;
case FhirPackage.CARE_PLAN__PART_OF:
getPartOf().clear();
getPartOf().addAll((Collection<? extends Reference>)newValue);
return;
case FhirPackage.CARE_PLAN__STATUS:
setStatus((RequestStatus)newValue);
return;
case FhirPackage.CARE_PLAN__INTENT:
setIntent((CarePlanIntent)newValue);
return;
case FhirPackage.CARE_PLAN__CATEGORY:
getCategory().clear();
getCategory().addAll((Collection<? extends CodeableConcept>)newValue);
return;
case FhirPackage.CARE_PLAN__TITLE:
setTitle((org.hl7.fhir.String)newValue);
return;
case FhirPackage.CARE_PLAN__DESCRIPTION:
setDescription((org.hl7.fhir.String)newValue);
return;
case FhirPackage.CARE_PLAN__SUBJECT:
setSubject((Reference)newValue);
return;
case FhirPackage.CARE_PLAN__ENCOUNTER:
setEncounter((Reference)newValue);
return;
case FhirPackage.CARE_PLAN__PERIOD:
setPeriod((Period)newValue);
return;
case FhirPackage.CARE_PLAN__CREATED:
setCreated((DateTime)newValue);
return;
case FhirPackage.CARE_PLAN__AUTHOR:
setAuthor((Reference)newValue);
return;
case FhirPackage.CARE_PLAN__CONTRIBUTOR:
getContributor().clear();
getContributor().addAll((Collection<? extends Reference>)newValue);
return;
case FhirPackage.CARE_PLAN__CARE_TEAM:
getCareTeam().clear();
getCareTeam().addAll((Collection<? extends Reference>)newValue);
return;
case FhirPackage.CARE_PLAN__ADDRESSES:
getAddresses().clear();
getAddresses().addAll((Collection<? extends Reference>)newValue);
return;
case FhirPackage.CARE_PLAN__SUPPORTING_INFO:
getSupportingInfo().clear();
getSupportingInfo().addAll((Collection<? extends Reference>)newValue);
return;
case FhirPackage.CARE_PLAN__GOAL:
getGoal().clear();
getGoal().addAll((Collection<? extends Reference>)newValue);
return;
case FhirPackage.CARE_PLAN__ACTIVITY:
getActivity().clear();
getActivity().addAll((Collection<? extends CarePlanActivity>)newValue);
return;
case FhirPackage.CARE_PLAN__NOTE:
getNote().clear();
getNote().addAll((Collection<? extends Annotation>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirPackage.CARE_PLAN__IDENTIFIER:
getIdentifier().clear();
return;
case FhirPackage.CARE_PLAN__INSTANTIATES_CANONICAL:
getInstantiatesCanonical().clear();
return;
case FhirPackage.CARE_PLAN__INSTANTIATES_URI:
getInstantiatesUri().clear();
return;
case FhirPackage.CARE_PLAN__BASED_ON:
getBasedOn().clear();
return;
case FhirPackage.CARE_PLAN__REPLACES:
getReplaces().clear();
return;
case FhirPackage.CARE_PLAN__PART_OF:
getPartOf().clear();
return;
case FhirPackage.CARE_PLAN__STATUS:
setStatus((RequestStatus)null);
return;
case FhirPackage.CARE_PLAN__INTENT:
setIntent((CarePlanIntent)null);
return;
case FhirPackage.CARE_PLAN__CATEGORY:
getCategory().clear();
return;
case FhirPackage.CARE_PLAN__TITLE:
setTitle((org.hl7.fhir.String)null);
return;
case FhirPackage.CARE_PLAN__DESCRIPTION:
setDescription((org.hl7.fhir.String)null);
return;
case FhirPackage.CARE_PLAN__SUBJECT:
setSubject((Reference)null);
return;
case FhirPackage.CARE_PLAN__ENCOUNTER:
setEncounter((Reference)null);
return;
case FhirPackage.CARE_PLAN__PERIOD:
setPeriod((Period)null);
return;
case FhirPackage.CARE_PLAN__CREATED:
setCreated((DateTime)null);
return;
case FhirPackage.CARE_PLAN__AUTHOR:
setAuthor((Reference)null);
return;
case FhirPackage.CARE_PLAN__CONTRIBUTOR:
getContributor().clear();
return;
case FhirPackage.CARE_PLAN__CARE_TEAM:
getCareTeam().clear();
return;
case FhirPackage.CARE_PLAN__ADDRESSES:
getAddresses().clear();
return;
case FhirPackage.CARE_PLAN__SUPPORTING_INFO:
getSupportingInfo().clear();
return;
case FhirPackage.CARE_PLAN__GOAL:
getGoal().clear();
return;
case FhirPackage.CARE_PLAN__ACTIVITY:
getActivity().clear();
return;
case FhirPackage.CARE_PLAN__NOTE:
getNote().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirPackage.CARE_PLAN__IDENTIFIER:
return identifier != null && !identifier.isEmpty();
case FhirPackage.CARE_PLAN__INSTANTIATES_CANONICAL:
return instantiatesCanonical != null && !instantiatesCanonical.isEmpty();
case FhirPackage.CARE_PLAN__INSTANTIATES_URI:
return instantiatesUri != null && !instantiatesUri.isEmpty();
case FhirPackage.CARE_PLAN__BASED_ON:
return basedOn != null && !basedOn.isEmpty();
case FhirPackage.CARE_PLAN__REPLACES:
return replaces != null && !replaces.isEmpty();
case FhirPackage.CARE_PLAN__PART_OF:
return partOf != null && !partOf.isEmpty();
case FhirPackage.CARE_PLAN__STATUS:
return status != null;
case FhirPackage.CARE_PLAN__INTENT:
return intent != null;
case FhirPackage.CARE_PLAN__CATEGORY:
return category != null && !category.isEmpty();
case FhirPackage.CARE_PLAN__TITLE:
return title != null;
case FhirPackage.CARE_PLAN__DESCRIPTION:
return description != null;
case FhirPackage.CARE_PLAN__SUBJECT:
return subject != null;
case FhirPackage.CARE_PLAN__ENCOUNTER:
return encounter != null;
case FhirPackage.CARE_PLAN__PERIOD:
return period != null;
case FhirPackage.CARE_PLAN__CREATED:
return created != null;
case FhirPackage.CARE_PLAN__AUTHOR:
return author != null;
case FhirPackage.CARE_PLAN__CONTRIBUTOR:
return contributor != null && !contributor.isEmpty();
case FhirPackage.CARE_PLAN__CARE_TEAM:
return careTeam != null && !careTeam.isEmpty();
case FhirPackage.CARE_PLAN__ADDRESSES:
return addresses != null && !addresses.isEmpty();
case FhirPackage.CARE_PLAN__SUPPORTING_INFO:
return supportingInfo != null && !supportingInfo.isEmpty();
case FhirPackage.CARE_PLAN__GOAL:
return goal != null && !goal.isEmpty();
case FhirPackage.CARE_PLAN__ACTIVITY:
return activity != null && !activity.isEmpty();
case FhirPackage.CARE_PLAN__NOTE:
return note != null && !note.isEmpty();
}
return super.eIsSet(featureID);
}
} //CarePlanImpl