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

org.openhealthtools.mdht.uml.cda.impl.StrucDocTextImpl 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.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.BasicFeatureMap;
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.StrucDocText;
import org.openhealthtools.mdht.uml.cda.operations.StrucDocTextOperations;

/**
 * 
 * An implementation of the model object 'Struc Doc Text'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.openhealthtools.mdht.uml.cda.impl.StrucDocTextImpl#getMixed Mixed}
  • *
  • {@link org.openhealthtools.mdht.uml.cda.impl.StrucDocTextImpl#getAny Any}
  • *
*

* * @generated */ public class StrucDocTextImpl extends EObjectImpl implements StrucDocText { /** * The cached value of the '{@link #getMixed() Mixed}' attribute list. * * * @see #getMixed() * @generated * @ordered */ protected FeatureMap mixed; /** * * * @generated */ protected StrucDocTextImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return CDAPackage.Literals.STRUC_DOC_TEXT; } /** * * * @generated */ public FeatureMap getMixed() { if (mixed == null) { mixed = new BasicFeatureMap(this, CDAPackage.STRUC_DOC_TEXT__MIXED); } return mixed; } /** * * * @generated */ public FeatureMap getAny() { return (FeatureMap) getMixed(). list(CDAPackage.Literals.STRUC_DOC_TEXT__ANY); } /** * * * @generated */ public void addText(String text) { StrucDocTextOperations.addText(this, text); } /** * * * @generated */ public String getText() { return StrucDocTextOperations.getText(this); } /** * * * @generated */ public String getText(String id) { return StrucDocTextOperations.getText(this, id); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case CDAPackage.STRUC_DOC_TEXT__MIXED: return ((InternalEList) getMixed()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case CDAPackage.STRUC_DOC_TEXT__MIXED: if (coreType) { return getMixed(); } return ((FeatureMap.Internal) getMixed()).getWrapper(); case CDAPackage.STRUC_DOC_TEXT__ANY: if (coreType) { return getAny(); } return ((FeatureMap.Internal) getAny()).getWrapper(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case CDAPackage.STRUC_DOC_TEXT__MIXED: ((FeatureMap.Internal) getMixed()).set(newValue); return; case CDAPackage.STRUC_DOC_TEXT__ANY: ((FeatureMap.Internal) getAny()).set(newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case CDAPackage.STRUC_DOC_TEXT__MIXED: getMixed().clear(); return; case CDAPackage.STRUC_DOC_TEXT__ANY: getAny().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case CDAPackage.STRUC_DOC_TEXT__MIXED: return mixed != null && !mixed.isEmpty(); case CDAPackage.STRUC_DOC_TEXT__ANY: return !getAny().isEmpty(); } 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(); } } // StrucDocTextImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy