org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2009, 2011 IBM Corporation 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.openhealthtools.mdht.uml.cda.impl;
import java.util.Collection;
import java.util.Map;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.DiagnosticChain;
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.openhealthtools.mdht.uml.cda.Authenticator;
import org.openhealthtools.mdht.uml.cda.Author;
import org.openhealthtools.mdht.uml.cda.Authorization;
import org.openhealthtools.mdht.uml.cda.CDAPackage;
import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
import org.openhealthtools.mdht.uml.cda.Component1;
import org.openhealthtools.mdht.uml.cda.Component2;
import org.openhealthtools.mdht.uml.cda.Custodian;
import org.openhealthtools.mdht.uml.cda.DataEnterer;
import org.openhealthtools.mdht.uml.cda.DocumentationOf;
import org.openhealthtools.mdht.uml.cda.InFulfillmentOf;
import org.openhealthtools.mdht.uml.cda.Informant12;
import org.openhealthtools.mdht.uml.cda.InformationRecipient;
import org.openhealthtools.mdht.uml.cda.InfrastructureRootTypeId;
import org.openhealthtools.mdht.uml.cda.LegalAuthenticator;
import org.openhealthtools.mdht.uml.cda.Participant1;
import org.openhealthtools.mdht.uml.cda.Patient;
import org.openhealthtools.mdht.uml.cda.PatientRole;
import org.openhealthtools.mdht.uml.cda.RecordTarget;
import org.openhealthtools.mdht.uml.cda.RelatedDocument;
import org.openhealthtools.mdht.uml.cda.Section;
import org.openhealthtools.mdht.uml.cda.StructuredBody;
import org.openhealthtools.mdht.uml.cda.operations.ClinicalDocumentOperations;
import org.openhealthtools.mdht.uml.hl7.datatypes.CE;
import org.openhealthtools.mdht.uml.hl7.datatypes.CS;
import org.openhealthtools.mdht.uml.hl7.datatypes.II;
import org.openhealthtools.mdht.uml.hl7.datatypes.INT;
import org.openhealthtools.mdht.uml.hl7.datatypes.ST;
import org.openhealthtools.mdht.uml.hl7.datatypes.TS;
import org.openhealthtools.mdht.uml.hl7.rim.impl.ActImpl;
import org.openhealthtools.mdht.uml.hl7.vocab.ActClinicalDocument;
import org.openhealthtools.mdht.uml.hl7.vocab.ActMood;
import org.openhealthtools.mdht.uml.hl7.vocab.NullFlavor;
/**
*
* An implementation of the model object 'Clinical Document'.
*
*
* The following features are implemented:
*
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getRealmCodes Realm Code}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getTypeId Type Id}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getTemplateIds Template Id}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getId Id}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getCode Code}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getTitle Title}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getEffectiveTime Effective Time}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getConfidentialityCode Confidentiality Code}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getLanguageCode Language Code}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getSetId Set Id}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getVersionNumber Version Number}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getCopyTime Copy Time}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getRecordTargets Record Target}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getAuthors Author}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getDataEnterer Data Enterer}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getInformants Informant}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getCustodian Custodian}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getInformationRecipients Information Recipient}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getLegalAuthenticator Legal Authenticator}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getAuthenticators Authenticator}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getParticipants Participant}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getInFulfillmentOfs In Fulfillment Of}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getDocumentationOfs Documentation Of}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getRelatedDocuments Related Document}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getAuthorizations Authorization}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getComponentOf Component Of}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getComponent Component}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getNullFlavor Null Flavor}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getClassCode Class Code}
* - {@link org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl#getMoodCode Mood Code}
*
*
*
* @generated
*/
public class ClinicalDocumentImpl extends ActImpl implements ClinicalDocument {
/**
* The cached value of the '{@link #getRealmCodes() Realm Code}' containment reference list.
*
*
* @see #getRealmCodes()
* @generated
* @ordered
*/
protected EList realmCodes;
/**
* The cached value of the '{@link #getTypeId() Type Id}' containment reference.
*
*
* @see #getTypeId()
* @generated
* @ordered
*/
protected InfrastructureRootTypeId typeId;
/**
* The cached value of the '{@link #getTemplateIds() Template Id}' containment reference list.
*
*
* @see #getTemplateIds()
* @generated
* @ordered
*/
protected EList templateIds;
/**
* The cached value of the '{@link #getId() Id}' containment reference.
*
*
* @see #getId()
* @generated
* @ordered
*/
protected II id;
/**
* The cached value of the '{@link #getCode() Code}' containment reference.
*
*
* @see #getCode()
* @generated
* @ordered
*/
protected CE code;
/**
* The cached value of the '{@link #getTitle() Title}' containment reference.
*
*
* @see #getTitle()
* @generated
* @ordered
*/
protected ST title;
/**
* The cached value of the '{@link #getEffectiveTime() Effective Time}' containment reference.
*
*
* @see #getEffectiveTime()
* @generated
* @ordered
*/
protected TS effectiveTime;
/**
* The cached value of the '{@link #getConfidentialityCode() Confidentiality Code}' containment reference.
*
*
* @see #getConfidentialityCode()
* @generated
* @ordered
*/
protected CE confidentialityCode;
/**
* The cached value of the '{@link #getLanguageCode() Language Code}' containment reference.
*
*
* @see #getLanguageCode()
* @generated
* @ordered
*/
protected CS languageCode;
/**
* The cached value of the '{@link #getSetId() Set Id}' containment reference.
*
*
* @see #getSetId()
* @generated
* @ordered
*/
protected II setId;
/**
* The cached value of the '{@link #getVersionNumber() Version Number}' containment reference.
*
*
* @see #getVersionNumber()
* @generated
* @ordered
*/
protected INT versionNumber;
/**
* The cached value of the '{@link #getCopyTime() Copy Time}' containment reference.
*
*
* @see #getCopyTime()
* @generated
* @ordered
*/
protected TS copyTime;
/**
* The cached value of the '{@link #getRecordTargets() Record Target}' containment reference list.
*
*
* @see #getRecordTargets()
* @generated
* @ordered
*/
protected EList recordTargets;
/**
* The cached value of the '{@link #getAuthors() Author}' containment reference list.
*
*
* @see #getAuthors()
* @generated
* @ordered
*/
protected EList authors;
/**
* The cached value of the '{@link #getDataEnterer() Data Enterer}' containment reference.
*
*
* @see #getDataEnterer()
* @generated
* @ordered
*/
protected DataEnterer dataEnterer;
/**
* The cached value of the '{@link #getInformants() Informant}' containment reference list.
*
*
* @see #getInformants()
* @generated
* @ordered
*/
protected EList informants;
/**
* The cached value of the '{@link #getCustodian() Custodian}' containment reference.
*
*
* @see #getCustodian()
* @generated
* @ordered
*/
protected Custodian custodian;
/**
* The cached value of the '{@link #getInformationRecipients() Information Recipient}' containment reference list.
*
*
* @see #getInformationRecipients()
* @generated
* @ordered
*/
protected EList informationRecipients;
/**
* The cached value of the '{@link #getLegalAuthenticator() Legal Authenticator}' containment reference.
*
*
* @see #getLegalAuthenticator()
* @generated
* @ordered
*/
protected LegalAuthenticator legalAuthenticator;
/**
* The cached value of the '{@link #getAuthenticators() Authenticator}' containment reference list.
*
*
* @see #getAuthenticators()
* @generated
* @ordered
*/
protected EList authenticators;
/**
* The cached value of the '{@link #getParticipants() Participant}' containment reference list.
*
*
* @see #getParticipants()
* @generated
* @ordered
*/
protected EList participants;
/**
* The cached value of the '{@link #getInFulfillmentOfs() In Fulfillment Of}' containment reference list.
*
*
* @see #getInFulfillmentOfs()
* @generated
* @ordered
*/
protected EList inFulfillmentOfs;
/**
* The cached value of the '{@link #getDocumentationOfs() Documentation Of}' containment reference list.
*
*
* @see #getDocumentationOfs()
* @generated
* @ordered
*/
protected EList documentationOfs;
/**
* The cached value of the '{@link #getRelatedDocuments() Related Document}' containment reference list.
*
*
* @see #getRelatedDocuments()
* @generated
* @ordered
*/
protected EList relatedDocuments;
/**
* The cached value of the '{@link #getAuthorizations() Authorization}' containment reference list.
*
*
* @see #getAuthorizations()
* @generated
* @ordered
*/
protected EList authorizations;
/**
* The cached value of the '{@link #getComponentOf() Component Of}' containment reference.
*
*
* @see #getComponentOf()
* @generated
* @ordered
*/
protected Component1 componentOf;
/**
* The cached value of the '{@link #getComponent() Component}' containment reference.
*
*
* @see #getComponent()
* @generated
* @ordered
*/
protected Component2 component;
/**
* The default value of the '{@link #getNullFlavor() Null Flavor}' attribute.
*
*
* @see #getNullFlavor()
* @generated
* @ordered
*/
protected static final NullFlavor NULL_FLAVOR_EDEFAULT = NullFlavor.ASKU;
/**
* The cached value of the '{@link #getNullFlavor() Null Flavor}' attribute.
*
*
* @see #getNullFlavor()
* @generated
* @ordered
*/
protected NullFlavor nullFlavor = NULL_FLAVOR_EDEFAULT;
/**
* This is true if the Null Flavor attribute has been set.
*
*
* @generated
* @ordered
*/
protected boolean nullFlavorESet;
/**
* The default value of the '{@link #getClassCode() Class Code}' attribute.
*
*
* @see #getClassCode()
* @generated
* @ordered
*/
protected static final ActClinicalDocument CLASS_CODE_EDEFAULT = ActClinicalDocument.DOCCLIN;
/**
* The cached value of the '{@link #getClassCode() Class Code}' attribute.
*
*
* @see #getClassCode()
* @generated
* @ordered
*/
protected ActClinicalDocument classCode = CLASS_CODE_EDEFAULT;
/**
* This is true if the Class Code attribute has been set.
*
*
* @generated
* @ordered
*/
protected boolean classCodeESet;
/**
* The default value of the '{@link #getMoodCode() Mood Code}' attribute.
*
*
* @see #getMoodCode()
* @generated
* @ordered
*/
protected static final ActMood MOOD_CODE_EDEFAULT = ActMood.EVN;
/**
* The cached value of the '{@link #getMoodCode() Mood Code}' attribute.
*
*
* @see #getMoodCode()
* @generated
* @ordered
*/
protected ActMood moodCode = MOOD_CODE_EDEFAULT;
/**
* This is true if the Mood Code attribute has been set.
*
*
* @generated
* @ordered
*/
protected boolean moodCodeESet;
/**
*
*
* @generated
*/
protected ClinicalDocumentImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return CDAPackage.Literals.CLINICAL_DOCUMENT;
}
/**
*
*
* @generated
*/
@Override
public EList getRealmCodes() {
if (realmCodes == null) {
realmCodes = new EObjectContainmentEList(CS.class, this, CDAPackage.CLINICAL_DOCUMENT__REALM_CODE);
}
return realmCodes;
}
/**
*
*
* @generated
*/
@Override
public InfrastructureRootTypeId getTypeId() {
return typeId;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetTypeId(InfrastructureRootTypeId newTypeId, NotificationChain msgs) {
InfrastructureRootTypeId oldTypeId = typeId;
typeId = newTypeId;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__TYPE_ID, oldTypeId, newTypeId);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setTypeId(InfrastructureRootTypeId newTypeId) {
if (newTypeId != typeId) {
NotificationChain msgs = null;
if (typeId != null) {
msgs = ((InternalEObject) typeId).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__TYPE_ID, null, msgs);
}
if (newTypeId != null) {
msgs = ((InternalEObject) newTypeId).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__TYPE_ID, null, msgs);
}
msgs = basicSetTypeId(newTypeId, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__TYPE_ID, newTypeId, newTypeId));
}
}
/**
*
*
* @generated
*/
@Override
public EList getTemplateIds() {
if (templateIds == null) {
templateIds = new EObjectContainmentEList(II.class, this, CDAPackage.CLINICAL_DOCUMENT__TEMPLATE_ID);
}
return templateIds;
}
/**
*
*
* @generated
*/
public II getId() {
return id;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetId(II newId, NotificationChain msgs) {
II oldId = id;
id = newId;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__ID, oldId, newId);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setId(II newId) {
if (newId != id) {
NotificationChain msgs = null;
if (id != null) {
msgs = ((InternalEObject) id).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__ID, null, msgs);
}
if (newId != null) {
msgs = ((InternalEObject) newId).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__ID, null, msgs);
}
msgs = basicSetId(newId, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__ID, newId, newId));
}
}
/**
*
*
* @generated
*/
public CE getCode() {
return code;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetCode(CE newCode, NotificationChain msgs) {
CE oldCode = code;
code = newCode;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__CODE, oldCode, newCode);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setCode(CE newCode) {
if (newCode != code) {
NotificationChain msgs = null;
if (code != null) {
msgs = ((InternalEObject) code).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__CODE, null, msgs);
}
if (newCode != null) {
msgs = ((InternalEObject) newCode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__CODE, null, msgs);
}
msgs = basicSetCode(newCode, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__CODE, newCode, newCode));
}
}
/**
*
*
* @generated
*/
public ST getTitle() {
return title;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetTitle(ST newTitle, NotificationChain msgs) {
ST oldTitle = title;
title = newTitle;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__TITLE, oldTitle, newTitle);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setTitle(ST newTitle) {
if (newTitle != title) {
NotificationChain msgs = null;
if (title != null) {
msgs = ((InternalEObject) title).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__TITLE, null, msgs);
}
if (newTitle != null) {
msgs = ((InternalEObject) newTitle).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__TITLE, null, msgs);
}
msgs = basicSetTitle(newTitle, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__TITLE, newTitle, newTitle));
}
}
/**
*
*
* @generated
*/
public TS getEffectiveTime() {
return effectiveTime;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetEffectiveTime(TS newEffectiveTime, NotificationChain msgs) {
TS oldEffectiveTime = effectiveTime;
effectiveTime = newEffectiveTime;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__EFFECTIVE_TIME, oldEffectiveTime,
newEffectiveTime);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setEffectiveTime(TS newEffectiveTime) {
if (newEffectiveTime != effectiveTime) {
NotificationChain msgs = null;
if (effectiveTime != null) {
msgs = ((InternalEObject) effectiveTime).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__EFFECTIVE_TIME, null, msgs);
}
if (newEffectiveTime != null) {
msgs = ((InternalEObject) newEffectiveTime).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__EFFECTIVE_TIME, null, msgs);
}
msgs = basicSetEffectiveTime(newEffectiveTime, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__EFFECTIVE_TIME, newEffectiveTime,
newEffectiveTime));
}
}
/**
*
*
* @generated
*/
public CE getConfidentialityCode() {
return confidentialityCode;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetConfidentialityCode(CE newConfidentialityCode, NotificationChain msgs) {
CE oldConfidentialityCode = confidentialityCode;
confidentialityCode = newConfidentialityCode;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__CONFIDENTIALITY_CODE, oldConfidentialityCode,
newConfidentialityCode);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setConfidentialityCode(CE newConfidentialityCode) {
if (newConfidentialityCode != confidentialityCode) {
NotificationChain msgs = null;
if (confidentialityCode != null) {
msgs = ((InternalEObject) confidentialityCode).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__CONFIDENTIALITY_CODE, null, msgs);
}
if (newConfidentialityCode != null) {
msgs = ((InternalEObject) newConfidentialityCode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__CONFIDENTIALITY_CODE, null, msgs);
}
msgs = basicSetConfidentialityCode(newConfidentialityCode, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__CONFIDENTIALITY_CODE, newConfidentialityCode,
newConfidentialityCode));
}
}
/**
*
*
* @generated
*/
public CS getLanguageCode() {
return languageCode;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetLanguageCode(CS newLanguageCode, NotificationChain msgs) {
CS oldLanguageCode = languageCode;
languageCode = newLanguageCode;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__LANGUAGE_CODE, oldLanguageCode, newLanguageCode);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setLanguageCode(CS newLanguageCode) {
if (newLanguageCode != languageCode) {
NotificationChain msgs = null;
if (languageCode != null) {
msgs = ((InternalEObject) languageCode).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__LANGUAGE_CODE, null, msgs);
}
if (newLanguageCode != null) {
msgs = ((InternalEObject) newLanguageCode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__LANGUAGE_CODE, null, msgs);
}
msgs = basicSetLanguageCode(newLanguageCode, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__LANGUAGE_CODE, newLanguageCode, newLanguageCode));
}
}
/**
*
*
* @generated
*/
public II getSetId() {
return setId;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetSetId(II newSetId, NotificationChain msgs) {
II oldSetId = setId;
setId = newSetId;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__SET_ID, oldSetId, newSetId);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setSetId(II newSetId) {
if (newSetId != setId) {
NotificationChain msgs = null;
if (setId != null) {
msgs = ((InternalEObject) setId).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__SET_ID, null, msgs);
}
if (newSetId != null) {
msgs = ((InternalEObject) newSetId).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__SET_ID, null, msgs);
}
msgs = basicSetSetId(newSetId, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__SET_ID, newSetId, newSetId));
}
}
/**
*
*
* @generated
*/
public INT getVersionNumber() {
return versionNumber;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetVersionNumber(INT newVersionNumber, NotificationChain msgs) {
INT oldVersionNumber = versionNumber;
versionNumber = newVersionNumber;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__VERSION_NUMBER, oldVersionNumber,
newVersionNumber);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setVersionNumber(INT newVersionNumber) {
if (newVersionNumber != versionNumber) {
NotificationChain msgs = null;
if (versionNumber != null) {
msgs = ((InternalEObject) versionNumber).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__VERSION_NUMBER, null, msgs);
}
if (newVersionNumber != null) {
msgs = ((InternalEObject) newVersionNumber).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__VERSION_NUMBER, null, msgs);
}
msgs = basicSetVersionNumber(newVersionNumber, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__VERSION_NUMBER, newVersionNumber,
newVersionNumber));
}
}
/**
*
*
* @generated
*/
public TS getCopyTime() {
return copyTime;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetCopyTime(TS newCopyTime, NotificationChain msgs) {
TS oldCopyTime = copyTime;
copyTime = newCopyTime;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__COPY_TIME, oldCopyTime, newCopyTime);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setCopyTime(TS newCopyTime) {
if (newCopyTime != copyTime) {
NotificationChain msgs = null;
if (copyTime != null) {
msgs = ((InternalEObject) copyTime).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__COPY_TIME, null, msgs);
}
if (newCopyTime != null) {
msgs = ((InternalEObject) newCopyTime).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__COPY_TIME, null, msgs);
}
msgs = basicSetCopyTime(newCopyTime, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__COPY_TIME, newCopyTime, newCopyTime));
}
}
/**
*
*
* @generated
*/
public EList getRecordTargets() {
if (recordTargets == null) {
recordTargets = new EObjectContainmentEList(
RecordTarget.class, this, CDAPackage.CLINICAL_DOCUMENT__RECORD_TARGET);
}
return recordTargets;
}
/**
*
*
* @generated
*/
public EList getAuthors() {
if (authors == null) {
authors = new EObjectContainmentEList(Author.class, this, CDAPackage.CLINICAL_DOCUMENT__AUTHOR);
}
return authors;
}
/**
*
*
* @generated
*/
public DataEnterer getDataEnterer() {
return dataEnterer;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetDataEnterer(DataEnterer newDataEnterer, NotificationChain msgs) {
DataEnterer oldDataEnterer = dataEnterer;
dataEnterer = newDataEnterer;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__DATA_ENTERER, oldDataEnterer, newDataEnterer);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setDataEnterer(DataEnterer newDataEnterer) {
if (newDataEnterer != dataEnterer) {
NotificationChain msgs = null;
if (dataEnterer != null) {
msgs = ((InternalEObject) dataEnterer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__DATA_ENTERER, null, msgs);
}
if (newDataEnterer != null) {
msgs = ((InternalEObject) newDataEnterer).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__DATA_ENTERER, null, msgs);
}
msgs = basicSetDataEnterer(newDataEnterer, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__DATA_ENTERER, newDataEnterer, newDataEnterer));
}
}
/**
*
*
* @generated
*/
public EList getInformants() {
if (informants == null) {
informants = new EObjectContainmentEList(
Informant12.class, this, CDAPackage.CLINICAL_DOCUMENT__INFORMANT);
}
return informants;
}
/**
*
*
* @generated
*/
public Custodian getCustodian() {
return custodian;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetCustodian(Custodian newCustodian, NotificationChain msgs) {
Custodian oldCustodian = custodian;
custodian = newCustodian;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__CUSTODIAN, oldCustodian, newCustodian);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setCustodian(Custodian newCustodian) {
if (newCustodian != custodian) {
NotificationChain msgs = null;
if (custodian != null) {
msgs = ((InternalEObject) custodian).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__CUSTODIAN, null, msgs);
}
if (newCustodian != null) {
msgs = ((InternalEObject) newCustodian).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__CUSTODIAN, null, msgs);
}
msgs = basicSetCustodian(newCustodian, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__CUSTODIAN, newCustodian, newCustodian));
}
}
/**
*
*
* @generated
*/
public EList getInformationRecipients() {
if (informationRecipients == null) {
informationRecipients = new EObjectContainmentEList(
InformationRecipient.class, this, CDAPackage.CLINICAL_DOCUMENT__INFORMATION_RECIPIENT);
}
return informationRecipients;
}
/**
*
*
* @generated
*/
public LegalAuthenticator getLegalAuthenticator() {
return legalAuthenticator;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetLegalAuthenticator(LegalAuthenticator newLegalAuthenticator, NotificationChain msgs) {
LegalAuthenticator oldLegalAuthenticator = legalAuthenticator;
legalAuthenticator = newLegalAuthenticator;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__LEGAL_AUTHENTICATOR, oldLegalAuthenticator,
newLegalAuthenticator);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setLegalAuthenticator(LegalAuthenticator newLegalAuthenticator) {
if (newLegalAuthenticator != legalAuthenticator) {
NotificationChain msgs = null;
if (legalAuthenticator != null) {
msgs = ((InternalEObject) legalAuthenticator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__LEGAL_AUTHENTICATOR, null, msgs);
}
if (newLegalAuthenticator != null) {
msgs = ((InternalEObject) newLegalAuthenticator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__LEGAL_AUTHENTICATOR, null, msgs);
}
msgs = basicSetLegalAuthenticator(newLegalAuthenticator, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__LEGAL_AUTHENTICATOR, newLegalAuthenticator,
newLegalAuthenticator));
}
}
/**
*
*
* @generated
*/
public EList getAuthenticators() {
if (authenticators == null) {
authenticators = new EObjectContainmentEList(
Authenticator.class, this, CDAPackage.CLINICAL_DOCUMENT__AUTHENTICATOR);
}
return authenticators;
}
/**
*
*
* @generated
*/
public EList getParticipants() {
if (participants == null) {
participants = new EObjectContainmentEList(
Participant1.class, this, CDAPackage.CLINICAL_DOCUMENT__PARTICIPANT);
}
return participants;
}
/**
*
*
* @generated
*/
public EList getInFulfillmentOfs() {
if (inFulfillmentOfs == null) {
inFulfillmentOfs = new EObjectContainmentEList(
InFulfillmentOf.class, this, CDAPackage.CLINICAL_DOCUMENT__IN_FULFILLMENT_OF);
}
return inFulfillmentOfs;
}
/**
*
*
* @generated
*/
public EList getDocumentationOfs() {
if (documentationOfs == null) {
documentationOfs = new EObjectContainmentEList(
DocumentationOf.class, this, CDAPackage.CLINICAL_DOCUMENT__DOCUMENTATION_OF);
}
return documentationOfs;
}
/**
*
*
* @generated
*/
public EList getRelatedDocuments() {
if (relatedDocuments == null) {
relatedDocuments = new EObjectContainmentEList(
RelatedDocument.class, this, CDAPackage.CLINICAL_DOCUMENT__RELATED_DOCUMENT);
}
return relatedDocuments;
}
/**
*
*
* @generated
*/
public EList getAuthorizations() {
if (authorizations == null) {
authorizations = new EObjectContainmentEList(
Authorization.class, this, CDAPackage.CLINICAL_DOCUMENT__AUTHORIZATION);
}
return authorizations;
}
/**
*
*
* @generated
*/
public Component1 getComponentOf() {
return componentOf;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetComponentOf(Component1 newComponentOf, NotificationChain msgs) {
Component1 oldComponentOf = componentOf;
componentOf = newComponentOf;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__COMPONENT_OF, oldComponentOf, newComponentOf);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setComponentOf(Component1 newComponentOf) {
if (newComponentOf != componentOf) {
NotificationChain msgs = null;
if (componentOf != null) {
msgs = ((InternalEObject) componentOf).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__COMPONENT_OF, null, msgs);
}
if (newComponentOf != null) {
msgs = ((InternalEObject) newComponentOf).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__COMPONENT_OF, null, msgs);
}
msgs = basicSetComponentOf(newComponentOf, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__COMPONENT_OF, newComponentOf, newComponentOf));
}
}
/**
*
*
* @generated
*/
public Component2 getComponent() {
return component;
}
/**
*
*
* @generated
*/
public NotificationChain basicSetComponent(Component2 newComponent, NotificationChain msgs) {
Component2 oldComponent = component;
component = newComponent;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__COMPONENT, oldComponent, newComponent);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
return msgs;
}
/**
*
*
* @generated
*/
public void setComponent(Component2 newComponent) {
if (newComponent != component) {
NotificationChain msgs = null;
if (component != null) {
msgs = ((InternalEObject) component).eInverseRemove(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__COMPONENT, null, msgs);
}
if (newComponent != null) {
msgs = ((InternalEObject) newComponent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE -
CDAPackage.CLINICAL_DOCUMENT__COMPONENT, null, msgs);
}
msgs = basicSetComponent(newComponent, msgs);
if (msgs != null) {
msgs.dispatch();
}
} else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__COMPONENT, newComponent, newComponent));
}
}
/**
*
*
* @generated
*/
@Override
public NullFlavor getNullFlavor() {
return nullFlavor;
}
/**
*
*
* @generated
*/
public void setNullFlavor(NullFlavor newNullFlavor) {
NullFlavor oldNullFlavor = nullFlavor;
nullFlavor = newNullFlavor == null
? NULL_FLAVOR_EDEFAULT
: newNullFlavor;
boolean oldNullFlavorESet = nullFlavorESet;
nullFlavorESet = true;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__NULL_FLAVOR, oldNullFlavor, nullFlavor,
!oldNullFlavorESet));
}
}
/**
*
*
* @generated
*/
public void unsetNullFlavor() {
NullFlavor oldNullFlavor = nullFlavor;
boolean oldNullFlavorESet = nullFlavorESet;
nullFlavor = NULL_FLAVOR_EDEFAULT;
nullFlavorESet = false;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.UNSET, CDAPackage.CLINICAL_DOCUMENT__NULL_FLAVOR, oldNullFlavor,
NULL_FLAVOR_EDEFAULT, oldNullFlavorESet));
}
}
/**
*
*
* @generated
*/
public boolean isSetNullFlavor() {
return nullFlavorESet;
}
/**
*
*
* @generated
*/
@Override
public ActClinicalDocument getClassCode() {
return classCode;
}
/**
*
*
* @generated
*/
public void setClassCode(ActClinicalDocument newClassCode) {
ActClinicalDocument oldClassCode = classCode;
classCode = newClassCode == null
? CLASS_CODE_EDEFAULT
: newClassCode;
boolean oldClassCodeESet = classCodeESet;
classCodeESet = true;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__CLASS_CODE, oldClassCode, classCode,
!oldClassCodeESet));
}
}
/**
*
*
* @generated
*/
public void unsetClassCode() {
ActClinicalDocument oldClassCode = classCode;
boolean oldClassCodeESet = classCodeESet;
classCode = CLASS_CODE_EDEFAULT;
classCodeESet = false;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.UNSET, CDAPackage.CLINICAL_DOCUMENT__CLASS_CODE, oldClassCode, CLASS_CODE_EDEFAULT,
oldClassCodeESet));
}
}
/**
*
*
* @generated
*/
public boolean isSetClassCode() {
return classCodeESet;
}
/**
*
*
* @generated
*/
@Override
public ActMood getMoodCode() {
return moodCode;
}
/**
*
*
* @generated
*/
public void setMoodCode(ActMood newMoodCode) {
ActMood oldMoodCode = moodCode;
moodCode = newMoodCode == null
? MOOD_CODE_EDEFAULT
: newMoodCode;
boolean oldMoodCodeESet = moodCodeESet;
moodCodeESet = true;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.SET, CDAPackage.CLINICAL_DOCUMENT__MOOD_CODE, oldMoodCode, moodCode,
!oldMoodCodeESet));
}
}
/**
*
*
* @generated
*/
public void unsetMoodCode() {
ActMood oldMoodCode = moodCode;
boolean oldMoodCodeESet = moodCodeESet;
moodCode = MOOD_CODE_EDEFAULT;
moodCodeESet = false;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(
this, Notification.UNSET, CDAPackage.CLINICAL_DOCUMENT__MOOD_CODE, oldMoodCode, MOOD_CODE_EDEFAULT,
oldMoodCodeESet));
}
}
/**
*
*
* @generated
*/
public boolean isSetMoodCode() {
return moodCodeESet;
}
/**
*
*
* @generated
*/
public boolean validateClassCode(DiagnosticChain diagnostics, Map