diff options
author | mtaal | 2009-07-27 22:11:52 +0000 |
---|---|---|
committer | mtaal | 2009-07-27 22:11:52 +0000 |
commit | 265198f054ea9de0f9840007c1fb2ff8262732f5 (patch) | |
tree | 04188004b1d35a95214260961bd9fc4a2e74ca24 | |
parent | e7a13a097e04c0233bb7637fc998a072fd0a9324 (diff) | |
download | org.eclipse.emf.teneo-265198f054ea9de0f9840007c1fb2ff8262732f5.tar.gz org.eclipse.emf.teneo-265198f054ea9de0f9840007c1fb2ff8262732f5.tar.xz org.eclipse.emf.teneo-265198f054ea9de0f9840007c1fb2ff8262732f5.zip |
[284691]
[284803]
22 files changed, 2163 insertions, 100 deletions
diff --git a/examples/org.eclipse.emf.teneo.samples/META-INF/MANIFEST.MF b/examples/org.eclipse.emf.teneo.samples/META-INF/MANIFEST.MF index 315c760ee..a0f42e2dc 100644 --- a/examples/org.eclipse.emf.teneo.samples/META-INF/MANIFEST.MF +++ b/examples/org.eclipse.emf.teneo.samples/META-INF/MANIFEST.MF @@ -1152,6 +1152,10 @@ Export-Package: com.example.car;uses:="org.eclipse.emf.common.util,org.eclipse.e org.eclipse.emf.ecore.resource, org.eclipse.emf.ecore", org.eclipse.emf.teneo.samples.emf.schemaconstructs.datetime.validation;uses:="org.eclipse.emf.common.util,org.eclipse.emf.teneo.samples.emf.schemaconstructs.datetime,org.eclipse.emf.ecore.util", + org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot, + org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl, + org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.util, + org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.validation, org.eclipse.emf.teneo.samples.emf.schemaconstructs.duration, org.eclipse.emf.teneo.samples.emf.schemaconstructs.duration.impl, org.eclipse.emf.teneo.samples.emf.schemaconstructs.duration.util, diff --git a/examples/org.eclipse.emf.teneo.samples/build.properties b/examples/org.eclipse.emf.teneo.samples/build.properties index 72533240a..0d61c8f00 100644 --- a/examples/org.eclipse.emf.teneo.samples/build.properties +++ b/examples/org.eclipse.emf.teneo.samples/build.properties @@ -1,91 +1,14 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.properties,\ + +# <copyright> +# </copyright> +# +# $Id: build.properties,v 1.23 2009/07/27 22:12:09 mtaal Exp $ + +bin.includes = .,\ + model/,\ META-INF/,\ - .,\ - epl-v10.html,\ - modeling32.png,\ - about.ini,\ - about.properties,\ - copyright.txt,\ - about.html,\ plugin.xml,\ - src/org/eclipse/emf/teneo/samples/emf/sample/play/data/,\ - src/org/eclipse/emf/teneo/samples/emf/sample/accounting/import.xmi,\ - jdofiles/,\ - src/org/eclipse/emf/teneo/test.hbm.xml,\ - src/org/eclipse/emf/teneo/samples/emf/sample/library/library.ecore,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/attributes/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/basic/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/issues/simplenm/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/detach/detachfeaturemap/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/mappedsuperclass/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/sample/schoollibrary/library/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/anytype/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/simplefeaturemap/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/sample/sunBooks/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/substitution/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/secondarytable/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/simpletypes/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/sample/epo2/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/duplicates/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/sample/play/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/lob/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/ecoreattrs/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/groupall/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/relation/relation1ton/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/manytomany/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/issues/nav/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/issues/interfacetrue/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/substitutionzvon/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/detach/detachtest/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/elist/featuremap/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/detach/detachelist/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/sample/inv/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/emap/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/sample/schemaprimerpo/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/sample/forum/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/id/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/relation/relationntom/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/uniqueconstraints/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/issues/bagduplicate/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/column/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/sample/catalog/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/nestedgroup/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/sample/product/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/nmset/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/set/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/cascadenotall/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/issues/generaltest/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/sample/accounting/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/issues/enumtest/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/issues/abstractsuper/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/listunion/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/lazy/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/edatatypeColumn/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/toone/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/list/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/issues/inheritance/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/mixed/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/restriction/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/relation/relation1to1/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/compositeid/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/qname/impl/package.jdo,\ - src/org/eclipse/emf/teneo/rental/impl/package.jdo,\ - src/com/example/car/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/sample/library/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/duration/impl/package.jdo,\ - src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/package.jdo,\ - license.html -src.includes = about.html,\ - epl-v10.html,\ - copyright.txt,\ - src/org/eclipse/emf/teneo/test.hbm.xml,\ - about.ini,\ - about.properties,\ - license.html,\ - modeling32.png,\ plugin.properties -javacSource=1.5 -javacTarget=1.5 +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/examples/org.eclipse.emf.teneo.samples/plugin.xml b/examples/org.eclipse.emf.teneo.samples/plugin.xml new file mode 100644 index 000000000..f7a533b09 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/plugin.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> + +<!-- + <copyright> + </copyright> + + $Id: plugin.xml,v 1.3 2009/07/27 22:12:11 mtaal Exp $ +--> + +<plugin> + + <extension point="org.eclipse.emf.ecore.generated_package"> + <package + uri="http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentroot" + class="org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage" + genModel="src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/model/documentroot.genmodel"/> + </extension> + + <extension point="org.eclipse.emf.ecore.extension_parser"> + <parser + type="documentroot" + class="org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.util.DocumentrootResourceFactoryImpl"/> + </extension> + +</plugin> diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/ComplexType.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/ComplexType.java new file mode 100644 index 000000000..7a98d132e --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/ComplexType.java @@ -0,0 +1,55 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComplexType.java,v 1.1 2009/07/27 22:12:03 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Complex Type</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.ComplexType#getTest <em>Test</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage#getComplexType() + * @model extendedMetaData="name='ComplexType' kind='elementOnly'" + * @generated + */ +public interface ComplexType extends EObject { + /** + * Returns the value of the '<em><b>Test</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Test</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Test</em>' attribute. + * @see #setTest(String) + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage#getComplexType_Test() + * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true" + * extendedMetaData="kind='element' name='test' namespace='##targetNamespace'" + * @generated + */ + String getTest(); + + /** + * Sets the value of the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.ComplexType#getTest <em>Test</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Test</em>' attribute. + * @see #getTest() + * @generated + */ + void setTest(String value); + +} // ComplexType diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/DocumentRoot.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/DocumentRoot.java new file mode 100644 index 000000000..2ad4d1b82 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/DocumentRoot.java @@ -0,0 +1,143 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DocumentRoot.java,v 1.1 2009/07/27 22:12:01 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot; + +import org.eclipse.emf.common.util.EMap; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.ecore.util.FeatureMap; + +/** + * <!-- 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 org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getMixed <em>Mixed</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getOtherTest <em>Other Test</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getTest <em>Test</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage#getDocumentRoot() + * @model extendedMetaData="name='' kind='mixed'" + * @generated + */ +public interface DocumentRoot extends EObject { + /** + * 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 org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage#getDocumentRoot_Mixed() + * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true" + * extendedMetaData="kind='elementWildcard' name=':mixed'" + * @generated + */ + FeatureMap getMixed(); + + /** + * 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 org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage#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 + */ + EMap<String, String> getXMLNSPrefixMap(); + + /** + * 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 org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage#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 + */ + EMap<String, String> getXSISchemaLocation(); + + /** + * Returns the value of the '<em><b>Other Test</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Other Test</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Other Test</em>' attribute. + * @see #setOtherTest(String) + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage#getDocumentRoot_OtherTest() + * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" upper="-2" transient="true" volatile="true" derived="true" + * extendedMetaData="kind='element' name='otherTest' namespace='##targetNamespace'" + * @generated + */ + String getOtherTest(); + + /** + * Sets the value of the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getOtherTest <em>Other Test</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Other Test</em>' attribute. + * @see #getOtherTest() + * @generated + */ + void setOtherTest(String value); + + /** + * Returns the value of the '<em><b>Test</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Test</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Test</em>' attribute. + * @see #setTest(String) + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage#getDocumentRoot_Test() + * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" upper="-2" transient="true" volatile="true" derived="true" + * extendedMetaData="kind='element' name='test' namespace='##targetNamespace'" + * @generated + */ + String getTest(); + + /** + * Sets the value of the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getTest <em>Test</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Test</em>' attribute. + * @see #getTest() + * @generated + */ + void setTest(String value); + +} // DocumentRoot diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/DocumentrootFactory.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/DocumentrootFactory.java new file mode 100644 index 000000000..542b412da --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/DocumentrootFactory.java @@ -0,0 +1,55 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DocumentrootFactory.java,v 1.1 2009/07/27 22:12:02 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot; + +import org.eclipse.emf.ecore.EFactory; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage + * @generated + */ +public interface DocumentrootFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + DocumentrootFactory eINSTANCE = org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentrootFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Complex Type</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Complex Type</em>'. + * @generated + */ + ComplexType createComplexType(); + + /** + * Returns a new object of class '<em>Document Root</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Document Root</em>'. + * @generated + */ + DocumentRoot createDocumentRoot(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ + DocumentrootPackage getDocumentrootPackage(); + +} //DocumentrootFactory diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/DocumentrootPackage.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/DocumentrootPackage.java new file mode 100644 index 000000000..a8729169e --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/DocumentrootPackage.java @@ -0,0 +1,333 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DocumentrootPackage.java,v 1.1 2009/07/27 22:12:00 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootFactory + * @model kind="package" + * @generated + */ +public interface DocumentrootPackage extends EPackage { + /** + * The package name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "documentroot"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentroot"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "documentroot"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + DocumentrootPackage eINSTANCE = org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentrootPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.ComplexTypeImpl <em>Complex Type</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.ComplexTypeImpl + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentrootPackageImpl#getComplexType() + * @generated + */ + int COMPLEX_TYPE = 0; + + /** + * The feature id for the '<em><b>Test</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPLEX_TYPE__TEST = 0; + + /** + * The number of structural features of the '<em>Complex Type</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPLEX_TYPE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl <em>Document Root</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentrootPackageImpl#getDocumentRoot() + * @generated + */ + int DOCUMENT_ROOT = 1; + + /** + * The feature id for the '<em><b>Mixed</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DOCUMENT_ROOT__MIXED = 0; + + /** + * The feature id for the '<em><b>XMLNS Prefix Map</b></em>' map. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1; + + /** + * The feature id for the '<em><b>XSI Schema Location</b></em>' map. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2; + + /** + * The feature id for the '<em><b>Other Test</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DOCUMENT_ROOT__OTHER_TEST = 3; + + /** + * The feature id for the '<em><b>Test</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DOCUMENT_ROOT__TEST = 4; + + /** + * The number of structural features of the '<em>Document Root</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DOCUMENT_ROOT_FEATURE_COUNT = 5; + + + /** + * Returns the meta object for class '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.ComplexType <em>Complex Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Complex Type</em>'. + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.ComplexType + * @generated + */ + EClass getComplexType(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.ComplexType#getTest <em>Test</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Test</em>'. + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.ComplexType#getTest() + * @see #getComplexType() + * @generated + */ + EAttribute getComplexType_Test(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot <em>Document Root</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Document Root</em>'. + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot + * @generated + */ + EClass getDocumentRoot(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getMixed <em>Mixed</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>Mixed</em>'. + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getMixed() + * @see #getDocumentRoot() + * @generated + */ + EAttribute getDocumentRoot_Mixed(); + + /** + * Returns the meta object for the map '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the map '<em>XMLNS Prefix Map</em>'. + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getXMLNSPrefixMap() + * @see #getDocumentRoot() + * @generated + */ + EReference getDocumentRoot_XMLNSPrefixMap(); + + /** + * Returns the meta object for the map '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the map '<em>XSI Schema Location</em>'. + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getXSISchemaLocation() + * @see #getDocumentRoot() + * @generated + */ + EReference getDocumentRoot_XSISchemaLocation(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getOtherTest <em>Other Test</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Other Test</em>'. + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getOtherTest() + * @see #getDocumentRoot() + * @generated + */ + EAttribute getDocumentRoot_OtherTest(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getTest <em>Test</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Test</em>'. + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot#getTest() + * @see #getDocumentRoot() + * @generated + */ + EAttribute getDocumentRoot_Test(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + DocumentrootFactory getDocumentrootFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.ComplexTypeImpl <em>Complex Type</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.ComplexTypeImpl + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentrootPackageImpl#getComplexType() + * @generated + */ + EClass COMPLEX_TYPE = eINSTANCE.getComplexType(); + + /** + * The meta object literal for the '<em><b>Test</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMPLEX_TYPE__TEST = eINSTANCE.getComplexType_Test(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl <em>Document Root</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentrootPackageImpl#getDocumentRoot() + * @generated + */ + EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot(); + + /** + * The meta object literal for the '<em><b>Mixed</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed(); + + /** + * The meta object literal for the '<em><b>XMLNS Prefix Map</b></em>' map feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference DOCUMENT_ROOT__XMLNS_PREFIX_MAP = eINSTANCE.getDocumentRoot_XMLNSPrefixMap(); + + /** + * The meta object literal for the '<em><b>XSI Schema Location</b></em>' map feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = eINSTANCE.getDocumentRoot_XSISchemaLocation(); + + /** + * The meta object literal for the '<em><b>Other Test</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute DOCUMENT_ROOT__OTHER_TEST = eINSTANCE.getDocumentRoot_OtherTest(); + + /** + * The meta object literal for the '<em><b>Test</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute DOCUMENT_ROOT__TEST = eINSTANCE.getDocumentRoot_Test(); + + } + +} //DocumentrootPackage diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/impl/ComplexTypeImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/impl/ComplexTypeImpl.java new file mode 100644 index 000000000..6d4660ff2 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/impl/ComplexTypeImpl.java @@ -0,0 +1,167 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComplexTypeImpl.java,v 1.1 2009/07/27 22:11:58 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.ComplexType; +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Complex Type</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.ComplexTypeImpl#getTest <em>Test</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ComplexTypeImpl extends EObjectImpl implements ComplexType { + /** + * The default value of the '{@link #getTest() <em>Test</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTest() + * @generated + * @ordered + */ + protected static final String TEST_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTest() <em>Test</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTest() + * @generated + * @ordered + */ + protected String test = TEST_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ComplexTypeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return DocumentrootPackage.Literals.COMPLEX_TYPE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getTest() { + return test; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTest(String newTest) { + String oldTest = test; + test = newTest; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DocumentrootPackage.COMPLEX_TYPE__TEST, oldTest, test)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case DocumentrootPackage.COMPLEX_TYPE__TEST: + return getTest(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DocumentrootPackage.COMPLEX_TYPE__TEST: + setTest((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DocumentrootPackage.COMPLEX_TYPE__TEST: + setTest(TEST_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DocumentrootPackage.COMPLEX_TYPE__TEST: + return TEST_EDEFAULT == null ? test != null : !TEST_EDEFAULT.equals(test); + } + 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(" (test: "); + result.append(test); + result.append(')'); + return result.toString(); + } + +} //ComplexTypeImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/impl/DocumentRootImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/impl/DocumentRootImpl.java new file mode 100644 index 000000000..d6a8fc5b2 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/impl/DocumentRootImpl.java @@ -0,0 +1,323 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DocumentRootImpl.java,v 1.1 2009/07/27 22:11:56 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.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.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot; +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Document Root</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl#getMixed <em>Mixed</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl#getXSISchemaLocation <em>XSI Schema Location</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl#getOtherTest <em>Other Test</em>}</li> + * <li>{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl.DocumentRootImpl#getTest <em>Test</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class DocumentRootImpl extends EObjectImpl implements DocumentRoot { + /** + * 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; + + /** + * The default value of the '{@link #getOtherTest() <em>Other Test</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOtherTest() + * @generated + * @ordered + */ + protected static final String OTHER_TEST_EDEFAULT = null; + + /** + * The default value of the '{@link #getTest() <em>Test</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTest() + * @generated + * @ordered + */ + protected static final String TEST_EDEFAULT = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DocumentRootImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return DocumentrootPackage.Literals.DOCUMENT_ROOT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FeatureMap getMixed() { + if (mixed == null) { + mixed = new BasicFeatureMap(this, DocumentrootPackage.DOCUMENT_ROOT__MIXED); + } + return mixed; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EMap<String, String> getXMLNSPrefixMap() { + if (xMLNSPrefixMap == null) { + xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DocumentrootPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP); + } + return xMLNSPrefixMap; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EMap<String, String> getXSISchemaLocation() { + if (xSISchemaLocation == null) { + xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DocumentrootPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); + } + return xSISchemaLocation; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getOtherTest() { + return (String)getMixed().get(DocumentrootPackage.Literals.DOCUMENT_ROOT__OTHER_TEST, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setOtherTest(String newOtherTest) { + ((FeatureMap.Internal)getMixed()).set(DocumentrootPackage.Literals.DOCUMENT_ROOT__OTHER_TEST, newOtherTest); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getTest() { + return (String)getMixed().get(DocumentrootPackage.Literals.DOCUMENT_ROOT__TEST, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTest(String newTest) { + ((FeatureMap.Internal)getMixed()).set(DocumentrootPackage.Literals.DOCUMENT_ROOT__TEST, newTest); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case DocumentrootPackage.DOCUMENT_ROOT__MIXED: + return ((InternalEList<?>)getMixed()).basicRemove(otherEnd, msgs); + case DocumentrootPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: + return ((InternalEList<?>)getXMLNSPrefixMap()).basicRemove(otherEnd, msgs); + case DocumentrootPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: + return ((InternalEList<?>)getXSISchemaLocation()).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 DocumentrootPackage.DOCUMENT_ROOT__MIXED: + if (coreType) return getMixed(); + return ((FeatureMap.Internal)getMixed()).getWrapper(); + case DocumentrootPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: + if (coreType) return getXMLNSPrefixMap(); + else return getXMLNSPrefixMap().map(); + case DocumentrootPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: + if (coreType) return getXSISchemaLocation(); + else return getXSISchemaLocation().map(); + case DocumentrootPackage.DOCUMENT_ROOT__OTHER_TEST: + return getOtherTest(); + case DocumentrootPackage.DOCUMENT_ROOT__TEST: + return getTest(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case DocumentrootPackage.DOCUMENT_ROOT__MIXED: + ((FeatureMap.Internal)getMixed()).set(newValue); + return; + case DocumentrootPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: + ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue); + return; + case DocumentrootPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: + ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue); + return; + case DocumentrootPackage.DOCUMENT_ROOT__OTHER_TEST: + setOtherTest((String)newValue); + return; + case DocumentrootPackage.DOCUMENT_ROOT__TEST: + setTest((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case DocumentrootPackage.DOCUMENT_ROOT__MIXED: + getMixed().clear(); + return; + case DocumentrootPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: + getXMLNSPrefixMap().clear(); + return; + case DocumentrootPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: + getXSISchemaLocation().clear(); + return; + case DocumentrootPackage.DOCUMENT_ROOT__OTHER_TEST: + setOtherTest(OTHER_TEST_EDEFAULT); + return; + case DocumentrootPackage.DOCUMENT_ROOT__TEST: + setTest(TEST_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case DocumentrootPackage.DOCUMENT_ROOT__MIXED: + return mixed != null && !mixed.isEmpty(); + case DocumentrootPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: + return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty(); + case DocumentrootPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: + return xSISchemaLocation != null && !xSISchemaLocation.isEmpty(); + case DocumentrootPackage.DOCUMENT_ROOT__OTHER_TEST: + return OTHER_TEST_EDEFAULT == null ? getOtherTest() != null : !OTHER_TEST_EDEFAULT.equals(getOtherTest()); + case DocumentrootPackage.DOCUMENT_ROOT__TEST: + return TEST_EDEFAULT == null ? getTest() != null : !TEST_EDEFAULT.equals(getTest()); + } + 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(); + } + +} //DocumentRootImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/impl/DocumentrootFactoryImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/impl/DocumentrootFactoryImpl.java new file mode 100644 index 000000000..4e7523b12 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/impl/DocumentrootFactoryImpl.java @@ -0,0 +1,110 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DocumentrootFactoryImpl.java,v 1.1 2009/07/27 22:11:57 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.*; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class DocumentrootFactoryImpl extends EFactoryImpl implements DocumentrootFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static DocumentrootFactory init() { + try { + DocumentrootFactory theDocumentrootFactory = (DocumentrootFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentroot"); + if (theDocumentrootFactory != null) { + return theDocumentrootFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new DocumentrootFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DocumentrootFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case DocumentrootPackage.COMPLEX_TYPE: return createComplexType(); + case DocumentrootPackage.DOCUMENT_ROOT: return createDocumentRoot(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComplexType createComplexType() { + ComplexTypeImpl complexType = new ComplexTypeImpl(); + return complexType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DocumentRoot createDocumentRoot() { + DocumentRootImpl documentRoot = new DocumentRootImpl(); + return documentRoot; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DocumentrootPackage getDocumentrootPackage() { + return (DocumentrootPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @deprecated + * @generated + */ + @Deprecated + public static DocumentrootPackage getPackage() { + return DocumentrootPackage.eINSTANCE; + } + +} //DocumentrootFactoryImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/impl/DocumentrootPackageImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/impl/DocumentrootPackageImpl.java new file mode 100644 index 000000000..bcca18487 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/impl/DocumentrootPackageImpl.java @@ -0,0 +1,339 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DocumentrootPackageImpl.java,v 1.1 2009/07/27 22:11:59 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.eclipse.emf.ecore.xml.type.XMLTypePackage; + +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.ComplexType; +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot; +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootFactory; +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class DocumentrootPackageImpl extends EPackageImpl implements DocumentrootPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass complexTypeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass documentRootEClass = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage#eNS_URI + * @see #init() + * @generated + */ + private DocumentrootPackageImpl() { + super(eNS_URI, DocumentrootFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>This method is used to initialize {@link DocumentrootPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static DocumentrootPackage init() { + if (isInited) return (DocumentrootPackage)EPackage.Registry.INSTANCE.getEPackage(DocumentrootPackage.eNS_URI); + + // Obtain or create and register package + DocumentrootPackageImpl theDocumentrootPackage = (DocumentrootPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DocumentrootPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DocumentrootPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + XMLTypePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theDocumentrootPackage.createPackageContents(); + + // Initialize created meta-data + theDocumentrootPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theDocumentrootPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(DocumentrootPackage.eNS_URI, theDocumentrootPackage); + return theDocumentrootPackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getComplexType() { + return complexTypeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getComplexType_Test() { + return (EAttribute)complexTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDocumentRoot() { + return documentRootEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDocumentRoot_Mixed() { + return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getDocumentRoot_XMLNSPrefixMap() { + return (EReference)documentRootEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getDocumentRoot_XSISchemaLocation() { + return (EReference)documentRootEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDocumentRoot_OtherTest() { + return (EAttribute)documentRootEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDocumentRoot_Test() { + return (EAttribute)documentRootEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DocumentrootFactory getDocumentrootFactory() { + return (DocumentrootFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + complexTypeEClass = createEClass(COMPLEX_TYPE); + createEAttribute(complexTypeEClass, COMPLEX_TYPE__TEST); + + documentRootEClass = createEClass(DOCUMENT_ROOT); + createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED); + createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP); + createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); + createEAttribute(documentRootEClass, DOCUMENT_ROOT__OTHER_TEST); + createEAttribute(documentRootEClass, DOCUMENT_ROOT__TEST); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + + // Initialize classes and features; add operations and parameters + initEClass(complexTypeEClass, ComplexType.class, "ComplexType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getComplexType_Test(), theXMLTypePackage.getString(), "test", null, 1, 1, ComplexType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(documentRootEClass, DocumentRoot.class, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(), "mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDocumentRoot_XMLNSPrefixMap(), ecorePackage.getEStringToStringMapEntry(), null, "xMLNSPrefixMap", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getDocumentRoot_OtherTest(), theXMLTypePackage.getString(), "otherTest", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED); + initEAttribute(getDocumentRoot_Test(), theXMLTypePackage.getString(), "test", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http:///org/eclipse/emf/ecore/util/ExtendedMetaData + createExtendedMetaDataAnnotations(); + } + + /** + * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void createExtendedMetaDataAnnotations() { + String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; + addAnnotation + (complexTypeEClass, + source, + new String[] { + "name", "ComplexType", + "kind", "elementOnly" + }); + addAnnotation + (getComplexType_Test(), + source, + new String[] { + "kind", "element", + "name", "test", + "namespace", "##targetNamespace" + }); + addAnnotation + (documentRootEClass, + source, + new String[] { + "name", "", + "kind", "mixed" + }); + addAnnotation + (getDocumentRoot_Mixed(), + source, + new String[] { + "kind", "elementWildcard", + "name", ":mixed" + }); + addAnnotation + (getDocumentRoot_XMLNSPrefixMap(), + source, + new String[] { + "kind", "attribute", + "name", "xmlns:prefix" + }); + addAnnotation + (getDocumentRoot_XSISchemaLocation(), + source, + new String[] { + "kind", "attribute", + "name", "xsi:schemaLocation" + }); + addAnnotation + (getDocumentRoot_OtherTest(), + source, + new String[] { + "kind", "element", + "name", "otherTest", + "namespace", "##targetNamespace" + }); + addAnnotation + (getDocumentRoot_Test(), + source, + new String[] { + "kind", "element", + "name", "test", + "namespace", "##targetNamespace" + }); + } + +} //DocumentrootPackageImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/model/documentroot.ecore b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/model/documentroot.ecore new file mode 100644 index 000000000..54f187040 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/model/documentroot.ecore @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ecore:EPackage xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="documentroot" + nsURI="http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentroot" + nsPrefix="documentroot"> + <eClassifiers xsi:type="ecore:EClass" name="ComplexType"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="name" value="ComplexType"/> + <details key="kind" value="elementOnly"/> + </eAnnotations> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="test" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="test"/> + <details key="namespace" value="##targetNamespace"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="DocumentRoot"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="name" value=""/> + <details key="kind" value="mixed"/> + </eAnnotations> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="mixed" unique="false" upperBound="-1" + eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="elementWildcard"/> + <details key="name" value=":mixed"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="xMLNSPrefixMap" upperBound="-1" + eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry" + transient="true" containment="true" resolveProxies="false"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="attribute"/> + <details key="name" value="xmlns:prefix"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EReference" name="xSISchemaLocation" upperBound="-1" + eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry" + transient="true" containment="true" resolveProxies="false"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="attribute"/> + <details key="name" value="xsi:schemaLocation"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="otherTest" unique="false" + upperBound="-2" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String" + volatile="true" transient="true" derived="true"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="otherTest"/> + <details key="namespace" value="##targetNamespace"/> + </eAnnotations> + </eStructuralFeatures> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="test" unique="false" upperBound="-2" + eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String" volatile="true" + transient="true" derived="true"> + <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> + <details key="kind" value="element"/> + <details key="name" value="test"/> + <details key="namespace" value="##targetNamespace"/> + </eAnnotations> + </eStructuralFeatures> + </eClassifiers> +</ecore:EPackage> diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/model/documentroot.genmodel b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/model/documentroot.genmodel new file mode 100644 index 000000000..a242ff421 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/model/documentroot.genmodel @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<genmodel:GenModel xmi:version="2.0" + xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" + xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.emf.teneo.samples/src" + modelPluginID="org.eclipse.emf.teneo.samples" modelName="Documentroot" importerID="org.eclipse.xsd.ecore.importer" + complianceLevel="6.0" copyrightFields="false"> + <foreignModel>documentroot.xsd</foreignModel> + <genPackages prefix="Documentroot" basePackage="org.eclipse.emf.teneo.samples.emf.schemaconstructs" + resource="XML" disposableProviderFactory="true" ecorePackage="documentroot.ecore#/"> + <genClasses ecoreClass="documentroot.ecore#//ComplexType"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute documentroot.ecore#//ComplexType/test"/> + </genClasses> + <genClasses ecoreClass="documentroot.ecore#//DocumentRoot"> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute documentroot.ecore#//DocumentRoot/mixed"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference documentroot.ecore#//DocumentRoot/xMLNSPrefixMap"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference documentroot.ecore#//DocumentRoot/xSISchemaLocation"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute documentroot.ecore#//DocumentRoot/otherTest"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute documentroot.ecore#//DocumentRoot/test"/> + </genClasses> + </genPackages> +</genmodel:GenModel> diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/model/documentroot.xsd b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/model/documentroot.xsd new file mode 100755 index 000000000..33bb5319f --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/model/documentroot.xsd @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsd:schema + targetNamespace="http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentroot" + xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" + xmlns:this="http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentroot" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:element name="test" type="xsd:string" /> + + <xsd:element name="otherTest" type="xsd:string" /> + + <xsd:complexType name="ComplexType"> + <xsd:sequence> + <xsd:element ref="this:test" /> + </xsd:sequence> + </xsd:complexType> +</xsd:schema> diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootAdapterFactory.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootAdapterFactory.java new file mode 100644 index 000000000..a1e66351c --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootAdapterFactory.java @@ -0,0 +1,142 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DocumentrootAdapterFactory.java,v 1.1 2009/07/27 22:11:55 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.*; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage + * @generated + */ +public class DocumentrootAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static DocumentrootPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DocumentrootAdapterFactory() { + if (modelPackage == null) { + modelPackage = DocumentrootPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DocumentrootSwitch<Adapter> modelSwitch = + new DocumentrootSwitch<Adapter>() { + @Override + public Adapter caseComplexType(ComplexType object) { + return createComplexTypeAdapter(); + } + @Override + public Adapter caseDocumentRoot(DocumentRoot object) { + return createDocumentRootAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.ComplexType <em>Complex Type</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.ComplexType + * @generated + */ + public Adapter createComplexTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot <em>Document Root</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot + * @generated + */ + public Adapter createDocumentRootAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //DocumentrootAdapterFactory diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootResourceFactoryImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootResourceFactoryImpl.java new file mode 100644 index 000000000..42b741023 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootResourceFactoryImpl.java @@ -0,0 +1,56 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DocumentrootResourceFactoryImpl.java,v 1.1 2009/07/27 22:11:54 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + +import org.eclipse.emf.ecore.xmi.XMLResource; + +/** + * <!-- begin-user-doc --> + * The <b>Resource Factory</b> associated with the package. + * <!-- end-user-doc --> + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.util.DocumentrootResourceImpl + * @generated + */ +public class DocumentrootResourceFactoryImpl extends ResourceFactoryImpl { + /** + * Creates an instance of the resource factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DocumentrootResourceFactoryImpl() { + super(); + } + + /** + * Creates an instance of the resource. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Resource createResource(URI uri) { + XMLResource result = new DocumentrootResourceImpl(uri); + result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); + result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); + + result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); + + result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); + result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); + + result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); + return result; + } + +} //DocumentrootResourceFactoryImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootResourceImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootResourceImpl.java new file mode 100644 index 000000000..30cd2cc0f --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootResourceImpl.java @@ -0,0 +1,32 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DocumentrootResourceImpl.java,v 1.1 2009/07/27 22:11:52 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; + +/** + * <!-- begin-user-doc --> + * The <b>Resource </b> associated with the package. + * <!-- end-user-doc --> + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.util.DocumentrootResourceFactoryImpl + * @generated + */ +public class DocumentrootResourceImpl extends XMLResourceImpl { + /** + * Creates an instance of the resource. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param uri the URI of the new resource. + * @generated + */ + public DocumentrootResourceImpl(URI uri) { + super(uri); + } + +} //DocumentrootResourceImpl diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootSwitch.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootSwitch.java new file mode 100644 index 000000000..e33c5d9f1 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootSwitch.java @@ -0,0 +1,151 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DocumentrootSwitch.java,v 1.1 2009/07/27 22:11:55 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.util; + +import java.util.List; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.*; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * <!-- end-user-doc --> + * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage + * @generated + */ +public class DocumentrootSwitch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static DocumentrootPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DocumentrootSwitch() { + if (modelPackage == null) { + modelPackage = DocumentrootPackage.eINSTANCE; + } + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + public T doSwitch(EObject theEObject) { + return doSwitch(theEObject.eClass(), theEObject); + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + protected T doSwitch(EClass theEClass, EObject theEObject) { + if (theEClass.eContainer() == modelPackage) { + return doSwitch(theEClass.getClassifierID(), theEObject); + } + else { + List<EClass> eSuperTypes = theEClass.getESuperTypes(); + return + eSuperTypes.isEmpty() ? + defaultCase(theEObject) : + doSwitch(eSuperTypes.get(0), theEObject); + } + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case DocumentrootPackage.COMPLEX_TYPE: { + ComplexType complexType = (ComplexType)theEObject; + T result = caseComplexType(complexType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case DocumentrootPackage.DOCUMENT_ROOT: { + DocumentRoot documentRoot = (DocumentRoot)theEObject; + T result = caseDocumentRoot(documentRoot); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Complex Type</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Complex Type</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseComplexType(ComplexType object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Document Root</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Document Root</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDocumentRoot(DocumentRoot object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public T defaultCase(EObject object) { + return null; + } + +} //DocumentrootSwitch diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootXMLProcessor.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootXMLProcessor.java new file mode 100644 index 000000000..d30bd83de --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/util/DocumentrootXMLProcessor.java @@ -0,0 +1,54 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DocumentrootXMLProcessor.java,v 1.1 2009/07/27 22:11:53 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.util; + +import java.util.Map; + +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.xmi.util.XMLProcessor; + +import org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentrootPackage; + +/** + * This class contains helper methods to serialize and deserialize XML documents + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class DocumentrootXMLProcessor extends XMLProcessor { + + /** + * Public constructor to instantiate the helper. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DocumentrootXMLProcessor() { + super((EPackage.Registry.INSTANCE)); + DocumentrootPackage.eINSTANCE.eClass(); + } + + /** + * Register for "*" and "xml" file extensions the DocumentrootResourceFactoryImpl factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected Map<String, Resource.Factory> getRegistrations() { + if (registrations == null) { + super.getRegistrations(); + registrations.put(XML_EXTENSION, new DocumentrootResourceFactoryImpl()); + registrations.put(STAR_EXTENSION, new DocumentrootResourceFactoryImpl()); + } + return registrations; + } + +} //DocumentrootXMLProcessor diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/validation/ComplexTypeValidator.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/validation/ComplexTypeValidator.java new file mode 100644 index 000000000..fb098a9f5 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/validation/ComplexTypeValidator.java @@ -0,0 +1,20 @@ +/** + * <copyright> + * </copyright> + * + * $Id: ComplexTypeValidator.java,v 1.1 2009/07/27 22:12:04 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.validation; + + +/** + * A sample validator interface for {@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.ComplexType}. + * This doesn't really do anything, and it's not a real EMF artifact. + * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. + * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface ComplexTypeValidator { + boolean validate(); + + boolean validateTest(String value); +} diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/validation/DocumentRootValidator.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/validation/DocumentRootValidator.java new file mode 100644 index 000000000..2649faac9 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/documentroot/validation/DocumentRootValidator.java @@ -0,0 +1,27 @@ +/** + * <copyright> + * </copyright> + * + * $Id: DocumentRootValidator.java,v 1.1 2009/07/27 22:12:04 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.validation; + +import org.eclipse.emf.common.util.EMap; + +import org.eclipse.emf.ecore.util.FeatureMap; + +/** + * A sample validator interface for {@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.documentroot.DocumentRoot}. + * This doesn't really do anything, and it's not a real EMF artifact. + * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. + * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. + */ +public interface DocumentRootValidator { + boolean validate(); + + boolean validateMixed(FeatureMap value); + boolean validateXMLNSPrefixMap(EMap<String, String> value); + boolean validateXSISchemaLocation(EMap<String, String> value); + boolean validateOtherTest(String value); + boolean validateTest(String value); +} diff --git a/examples/org.eclipse.emf.teneo.samples/text/description.txt b/examples/org.eclipse.emf.teneo.samples/text/description.txt index 9260f0519..7b2cfd31c 100644 --- a/examples/org.eclipse.emf.teneo.samples/text/description.txt +++ b/examples/org.eclipse.emf.teneo.samples/text/description.txt @@ -1,20 +1,18 @@ -Model Employee +Model Documentroot This model description is not a real EMF artifact. It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. -Package employee <http://www.eclipse.org/emf/teneo/samples/emf/sample/Employee> +Package documentroot <http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/documentroot> - Class Department - Attribute name : String<<1..1>> - Reference employees : Employee<<0..*>> + Class ComplexType + Attribute test : String<<1..1>> - Class Employee - Attribute name : String<<1..1>> - Attribute salary : Int<<1..1>> - Attribute age : Int<<1..1>> - Attribute hireDate : Date<<1..1>> - - DataType Date <java.util.Date> + Class DocumentRoot + Attribute mixed : EFeatureMapEntry<<0..*>> + Reference xMLNSPrefixMap : EStringToStringMapEntry<<0..*>> + Reference xSISchemaLocation : EStringToStringMapEntry<<0..*>> + Attribute /otherTest : String<<0..?>> + Attribute /test : String<<0..?>> |