All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openhealthtools.mdht.uml.cda.impl.DocumentRootImpl 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 org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EMap;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl;
import org.eclipse.emf.ecore.util.BasicFeatureMap;
import org.eclipse.emf.ecore.util.EcoreEMap;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;
import org.openhealthtools.mdht.uml.cda.CDAPackage;
import org.openhealthtools.mdht.uml.cda.ClinicalDocument;
import org.openhealthtools.mdht.uml.cda.DocumentRoot;

/**
 * 
 * An implementation of the model object 'Document Root'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.openhealthtools.mdht.uml.cda.impl.DocumentRootImpl#getMixed Mixed}
  • *
  • {@link org.openhealthtools.mdht.uml.cda.impl.DocumentRootImpl#getXMLNSPrefixMap XMLNS Prefix Map}
  • *
  • {@link org.openhealthtools.mdht.uml.cda.impl.DocumentRootImpl#getXSISchemaLocation XSI Schema Location}
  • *
  • {@link org.openhealthtools.mdht.uml.cda.impl.DocumentRootImpl#getClinicalDocument Clinical Document}
  • *
*

* * @generated */ public class DocumentRootImpl extends EObjectImpl implements DocumentRoot { /** * The cached value of the '{@link #getMixed() Mixed}' attribute list. * * * @see #getMixed() * @generated * @ordered */ protected FeatureMap mixed; /** * The cached value of the '{@link #getXMLNSPrefixMap() XMLNS Prefix Map}' map. * * * @see #getXMLNSPrefixMap() * @generated * @ordered */ protected EMap xMLNSPrefixMap; /** * The cached value of the '{@link #getXSISchemaLocation() XSI Schema Location}' map. * * * @see #getXSISchemaLocation() * @generated * @ordered */ protected EMap xSISchemaLocation; /** * * * @generated */ protected DocumentRootImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return CDAPackage.Literals.DOCUMENT_ROOT; } /** * * * @generated */ public FeatureMap getMixed() { if (mixed == null) { mixed = new BasicFeatureMap(this, CDAPackage.DOCUMENT_ROOT__MIXED); } return mixed; } /** * * * @generated */ public EMap getXMLNSPrefixMap() { if (xMLNSPrefixMap == null) { xMLNSPrefixMap = new EcoreEMap( EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, CDAPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP); } return xMLNSPrefixMap; } /** * * * @generated */ public EMap getXSISchemaLocation() { if (xSISchemaLocation == null) { xSISchemaLocation = new EcoreEMap( EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, CDAPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); } return xSISchemaLocation; } /** * * * @generated */ public ClinicalDocument getClinicalDocument() { return (ClinicalDocument) getMixed().get(CDAPackage.Literals.DOCUMENT_ROOT__CLINICAL_DOCUMENT, true); } /** * * * @generated */ public NotificationChain basicSetClinicalDocument(ClinicalDocument newClinicalDocument, NotificationChain msgs) { return ((FeatureMap.Internal) getMixed()).basicAdd( CDAPackage.Literals.DOCUMENT_ROOT__CLINICAL_DOCUMENT, newClinicalDocument, msgs); } /** * * * @generated */ public void setClinicalDocument(ClinicalDocument newClinicalDocument) { ((FeatureMap.Internal) getMixed()).set( CDAPackage.Literals.DOCUMENT_ROOT__CLINICAL_DOCUMENT, newClinicalDocument); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case CDAPackage.DOCUMENT_ROOT__MIXED: return ((InternalEList) getMixed()).basicRemove(otherEnd, msgs); case CDAPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: return ((InternalEList) getXMLNSPrefixMap()).basicRemove(otherEnd, msgs); case CDAPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: return ((InternalEList) getXSISchemaLocation()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case CDAPackage.DOCUMENT_ROOT__MIXED: if (coreType) { return getMixed(); } return ((FeatureMap.Internal) getMixed()).getWrapper(); case CDAPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: if (coreType) { return getXMLNSPrefixMap(); } else { return getXMLNSPrefixMap().map(); } case CDAPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: if (coreType) { return getXSISchemaLocation(); } else { return getXSISchemaLocation().map(); } case CDAPackage.DOCUMENT_ROOT__CLINICAL_DOCUMENT: return getClinicalDocument(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case CDAPackage.DOCUMENT_ROOT__MIXED: ((FeatureMap.Internal) getMixed()).set(newValue); return; case CDAPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: ((EStructuralFeature.Setting) getXMLNSPrefixMap()).set(newValue); return; case CDAPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: ((EStructuralFeature.Setting) getXSISchemaLocation()).set(newValue); return; case CDAPackage.DOCUMENT_ROOT__CLINICAL_DOCUMENT: setClinicalDocument((ClinicalDocument) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case CDAPackage.DOCUMENT_ROOT__MIXED: getMixed().clear(); return; case CDAPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: getXMLNSPrefixMap().clear(); return; case CDAPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: getXSISchemaLocation().clear(); return; case CDAPackage.DOCUMENT_ROOT__CLINICAL_DOCUMENT: setClinicalDocument((ClinicalDocument) null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case CDAPackage.DOCUMENT_ROOT__MIXED: return mixed != null && !mixed.isEmpty(); case CDAPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty(); case CDAPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: return xSISchemaLocation != null && !xSISchemaLocation.isEmpty(); case CDAPackage.DOCUMENT_ROOT__CLINICAL_DOCUMENT: return getClinicalDocument() != null; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) { return super.toString(); } StringBuffer result = new StringBuffer(super.toString()); result.append(" (mixed: "); result.append(mixed); result.append(')'); return result.toString(); } } // DocumentRootImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy