Skip to main content
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorpelder2009-07-14 12:54:09 -0400
committerpelder2009-07-14 12:54:09 -0400
commit58e7691207f8438b44dd02860f1675a323a08206 (patch)
treec566cc2166baf9eb3c819d1f7ebeab0c525a02ae /tests
parent8ea1b12b9512b6c9d4a172582cc0faeaef832a9a (diff)
downloadorg.eclipse.jet-58e7691207f8438b44dd02860f1675a323a08206.tar.gz
org.eclipse.jet-58e7691207f8438b44dd02860f1675a323a08206.tar.xz
org.eclipse.jet-58e7691207f8438b44dd02860f1675a323a08206.zip
[279478] XPath expressions against elements whose complex type is subclassed do not match instances of these subclasses
https://bugs.eclipse.org/bugs/show_bug.cgi?id=279478
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/README.txt4
-rw-r--r--tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/human.ecore82
-rw-r--r--tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/human.genmodel31
-rw-r--r--tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/human.xsd16
-rw-r--r--tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/humans.xml7
-rw-r--r--tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/human2.ecore102
-rw-r--r--tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/human2.genmodel31
-rw-r--r--tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/human2.xsd32
-rw-r--r--tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/humans.xml7
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/AbstractEMFXMLSubclassTests.java114
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/AllTests.java4
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/XMLSubclasses.java47
-rw-r--r--tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/XMLSubclassesWithoutMetadata.java48
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/DocumentRoot.java115
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/Human.java110
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/HumanFactory.java82
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/HumanPackage.java570
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/Man.java53
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/Root.java47
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/Woman.java53
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/impl/DocumentRootImpl.java279
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/impl/HumanFactoryImpl.java141
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/impl/HumanImpl.java249
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/impl/HumanPackageImpl.java453
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/impl/ManImpl.java160
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/impl/RootImpl.java149
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/impl/WomanImpl.java160
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/util/HumanAdapterFactory.java188
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/util/HumanResourceFactoryImpl.java55
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/util/HumanResourceImpl.java32
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/util/HumanSwitch.java216
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/util/HumanXMLProcessor.java51
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/validation/DocumentRootValidator.java28
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/validation/HumanValidator.java21
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/validation/ManValidator.java20
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/validation/RootValidator.java21
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human/validation/WomanValidator.java20
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/DocumentRoot.java115
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/Human.java110
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/Human2Factory.java82
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/Human2Package.java570
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/Man.java81
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/Root.java47
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/Woman.java81
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/impl/DocumentRootImpl.java279
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/impl/Human2FactoryImpl.java141
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/impl/Human2PackageImpl.java481
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/impl/HumanImpl.java249
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/impl/ManImpl.java194
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/impl/RootImpl.java149
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/impl/WomanImpl.java194
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2AdapterFactory.java188
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2ResourceFactoryImpl.java55
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2ResourceImpl.java32
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2Switch.java216
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2XMLProcessor.java51
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/validation/DocumentRootValidator.java28
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/validation/HumanValidator.java21
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/validation/ManValidator.java20
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/validation/RootValidator.java21
-rw-r--r--tests/org.eclipse.jet.tests/src/org/example/human2/validation/WomanValidator.java20
-rw-r--r--tests/org.eclipse.jet.tests/text/description.txt27
62 files changed, 7249 insertions, 1 deletions
diff --git a/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/README.txt b/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/README.txt
new file mode 100644
index 0000000..bc89fcb
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/README.txt
@@ -0,0 +1,4 @@
+This test case covers a specific defect:
+
+1) And XSD was used to define the .ecore model, but has not been used to maintain the model. The original XSD defined Human.
+2) The Human subclasses Man and Woman were directly defined in the .ecore model - they do not have Extended metadata.
diff --git a/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/human.ecore b/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/human.ecore
new file mode 100644
index 0000000..3e1a593
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/human.ecore
@@ -0,0 +1,82 @@
+<?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="human"
+ nsURI="http://www.example.org/human" nsPrefix="human">
+ <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:EReference" name="root" upperBound="-2" eType="#//Root"
+ volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="root"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Human">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="Human"/>
+ <details key="kind" value="empty"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="age" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Int"
+ unsettable="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="age"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="name"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Root">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="Root"/>
+ <details key="kind" value="elementOnly"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="human" upperBound="-1"
+ eType="#//Human" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="human"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Man" eSuperTypes="#//Human">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="likesCars" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Woman" eSuperTypes="#//Human">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="likesShopping" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/human.genmodel b/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/human.genmodel
new file mode 100644
index 0000000..8ee8d40
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/human.genmodel
@@ -0,0 +1,31 @@
+<?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.jet.tests/src"
+ editDirectory="/org.eclipse.jet.tests.edit/src" editorDirectory="/org.eclipse.jet.tests.editor/src"
+ modelPluginID="org.eclipse.jet.tests" modelName="Human" testsDirectory="/org.eclipse.jet.tests.tests/src"
+ importerID="org.eclipse.xsd.ecore.importer" copyrightFields="false" language="">
+ <foreignModel>../../dkb.xsd/human.xsd</foreignModel>
+ <genPackages prefix="Human" basePackage="org.example" resource="XML" disposableProviderFactory="true"
+ ecorePackage="human.ecore#/">
+ <genClasses ecoreClass="human.ecore#//DocumentRoot">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute human.ecore#//DocumentRoot/mixed"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference human.ecore#//DocumentRoot/xMLNSPrefixMap"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference human.ecore#//DocumentRoot/xSISchemaLocation"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference human.ecore#//DocumentRoot/root"/>
+ </genClasses>
+ <genClasses ecoreClass="human.ecore#//Human">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute human.ecore#//Human/age"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute human.ecore#//Human/name"/>
+ </genClasses>
+ <genClasses ecoreClass="human.ecore#//Root">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference human.ecore#//Root/human"/>
+ </genClasses>
+ <genClasses ecoreClass="human.ecore#//Man">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute human.ecore#//Man/likesCars"/>
+ </genClasses>
+ <genClasses ecoreClass="human.ecore#//Woman">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute human.ecore#//Woman/likesShopping"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/human.xsd b/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/human.xsd
new file mode 100644
index 0000000..425bcb3
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/human.xsd
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/human" xmlns:tns="http://www.example.org/human" elementFormDefault="qualified">
+
+ <complexType name="Root">
+ <sequence>
+ <element name="human" type="tns:Human" maxOccurs="unbounded" minOccurs="0"></element>
+ </sequence>
+ </complexType>
+
+ <complexType name="Human">
+ <attribute name="name" type="string"></attribute>
+ <attribute name="age" type="int"></attribute>
+ </complexType>
+
+ <element name="root" type="tns:Root"></element>
+</schema>
diff --git a/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/humans.xml b/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/humans.xml
new file mode 100644
index 0000000..43ff947
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/data/xmlSubclass/no-metadata-on-subclasses/humans.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:root xmlns:tns="http://www.example.org/human" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ >
+ <tns:human xsi:type="tns:Man" age="25" likesCars="true" name="John" />
+ <tns:human age="32" name="Yoko" xsi:type="tns:Woman"
+ likesShopping="true" />
+</tns:root>
diff --git a/tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/human2.ecore b/tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/human2.ecore
new file mode 100644
index 0000000..bf1144f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/human2.ecore
@@ -0,0 +1,102 @@
+<?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="human2"
+ nsURI="http://www.example.org/human2" nsPrefix="human2">
+ <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:EReference" name="root" upperBound="-2" eType="#//Root"
+ volatile="true" transient="true" derived="true" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="root"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Human">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="Human"/>
+ <details key="kind" value="empty"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="age" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Int"
+ unsettable="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="age"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="name"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Man" eSuperTypes="#//Human">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="Man"/>
+ <details key="kind" value="empty"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="likesCars" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"
+ unsettable="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="likesCars"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Root">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="Root"/>
+ <details key="kind" value="elementOnly"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="human" upperBound="-1"
+ eType="#//Human" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="human"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Woman" eSuperTypes="#//Human">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="Woman"/>
+ <details key="kind" value="empty"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="likesShopping" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"
+ unsettable="true">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="likesShopping"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/human2.genmodel b/tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/human2.genmodel
new file mode 100644
index 0000000..e34124d
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/human2.genmodel
@@ -0,0 +1,31 @@
+<?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.jet.tests/src"
+ editDirectory="/org.eclipse.jet.tests.edit/src" editorDirectory="/org.eclipse.jet.tests.editor/src"
+ modelPluginID="org.eclipse.jet.tests" modelName="Human2" importerID="org.eclipse.xsd.ecore.importer"
+ copyrightFields="false">
+ <foreignModel>../../dkb.xsd/human2.xsd</foreignModel>
+ <genPackages prefix="Human2" basePackage="org.example" resource="XML" disposableProviderFactory="true"
+ ecorePackage="human2.ecore#/">
+ <genClasses ecoreClass="human2.ecore#//DocumentRoot">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute human2.ecore#//DocumentRoot/mixed"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference human2.ecore#//DocumentRoot/xMLNSPrefixMap"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference human2.ecore#//DocumentRoot/xSISchemaLocation"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference human2.ecore#//DocumentRoot/root"/>
+ </genClasses>
+ <genClasses ecoreClass="human2.ecore#//Human">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute human2.ecore#//Human/age"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute human2.ecore#//Human/name"/>
+ </genClasses>
+ <genClasses ecoreClass="human2.ecore#//Man">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute human2.ecore#//Man/likesCars"/>
+ </genClasses>
+ <genClasses ecoreClass="human2.ecore#//Root">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference human2.ecore#//Root/human"/>
+ </genClasses>
+ <genClasses ecoreClass="human2.ecore#//Woman">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute human2.ecore#//Woman/likesShopping"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/human2.xsd b/tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/human2.xsd
new file mode 100644
index 0000000..ca7fcf1
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/human2.xsd
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema targetNamespace="http://www.example.org/human2" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.org/human2">
+
+ <complexType name="Root">
+ <sequence>
+ <element name="human" type="tns:Human" maxOccurs="unbounded" minOccurs="0"></element>
+ </sequence>
+ </complexType>
+
+ <complexType name="Human">
+ <attribute name="name" type="string"></attribute>
+ <attribute name="age" type="int"></attribute>
+ </complexType>
+
+ <element name="root" type="tns:Root"></element>
+
+ <complexType name="Man">
+ <complexContent>
+ <extension base="tns:Human">
+ <attribute name="likesCars" type="boolean"></attribute>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="Woman">
+ <complexContent>
+ <extension base="tns:Human">
+ <attribute name="likesShopping" type="boolean"></attribute>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
diff --git a/tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/humans.xml b/tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/humans.xml
new file mode 100644
index 0000000..6c82685
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/data/xmlSubclass/with-metadata/humans.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:root xmlns:tns="http://www.example.org/human2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ >
+ <tns:human xsi:type="tns:Man" age="25" likesCars="true" name="John" />
+ <tns:human age="32" name="Yoko" xsi:type="tns:Woman"
+ likesShopping="true" />
+</tns:root>
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/AbstractEMFXMLSubclassTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/AbstractEMFXMLSubclassTests.java
new file mode 100644
index 0000000..0906a7f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/AbstractEMFXMLSubclassTests.java
@@ -0,0 +1,114 @@
+package org.eclipse.jet.tests.xpath.inspectors;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collection;
+
+import junit.framework.TestCase;
+
+import org.eclipse.jet.internal.runtime.model.EMFXMLModelLoader;
+import org.eclipse.jet.runtime.model.IModelLoader;
+import org.eclipse.jet.xpath.XPath;
+import org.eclipse.jet.xpath.XPathException;
+import org.eclipse.jet.xpath.XPathExpression;
+import org.eclipse.jet.xpath.XPathFactory;
+import org.eclipse.jet.xpath.XPathUtil;
+
+/**
+ * Abstract test case for verifying the EObjectInspector correctly handles
+ * XPath matchings on XML subclasses. Example XSD:
+ * <pre>
+&lt;schema targetNamespace="http://www.example.org/human2" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.org/human2">
+
+ &lt;complexType name="Root">
+ &lt;sequence>
+ &lt;element name="human" type="tns:Human" maxOccurs="unbounded" minOccurs="0">&lt;/element>
+ &lt;/sequence>
+ &lt;/complexType>
+
+ &lt;complexType name="Human">
+ &lt;attribute name="name" type="string">&lt;/attribute>
+ &lt;attribute name="age" type="int">&lt;/attribute>
+ &lt;/complexType>
+
+ &lt;element name="root" type="tns:Root">&lt;/element>
+
+ &lt;complexType name="Man">
+ &lt;complexContent>
+ &lt;extension base="tns:Human">
+ &lt;attribute name="likesCars" type="boolean">&lt;/attribute>
+ &lt;/extension>
+ &lt;/complexContent>
+ &lt;/complexType>
+
+ &lt;complexType name="Woman">
+ &lt;complexContent>
+ &lt;extension base="tns:Human">
+ &lt;attribute name="likesShopping" type="boolean">&lt;/attribute>
+ &lt;/extension>
+ &lt;/complexContent>
+ &lt;/complexType>
+&lt;/schema>
+ * </pre>
+ *
+ */
+public abstract class AbstractEMFXMLSubclassTests extends TestCase {
+
+ private final XPath xpathEngine = XPathFactory.newInstance().newXPath(null);
+
+ public AbstractEMFXMLSubclassTests() {
+ super();
+ }
+
+ /**
+ * return the URL of the tests plug-in containing the test data.
+ * @return a plug-in URL (typically http://platform/plugin/org.eclipse.jet.tests)
+ * @throws MalformedURLException
+ */
+ protected abstract URL getPluginURL() throws MalformedURLException;
+
+ /**
+ * Return the plug-in relative path containing the test data
+ * @return a relative path terminated with a slash
+ */
+ protected abstract String getTestDataFolder();
+
+ protected final IModelLoader getModelLoader() {
+ return new EMFXMLModelLoader();
+ }
+
+ public AbstractEMFXMLSubclassTests(String name) {
+ super(name);
+ }
+
+ public void testPolymorphicStep() throws XPathException, IOException {
+ final Object documentRoot = loadEMFXML("humans.xml");
+
+ final String xpath = "/root/human";
+
+ final XPathExpression compiledXPath = xpathEngine.compile(xpath);
+
+ Collection result = compiledXPath.evaluateAsNodeSet(documentRoot);
+
+ assertEquals("result.size()", 2, result.size());
+ Object[] resultArray = result.toArray();
+
+ assertEquals("result[0]/@name", "John", getXPath(resultArray[0], "@name"));
+ assertEquals("result[1]/@name", "Yoko", getXPath(resultArray[1], "@name"));
+ }
+
+ private String getXPath(Object contextObject, String expression) throws XPathException {
+ final XPathExpression compiledExpression = xpathEngine.compile(expression);
+ return XPathUtil.xpathString(compiledExpression.evaluate(contextObject));
+ }
+
+ private Object loadEMFXML(String pluginRelativePath) throws IOException {
+ final IModelLoader loader = getModelLoader();
+ final URL baseURL = getPluginURL();
+ final URL resourceURL = new URL(baseURL, getTestDataFolder() + pluginRelativePath);
+ return loader.load(resourceURL);
+
+ }
+
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/AllTests.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/AllTests.java
index 754efb3..cf12b67 100644
--- a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/AllTests.java
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/AllTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,6 +21,8 @@ public class AllTests {
TestSuite suite = new TestSuite(
"Test for org.eclipse.jet.tests.xpath.inspectors");
//$JUnit-BEGIN$
+ suite.addTestSuite(XMLSubclassesWithoutMetadata.class);
+ suite.addTestSuite(XMLSubclasses.class);
suite.addTestSuite(XMLDOMCopyElementTests.class);
suite.addTestSuite(EMFXMLCopyELementTests.class);
suite.addTestSuite(EMFXML24SubstitutionGroupTests.class);
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/XMLSubclasses.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/XMLSubclasses.java
new file mode 100644
index 0000000..b1267e7
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/XMLSubclasses.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * /
+ *******************************************************************************/
+
+package org.eclipse.jet.tests.xpath.inspectors;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.jet.xpath.XPathException;
+
+/**
+ * Test subclasses where the subclasses were created directly in ecore rather than the XSD.
+ *
+ */
+public class XMLSubclasses extends AbstractEMFXMLSubclassTests {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.tests.xpath.inspectors.AbstractEMFXMLSubclassTests#getPluginURL()
+ */
+ protected URL getPluginURL() throws MalformedURLException {
+ return new URL("platform:/plugin/org.eclipse.jet.tests/");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.tests.xpath.inspectors.AbstractEMFXMLSubclassTests#getTestDataFolder()
+ */
+ protected String getTestDataFolder() {
+ return "data/xmlSubclass/with-metadata/";
+ }
+
+ public void testPolymorphicStep() throws XPathException, IOException {
+ // reference the HumanPackage so that the package gets registered with EMF
+ org.example.human2.Human2Package.eINSTANCE.getName();
+ super.testPolymorphicStep();
+ }
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/XMLSubclassesWithoutMetadata.java b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/XMLSubclassesWithoutMetadata.java
new file mode 100644
index 0000000..a30cef2
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/eclipse/jet/tests/xpath/inspectors/XMLSubclassesWithoutMetadata.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - Initial API and implementation
+ *
+ * /
+ *******************************************************************************/
+
+package org.eclipse.jet.tests.xpath.inspectors;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.eclipse.jet.xpath.XPathException;
+import org.example.human.HumanPackage;
+
+/**
+ * Test subclasses where the subclasses were created directly in ecore rather than the XSD.
+ *
+ */
+public class XMLSubclassesWithoutMetadata extends AbstractEMFXMLSubclassTests {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.tests.xpath.inspectors.AbstractEMFXMLSubclassTests#getPluginURL()
+ */
+ protected URL getPluginURL() throws MalformedURLException {
+ return new URL("platform:/plugin/org.eclipse.jet.tests/");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jet.tests.xpath.inspectors.AbstractEMFXMLSubclassTests#getTestDataFolder()
+ */
+ protected String getTestDataFolder() {
+ return "data/xmlSubclass/no-metadata-on-subclasses/";
+ }
+
+ public void testPolymorphicStep() throws XPathException, IOException {
+ // reference the HumanPackage so that the package gets registered with EMF
+ org.example.human.HumanPackage.eINSTANCE.getName();
+ super.testPolymorphicStep();
+ }
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/DocumentRoot.java b/tests/org.eclipse.jet.tests/src/org/example/human/DocumentRoot.java
new file mode 100644
index 0000000..ff16fea
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/DocumentRoot.java
@@ -0,0 +1,115 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: DocumentRoot.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human;
+
+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.example.human.DocumentRoot#getMixed <em>Mixed</em>}</li>
+ * <li>{@link org.example.human.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
+ * <li>{@link org.example.human.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
+ * <li>{@link org.example.human.DocumentRoot#getRoot <em>Root</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.example.human.HumanPackage#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.example.human.HumanPackage#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.example.human.HumanPackage#getDocumentRoot_XMLNSPrefixMap()
+ * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry" keyType="java.lang.String" valueType="java.lang.String" transient="true"
+ * extendedMetaData="kind='attribute' name='xmlns:prefix'"
+ * @generated
+ */
+ EMap 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.example.human.HumanPackage#getDocumentRoot_XSISchemaLocation()
+ * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry" keyType="java.lang.String" valueType="java.lang.String" transient="true"
+ * extendedMetaData="kind='attribute' name='xsi:schemaLocation'"
+ * @generated
+ */
+ EMap getXSISchemaLocation();
+
+ /**
+ * Returns the value of the '<em><b>Root</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Root</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>Root</em>' containment reference.
+ * @see #setRoot(Root)
+ * @see org.example.human.HumanPackage#getDocumentRoot_Root()
+ * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
+ * extendedMetaData="kind='element' name='root' namespace='##targetNamespace'"
+ * @generated
+ */
+ Root getRoot();
+
+ /**
+ * Sets the value of the '{@link org.example.human.DocumentRoot#getRoot <em>Root</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Root</em>' containment reference.
+ * @see #getRoot()
+ * @generated
+ */
+ void setRoot(Root value);
+
+} // DocumentRoot
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/Human.java b/tests/org.eclipse.jet.tests/src/org/example/human/Human.java
new file mode 100644
index 0000000..452a960
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/Human.java
@@ -0,0 +1,110 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Human.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Human</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.example.human.Human#getAge <em>Age</em>}</li>
+ * <li>{@link org.example.human.Human#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.example.human.HumanPackage#getHuman()
+ * @model extendedMetaData="name='Human' kind='empty'"
+ * @generated
+ */
+public interface Human extends EObject {
+ /**
+ * Returns the value of the '<em><b>Age</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Age</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Age</em>' attribute.
+ * @see #isSetAge()
+ * @see #unsetAge()
+ * @see #setAge(int)
+ * @see org.example.human.HumanPackage#getHuman_Age()
+ * @model unsettable="true" dataType="org.eclipse.emf.ecore.xml.type.Int"
+ * extendedMetaData="kind='attribute' name='age'"
+ * @generated
+ */
+ int getAge();
+
+ /**
+ * Sets the value of the '{@link org.example.human.Human#getAge <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Age</em>' attribute.
+ * @see #isSetAge()
+ * @see #unsetAge()
+ * @see #getAge()
+ * @generated
+ */
+ void setAge(int value);
+
+ /**
+ * Unsets the value of the '{@link org.example.human.Human#getAge <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetAge()
+ * @see #getAge()
+ * @see #setAge(int)
+ * @generated
+ */
+ void unsetAge();
+
+ /**
+ * Returns whether the value of the '{@link org.example.human.Human#getAge <em>Age</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Age</em>' attribute is set.
+ * @see #unsetAge()
+ * @see #getAge()
+ * @see #setAge(int)
+ * @generated
+ */
+ boolean isSetAge();
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.example.human.HumanPackage#getHuman_Name()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+ * extendedMetaData="kind='attribute' name='name'"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.example.human.Human#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+} // Human
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/HumanFactory.java b/tests/org.eclipse.jet.tests/src/org/example/human/HumanFactory.java
new file mode 100644
index 0000000..0d37f3f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/HumanFactory.java
@@ -0,0 +1,82 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanFactory.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human;
+
+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.example.human.HumanPackage
+ * @generated
+ */
+public interface HumanFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ HumanFactory eINSTANCE = org.example.human.impl.HumanFactoryImpl.init();
+
+ /**
+ * 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 a new object of class '<em>Human</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Human</em>'.
+ * @generated
+ */
+ Human createHuman();
+
+ /**
+ * Returns a new object of class '<em>Root</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Root</em>'.
+ * @generated
+ */
+ Root createRoot();
+
+ /**
+ * Returns a new object of class '<em>Man</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Man</em>'.
+ * @generated
+ */
+ Man createMan();
+
+ /**
+ * Returns a new object of class '<em>Woman</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Woman</em>'.
+ * @generated
+ */
+ Woman createWoman();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ HumanPackage getHumanPackage();
+
+} //HumanFactory
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/HumanPackage.java b/tests/org.eclipse.jet.tests/src/org/example/human/HumanPackage.java
new file mode 100644
index 0000000..f8734d3
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/HumanPackage.java
@@ -0,0 +1,570 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanPackage.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human;
+
+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.example.human.HumanFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface HumanPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "human";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.example.org/human";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "human";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ HumanPackage eINSTANCE = org.example.human.impl.HumanPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.example.human.impl.DocumentRootImpl <em>Document Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human.impl.DocumentRootImpl
+ * @see org.example.human.impl.HumanPackageImpl#getDocumentRoot()
+ * @generated
+ */
+ int DOCUMENT_ROOT = 0;
+
+ /**
+ * 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>Root</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__ROOT = 3;
+
+ /**
+ * 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 = 4;
+
+ /**
+ * The meta object id for the '{@link org.example.human.impl.HumanImpl <em>Human</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human.impl.HumanImpl
+ * @see org.example.human.impl.HumanPackageImpl#getHuman()
+ * @generated
+ */
+ int HUMAN = 1;
+
+ /**
+ * The feature id for the '<em><b>Age</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HUMAN__AGE = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HUMAN__NAME = 1;
+
+ /**
+ * The number of structural features of the '<em>Human</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HUMAN_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.example.human.impl.RootImpl <em>Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human.impl.RootImpl
+ * @see org.example.human.impl.HumanPackageImpl#getRoot()
+ * @generated
+ */
+ int ROOT = 2;
+
+ /**
+ * The feature id for the '<em><b>Human</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ROOT__HUMAN = 0;
+
+ /**
+ * The number of structural features of the '<em>Root</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ROOT_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.example.human.impl.ManImpl <em>Man</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human.impl.ManImpl
+ * @see org.example.human.impl.HumanPackageImpl#getMan()
+ * @generated
+ */
+ int MAN = 3;
+
+ /**
+ * The feature id for the '<em><b>Age</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAN__AGE = HUMAN__AGE;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAN__NAME = HUMAN__NAME;
+
+ /**
+ * The feature id for the '<em><b>Likes Cars</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAN__LIKES_CARS = HUMAN_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Man</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAN_FEATURE_COUNT = HUMAN_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.example.human.impl.WomanImpl <em>Woman</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human.impl.WomanImpl
+ * @see org.example.human.impl.HumanPackageImpl#getWoman()
+ * @generated
+ */
+ int WOMAN = 4;
+
+ /**
+ * The feature id for the '<em><b>Age</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WOMAN__AGE = HUMAN__AGE;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WOMAN__NAME = HUMAN__NAME;
+
+ /**
+ * The feature id for the '<em><b>Likes Shopping</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WOMAN__LIKES_SHOPPING = HUMAN_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Woman</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WOMAN_FEATURE_COUNT = HUMAN_FEATURE_COUNT + 1;
+
+
+ /**
+ * Returns the meta object for class '{@link org.example.human.DocumentRoot <em>Document Root</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Document Root</em>'.
+ * @see org.example.human.DocumentRoot
+ * @generated
+ */
+ EClass getDocumentRoot();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.example.human.DocumentRoot#getMixed <em>Mixed</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Mixed</em>'.
+ * @see org.example.human.DocumentRoot#getMixed()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EAttribute getDocumentRoot_Mixed();
+
+ /**
+ * Returns the meta object for the map '{@link org.example.human.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.example.human.DocumentRoot#getXMLNSPrefixMap()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_XMLNSPrefixMap();
+
+ /**
+ * Returns the meta object for the map '{@link org.example.human.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.example.human.DocumentRoot#getXSISchemaLocation()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_XSISchemaLocation();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.example.human.DocumentRoot#getRoot <em>Root</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Root</em>'.
+ * @see org.example.human.DocumentRoot#getRoot()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_Root();
+
+ /**
+ * Returns the meta object for class '{@link org.example.human.Human <em>Human</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Human</em>'.
+ * @see org.example.human.Human
+ * @generated
+ */
+ EClass getHuman();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.example.human.Human#getAge <em>Age</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Age</em>'.
+ * @see org.example.human.Human#getAge()
+ * @see #getHuman()
+ * @generated
+ */
+ EAttribute getHuman_Age();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.example.human.Human#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.example.human.Human#getName()
+ * @see #getHuman()
+ * @generated
+ */
+ EAttribute getHuman_Name();
+
+ /**
+ * Returns the meta object for class '{@link org.example.human.Root <em>Root</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Root</em>'.
+ * @see org.example.human.Root
+ * @generated
+ */
+ EClass getRoot();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.example.human.Root#getHuman <em>Human</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Human</em>'.
+ * @see org.example.human.Root#getHuman()
+ * @see #getRoot()
+ * @generated
+ */
+ EReference getRoot_Human();
+
+ /**
+ * Returns the meta object for class '{@link org.example.human.Man <em>Man</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Man</em>'.
+ * @see org.example.human.Man
+ * @generated
+ */
+ EClass getMan();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.example.human.Man#isLikesCars <em>Likes Cars</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Likes Cars</em>'.
+ * @see org.example.human.Man#isLikesCars()
+ * @see #getMan()
+ * @generated
+ */
+ EAttribute getMan_LikesCars();
+
+ /**
+ * Returns the meta object for class '{@link org.example.human.Woman <em>Woman</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Woman</em>'.
+ * @see org.example.human.Woman
+ * @generated
+ */
+ EClass getWoman();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.example.human.Woman#isLikesShopping <em>Likes Shopping</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Likes Shopping</em>'.
+ * @see org.example.human.Woman#isLikesShopping()
+ * @see #getWoman()
+ * @generated
+ */
+ EAttribute getWoman_LikesShopping();
+
+ /**
+ * 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
+ */
+ HumanFactory getHumanFactory();
+
+ /**
+ * <!-- 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.example.human.impl.DocumentRootImpl <em>Document Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human.impl.DocumentRootImpl
+ * @see org.example.human.impl.HumanPackageImpl#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>Root</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOCUMENT_ROOT__ROOT = eINSTANCE.getDocumentRoot_Root();
+
+ /**
+ * The meta object literal for the '{@link org.example.human.impl.HumanImpl <em>Human</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human.impl.HumanImpl
+ * @see org.example.human.impl.HumanPackageImpl#getHuman()
+ * @generated
+ */
+ EClass HUMAN = eINSTANCE.getHuman();
+
+ /**
+ * The meta object literal for the '<em><b>Age</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute HUMAN__AGE = eINSTANCE.getHuman_Age();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute HUMAN__NAME = eINSTANCE.getHuman_Name();
+
+ /**
+ * The meta object literal for the '{@link org.example.human.impl.RootImpl <em>Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human.impl.RootImpl
+ * @see org.example.human.impl.HumanPackageImpl#getRoot()
+ * @generated
+ */
+ EClass ROOT = eINSTANCE.getRoot();
+
+ /**
+ * The meta object literal for the '<em><b>Human</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ROOT__HUMAN = eINSTANCE.getRoot_Human();
+
+ /**
+ * The meta object literal for the '{@link org.example.human.impl.ManImpl <em>Man</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human.impl.ManImpl
+ * @see org.example.human.impl.HumanPackageImpl#getMan()
+ * @generated
+ */
+ EClass MAN = eINSTANCE.getMan();
+
+ /**
+ * The meta object literal for the '<em><b>Likes Cars</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MAN__LIKES_CARS = eINSTANCE.getMan_LikesCars();
+
+ /**
+ * The meta object literal for the '{@link org.example.human.impl.WomanImpl <em>Woman</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human.impl.WomanImpl
+ * @see org.example.human.impl.HumanPackageImpl#getWoman()
+ * @generated
+ */
+ EClass WOMAN = eINSTANCE.getWoman();
+
+ /**
+ * The meta object literal for the '<em><b>Likes Shopping</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute WOMAN__LIKES_SHOPPING = eINSTANCE.getWoman_LikesShopping();
+
+ }
+
+} //HumanPackage
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/Man.java b/tests/org.eclipse.jet.tests/src/org/example/human/Man.java
new file mode 100644
index 0000000..d479335
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/Man.java
@@ -0,0 +1,53 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Man.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Man</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.example.human.Man#isLikesCars <em>Likes Cars</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.example.human.HumanPackage#getMan()
+ * @model
+ * @generated
+ */
+public interface Man extends Human {
+ /**
+ * Returns the value of the '<em><b>Likes Cars</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Likes Cars</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Likes Cars</em>' attribute.
+ * @see #setLikesCars(boolean)
+ * @see org.example.human.HumanPackage#getMan_LikesCars()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+ * @generated
+ */
+ boolean isLikesCars();
+
+ /**
+ * Sets the value of the '{@link org.example.human.Man#isLikesCars <em>Likes Cars</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Likes Cars</em>' attribute.
+ * @see #isLikesCars()
+ * @generated
+ */
+ void setLikesCars(boolean value);
+
+} // Man
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/Root.java b/tests/org.eclipse.jet.tests/src/org/example/human/Root.java
new file mode 100644
index 0000000..0a9aeed
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/Root.java
@@ -0,0 +1,47 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Root.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Root</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.example.human.Root#getHuman <em>Human</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.example.human.HumanPackage#getRoot()
+ * @model extendedMetaData="name='Root' kind='elementOnly'"
+ * @generated
+ */
+public interface Root extends EObject {
+ /**
+ * Returns the value of the '<em><b>Human</b></em>' containment reference list.
+ * The list contents are of type {@link org.example.human.Human}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Human</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Human</em>' containment reference list.
+ * @see org.example.human.HumanPackage#getRoot_Human()
+ * @model type="org.example.human.Human" containment="true"
+ * extendedMetaData="kind='element' name='human' namespace='##targetNamespace'"
+ * @generated
+ */
+ EList getHuman();
+
+} // Root
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/Woman.java b/tests/org.eclipse.jet.tests/src/org/example/human/Woman.java
new file mode 100644
index 0000000..5d9dda2
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/Woman.java
@@ -0,0 +1,53 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Woman.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Woman</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.example.human.Woman#isLikesShopping <em>Likes Shopping</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.example.human.HumanPackage#getWoman()
+ * @model
+ * @generated
+ */
+public interface Woman extends Human {
+ /**
+ * Returns the value of the '<em><b>Likes Shopping</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Likes Shopping</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Likes Shopping</em>' attribute.
+ * @see #setLikesShopping(boolean)
+ * @see org.example.human.HumanPackage#getWoman_LikesShopping()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+ * @generated
+ */
+ boolean isLikesShopping();
+
+ /**
+ * Sets the value of the '{@link org.example.human.Woman#isLikesShopping <em>Likes Shopping</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Likes Shopping</em>' attribute.
+ * @see #isLikesShopping()
+ * @generated
+ */
+ void setLikesShopping(boolean value);
+
+} // Woman
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/impl/DocumentRootImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human/impl/DocumentRootImpl.java
new file mode 100644
index 0000000..71d1f15
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/impl/DocumentRootImpl.java
@@ -0,0 +1,279 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: DocumentRootImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human.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.example.human.DocumentRoot;
+import org.example.human.HumanPackage;
+import org.example.human.Root;
+
+/**
+ * <!-- 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.example.human.impl.DocumentRootImpl#getMixed <em>Mixed</em>}</li>
+ * <li>{@link org.example.human.impl.DocumentRootImpl#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
+ * <li>{@link org.example.human.impl.DocumentRootImpl#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
+ * <li>{@link org.example.human.impl.DocumentRootImpl#getRoot <em>Root</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 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 xSISchemaLocation;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DocumentRootImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return HumanPackage.Literals.DOCUMENT_ROOT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FeatureMap getMixed() {
+ if (mixed == null) {
+ mixed = new BasicFeatureMap(this, HumanPackage.DOCUMENT_ROOT__MIXED);
+ }
+ return mixed;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap getXMLNSPrefixMap() {
+ if (xMLNSPrefixMap == null) {
+ xMLNSPrefixMap = new EcoreEMap(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, HumanPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+ }
+ return xMLNSPrefixMap;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap getXSISchemaLocation() {
+ if (xSISchemaLocation == null) {
+ xSISchemaLocation = new EcoreEMap(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, HumanPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+ }
+ return xSISchemaLocation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Root getRoot() {
+ return (Root)getMixed().get(HumanPackage.Literals.DOCUMENT_ROOT__ROOT, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetRoot(Root newRoot, NotificationChain msgs) {
+ return ((FeatureMap.Internal)getMixed()).basicAdd(HumanPackage.Literals.DOCUMENT_ROOT__ROOT, newRoot, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRoot(Root newRoot) {
+ ((FeatureMap.Internal)getMixed()).set(HumanPackage.Literals.DOCUMENT_ROOT__ROOT, newRoot);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case HumanPackage.DOCUMENT_ROOT__MIXED:
+ return ((InternalEList)getMixed()).basicRemove(otherEnd, msgs);
+ case HumanPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ return ((InternalEList)getXMLNSPrefixMap()).basicRemove(otherEnd, msgs);
+ case HumanPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ return ((InternalEList)getXSISchemaLocation()).basicRemove(otherEnd, msgs);
+ case HumanPackage.DOCUMENT_ROOT__ROOT:
+ return basicSetRoot(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case HumanPackage.DOCUMENT_ROOT__MIXED:
+ if (coreType) return getMixed();
+ return ((FeatureMap.Internal)getMixed()).getWrapper();
+ case HumanPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ if (coreType) return getXMLNSPrefixMap();
+ else return getXMLNSPrefixMap().map();
+ case HumanPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ if (coreType) return getXSISchemaLocation();
+ else return getXSISchemaLocation().map();
+ case HumanPackage.DOCUMENT_ROOT__ROOT:
+ return getRoot();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case HumanPackage.DOCUMENT_ROOT__MIXED:
+ ((FeatureMap.Internal)getMixed()).set(newValue);
+ return;
+ case HumanPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue);
+ return;
+ case HumanPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue);
+ return;
+ case HumanPackage.DOCUMENT_ROOT__ROOT:
+ setRoot((Root)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case HumanPackage.DOCUMENT_ROOT__MIXED:
+ getMixed().clear();
+ return;
+ case HumanPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ getXMLNSPrefixMap().clear();
+ return;
+ case HumanPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ getXSISchemaLocation().clear();
+ return;
+ case HumanPackage.DOCUMENT_ROOT__ROOT:
+ setRoot((Root)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case HumanPackage.DOCUMENT_ROOT__MIXED:
+ return mixed != null && !mixed.isEmpty();
+ case HumanPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty();
+ case HumanPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ return xSISchemaLocation != null && !xSISchemaLocation.isEmpty();
+ case HumanPackage.DOCUMENT_ROOT__ROOT:
+ return getRoot() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ 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/tests/org.eclipse.jet.tests/src/org/example/human/impl/HumanFactoryImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human/impl/HumanFactoryImpl.java
new file mode 100644
index 0000000..873fb0f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/impl/HumanFactoryImpl.java
@@ -0,0 +1,141 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanFactoryImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human.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.example.human.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class HumanFactoryImpl extends EFactoryImpl implements HumanFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static HumanFactory init() {
+ try {
+ HumanFactory theHumanFactory = (HumanFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.example.org/human");
+ if (theHumanFactory != null) {
+ return theHumanFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new HumanFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HumanFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case HumanPackage.DOCUMENT_ROOT: return createDocumentRoot();
+ case HumanPackage.HUMAN: return createHuman();
+ case HumanPackage.ROOT: return createRoot();
+ case HumanPackage.MAN: return createMan();
+ case HumanPackage.WOMAN: return createWoman();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DocumentRoot createDocumentRoot() {
+ DocumentRootImpl documentRoot = new DocumentRootImpl();
+ return documentRoot;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Human createHuman() {
+ HumanImpl human = new HumanImpl();
+ return human;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Root createRoot() {
+ RootImpl root = new RootImpl();
+ return root;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Man createMan() {
+ ManImpl man = new ManImpl();
+ return man;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Woman createWoman() {
+ WomanImpl woman = new WomanImpl();
+ return woman;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HumanPackage getHumanPackage() {
+ return (HumanPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ public static HumanPackage getPackage() {
+ return HumanPackage.eINSTANCE;
+ }
+
+} //HumanFactoryImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/impl/HumanImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human/impl/HumanImpl.java
new file mode 100644
index 0000000..197bdc1
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/impl/HumanImpl.java
@@ -0,0 +1,249 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human.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.example.human.Human;
+import org.example.human.HumanPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Human</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.example.human.impl.HumanImpl#getAge <em>Age</em>}</li>
+ * <li>{@link org.example.human.impl.HumanImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class HumanImpl extends EObjectImpl implements Human {
+ /**
+ * The default value of the '{@link #getAge() <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAge()
+ * @generated
+ * @ordered
+ */
+ protected static final int AGE_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getAge() <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAge()
+ * @generated
+ * @ordered
+ */
+ protected int age = AGE_EDEFAULT;
+
+ /**
+ * This is true if the Age attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean ageESet;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected HumanImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return HumanPackage.Literals.HUMAN;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getAge() {
+ return age;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAge(int newAge) {
+ int oldAge = age;
+ age = newAge;
+ boolean oldAgeESet = ageESet;
+ ageESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HumanPackage.HUMAN__AGE, oldAge, age, !oldAgeESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetAge() {
+ int oldAge = age;
+ boolean oldAgeESet = ageESet;
+ age = AGE_EDEFAULT;
+ ageESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, HumanPackage.HUMAN__AGE, oldAge, AGE_EDEFAULT, oldAgeESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetAge() {
+ return ageESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HumanPackage.HUMAN__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case HumanPackage.HUMAN__AGE:
+ return new Integer(getAge());
+ case HumanPackage.HUMAN__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case HumanPackage.HUMAN__AGE:
+ setAge(((Integer)newValue).intValue());
+ return;
+ case HumanPackage.HUMAN__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case HumanPackage.HUMAN__AGE:
+ unsetAge();
+ return;
+ case HumanPackage.HUMAN__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case HumanPackage.HUMAN__AGE:
+ return isSetAge();
+ case HumanPackage.HUMAN__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (age: ");
+ if (ageESet) result.append(age); else result.append("<unset>");
+ result.append(", name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //HumanImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/impl/HumanPackageImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human/impl/HumanPackageImpl.java
new file mode 100644
index 0000000..d26a88d
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/impl/HumanPackageImpl.java
@@ -0,0 +1,453 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanPackageImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human.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.example.human.DocumentRoot;
+import org.example.human.Human;
+import org.example.human.HumanFactory;
+import org.example.human.HumanPackage;
+import org.example.human.Man;
+import org.example.human.Root;
+import org.example.human.Woman;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class HumanPackageImpl extends EPackageImpl implements HumanPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass documentRootEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass humanEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass rootEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass manEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass womanEClass = 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.example.human.HumanPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private HumanPackageImpl() {
+ super(eNS_URI, HumanFactory.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. Simple
+ * dependencies are satisfied by calling this method on all
+ * dependent packages before doing anything else. This method drives
+ * initialization for interdependent packages directly, in parallel
+ * with this package, itself.
+ * <p>Of this package and its interdependencies, all packages which
+ * have not yet been registered by their URI values are first created
+ * and registered. The packages are then initialized in two steps:
+ * meta-model objects for all of the packages are created before any
+ * are initialized, since one package's meta-model objects may refer to
+ * those of another.
+ * <p>Invocation of this method will not affect any packages that have
+ * already been initialized.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static HumanPackage init() {
+ if (isInited) return (HumanPackage)EPackage.Registry.INSTANCE.getEPackage(HumanPackage.eNS_URI);
+
+ // Obtain or create and register package
+ HumanPackageImpl theHumanPackage = (HumanPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof HumanPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new HumanPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ XMLTypePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theHumanPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theHumanPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theHumanPackage.freeze();
+
+ return theHumanPackage;
+ }
+
+ /**
+ * <!-- 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 EReference getDocumentRoot_Root() {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getHuman() {
+ return humanEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getHuman_Age() {
+ return (EAttribute)humanEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getHuman_Name() {
+ return (EAttribute)humanEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getRoot() {
+ return rootEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRoot_Human() {
+ return (EReference)rootEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMan() {
+ return manEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getMan_LikesCars() {
+ return (EAttribute)manEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getWoman() {
+ return womanEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getWoman_LikesShopping() {
+ return (EAttribute)womanEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HumanFactory getHumanFactory() {
+ return (HumanFactory)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
+ documentRootEClass = createEClass(DOCUMENT_ROOT);
+ createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__ROOT);
+
+ humanEClass = createEClass(HUMAN);
+ createEAttribute(humanEClass, HUMAN__AGE);
+ createEAttribute(humanEClass, HUMAN__NAME);
+
+ rootEClass = createEClass(ROOT);
+ createEReference(rootEClass, ROOT__HUMAN);
+
+ manEClass = createEClass(MAN);
+ createEAttribute(manEClass, MAN__LIKES_CARS);
+
+ womanEClass = createEClass(WOMAN);
+ createEAttribute(womanEClass, WOMAN__LIKES_SHOPPING);
+ }
+
+ /**
+ * <!-- 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);
+
+ // Add supertypes to classes
+ manEClass.getESuperTypes().add(this.getHuman());
+ womanEClass.getESuperTypes().add(this.getHuman());
+
+ // Initialize classes and features; add operations and parameters
+ 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);
+ initEReference(getDocumentRoot_Root(), this.getRoot(), null, "root", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+ initEClass(humanEClass, Human.class, "Human", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getHuman_Age(), theXMLTypePackage.getInt(), "age", null, 0, 1, Human.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getHuman_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, Human.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(rootEClass, Root.class, "Root", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getRoot_Human(), this.getHuman(), null, "human", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(manEClass, Man.class, "Man", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getMan_LikesCars(), theXMLTypePackage.getBoolean(), "likesCars", null, 0, 1, Man.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(womanEClass, Woman.class, "Woman", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getWoman_LikesShopping(), theXMLTypePackage.getBoolean(), "likesShopping", null, 0, 1, Woman.class, !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
+ (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_Root(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "root",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (humanEClass,
+ source,
+ new String[] {
+ "name", "Human",
+ "kind", "empty"
+ });
+ addAnnotation
+ (getHuman_Age(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "age"
+ });
+ addAnnotation
+ (getHuman_Name(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "name"
+ });
+ addAnnotation
+ (rootEClass,
+ source,
+ new String[] {
+ "name", "Root",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getRoot_Human(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "human",
+ "namespace", "##targetNamespace"
+ });
+ }
+
+} //HumanPackageImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/impl/ManImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human/impl/ManImpl.java
new file mode 100644
index 0000000..511d424
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/impl/ManImpl.java
@@ -0,0 +1,160 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ManImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.example.human.HumanPackage;
+import org.example.human.Man;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Man</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.example.human.impl.ManImpl#isLikesCars <em>Likes Cars</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ManImpl extends HumanImpl implements Man {
+ /**
+ * The default value of the '{@link #isLikesCars() <em>Likes Cars</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isLikesCars()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean LIKES_CARS_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isLikesCars() <em>Likes Cars</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isLikesCars()
+ * @generated
+ * @ordered
+ */
+ protected boolean likesCars = LIKES_CARS_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ManImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return HumanPackage.Literals.MAN;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isLikesCars() {
+ return likesCars;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLikesCars(boolean newLikesCars) {
+ boolean oldLikesCars = likesCars;
+ likesCars = newLikesCars;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HumanPackage.MAN__LIKES_CARS, oldLikesCars, likesCars));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case HumanPackage.MAN__LIKES_CARS:
+ return isLikesCars() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case HumanPackage.MAN__LIKES_CARS:
+ setLikesCars(((Boolean)newValue).booleanValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case HumanPackage.MAN__LIKES_CARS:
+ setLikesCars(LIKES_CARS_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case HumanPackage.MAN__LIKES_CARS:
+ return likesCars != LIKES_CARS_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (likesCars: ");
+ result.append(likesCars);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ManImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/impl/RootImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human/impl/RootImpl.java
new file mode 100644
index 0000000..7130603
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/impl/RootImpl.java
@@ -0,0 +1,149 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: RootImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.example.human.Human;
+import org.example.human.HumanPackage;
+import org.example.human.Root;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Root</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.example.human.impl.RootImpl#getHuman <em>Human</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RootImpl extends EObjectImpl implements Root {
+ /**
+ * The cached value of the '{@link #getHuman() <em>Human</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHuman()
+ * @generated
+ * @ordered
+ */
+ protected EList human;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RootImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return HumanPackage.Literals.ROOT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList getHuman() {
+ if (human == null) {
+ human = new EObjectContainmentEList(Human.class, this, HumanPackage.ROOT__HUMAN);
+ }
+ return human;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case HumanPackage.ROOT__HUMAN:
+ return ((InternalEList)getHuman()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case HumanPackage.ROOT__HUMAN:
+ return getHuman();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case HumanPackage.ROOT__HUMAN:
+ getHuman().clear();
+ getHuman().addAll((Collection)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case HumanPackage.ROOT__HUMAN:
+ getHuman().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case HumanPackage.ROOT__HUMAN:
+ return human != null && !human.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //RootImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/impl/WomanImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human/impl/WomanImpl.java
new file mode 100644
index 0000000..a0e62c5
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/impl/WomanImpl.java
@@ -0,0 +1,160 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: WomanImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.example.human.HumanPackage;
+import org.example.human.Woman;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Woman</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.example.human.impl.WomanImpl#isLikesShopping <em>Likes Shopping</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class WomanImpl extends HumanImpl implements Woman {
+ /**
+ * The default value of the '{@link #isLikesShopping() <em>Likes Shopping</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isLikesShopping()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean LIKES_SHOPPING_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isLikesShopping() <em>Likes Shopping</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isLikesShopping()
+ * @generated
+ * @ordered
+ */
+ protected boolean likesShopping = LIKES_SHOPPING_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected WomanImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return HumanPackage.Literals.WOMAN;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isLikesShopping() {
+ return likesShopping;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLikesShopping(boolean newLikesShopping) {
+ boolean oldLikesShopping = likesShopping;
+ likesShopping = newLikesShopping;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HumanPackage.WOMAN__LIKES_SHOPPING, oldLikesShopping, likesShopping));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case HumanPackage.WOMAN__LIKES_SHOPPING:
+ return isLikesShopping() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case HumanPackage.WOMAN__LIKES_SHOPPING:
+ setLikesShopping(((Boolean)newValue).booleanValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case HumanPackage.WOMAN__LIKES_SHOPPING:
+ setLikesShopping(LIKES_SHOPPING_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case HumanPackage.WOMAN__LIKES_SHOPPING:
+ return likesShopping != LIKES_SHOPPING_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (likesShopping: ");
+ result.append(likesShopping);
+ result.append(')');
+ return result.toString();
+ }
+
+} //WomanImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanAdapterFactory.java b/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanAdapterFactory.java
new file mode 100644
index 0000000..7df66fb
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanAdapterFactory.java
@@ -0,0 +1,188 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanAdapterFactory.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human.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.example.human.*;
+
+/**
+ * <!-- 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.example.human.HumanPackage
+ * @generated
+ */
+public class HumanAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static HumanPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HumanAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = HumanPackage.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
+ */
+ 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 HumanSwitch modelSwitch =
+ new HumanSwitch() {
+ public Object caseDocumentRoot(DocumentRoot object) {
+ return createDocumentRootAdapter();
+ }
+ public Object caseHuman(Human object) {
+ return createHumanAdapter();
+ }
+ public Object caseRoot(Root object) {
+ return createRootAdapter();
+ }
+ public Object caseMan(Man object) {
+ return createManAdapter();
+ }
+ public Object caseWoman(Woman object) {
+ return createWomanAdapter();
+ }
+ public Object 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
+ */
+ public Adapter createAdapter(Notifier target) {
+ return (Adapter)modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.example.human.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.example.human.DocumentRoot
+ * @generated
+ */
+ public Adapter createDocumentRootAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.example.human.Human <em>Human</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.example.human.Human
+ * @generated
+ */
+ public Adapter createHumanAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.example.human.Root <em>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.example.human.Root
+ * @generated
+ */
+ public Adapter createRootAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.example.human.Man <em>Man</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.example.human.Man
+ * @generated
+ */
+ public Adapter createManAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.example.human.Woman <em>Woman</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.example.human.Woman
+ * @generated
+ */
+ public Adapter createWomanAdapter() {
+ 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;
+ }
+
+} //HumanAdapterFactory
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanResourceFactoryImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanResourceFactoryImpl.java
new file mode 100644
index 0000000..f2cd523
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanResourceFactoryImpl.java
@@ -0,0 +1,55 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanResourceFactoryImpl.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human.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.example.human.util.HumanResourceImpl
+ * @generated
+ */
+public class HumanResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HumanResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Resource createResource(URI uri) {
+ XMLResource result = new HumanResourceImpl(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;
+ }
+
+} //HumanResourceFactoryImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanResourceImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanResourceImpl.java
new file mode 100644
index 0000000..d1c53fc
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanResourceImpl.java
@@ -0,0 +1,32 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanResourceImpl.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human.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.example.human.util.HumanResourceFactoryImpl
+ * @generated
+ */
+public class HumanResourceImpl extends XMLResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public HumanResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} //HumanResourceImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanSwitch.java b/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanSwitch.java
new file mode 100644
index 0000000..c6e40a3
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanSwitch.java
@@ -0,0 +1,216 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanSwitch.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.example.human.*;
+
+/**
+ * <!-- 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.example.human.HumanPackage
+ * @generated
+ */
+public class HumanSwitch {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static HumanPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HumanSwitch() {
+ if (modelPackage == null) {
+ modelPackage = HumanPackage.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 Object 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 Object doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else {
+ List eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch((EClass)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 Object doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case HumanPackage.DOCUMENT_ROOT: {
+ DocumentRoot documentRoot = (DocumentRoot)theEObject;
+ Object result = caseDocumentRoot(documentRoot);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case HumanPackage.HUMAN: {
+ Human human = (Human)theEObject;
+ Object result = caseHuman(human);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case HumanPackage.ROOT: {
+ Root root = (Root)theEObject;
+ Object result = caseRoot(root);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case HumanPackage.MAN: {
+ Man man = (Man)theEObject;
+ Object result = caseMan(man);
+ if (result == null) result = caseHuman(man);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case HumanPackage.WOMAN: {
+ Woman woman = (Woman)theEObject;
+ Object result = caseWoman(woman);
+ if (result == null) result = caseHuman(woman);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * 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 Object caseDocumentRoot(DocumentRoot object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Human</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>Human</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseHuman(Human object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>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>Root</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseRoot(Root object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Man</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>Man</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseMan(Man object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Woman</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>Woman</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseWoman(Woman 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 Object defaultCase(EObject object) {
+ return null;
+ }
+
+} //HumanSwitch
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanXMLProcessor.java b/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanXMLProcessor.java
new file mode 100644
index 0000000..7fc05b7
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/util/HumanXMLProcessor.java
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanXMLProcessor.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+
+import org.example.human.HumanPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class HumanXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HumanXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ HumanPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the HumanResourceFactoryImpl factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Map getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new HumanResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new HumanResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} //HumanXMLProcessor
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/validation/DocumentRootValidator.java b/tests/org.eclipse.jet.tests/src/org/example/human/validation/DocumentRootValidator.java
new file mode 100644
index 0000000..19e6ca3
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/validation/DocumentRootValidator.java
@@ -0,0 +1,28 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: DocumentRootValidator.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human.validation;
+
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.util.FeatureMap;
+
+import org.example.human.Root;
+
+/**
+ * A sample validator interface for {@link org.example.human.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 value);
+ boolean validateXSISchemaLocation(EMap value);
+ boolean validateRoot(Root value);
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/validation/HumanValidator.java b/tests/org.eclipse.jet.tests/src/org/example/human/validation/HumanValidator.java
new file mode 100644
index 0000000..2e19f57
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/validation/HumanValidator.java
@@ -0,0 +1,21 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanValidator.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human.validation;
+
+
+/**
+ * A sample validator interface for {@link org.example.human.Human}.
+ * 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 HumanValidator {
+ boolean validate();
+
+ boolean validateAge(int value);
+ boolean validateName(String value);
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/validation/ManValidator.java b/tests/org.eclipse.jet.tests/src/org/example/human/validation/ManValidator.java
new file mode 100644
index 0000000..d0b3770
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/validation/ManValidator.java
@@ -0,0 +1,20 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ManValidator.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human.validation;
+
+
+/**
+ * A sample validator interface for {@link org.example.human.Man}.
+ * 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 ManValidator {
+ boolean validate();
+
+ boolean validateLikesCars(boolean value);
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/validation/RootValidator.java b/tests/org.eclipse.jet.tests/src/org/example/human/validation/RootValidator.java
new file mode 100644
index 0000000..d4359d5
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/validation/RootValidator.java
@@ -0,0 +1,21 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: RootValidator.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human.validation;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * A sample validator interface for {@link org.example.human.Root}.
+ * 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 RootValidator {
+ boolean validate();
+
+ boolean validateHuman(EList value);
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human/validation/WomanValidator.java b/tests/org.eclipse.jet.tests/src/org/example/human/validation/WomanValidator.java
new file mode 100644
index 0000000..f76cbd1
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human/validation/WomanValidator.java
@@ -0,0 +1,20 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: WomanValidator.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human.validation;
+
+
+/**
+ * A sample validator interface for {@link org.example.human.Woman}.
+ * 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 WomanValidator {
+ boolean validate();
+
+ boolean validateLikesShopping(boolean value);
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/DocumentRoot.java b/tests/org.eclipse.jet.tests/src/org/example/human2/DocumentRoot.java
new file mode 100644
index 0000000..6c8925b
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/DocumentRoot.java
@@ -0,0 +1,115 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: DocumentRoot.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human2;
+
+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.example.human2.DocumentRoot#getMixed <em>Mixed</em>}</li>
+ * <li>{@link org.example.human2.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
+ * <li>{@link org.example.human2.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
+ * <li>{@link org.example.human2.DocumentRoot#getRoot <em>Root</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.example.human2.Human2Package#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.example.human2.Human2Package#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.example.human2.Human2Package#getDocumentRoot_XMLNSPrefixMap()
+ * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry" keyType="java.lang.String" valueType="java.lang.String" transient="true"
+ * extendedMetaData="kind='attribute' name='xmlns:prefix'"
+ * @generated
+ */
+ EMap 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.example.human2.Human2Package#getDocumentRoot_XSISchemaLocation()
+ * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry" keyType="java.lang.String" valueType="java.lang.String" transient="true"
+ * extendedMetaData="kind='attribute' name='xsi:schemaLocation'"
+ * @generated
+ */
+ EMap getXSISchemaLocation();
+
+ /**
+ * Returns the value of the '<em><b>Root</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Root</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>Root</em>' containment reference.
+ * @see #setRoot(Root)
+ * @see org.example.human2.Human2Package#getDocumentRoot_Root()
+ * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
+ * extendedMetaData="kind='element' name='root' namespace='##targetNamespace'"
+ * @generated
+ */
+ Root getRoot();
+
+ /**
+ * Sets the value of the '{@link org.example.human2.DocumentRoot#getRoot <em>Root</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Root</em>' containment reference.
+ * @see #getRoot()
+ * @generated
+ */
+ void setRoot(Root value);
+
+} // DocumentRoot
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/Human.java b/tests/org.eclipse.jet.tests/src/org/example/human2/Human.java
new file mode 100644
index 0000000..df4e484
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/Human.java
@@ -0,0 +1,110 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Human.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human2;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Human</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.example.human2.Human#getAge <em>Age</em>}</li>
+ * <li>{@link org.example.human2.Human#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.example.human2.Human2Package#getHuman()
+ * @model extendedMetaData="name='Human' kind='empty'"
+ * @generated
+ */
+public interface Human extends EObject {
+ /**
+ * Returns the value of the '<em><b>Age</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Age</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Age</em>' attribute.
+ * @see #isSetAge()
+ * @see #unsetAge()
+ * @see #setAge(int)
+ * @see org.example.human2.Human2Package#getHuman_Age()
+ * @model unsettable="true" dataType="org.eclipse.emf.ecore.xml.type.Int"
+ * extendedMetaData="kind='attribute' name='age'"
+ * @generated
+ */
+ int getAge();
+
+ /**
+ * Sets the value of the '{@link org.example.human2.Human#getAge <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Age</em>' attribute.
+ * @see #isSetAge()
+ * @see #unsetAge()
+ * @see #getAge()
+ * @generated
+ */
+ void setAge(int value);
+
+ /**
+ * Unsets the value of the '{@link org.example.human2.Human#getAge <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetAge()
+ * @see #getAge()
+ * @see #setAge(int)
+ * @generated
+ */
+ void unsetAge();
+
+ /**
+ * Returns whether the value of the '{@link org.example.human2.Human#getAge <em>Age</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Age</em>' attribute is set.
+ * @see #unsetAge()
+ * @see #getAge()
+ * @see #setAge(int)
+ * @generated
+ */
+ boolean isSetAge();
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.example.human2.Human2Package#getHuman_Name()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+ * extendedMetaData="kind='attribute' name='name'"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.example.human2.Human#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+} // Human
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/Human2Factory.java b/tests/org.eclipse.jet.tests/src/org/example/human2/Human2Factory.java
new file mode 100644
index 0000000..b6f7da6
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/Human2Factory.java
@@ -0,0 +1,82 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Human2Factory.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human2;
+
+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.example.human2.Human2Package
+ * @generated
+ */
+public interface Human2Factory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ Human2Factory eINSTANCE = org.example.human2.impl.Human2FactoryImpl.init();
+
+ /**
+ * 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 a new object of class '<em>Human</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Human</em>'.
+ * @generated
+ */
+ Human createHuman();
+
+ /**
+ * Returns a new object of class '<em>Man</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Man</em>'.
+ * @generated
+ */
+ Man createMan();
+
+ /**
+ * Returns a new object of class '<em>Root</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Root</em>'.
+ * @generated
+ */
+ Root createRoot();
+
+ /**
+ * Returns a new object of class '<em>Woman</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Woman</em>'.
+ * @generated
+ */
+ Woman createWoman();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ Human2Package getHuman2Package();
+
+} //Human2Factory
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/Human2Package.java b/tests/org.eclipse.jet.tests/src/org/example/human2/Human2Package.java
new file mode 100644
index 0000000..8710e2b
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/Human2Package.java
@@ -0,0 +1,570 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Human2Package.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human2;
+
+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.example.human2.Human2Factory
+ * @model kind="package"
+ * @generated
+ */
+public interface Human2Package extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "human2";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.example.org/human2";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "human2";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ Human2Package eINSTANCE = org.example.human2.impl.Human2PackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.example.human2.impl.DocumentRootImpl <em>Document Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human2.impl.DocumentRootImpl
+ * @see org.example.human2.impl.Human2PackageImpl#getDocumentRoot()
+ * @generated
+ */
+ int DOCUMENT_ROOT = 0;
+
+ /**
+ * 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>Root</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__ROOT = 3;
+
+ /**
+ * 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 = 4;
+
+ /**
+ * The meta object id for the '{@link org.example.human2.impl.HumanImpl <em>Human</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human2.impl.HumanImpl
+ * @see org.example.human2.impl.Human2PackageImpl#getHuman()
+ * @generated
+ */
+ int HUMAN = 1;
+
+ /**
+ * The feature id for the '<em><b>Age</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HUMAN__AGE = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HUMAN__NAME = 1;
+
+ /**
+ * The number of structural features of the '<em>Human</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HUMAN_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.example.human2.impl.ManImpl <em>Man</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human2.impl.ManImpl
+ * @see org.example.human2.impl.Human2PackageImpl#getMan()
+ * @generated
+ */
+ int MAN = 2;
+
+ /**
+ * The feature id for the '<em><b>Age</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAN__AGE = HUMAN__AGE;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAN__NAME = HUMAN__NAME;
+
+ /**
+ * The feature id for the '<em><b>Likes Cars</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAN__LIKES_CARS = HUMAN_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Man</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAN_FEATURE_COUNT = HUMAN_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.example.human2.impl.RootImpl <em>Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human2.impl.RootImpl
+ * @see org.example.human2.impl.Human2PackageImpl#getRoot()
+ * @generated
+ */
+ int ROOT = 3;
+
+ /**
+ * The feature id for the '<em><b>Human</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ROOT__HUMAN = 0;
+
+ /**
+ * The number of structural features of the '<em>Root</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ROOT_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.example.human2.impl.WomanImpl <em>Woman</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human2.impl.WomanImpl
+ * @see org.example.human2.impl.Human2PackageImpl#getWoman()
+ * @generated
+ */
+ int WOMAN = 4;
+
+ /**
+ * The feature id for the '<em><b>Age</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WOMAN__AGE = HUMAN__AGE;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WOMAN__NAME = HUMAN__NAME;
+
+ /**
+ * The feature id for the '<em><b>Likes Shopping</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WOMAN__LIKES_SHOPPING = HUMAN_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Woman</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WOMAN_FEATURE_COUNT = HUMAN_FEATURE_COUNT + 1;
+
+
+ /**
+ * Returns the meta object for class '{@link org.example.human2.DocumentRoot <em>Document Root</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Document Root</em>'.
+ * @see org.example.human2.DocumentRoot
+ * @generated
+ */
+ EClass getDocumentRoot();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.example.human2.DocumentRoot#getMixed <em>Mixed</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Mixed</em>'.
+ * @see org.example.human2.DocumentRoot#getMixed()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EAttribute getDocumentRoot_Mixed();
+
+ /**
+ * Returns the meta object for the map '{@link org.example.human2.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.example.human2.DocumentRoot#getXMLNSPrefixMap()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_XMLNSPrefixMap();
+
+ /**
+ * Returns the meta object for the map '{@link org.example.human2.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.example.human2.DocumentRoot#getXSISchemaLocation()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_XSISchemaLocation();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.example.human2.DocumentRoot#getRoot <em>Root</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Root</em>'.
+ * @see org.example.human2.DocumentRoot#getRoot()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_Root();
+
+ /**
+ * Returns the meta object for class '{@link org.example.human2.Human <em>Human</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Human</em>'.
+ * @see org.example.human2.Human
+ * @generated
+ */
+ EClass getHuman();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.example.human2.Human#getAge <em>Age</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Age</em>'.
+ * @see org.example.human2.Human#getAge()
+ * @see #getHuman()
+ * @generated
+ */
+ EAttribute getHuman_Age();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.example.human2.Human#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.example.human2.Human#getName()
+ * @see #getHuman()
+ * @generated
+ */
+ EAttribute getHuman_Name();
+
+ /**
+ * Returns the meta object for class '{@link org.example.human2.Man <em>Man</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Man</em>'.
+ * @see org.example.human2.Man
+ * @generated
+ */
+ EClass getMan();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.example.human2.Man#isLikesCars <em>Likes Cars</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Likes Cars</em>'.
+ * @see org.example.human2.Man#isLikesCars()
+ * @see #getMan()
+ * @generated
+ */
+ EAttribute getMan_LikesCars();
+
+ /**
+ * Returns the meta object for class '{@link org.example.human2.Root <em>Root</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Root</em>'.
+ * @see org.example.human2.Root
+ * @generated
+ */
+ EClass getRoot();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.example.human2.Root#getHuman <em>Human</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Human</em>'.
+ * @see org.example.human2.Root#getHuman()
+ * @see #getRoot()
+ * @generated
+ */
+ EReference getRoot_Human();
+
+ /**
+ * Returns the meta object for class '{@link org.example.human2.Woman <em>Woman</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Woman</em>'.
+ * @see org.example.human2.Woman
+ * @generated
+ */
+ EClass getWoman();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.example.human2.Woman#isLikesShopping <em>Likes Shopping</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Likes Shopping</em>'.
+ * @see org.example.human2.Woman#isLikesShopping()
+ * @see #getWoman()
+ * @generated
+ */
+ EAttribute getWoman_LikesShopping();
+
+ /**
+ * 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
+ */
+ Human2Factory getHuman2Factory();
+
+ /**
+ * <!-- 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.example.human2.impl.DocumentRootImpl <em>Document Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human2.impl.DocumentRootImpl
+ * @see org.example.human2.impl.Human2PackageImpl#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>Root</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOCUMENT_ROOT__ROOT = eINSTANCE.getDocumentRoot_Root();
+
+ /**
+ * The meta object literal for the '{@link org.example.human2.impl.HumanImpl <em>Human</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human2.impl.HumanImpl
+ * @see org.example.human2.impl.Human2PackageImpl#getHuman()
+ * @generated
+ */
+ EClass HUMAN = eINSTANCE.getHuman();
+
+ /**
+ * The meta object literal for the '<em><b>Age</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute HUMAN__AGE = eINSTANCE.getHuman_Age();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute HUMAN__NAME = eINSTANCE.getHuman_Name();
+
+ /**
+ * The meta object literal for the '{@link org.example.human2.impl.ManImpl <em>Man</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human2.impl.ManImpl
+ * @see org.example.human2.impl.Human2PackageImpl#getMan()
+ * @generated
+ */
+ EClass MAN = eINSTANCE.getMan();
+
+ /**
+ * The meta object literal for the '<em><b>Likes Cars</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MAN__LIKES_CARS = eINSTANCE.getMan_LikesCars();
+
+ /**
+ * The meta object literal for the '{@link org.example.human2.impl.RootImpl <em>Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human2.impl.RootImpl
+ * @see org.example.human2.impl.Human2PackageImpl#getRoot()
+ * @generated
+ */
+ EClass ROOT = eINSTANCE.getRoot();
+
+ /**
+ * The meta object literal for the '<em><b>Human</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ROOT__HUMAN = eINSTANCE.getRoot_Human();
+
+ /**
+ * The meta object literal for the '{@link org.example.human2.impl.WomanImpl <em>Woman</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.example.human2.impl.WomanImpl
+ * @see org.example.human2.impl.Human2PackageImpl#getWoman()
+ * @generated
+ */
+ EClass WOMAN = eINSTANCE.getWoman();
+
+ /**
+ * The meta object literal for the '<em><b>Likes Shopping</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute WOMAN__LIKES_SHOPPING = eINSTANCE.getWoman_LikesShopping();
+
+ }
+
+} //Human2Package
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/Man.java b/tests/org.eclipse.jet.tests/src/org/example/human2/Man.java
new file mode 100644
index 0000000..e1bd4e2
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/Man.java
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Man.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human2;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Man</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.example.human2.Man#isLikesCars <em>Likes Cars</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.example.human2.Human2Package#getMan()
+ * @model extendedMetaData="name='Man' kind='empty'"
+ * @generated
+ */
+public interface Man extends Human {
+ /**
+ * Returns the value of the '<em><b>Likes Cars</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Likes Cars</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Likes Cars</em>' attribute.
+ * @see #isSetLikesCars()
+ * @see #unsetLikesCars()
+ * @see #setLikesCars(boolean)
+ * @see org.example.human2.Human2Package#getMan_LikesCars()
+ * @model unsettable="true" dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+ * extendedMetaData="kind='attribute' name='likesCars'"
+ * @generated
+ */
+ boolean isLikesCars();
+
+ /**
+ * Sets the value of the '{@link org.example.human2.Man#isLikesCars <em>Likes Cars</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Likes Cars</em>' attribute.
+ * @see #isSetLikesCars()
+ * @see #unsetLikesCars()
+ * @see #isLikesCars()
+ * @generated
+ */
+ void setLikesCars(boolean value);
+
+ /**
+ * Unsets the value of the '{@link org.example.human2.Man#isLikesCars <em>Likes Cars</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetLikesCars()
+ * @see #isLikesCars()
+ * @see #setLikesCars(boolean)
+ * @generated
+ */
+ void unsetLikesCars();
+
+ /**
+ * Returns whether the value of the '{@link org.example.human2.Man#isLikesCars <em>Likes Cars</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Likes Cars</em>' attribute is set.
+ * @see #unsetLikesCars()
+ * @see #isLikesCars()
+ * @see #setLikesCars(boolean)
+ * @generated
+ */
+ boolean isSetLikesCars();
+
+} // Man
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/Root.java b/tests/org.eclipse.jet.tests/src/org/example/human2/Root.java
new file mode 100644
index 0000000..8a820ed
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/Root.java
@@ -0,0 +1,47 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Root.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human2;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Root</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.example.human2.Root#getHuman <em>Human</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.example.human2.Human2Package#getRoot()
+ * @model extendedMetaData="name='Root' kind='elementOnly'"
+ * @generated
+ */
+public interface Root extends EObject {
+ /**
+ * Returns the value of the '<em><b>Human</b></em>' containment reference list.
+ * The list contents are of type {@link org.example.human2.Human}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Human</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Human</em>' containment reference list.
+ * @see org.example.human2.Human2Package#getRoot_Human()
+ * @model type="org.example.human2.Human" containment="true"
+ * extendedMetaData="kind='element' name='human' namespace='##targetNamespace'"
+ * @generated
+ */
+ EList getHuman();
+
+} // Root
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/Woman.java b/tests/org.eclipse.jet.tests/src/org/example/human2/Woman.java
new file mode 100644
index 0000000..463288f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/Woman.java
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Woman.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human2;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Woman</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.example.human2.Woman#isLikesShopping <em>Likes Shopping</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.example.human2.Human2Package#getWoman()
+ * @model extendedMetaData="name='Woman' kind='empty'"
+ * @generated
+ */
+public interface Woman extends Human {
+ /**
+ * Returns the value of the '<em><b>Likes Shopping</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Likes Shopping</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Likes Shopping</em>' attribute.
+ * @see #isSetLikesShopping()
+ * @see #unsetLikesShopping()
+ * @see #setLikesShopping(boolean)
+ * @see org.example.human2.Human2Package#getWoman_LikesShopping()
+ * @model unsettable="true" dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+ * extendedMetaData="kind='attribute' name='likesShopping'"
+ * @generated
+ */
+ boolean isLikesShopping();
+
+ /**
+ * Sets the value of the '{@link org.example.human2.Woman#isLikesShopping <em>Likes Shopping</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Likes Shopping</em>' attribute.
+ * @see #isSetLikesShopping()
+ * @see #unsetLikesShopping()
+ * @see #isLikesShopping()
+ * @generated
+ */
+ void setLikesShopping(boolean value);
+
+ /**
+ * Unsets the value of the '{@link org.example.human2.Woman#isLikesShopping <em>Likes Shopping</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetLikesShopping()
+ * @see #isLikesShopping()
+ * @see #setLikesShopping(boolean)
+ * @generated
+ */
+ void unsetLikesShopping();
+
+ /**
+ * Returns whether the value of the '{@link org.example.human2.Woman#isLikesShopping <em>Likes Shopping</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Likes Shopping</em>' attribute is set.
+ * @see #unsetLikesShopping()
+ * @see #isLikesShopping()
+ * @see #setLikesShopping(boolean)
+ * @generated
+ */
+ boolean isSetLikesShopping();
+
+} // Woman
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/impl/DocumentRootImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/DocumentRootImpl.java
new file mode 100644
index 0000000..263de26
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/DocumentRootImpl.java
@@ -0,0 +1,279 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: DocumentRootImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human2.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.example.human2.DocumentRoot;
+import org.example.human2.Human2Package;
+import org.example.human2.Root;
+
+/**
+ * <!-- 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.example.human2.impl.DocumentRootImpl#getMixed <em>Mixed</em>}</li>
+ * <li>{@link org.example.human2.impl.DocumentRootImpl#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
+ * <li>{@link org.example.human2.impl.DocumentRootImpl#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
+ * <li>{@link org.example.human2.impl.DocumentRootImpl#getRoot <em>Root</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 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 xSISchemaLocation;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DocumentRootImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return Human2Package.Literals.DOCUMENT_ROOT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FeatureMap getMixed() {
+ if (mixed == null) {
+ mixed = new BasicFeatureMap(this, Human2Package.DOCUMENT_ROOT__MIXED);
+ }
+ return mixed;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap getXMLNSPrefixMap() {
+ if (xMLNSPrefixMap == null) {
+ xMLNSPrefixMap = new EcoreEMap(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, Human2Package.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+ }
+ return xMLNSPrefixMap;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap getXSISchemaLocation() {
+ if (xSISchemaLocation == null) {
+ xSISchemaLocation = new EcoreEMap(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, Human2Package.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+ }
+ return xSISchemaLocation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Root getRoot() {
+ return (Root)getMixed().get(Human2Package.Literals.DOCUMENT_ROOT__ROOT, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetRoot(Root newRoot, NotificationChain msgs) {
+ return ((FeatureMap.Internal)getMixed()).basicAdd(Human2Package.Literals.DOCUMENT_ROOT__ROOT, newRoot, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRoot(Root newRoot) {
+ ((FeatureMap.Internal)getMixed()).set(Human2Package.Literals.DOCUMENT_ROOT__ROOT, newRoot);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Human2Package.DOCUMENT_ROOT__MIXED:
+ return ((InternalEList)getMixed()).basicRemove(otherEnd, msgs);
+ case Human2Package.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ return ((InternalEList)getXMLNSPrefixMap()).basicRemove(otherEnd, msgs);
+ case Human2Package.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ return ((InternalEList)getXSISchemaLocation()).basicRemove(otherEnd, msgs);
+ case Human2Package.DOCUMENT_ROOT__ROOT:
+ return basicSetRoot(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Human2Package.DOCUMENT_ROOT__MIXED:
+ if (coreType) return getMixed();
+ return ((FeatureMap.Internal)getMixed()).getWrapper();
+ case Human2Package.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ if (coreType) return getXMLNSPrefixMap();
+ else return getXMLNSPrefixMap().map();
+ case Human2Package.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ if (coreType) return getXSISchemaLocation();
+ else return getXSISchemaLocation().map();
+ case Human2Package.DOCUMENT_ROOT__ROOT:
+ return getRoot();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Human2Package.DOCUMENT_ROOT__MIXED:
+ ((FeatureMap.Internal)getMixed()).set(newValue);
+ return;
+ case Human2Package.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue);
+ return;
+ case Human2Package.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue);
+ return;
+ case Human2Package.DOCUMENT_ROOT__ROOT:
+ setRoot((Root)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Human2Package.DOCUMENT_ROOT__MIXED:
+ getMixed().clear();
+ return;
+ case Human2Package.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ getXMLNSPrefixMap().clear();
+ return;
+ case Human2Package.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ getXSISchemaLocation().clear();
+ return;
+ case Human2Package.DOCUMENT_ROOT__ROOT:
+ setRoot((Root)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Human2Package.DOCUMENT_ROOT__MIXED:
+ return mixed != null && !mixed.isEmpty();
+ case Human2Package.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty();
+ case Human2Package.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ return xSISchemaLocation != null && !xSISchemaLocation.isEmpty();
+ case Human2Package.DOCUMENT_ROOT__ROOT:
+ return getRoot() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ 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/tests/org.eclipse.jet.tests/src/org/example/human2/impl/Human2FactoryImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/Human2FactoryImpl.java
new file mode 100644
index 0000000..54735e5
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/Human2FactoryImpl.java
@@ -0,0 +1,141 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Human2FactoryImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human2.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.example.human2.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class Human2FactoryImpl extends EFactoryImpl implements Human2Factory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static Human2Factory init() {
+ try {
+ Human2Factory theHuman2Factory = (Human2Factory)EPackage.Registry.INSTANCE.getEFactory("http://www.example.org/human2");
+ if (theHuman2Factory != null) {
+ return theHuman2Factory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new Human2FactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Human2FactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case Human2Package.DOCUMENT_ROOT: return createDocumentRoot();
+ case Human2Package.HUMAN: return createHuman();
+ case Human2Package.MAN: return createMan();
+ case Human2Package.ROOT: return createRoot();
+ case Human2Package.WOMAN: return createWoman();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DocumentRoot createDocumentRoot() {
+ DocumentRootImpl documentRoot = new DocumentRootImpl();
+ return documentRoot;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Human createHuman() {
+ HumanImpl human = new HumanImpl();
+ return human;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Man createMan() {
+ ManImpl man = new ManImpl();
+ return man;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Root createRoot() {
+ RootImpl root = new RootImpl();
+ return root;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Woman createWoman() {
+ WomanImpl woman = new WomanImpl();
+ return woman;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Human2Package getHuman2Package() {
+ return (Human2Package)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ public static Human2Package getPackage() {
+ return Human2Package.eINSTANCE;
+ }
+
+} //Human2FactoryImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/impl/Human2PackageImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/Human2PackageImpl.java
new file mode 100644
index 0000000..f841da5
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/Human2PackageImpl.java
@@ -0,0 +1,481 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Human2PackageImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human2.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.example.human2.DocumentRoot;
+import org.example.human2.Human;
+import org.example.human2.Human2Factory;
+import org.example.human2.Human2Package;
+import org.example.human2.Man;
+import org.example.human2.Root;
+import org.example.human2.Woman;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class Human2PackageImpl extends EPackageImpl implements Human2Package {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass documentRootEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass humanEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass manEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass rootEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass womanEClass = 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.example.human2.Human2Package#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private Human2PackageImpl() {
+ super(eNS_URI, Human2Factory.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. Simple
+ * dependencies are satisfied by calling this method on all
+ * dependent packages before doing anything else. This method drives
+ * initialization for interdependent packages directly, in parallel
+ * with this package, itself.
+ * <p>Of this package and its interdependencies, all packages which
+ * have not yet been registered by their URI values are first created
+ * and registered. The packages are then initialized in two steps:
+ * meta-model objects for all of the packages are created before any
+ * are initialized, since one package's meta-model objects may refer to
+ * those of another.
+ * <p>Invocation of this method will not affect any packages that have
+ * already been initialized.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static Human2Package init() {
+ if (isInited) return (Human2Package)EPackage.Registry.INSTANCE.getEPackage(Human2Package.eNS_URI);
+
+ // Obtain or create and register package
+ Human2PackageImpl theHuman2Package = (Human2PackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof Human2PackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new Human2PackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ XMLTypePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theHuman2Package.createPackageContents();
+
+ // Initialize created meta-data
+ theHuman2Package.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theHuman2Package.freeze();
+
+ return theHuman2Package;
+ }
+
+ /**
+ * <!-- 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 EReference getDocumentRoot_Root() {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getHuman() {
+ return humanEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getHuman_Age() {
+ return (EAttribute)humanEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getHuman_Name() {
+ return (EAttribute)humanEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMan() {
+ return manEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getMan_LikesCars() {
+ return (EAttribute)manEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getRoot() {
+ return rootEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRoot_Human() {
+ return (EReference)rootEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getWoman() {
+ return womanEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getWoman_LikesShopping() {
+ return (EAttribute)womanEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Human2Factory getHuman2Factory() {
+ return (Human2Factory)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
+ documentRootEClass = createEClass(DOCUMENT_ROOT);
+ createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__ROOT);
+
+ humanEClass = createEClass(HUMAN);
+ createEAttribute(humanEClass, HUMAN__AGE);
+ createEAttribute(humanEClass, HUMAN__NAME);
+
+ manEClass = createEClass(MAN);
+ createEAttribute(manEClass, MAN__LIKES_CARS);
+
+ rootEClass = createEClass(ROOT);
+ createEReference(rootEClass, ROOT__HUMAN);
+
+ womanEClass = createEClass(WOMAN);
+ createEAttribute(womanEClass, WOMAN__LIKES_SHOPPING);
+ }
+
+ /**
+ * <!-- 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);
+
+ // Add supertypes to classes
+ manEClass.getESuperTypes().add(this.getHuman());
+ womanEClass.getESuperTypes().add(this.getHuman());
+
+ // Initialize classes and features; add operations and parameters
+ 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);
+ initEReference(getDocumentRoot_Root(), this.getRoot(), null, "root", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+ initEClass(humanEClass, Human.class, "Human", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getHuman_Age(), theXMLTypePackage.getInt(), "age", null, 0, 1, Human.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getHuman_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, Human.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(manEClass, Man.class, "Man", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getMan_LikesCars(), theXMLTypePackage.getBoolean(), "likesCars", null, 0, 1, Man.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(rootEClass, Root.class, "Root", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getRoot_Human(), this.getHuman(), null, "human", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(womanEClass, Woman.class, "Woman", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getWoman_LikesShopping(), theXMLTypePackage.getBoolean(), "likesShopping", null, 0, 1, Woman.class, !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
+ (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_Root(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "root",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (humanEClass,
+ source,
+ new String[] {
+ "name", "Human",
+ "kind", "empty"
+ });
+ addAnnotation
+ (getHuman_Age(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "age"
+ });
+ addAnnotation
+ (getHuman_Name(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "name"
+ });
+ addAnnotation
+ (manEClass,
+ source,
+ new String[] {
+ "name", "Man",
+ "kind", "empty"
+ });
+ addAnnotation
+ (getMan_LikesCars(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "likesCars"
+ });
+ addAnnotation
+ (rootEClass,
+ source,
+ new String[] {
+ "name", "Root",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getRoot_Human(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "human",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (womanEClass,
+ source,
+ new String[] {
+ "name", "Woman",
+ "kind", "empty"
+ });
+ addAnnotation
+ (getWoman_LikesShopping(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "likesShopping"
+ });
+ }
+
+} //Human2PackageImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/impl/HumanImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/HumanImpl.java
new file mode 100644
index 0000000..11bf1bd
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/HumanImpl.java
@@ -0,0 +1,249 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human2.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.example.human2.Human;
+import org.example.human2.Human2Package;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Human</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.example.human2.impl.HumanImpl#getAge <em>Age</em>}</li>
+ * <li>{@link org.example.human2.impl.HumanImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class HumanImpl extends EObjectImpl implements Human {
+ /**
+ * The default value of the '{@link #getAge() <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAge()
+ * @generated
+ * @ordered
+ */
+ protected static final int AGE_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getAge() <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAge()
+ * @generated
+ * @ordered
+ */
+ protected int age = AGE_EDEFAULT;
+
+ /**
+ * This is true if the Age attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean ageESet;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected HumanImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return Human2Package.Literals.HUMAN;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getAge() {
+ return age;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAge(int newAge) {
+ int oldAge = age;
+ age = newAge;
+ boolean oldAgeESet = ageESet;
+ ageESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Human2Package.HUMAN__AGE, oldAge, age, !oldAgeESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetAge() {
+ int oldAge = age;
+ boolean oldAgeESet = ageESet;
+ age = AGE_EDEFAULT;
+ ageESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, Human2Package.HUMAN__AGE, oldAge, AGE_EDEFAULT, oldAgeESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetAge() {
+ return ageESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Human2Package.HUMAN__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Human2Package.HUMAN__AGE:
+ return new Integer(getAge());
+ case Human2Package.HUMAN__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Human2Package.HUMAN__AGE:
+ setAge(((Integer)newValue).intValue());
+ return;
+ case Human2Package.HUMAN__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Human2Package.HUMAN__AGE:
+ unsetAge();
+ return;
+ case Human2Package.HUMAN__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Human2Package.HUMAN__AGE:
+ return isSetAge();
+ case Human2Package.HUMAN__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (age: ");
+ if (ageESet) result.append(age); else result.append("<unset>");
+ result.append(", name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //HumanImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/impl/ManImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/ManImpl.java
new file mode 100644
index 0000000..1f15ec1
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/ManImpl.java
@@ -0,0 +1,194 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ManImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human2.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.example.human2.Human2Package;
+import org.example.human2.Man;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Man</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.example.human2.impl.ManImpl#isLikesCars <em>Likes Cars</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ManImpl extends HumanImpl implements Man {
+ /**
+ * The default value of the '{@link #isLikesCars() <em>Likes Cars</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isLikesCars()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean LIKES_CARS_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isLikesCars() <em>Likes Cars</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isLikesCars()
+ * @generated
+ * @ordered
+ */
+ protected boolean likesCars = LIKES_CARS_EDEFAULT;
+
+ /**
+ * This is true if the Likes Cars attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean likesCarsESet;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ManImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return Human2Package.Literals.MAN;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isLikesCars() {
+ return likesCars;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLikesCars(boolean newLikesCars) {
+ boolean oldLikesCars = likesCars;
+ likesCars = newLikesCars;
+ boolean oldLikesCarsESet = likesCarsESet;
+ likesCarsESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Human2Package.MAN__LIKES_CARS, oldLikesCars, likesCars, !oldLikesCarsESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetLikesCars() {
+ boolean oldLikesCars = likesCars;
+ boolean oldLikesCarsESet = likesCarsESet;
+ likesCars = LIKES_CARS_EDEFAULT;
+ likesCarsESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, Human2Package.MAN__LIKES_CARS, oldLikesCars, LIKES_CARS_EDEFAULT, oldLikesCarsESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetLikesCars() {
+ return likesCarsESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Human2Package.MAN__LIKES_CARS:
+ return isLikesCars() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Human2Package.MAN__LIKES_CARS:
+ setLikesCars(((Boolean)newValue).booleanValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Human2Package.MAN__LIKES_CARS:
+ unsetLikesCars();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Human2Package.MAN__LIKES_CARS:
+ return isSetLikesCars();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (likesCars: ");
+ if (likesCarsESet) result.append(likesCars); else result.append("<unset>");
+ result.append(')');
+ return result.toString();
+ }
+
+} //ManImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/impl/RootImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/RootImpl.java
new file mode 100644
index 0000000..ae5d177
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/RootImpl.java
@@ -0,0 +1,149 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: RootImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human2.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.example.human2.Human;
+import org.example.human2.Human2Package;
+import org.example.human2.Root;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Root</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.example.human2.impl.RootImpl#getHuman <em>Human</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RootImpl extends EObjectImpl implements Root {
+ /**
+ * The cached value of the '{@link #getHuman() <em>Human</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHuman()
+ * @generated
+ * @ordered
+ */
+ protected EList human;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RootImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return Human2Package.Literals.ROOT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList getHuman() {
+ if (human == null) {
+ human = new EObjectContainmentEList(Human.class, this, Human2Package.ROOT__HUMAN);
+ }
+ return human;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case Human2Package.ROOT__HUMAN:
+ return ((InternalEList)getHuman()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Human2Package.ROOT__HUMAN:
+ return getHuman();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Human2Package.ROOT__HUMAN:
+ getHuman().clear();
+ getHuman().addAll((Collection)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Human2Package.ROOT__HUMAN:
+ getHuman().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Human2Package.ROOT__HUMAN:
+ return human != null && !human.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //RootImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/impl/WomanImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/WomanImpl.java
new file mode 100644
index 0000000..a435395
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/impl/WomanImpl.java
@@ -0,0 +1,194 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: WomanImpl.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human2.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.example.human2.Human2Package;
+import org.example.human2.Woman;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Woman</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.example.human2.impl.WomanImpl#isLikesShopping <em>Likes Shopping</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class WomanImpl extends HumanImpl implements Woman {
+ /**
+ * The default value of the '{@link #isLikesShopping() <em>Likes Shopping</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isLikesShopping()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean LIKES_SHOPPING_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isLikesShopping() <em>Likes Shopping</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isLikesShopping()
+ * @generated
+ * @ordered
+ */
+ protected boolean likesShopping = LIKES_SHOPPING_EDEFAULT;
+
+ /**
+ * This is true if the Likes Shopping attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean likesShoppingESet;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected WomanImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return Human2Package.Literals.WOMAN;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isLikesShopping() {
+ return likesShopping;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLikesShopping(boolean newLikesShopping) {
+ boolean oldLikesShopping = likesShopping;
+ likesShopping = newLikesShopping;
+ boolean oldLikesShoppingESet = likesShoppingESet;
+ likesShoppingESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Human2Package.WOMAN__LIKES_SHOPPING, oldLikesShopping, likesShopping, !oldLikesShoppingESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetLikesShopping() {
+ boolean oldLikesShopping = likesShopping;
+ boolean oldLikesShoppingESet = likesShoppingESet;
+ likesShopping = LIKES_SHOPPING_EDEFAULT;
+ likesShoppingESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, Human2Package.WOMAN__LIKES_SHOPPING, oldLikesShopping, LIKES_SHOPPING_EDEFAULT, oldLikesShoppingESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetLikesShopping() {
+ return likesShoppingESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case Human2Package.WOMAN__LIKES_SHOPPING:
+ return isLikesShopping() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case Human2Package.WOMAN__LIKES_SHOPPING:
+ setLikesShopping(((Boolean)newValue).booleanValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case Human2Package.WOMAN__LIKES_SHOPPING:
+ unsetLikesShopping();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case Human2Package.WOMAN__LIKES_SHOPPING:
+ return isSetLikesShopping();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (likesShopping: ");
+ if (likesShoppingESet) result.append(likesShopping); else result.append("<unset>");
+ result.append(')');
+ return result.toString();
+ }
+
+} //WomanImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2AdapterFactory.java b/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2AdapterFactory.java
new file mode 100644
index 0000000..4cfb421
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2AdapterFactory.java
@@ -0,0 +1,188 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Human2AdapterFactory.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human2.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.example.human2.*;
+
+/**
+ * <!-- 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.example.human2.Human2Package
+ * @generated
+ */
+public class Human2AdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static Human2Package modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Human2AdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = Human2Package.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
+ */
+ 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 Human2Switch modelSwitch =
+ new Human2Switch() {
+ public Object caseDocumentRoot(DocumentRoot object) {
+ return createDocumentRootAdapter();
+ }
+ public Object caseHuman(Human object) {
+ return createHumanAdapter();
+ }
+ public Object caseMan(Man object) {
+ return createManAdapter();
+ }
+ public Object caseRoot(Root object) {
+ return createRootAdapter();
+ }
+ public Object caseWoman(Woman object) {
+ return createWomanAdapter();
+ }
+ public Object 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
+ */
+ public Adapter createAdapter(Notifier target) {
+ return (Adapter)modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.example.human2.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.example.human2.DocumentRoot
+ * @generated
+ */
+ public Adapter createDocumentRootAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.example.human2.Human <em>Human</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.example.human2.Human
+ * @generated
+ */
+ public Adapter createHumanAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.example.human2.Man <em>Man</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.example.human2.Man
+ * @generated
+ */
+ public Adapter createManAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.example.human2.Root <em>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.example.human2.Root
+ * @generated
+ */
+ public Adapter createRootAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.example.human2.Woman <em>Woman</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.example.human2.Woman
+ * @generated
+ */
+ public Adapter createWomanAdapter() {
+ 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;
+ }
+
+} //Human2AdapterFactory
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2ResourceFactoryImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2ResourceFactoryImpl.java
new file mode 100644
index 0000000..4b5d4c2
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2ResourceFactoryImpl.java
@@ -0,0 +1,55 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Human2ResourceFactoryImpl.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human2.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.example.human2.util.Human2ResourceImpl
+ * @generated
+ */
+public class Human2ResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Human2ResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Resource createResource(URI uri) {
+ XMLResource result = new Human2ResourceImpl(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;
+ }
+
+} //Human2ResourceFactoryImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2ResourceImpl.java b/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2ResourceImpl.java
new file mode 100644
index 0000000..60ef9cf
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2ResourceImpl.java
@@ -0,0 +1,32 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Human2ResourceImpl.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human2.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.example.human2.util.Human2ResourceFactoryImpl
+ * @generated
+ */
+public class Human2ResourceImpl extends XMLResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public Human2ResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} //Human2ResourceImpl
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2Switch.java b/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2Switch.java
new file mode 100644
index 0000000..f012e99
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2Switch.java
@@ -0,0 +1,216 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Human2Switch.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human2.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.example.human2.*;
+
+/**
+ * <!-- 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.example.human2.Human2Package
+ * @generated
+ */
+public class Human2Switch {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static Human2Package modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Human2Switch() {
+ if (modelPackage == null) {
+ modelPackage = Human2Package.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 Object 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 Object doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else {
+ List eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch((EClass)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 Object doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case Human2Package.DOCUMENT_ROOT: {
+ DocumentRoot documentRoot = (DocumentRoot)theEObject;
+ Object result = caseDocumentRoot(documentRoot);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Human2Package.HUMAN: {
+ Human human = (Human)theEObject;
+ Object result = caseHuman(human);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Human2Package.MAN: {
+ Man man = (Man)theEObject;
+ Object result = caseMan(man);
+ if (result == null) result = caseHuman(man);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Human2Package.ROOT: {
+ Root root = (Root)theEObject;
+ Object result = caseRoot(root);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case Human2Package.WOMAN: {
+ Woman woman = (Woman)theEObject;
+ Object result = caseWoman(woman);
+ if (result == null) result = caseHuman(woman);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * 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 Object caseDocumentRoot(DocumentRoot object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Human</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>Human</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseHuman(Human object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Man</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>Man</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseMan(Man object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>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>Root</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseRoot(Root object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Woman</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>Woman</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseWoman(Woman 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 Object defaultCase(EObject object) {
+ return null;
+ }
+
+} //Human2Switch
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2XMLProcessor.java b/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2XMLProcessor.java
new file mode 100644
index 0000000..c6f44fe
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/util/Human2XMLProcessor.java
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Human2XMLProcessor.java,v 1.1.2.1 2009/07/14 16:54:07 pelder Exp $
+ */
+package org.example.human2.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+
+import org.example.human2.Human2Package;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class Human2XMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Human2XMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ Human2Package.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the Human2ResourceFactoryImpl factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Map getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new Human2ResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new Human2ResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} //Human2XMLProcessor
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/validation/DocumentRootValidator.java b/tests/org.eclipse.jet.tests/src/org/example/human2/validation/DocumentRootValidator.java
new file mode 100644
index 0000000..dac485a
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/validation/DocumentRootValidator.java
@@ -0,0 +1,28 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: DocumentRootValidator.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human2.validation;
+
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.util.FeatureMap;
+
+import org.example.human2.Root;
+
+/**
+ * A sample validator interface for {@link org.example.human2.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 value);
+ boolean validateXSISchemaLocation(EMap value);
+ boolean validateRoot(Root value);
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/validation/HumanValidator.java b/tests/org.eclipse.jet.tests/src/org/example/human2/validation/HumanValidator.java
new file mode 100644
index 0000000..f6cf44a
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/validation/HumanValidator.java
@@ -0,0 +1,21 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: HumanValidator.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human2.validation;
+
+
+/**
+ * A sample validator interface for {@link org.example.human2.Human}.
+ * 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 HumanValidator {
+ boolean validate();
+
+ boolean validateAge(int value);
+ boolean validateName(String value);
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/validation/ManValidator.java b/tests/org.eclipse.jet.tests/src/org/example/human2/validation/ManValidator.java
new file mode 100644
index 0000000..ef480e0
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/validation/ManValidator.java
@@ -0,0 +1,20 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ManValidator.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human2.validation;
+
+
+/**
+ * A sample validator interface for {@link org.example.human2.Man}.
+ * 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 ManValidator {
+ boolean validate();
+
+ boolean validateLikesCars(boolean value);
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/validation/RootValidator.java b/tests/org.eclipse.jet.tests/src/org/example/human2/validation/RootValidator.java
new file mode 100644
index 0000000..40db063
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/validation/RootValidator.java
@@ -0,0 +1,21 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: RootValidator.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human2.validation;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * A sample validator interface for {@link org.example.human2.Root}.
+ * 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 RootValidator {
+ boolean validate();
+
+ boolean validateHuman(EList value);
+}
diff --git a/tests/org.eclipse.jet.tests/src/org/example/human2/validation/WomanValidator.java b/tests/org.eclipse.jet.tests/src/org/example/human2/validation/WomanValidator.java
new file mode 100644
index 0000000..2fe4757
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/src/org/example/human2/validation/WomanValidator.java
@@ -0,0 +1,20 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: WomanValidator.java,v 1.1.2.1 2009/07/14 16:54:06 pelder Exp $
+ */
+package org.example.human2.validation;
+
+
+/**
+ * A sample validator interface for {@link org.example.human2.Woman}.
+ * 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 WomanValidator {
+ boolean validate();
+
+ boolean validateLikesShopping(boolean value);
+}
diff --git a/tests/org.eclipse.jet.tests/text/description.txt b/tests/org.eclipse.jet.tests/text/description.txt
new file mode 100644
index 0000000..0f25e40
--- /dev/null
+++ b/tests/org.eclipse.jet.tests/text/description.txt
@@ -0,0 +1,27 @@
+Model Human2
+
+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 human2 <http://www.example.org/human2>
+
+ Class DocumentRoot
+ Attribute mixed : EFeatureMapEntry<<0..*>>
+ Reference xMLNSPrefixMap : EStringToStringMapEntry<<0..*>>
+ Reference xSISchemaLocation : EStringToStringMapEntry<<0..*>>
+ Reference /root : Root<<0..?>>
+
+ Class Human
+ Attribute age : Int
+ Attribute name : String
+
+ Class Man -> Human
+ Attribute likesCars : Boolean
+
+ Class Root
+ Reference human : Human<<0..*>>
+
+ Class Woman -> Human
+ Attribute likesShopping : Boolean

Back to the top