/** */ package regression.test; 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.EObject; 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; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Document Root</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link regression.test.DocumentRoot#getMixed <em>Mixed</em>}</li> * <li>{@link regression.test.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li> * <li>{@link regression.test.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}</li> * <li>{@link regression.test.DocumentRoot#getOutput <em>Output</em>}</li> * </ul> * </p> * * @see regression.test.TestPackage#getDocumentRoot() * @model kind="class" * extendedMetaData="name='' kind='mixed'" * @generated */ public class DocumentRoot extends EObjectImpl implements EObject { /** * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getMixed() * @generated * @ordered */ protected FeatureMap mixed; /** * The cached value of the '{@link #getXMLNSPrefixMap() <em>XMLNS Prefix Map</em>}' map. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getXMLNSPrefixMap() * @generated * @ordered */ protected EMap<String, String> xMLNSPrefixMap; /** * The cached value of the '{@link #getXSISchemaLocation() <em>XSI Schema Location</em>}' map. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getXSISchemaLocation() * @generated * @ordered */ protected EMap<String, String> xSISchemaLocation; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected DocumentRoot() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return TestPackage.Literals.DOCUMENT_ROOT; } /** * Returns the value of the '<em><b>Mixed</b></em>' attribute list. * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Mixed</em>' attribute list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Mixed</em>' attribute list. * @see regression.test.TestPackage#getDocumentRoot_Mixed() * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true" * extendedMetaData="kind='elementWildcard' name=':mixed'" * @generated */ public FeatureMap getMixed() { if (mixed == null) { mixed = new BasicFeatureMap(this, TestPackage.DOCUMENT_ROOT__MIXED); } return mixed; } /** * Returns the value of the '<em><b>XMLNS Prefix Map</b></em>' map. * The key is of type {@link java.lang.String}, * and the value is of type {@link java.lang.String}, * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>XMLNS Prefix Map</em>' map isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>XMLNS Prefix Map</em>' map. * @see regression.test.TestPackage#getDocumentRoot_XMLNSPrefixMap() * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>" transient="true" * extendedMetaData="kind='attribute' name='xmlns:prefix'" * @generated */ public EMap<String, String> getXMLNSPrefixMap() { if (xMLNSPrefixMap == null) { xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, TestPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP); } return xMLNSPrefixMap; } /** * Returns the value of the '<em><b>XSI Schema Location</b></em>' map. * The key is of type {@link java.lang.String}, * and the value is of type {@link java.lang.String}, * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>XSI Schema Location</em>' map isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>XSI Schema Location</em>' map. * @see regression.test.TestPackage#getDocumentRoot_XSISchemaLocation() * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>" transient="true" * extendedMetaData="kind='attribute' name='xsi:schemaLocation'" * @generated */ public EMap<String, String> getXSISchemaLocation() { if (xSISchemaLocation == null) { xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, TestPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); } return xSISchemaLocation; } /** * Returns the value of the '<em><b>Output</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Output</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Output</em>' containment reference. * @see #setOutput(OutputType) * @see regression.test.TestPackage#getDocumentRoot_Output() * @model containment="true" upper="-2" transient="true" volatile="true" derived="true" * extendedMetaData="kind='element' name='output' namespace='##targetNamespace'" * @generated */ public OutputType getOutput() { return (OutputType)getMixed().get(TestPackage.Literals.DOCUMENT_ROOT__OUTPUT, true); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetOutput(OutputType newOutput, NotificationChain msgs) { return ((FeatureMap.Internal)getMixed()).basicAdd(TestPackage.Literals.DOCUMENT_ROOT__OUTPUT, newOutput, msgs); } /** * Sets the value of the '{@link regression.test.DocumentRoot#getOutput <em>Output</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Output</em>' containment reference. * @see #getOutput() * @generated */ public void setOutput(OutputType newOutput) { ((FeatureMap.Internal)getMixed()).set(TestPackage.Literals.DOCUMENT_ROOT__OUTPUT, newOutput); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case TestPackage.DOCUMENT_ROOT__MIXED: return ((InternalEList<?>)getMixed()).basicRemove(otherEnd, msgs); case TestPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: return ((InternalEList<?>)getXMLNSPrefixMap()).basicRemove(otherEnd, msgs); case TestPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: return ((InternalEList<?>)getXSISchemaLocation()).basicRemove(otherEnd, msgs); case TestPackage.DOCUMENT_ROOT__OUTPUT: return basicSetOutput(null, 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 TestPackage.DOCUMENT_ROOT__MIXED: if (coreType) return getMixed(); return ((FeatureMap.Internal)getMixed()).getWrapper(); case TestPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: if (coreType) return getXMLNSPrefixMap(); else return getXMLNSPrefixMap().map(); case TestPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: if (coreType) return getXSISchemaLocation(); else return getXSISchemaLocation().map(); case TestPackage.DOCUMENT_ROOT__OUTPUT: return getOutput(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TestPackage.DOCUMENT_ROOT__MIXED: ((FeatureMap.Internal)getMixed()).set(newValue); return; case TestPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue); return; case TestPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue); return; case TestPackage.DOCUMENT_ROOT__OUTPUT: setOutput((OutputType)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TestPackage.DOCUMENT_ROOT__MIXED: getMixed().clear(); return; case TestPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: getXMLNSPrefixMap().clear(); return; case TestPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: getXSISchemaLocation().clear(); return; case TestPackage.DOCUMENT_ROOT__OUTPUT: setOutput((OutputType)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TestPackage.DOCUMENT_ROOT__MIXED: return mixed != null && !mixed.isEmpty(); case TestPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty(); case TestPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: return xSISchemaLocation != null && !xSISchemaLocation.isEmpty(); case TestPackage.DOCUMENT_ROOT__OUTPUT: return getOutput() != null; } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @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(); } } // DocumentRoot