Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormtaal2007-02-05 11:13:45 -0500
committermtaal2007-02-05 11:13:45 -0500
commit42ba472c286d0c2b5cad31df20cb02790e79e179 (patch)
treef73ccb390a60cd805477f5634aeb88d9b204579a
parent86a0dc8533bce7dc652293e113328f1d5d38f41d (diff)
downloadorg.eclipse.emf.teneo-42ba472c286d0c2b5cad31df20cb02790e79e179.tar.gz
org.eclipse.emf.teneo-42ba472c286d0c2b5cad31df20cb02790e79e179.tar.xz
org.eclipse.emf.teneo-42ba472c286d0c2b5cad31df20cb02790e79e179.zip
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/Address.java4
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/USAddress.java3
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingFactoryImpl.java4
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingPackageImpl.java24
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/InheritanceMapping.xsd107
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.ecore9
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.genmodel4
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/AddressList.java6
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/ExtensionFactory.java6
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/ExtensionPackage.java257
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/USAddress.java5
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/USState.java34
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/AddressImpl.java28
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/AddressListImpl.java42
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/DistrictUKAddressImpl.java78
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/ExtensionFactoryImpl.java66
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/ExtensionPackageImpl.java26
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/FirstAddressHolderImpl.java28
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/InternationalPriceImpl.java28
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/UKAddressImpl.java58
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/USAddressImpl.java58
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionResourceFactoryImpl.java4
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionValidator.java12
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionXMLProcessor.java50
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/Extension.genmodel4
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/Extension.xsd98
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/extension.ecore6
27 files changed, 555 insertions, 494 deletions
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/Address.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/Address.java
index 9e39bbb12..12efa9d80 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/Address.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/Address.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: Address.java,v 1.2 2006/09/13 10:39:43 mtaal Exp $
+ * $Id: Address.java,v 1.3 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping;
@@ -24,8 +24,8 @@ import org.eclipse.emf.ecore.EObject;
*
* @see org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.InheritancemappingPackage#getAddress()
* @model abstract="true"
- * annotation="teneo.jpa appinfo='\n\t\t\t\t@Inheritance(strategy=JOINED)\n\t\t\t'"
* extendedMetaData="name='Address' kind='elementOnly'"
+ * annotation="teneo.jpa appinfo='\n\t\t\t\t@Inheritance(strategy=JOINED)\n\t\t\t'"
* @generated
*/
public interface Address extends EObject {
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/USAddress.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/USAddress.java
index 7570a1450..b012f6c69 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/USAddress.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/USAddress.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: USAddress.java,v 1.1 2006/07/11 16:57:12 mtaal Exp $
+ * $Id: USAddress.java,v 1.2 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping;
@@ -23,6 +23,7 @@ import java.math.BigInteger;
*
* @see org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.InheritancemappingPackage#getUSAddress()
* @model extendedMetaData="name='USAddress' kind='elementOnly'"
+ * annotation="teneo.jpa appinfo='@Table(name=\"UNITEDSTATESADDRESS\")\n\t\t\t'"
* @generated
*/
public interface USAddress extends Address {
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingFactoryImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingFactoryImpl.java
index 93308819c..9ff377420 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingFactoryImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingFactoryImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: InheritancemappingFactoryImpl.java,v 1.4 2006/09/13 16:06:47 mtaal Exp $
+ * $Id: InheritancemappingFactoryImpl.java,v 1.5 2007/02/05 16:13:46 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl;
@@ -12,6 +12,8 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.*;
+
import org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.ContentList;
import org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.DistrictUKAddress;
import org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.InheritancemappingFactory;
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingPackageImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingPackageImpl.java
index 4d1fbdd10..f4da2c979 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingPackageImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/impl/InheritancemappingPackageImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: InheritancemappingPackageImpl.java,v 1.3 2006/09/13 10:39:43 mtaal Exp $
+ * $Id: InheritancemappingPackageImpl.java,v 1.4 2007/02/05 16:13:46 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.impl;
@@ -499,10 +499,10 @@ public class InheritancemappingPackageImpl extends EPackageImpl implements Inher
createResource(eNS_URI);
// Create annotations
- // teneo.jpa
- createTeneoAnnotations();
// http:///org/eclipse/emf/ecore/util/ExtendedMetaData
createExtendedMetaDataAnnotations();
+ // teneo.jpa
+ createTeneoAnnotations();
}
/**
@@ -512,13 +512,13 @@ public class InheritancemappingPackageImpl extends EPackageImpl implements Inher
* @generated
*/
protected void createTeneoAnnotations() {
- String source = "teneo.jpa";
+ String source = "teneo.jpa";
addAnnotation
(addressEClass,
source,
new String[] {
"appinfo", "\n\t\t\t\t@Inheritance(strategy=JOINED)\n\t\t\t"
- });
+ });
addAnnotation
(getAddress_Name(),
source,
@@ -542,7 +542,13 @@ public class InheritancemappingPackageImpl extends EPackageImpl implements Inher
source,
new String[] {
"appinfo", "\n\t\t\t\t@Table(name=\"myprice\")\n\t\t\t\t@Inheritance(strategy=SINGLE_TABLE)\n\t\t\t\t@DiscriminatorColumn(name=\"DISCRIMINATOR\" discriminatorType=STRING)\n\t\t\t\t@DiscriminatorValue(\"myPrice\")\n\t\t\t"
- });
+ });
+ addAnnotation
+ (usAddressEClass,
+ source,
+ new String[] {
+ "appinfo", "@Table(name=\"UNITEDSTATESADDRESS\")\n\t\t\t"
+ });
}
/**
@@ -552,14 +558,14 @@ public class InheritancemappingPackageImpl extends EPackageImpl implements Inher
* @generated
*/
protected void createExtendedMetaDataAnnotations() {
- String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
addAnnotation
(addressEClass,
source,
new String[] {
"name", "Address",
"kind", "elementOnly"
- });
+ });
addAnnotation
(getAddress_Name(),
source,
@@ -678,7 +684,7 @@ public class InheritancemappingPackageImpl extends EPackageImpl implements Inher
new String[] {
"name", "USAddress",
"kind", "elementOnly"
- });
+ });
addAnnotation
(getUSAddress_State(),
source,
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/InheritanceMapping.xsd b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/InheritanceMapping.xsd
deleted file mode 100644
index a66f0915a..000000000
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/InheritanceMapping.xsd
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:ext="http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping">
-
- <xsd:complexType name="contentList">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string">
- <xsd:annotation>
- <xsd:appinfo source="teneo.jpa">@Id</xsd:appinfo>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="address" type="xsd:IDREF" ecore:reference="ext:Address" maxOccurs="unbounded"/>
- <xsd:element name="price" type="xsd:IDREF" ecore:reference="ext:Price" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <!-- The price class hierarchy is always mapped to superclass -->
- <xsd:complexType name="Price">
- <xsd:annotation>
- <xsd:appinfo source="teneo.jpa">
- @Table(name="myprice")
- @Inheritance(strategy=SINGLE_TABLE)
- @DiscriminatorColumn(name="DISCRIMINATOR" discriminatorType=STRING)
- @DiscriminatorValue("myPrice")
- </xsd:appinfo>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="value" type="xsd:decimal"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="InternationalPrice">
- <xsd:annotation>
- <xsd:appinfo source="teneo.jpa">
- @DiscriminatorValue("myInternationalPrice")
- </xsd:appinfo>
- </xsd:annotation>
- <xsd:complexContent>
- <xsd:extension base="ext:Price">
- <xsd:sequence>
- <xsd:element name="currency" type="xsd:string"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <!-- The price class hierarchy is always mapped to joined-subclass -->
- <xsd:complexType name="Address" abstract="true">
- <xsd:annotation>
- <xsd:appinfo source="teneo.jpa">
- @Inheritance(strategy=JOINED)
- </xsd:appinfo>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string">
- <xsd:annotation>
- <xsd:appinfo source="teneo.jpa">@Id</xsd:appinfo>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="street" type="xsd:string"/>
- <xsd:element name="city" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="USAddress">
- <xsd:complexContent>
- <xsd:extension base="ext:Address">
- <xsd:sequence>
- <xsd:element name="state" type="ext:USState"/>
- <xsd:element name="zip" type="xsd:positiveInteger" nillable="true"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="UKAddress">
- <xsd:complexContent>
- <xsd:extension base="ext:Address">
- <xsd:sequence>
- <xsd:element name="postcode" type="xsd:string"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="DistrictUKAddress">
- <xsd:complexContent>
- <xsd:extension base="ext:UKAddress">
- <xsd:sequence>
- <xsd:element name="district" type="xsd:string" nillable="true"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:simpleType name="USState">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="AK"/>
- <xsd:enumeration value="AL"/>
- <xsd:enumeration value="AR"/>
- <!-- and so on ... -->
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:schema>
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.ecore b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.ecore
index cc816e242..14097b1b8 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.ecore
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.ecore
@@ -5,13 +5,13 @@
nsURI="http://www.eclipse.org/emf/teneo/samples/emf/annotations/inheritancemapping"
nsPrefix="inheritancemapping">
<eClassifiers xsi:type="ecore:EClass" name="Address" abstract="true">
- <eAnnotations source="teneo.jpa">
- <details key="appinfo" value="&#xA;&#x9;&#x9;&#x9;&#x9;@Inheritance(strategy=JOINED)&#xA;&#x9;&#x9;&#x9;"/>
- </eAnnotations>
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="Address"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
+ <eAnnotations source="teneo.jpa">
+ <details key="appinfo" value="&#xA;&#x9;&#x9;&#x9;&#x9;@Inheritance(strategy=JOINED)&#xA;&#x9;&#x9;&#x9;"/>
+ </eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
<eAnnotations source="teneo.jpa">
@@ -138,6 +138,9 @@
<details key="name" value="USAddress"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
+ <eAnnotations source="teneo.jpa">
+ <details key="appinfo" value="@Table(name=&quot;UNITEDSTATESADDRESS&quot;)&#xA;&#x9;&#x9;&#x9;"/>
+ </eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="state" unique="false" lowerBound="1"
eType="#//USState" defaultValueLiteral="AK" unsettable="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.genmodel b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.genmodel
index 58b7c12c1..e7259f0e7 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.genmodel
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/model/inheritancemapping.genmodel
@@ -2,8 +2,8 @@
<genmodel:GenModel xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.emf.teneo.samples/src"
- modelPluginID="org.eclipse.emf.teneo.samples" modelName="inheritancemapping" importerID="org.eclipse.xsd.ecore.importer">
- <foreignModel>InheritanceMapping.xsd</foreignModel>
+ modelPluginID="org.eclipse.emf.teneo.samples" modelName="inheritancemapping" importerID="org.eclipse.emf.importer.ecore">
+ <foreignModel>inheritancemapping.ecore</foreignModel>
<genPackages prefix="Inheritancemapping" basePackage="org.eclipse.emf.teneo.samples.emf.annotations"
resource="XML" disposableProviderFactory="true" ecorePackage="inheritancemapping.ecore#/">
<genEnums ecoreEnum="inheritancemapping.ecore#//USState">
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/AddressList.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/AddressList.java
index cb9d6be40..62fa42885 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/AddressList.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/AddressList.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: AddressList.java,v 1.1 2006/07/11 16:56:56 mtaal Exp $
+ * $Id: AddressList.java,v 1.2 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension;
@@ -28,7 +28,7 @@ import org.eclipse.emf.ecore.EObject;
* @model extendedMetaData="name='AddressList' kind='elementOnly'"
* @generated
*/
-public interface AddressList extends EObject{
+public interface AddressList extends EObject {
/**
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
@@ -67,7 +67,7 @@ public interface AddressList extends EObject{
* @return the value of the '<em>First Address</em>' containment reference.
* @see #setFirstAddress(FirstAddressHolder)
* @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.ExtensionPackage#getAddressList_FirstAddress()
- * @model containment="true" resolveProxies="false" required="true"
+ * @model containment="true" required="true"
* extendedMetaData="kind='element' name='firstAddress'"
* @generated
*/
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/ExtensionFactory.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/ExtensionFactory.java
index d92986671..f5ed9159e 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/ExtensionFactory.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/ExtensionFactory.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ExtensionFactory.java,v 1.1 2006/07/11 16:56:56 mtaal Exp $
+ * $Id: ExtensionFactory.java,v 1.2 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension;
@@ -16,14 +16,14 @@ import org.eclipse.emf.ecore.EFactory;
* @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.ExtensionPackage
* @generated
*/
-public interface ExtensionFactory extends EFactory{
+public interface ExtensionFactory extends EFactory {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- ExtensionFactory eINSTANCE = new org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionFactoryImpl();
+ ExtensionFactory eINSTANCE = org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionFactoryImpl.init();
/**
* Returns a new object of class '<em>Address List</em>'.
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/ExtensionPackage.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/ExtensionPackage.java
index 2904062d0..e8208fb19 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/ExtensionPackage.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/ExtensionPackage.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ExtensionPackage.java,v 1.1 2006/07/11 16:56:56 mtaal Exp $
+ * $Id: ExtensionPackage.java,v 1.2 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension;
@@ -28,7 +28,7 @@ import org.eclipse.emf.ecore.EReference;
* @model kind="package"
* @generated
*/
-public interface ExtensionPackage extends EPackage{
+public interface ExtensionPackage extends EPackage {
/**
* The package name.
* <!-- begin-user-doc -->
@@ -43,7 +43,7 @@ public interface ExtensionPackage extends EPackage{
* <!-- end-user-doc -->
* @generated
*/
- String eNS_URI = "http://www.eclipse.org/emf/teneo/store/test/emf/schemaconstructs/extension";
+ String eNS_URI = "http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension";
/**
* The package namespace name.
@@ -99,7 +99,7 @@ public interface ExtensionPackage extends EPackage{
int ADDRESS__CITY = 2;
/**
- * The number of structural features of the the '<em>Address</em>' class.
+ * The number of structural features of the '<em>Address</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -145,7 +145,7 @@ public interface ExtensionPackage extends EPackage{
int ADDRESS_LIST__SECOND_ADDRESS = 2;
/**
- * The number of structural features of the the '<em>Address List</em>' class.
+ * The number of structural features of the '<em>Address List</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -229,7 +229,7 @@ public interface ExtensionPackage extends EPackage{
int UK_ADDRESS__EXPORT_CODE = ADDRESS_FEATURE_COUNT + 1;
/**
- * The number of structural features of the the '<em>UK Address</em>' class.
+ * The number of structural features of the '<em>UK Address</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -302,7 +302,7 @@ public interface ExtensionPackage extends EPackage{
int DISTRICT_UK_ADDRESS__DISTRICT = UK_ADDRESS_FEATURE_COUNT + 0;
/**
- * The number of structural features of the the '<em>District UK Address</em>' class.
+ * The number of structural features of the '<em>District UK Address</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -320,7 +320,7 @@ public interface ExtensionPackage extends EPackage{
int FIRST_ADDRESS_HOLDER__VALUE = 0;
/**
- * The number of structural features of the the '<em>First Address Holder</em>' class.
+ * The number of structural features of the '<em>First Address Holder</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -347,7 +347,7 @@ public interface ExtensionPackage extends EPackage{
int INTERNATIONAL_PRICE__CURRENCY = 1;
/**
- * The number of structural features of the the '<em>International Price</em>' class.
+ * The number of structural features of the '<em>International Price</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -411,7 +411,7 @@ public interface ExtensionPackage extends EPackage{
int US_ADDRESS__ZIP = ADDRESS_FEATURE_COUNT + 1;
/**
- * The number of structural features of the the '<em>US Address</em>' class.
+ * The number of structural features of the '<em>US Address</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -739,4 +739,241 @@ public interface ExtensionPackage extends EPackage{
*/
ExtensionFactory getExtensionFactory();
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.AddressImpl <em>Address</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.AddressImpl
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionPackageImpl#getAddress()
+ * @generated
+ */
+ EClass ADDRESS = eINSTANCE.getAddress();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ADDRESS__NAME = eINSTANCE.getAddress_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Street</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ADDRESS__STREET = eINSTANCE.getAddress_Street();
+
+ /**
+ * The meta object literal for the '<em><b>City</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ADDRESS__CITY = eINSTANCE.getAddress_City();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.AddressListImpl <em>Address List</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.AddressListImpl
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionPackageImpl#getAddressList()
+ * @generated
+ */
+ EClass ADDRESS_LIST = eINSTANCE.getAddressList();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ADDRESS_LIST__NAME = eINSTANCE.getAddressList_Name();
+
+ /**
+ * The meta object literal for the '<em><b>First Address</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ADDRESS_LIST__FIRST_ADDRESS = eINSTANCE.getAddressList_FirstAddress();
+
+ /**
+ * The meta object literal for the '<em><b>Second Address</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ADDRESS_LIST__SECOND_ADDRESS = eINSTANCE.getAddressList_SecondAddress();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.DistrictUKAddressImpl <em>District UK Address</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.DistrictUKAddressImpl
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionPackageImpl#getDistrictUKAddress()
+ * @generated
+ */
+ EClass DISTRICT_UK_ADDRESS = eINSTANCE.getDistrictUKAddress();
+
+ /**
+ * The meta object literal for the '<em><b>District</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DISTRICT_UK_ADDRESS__DISTRICT = eINSTANCE.getDistrictUKAddress_District();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.FirstAddressHolderImpl <em>First Address Holder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.FirstAddressHolderImpl
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionPackageImpl#getFirstAddressHolder()
+ * @generated
+ */
+ EClass FIRST_ADDRESS_HOLDER = eINSTANCE.getFirstAddressHolder();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference FIRST_ADDRESS_HOLDER__VALUE = eINSTANCE.getFirstAddressHolder_Value();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.InternationalPriceImpl <em>International Price</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.InternationalPriceImpl
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionPackageImpl#getInternationalPrice()
+ * @generated
+ */
+ EClass INTERNATIONAL_PRICE = eINSTANCE.getInternationalPrice();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INTERNATIONAL_PRICE__VALUE = eINSTANCE.getInternationalPrice_Value();
+
+ /**
+ * The meta object literal for the '<em><b>Currency</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INTERNATIONAL_PRICE__CURRENCY = eINSTANCE.getInternationalPrice_Currency();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.UKAddressImpl <em>UK Address</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.UKAddressImpl
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionPackageImpl#getUKAddress()
+ * @generated
+ */
+ EClass UK_ADDRESS = eINSTANCE.getUKAddress();
+
+ /**
+ * The meta object literal for the '<em><b>Postcode</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute UK_ADDRESS__POSTCODE = eINSTANCE.getUKAddress_Postcode();
+
+ /**
+ * The meta object literal for the '<em><b>Export Code</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute UK_ADDRESS__EXPORT_CODE = eINSTANCE.getUKAddress_ExportCode();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.USAddressImpl <em>US Address</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.USAddressImpl
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionPackageImpl#getUSAddress()
+ * @generated
+ */
+ EClass US_ADDRESS = eINSTANCE.getUSAddress();
+
+ /**
+ * The meta object literal for the '<em><b>State</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute US_ADDRESS__STATE = eINSTANCE.getUSAddress_State();
+
+ /**
+ * The meta object literal for the '<em><b>Zip</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute US_ADDRESS__ZIP = eINSTANCE.getUSAddress_Zip();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.USState <em>US State</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.USState
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionPackageImpl#getUSState()
+ * @generated
+ */
+ EEnum US_STATE = eINSTANCE.getUSState();
+
+ /**
+ * The meta object literal for the '<em>Postcode</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.lang.String
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionPackageImpl#getPostcode()
+ * @generated
+ */
+ EDataType POSTCODE = eINSTANCE.getPostcode();
+
+ /**
+ * The meta object literal for the '<em>UK Postcode</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.lang.String
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionPackageImpl#getUKPostcode()
+ * @generated
+ */
+ EDataType UK_POSTCODE = eINSTANCE.getUKPostcode();
+
+ /**
+ * The meta object literal for the '<em>US State Object</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.USState
+ * @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl.ExtensionPackageImpl#getUSStateObject()
+ * @generated
+ */
+ EDataType US_STATE_OBJECT = eINSTANCE.getUSStateObject();
+
+ }
+
} //ExtensionPackage
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/USAddress.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/USAddress.java
index aa7836514..e01298ec5 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/USAddress.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/USAddress.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: USAddress.java,v 1.1 2006/07/11 16:56:57 mtaal Exp $
+ * $Id: USAddress.java,v 1.2 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension;
@@ -23,9 +23,10 @@ import java.math.BigInteger;
*
* @see org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.ExtensionPackage#getUSAddress()
* @model extendedMetaData="name='USAddress' kind='elementOnly'"
+ * annotation="teneo.jpa appinfo='@Table(name=\"UNITEDSTATESADDRESS\")'"
* @generated
*/
-public interface USAddress extends Address{
+public interface USAddress extends Address {
/**
* Returns the value of the '<em><b>State</b></em>' attribute.
* The default value is <code>"AK"</code>.
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/USState.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/USState.java
index f32aa7ab9..2d61b109f 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/USState.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/USState.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: USState.java,v 1.1 2006/07/11 16:56:57 mtaal Exp $
+ * $Id: USState.java,v 1.2 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension;
@@ -75,7 +75,7 @@ public final class USState extends AbstractEnumerator {
* @generated
* @ordered
*/
- public static final USState AK_LITERAL = new USState(AK, "AK");
+ public static final USState AK_LITERAL = new USState(AK, "AK", "AK");
/**
* The '<em><b>AL</b></em>' literal object.
@@ -85,7 +85,7 @@ public final class USState extends AbstractEnumerator {
* @generated
* @ordered
*/
- public static final USState AL_LITERAL = new USState(AL, "AL");
+ public static final USState AL_LITERAL = new USState(AL, "AL", "AL");
/**
* The '<em><b>AR</b></em>' literal object.
@@ -95,7 +95,7 @@ public final class USState extends AbstractEnumerator {
* @generated
* @ordered
*/
- public static final USState AR_LITERAL = new USState(AR, "AR");
+ public static final USState AR_LITERAL = new USState(AR, "AR", "AR");
/**
* An array of all the '<em><b>US State</b></em>' enumerators.
@@ -119,15 +119,31 @@ public final class USState extends AbstractEnumerator {
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
+ * Returns the '<em><b>US State</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static USState get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ USState result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
* Returns the '<em><b>US State</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- public static USState get(String name) {
+ public static USState getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
USState result = VALUES_ARRAY[i];
- if (result.toString().equals(name)) {
+ if (result.getName().equals(name)) {
return result;
}
}
@@ -135,7 +151,7 @@ public final class USState extends AbstractEnumerator {
}
/**
- * Returns the '<em><b>US State</b></em>' literal with the specified value.
+ * Returns the '<em><b>US State</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -155,8 +171,8 @@ public final class USState extends AbstractEnumerator {
* <!-- end-user-doc -->
* @generated
*/
- private USState(int value, String name) {
- super(value, name);
+ private USState(int value, String name, String literal) {
+ super(value, name, literal);
}
} //USState
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/AddressImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/AddressImpl.java
index 9e0cd90cb..085095cb6 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/AddressImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/AddressImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: AddressImpl.java,v 1.1 2006/07/11 16:56:59 mtaal Exp $
+ * $Id: AddressImpl.java,v 1.2 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl;
@@ -108,7 +108,7 @@ public abstract class AddressImpl extends EObjectImpl implements Address {
* @generated
*/
protected EClass eStaticClass() {
- return ExtensionPackage.eINSTANCE.getAddress();
+ return ExtensionPackage.Literals.ADDRESS;
}
/**
@@ -179,8 +179,8 @@ public abstract class AddressImpl extends EObjectImpl implements Address {
* <!-- end-user-doc -->
* @generated
*/
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
case ExtensionPackage.ADDRESS__NAME:
return getName();
case ExtensionPackage.ADDRESS__STREET:
@@ -188,7 +188,7 @@ public abstract class AddressImpl extends EObjectImpl implements Address {
case ExtensionPackage.ADDRESS__CITY:
return getCity();
}
- return eDynamicGet(eFeature, resolve);
+ return super.eGet(featureID, resolve, coreType);
}
/**
@@ -196,8 +196,8 @@ public abstract class AddressImpl extends EObjectImpl implements Address {
* <!-- end-user-doc -->
* @generated
*/
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
case ExtensionPackage.ADDRESS__NAME:
setName((String)newValue);
return;
@@ -208,7 +208,7 @@ public abstract class AddressImpl extends EObjectImpl implements Address {
setCity((String)newValue);
return;
}
- eDynamicSet(eFeature, newValue);
+ super.eSet(featureID, newValue);
}
/**
@@ -216,8 +216,8 @@ public abstract class AddressImpl extends EObjectImpl implements Address {
* <!-- end-user-doc -->
* @generated
*/
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public void eUnset(int featureID) {
+ switch (featureID) {
case ExtensionPackage.ADDRESS__NAME:
setName(NAME_EDEFAULT);
return;
@@ -228,7 +228,7 @@ public abstract class AddressImpl extends EObjectImpl implements Address {
setCity(CITY_EDEFAULT);
return;
}
- eDynamicUnset(eFeature);
+ super.eUnset(featureID);
}
/**
@@ -236,8 +236,8 @@ public abstract class AddressImpl extends EObjectImpl implements Address {
* <!-- end-user-doc -->
* @generated
*/
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
case ExtensionPackage.ADDRESS__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case ExtensionPackage.ADDRESS__STREET:
@@ -245,7 +245,7 @@ public abstract class AddressImpl extends EObjectImpl implements Address {
case ExtensionPackage.ADDRESS__CITY:
return CITY_EDEFAULT == null ? city != null : !CITY_EDEFAULT.equals(city);
}
- return eDynamicIsSet(eFeature);
+ return super.eIsSet(featureID);
}
/**
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/AddressListImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/AddressListImpl.java
index 71c85f0ff..e31d86db3 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/AddressListImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/AddressListImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: AddressListImpl.java,v 1.1 2006/07/11 16:56:59 mtaal Exp $
+ * $Id: AddressListImpl.java,v 1.2 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl;
@@ -98,7 +98,7 @@ public class AddressListImpl extends EObjectImpl implements AddressList {
* @generated
*/
protected EClass eStaticClass() {
- return ExtensionPackage.eINSTANCE.getAddressList();
+ return ExtensionPackage.Literals.ADDRESS_LIST;
}
/**
@@ -182,16 +182,12 @@ public class AddressListImpl extends EObjectImpl implements AddressList {
* <!-- end-user-doc -->
* @generated
*/
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) {
- if (featureID >= 0) {
- switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
- case ExtensionPackage.ADDRESS_LIST__FIRST_ADDRESS:
- return basicSetFirstAddress(null, msgs);
- default:
- return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
- }
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ExtensionPackage.ADDRESS_LIST__FIRST_ADDRESS:
+ return basicSetFirstAddress(null, msgs);
}
- return eBasicSetContainer(null, featureID, msgs);
+ return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
@@ -199,8 +195,8 @@ public class AddressListImpl extends EObjectImpl implements AddressList {
* <!-- end-user-doc -->
* @generated
*/
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
case ExtensionPackage.ADDRESS_LIST__NAME:
return getName();
case ExtensionPackage.ADDRESS_LIST__FIRST_ADDRESS:
@@ -208,7 +204,7 @@ public class AddressListImpl extends EObjectImpl implements AddressList {
case ExtensionPackage.ADDRESS_LIST__SECOND_ADDRESS:
return getSecondAddress();
}
- return eDynamicGet(eFeature, resolve);
+ return super.eGet(featureID, resolve, coreType);
}
/**
@@ -216,8 +212,8 @@ public class AddressListImpl extends EObjectImpl implements AddressList {
* <!-- end-user-doc -->
* @generated
*/
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
case ExtensionPackage.ADDRESS_LIST__NAME:
setName((String)newValue);
return;
@@ -229,7 +225,7 @@ public class AddressListImpl extends EObjectImpl implements AddressList {
getSecondAddress().addAll((Collection)newValue);
return;
}
- eDynamicSet(eFeature, newValue);
+ super.eSet(featureID, newValue);
}
/**
@@ -237,8 +233,8 @@ public class AddressListImpl extends EObjectImpl implements AddressList {
* <!-- end-user-doc -->
* @generated
*/
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public void eUnset(int featureID) {
+ switch (featureID) {
case ExtensionPackage.ADDRESS_LIST__NAME:
setName(NAME_EDEFAULT);
return;
@@ -249,7 +245,7 @@ public class AddressListImpl extends EObjectImpl implements AddressList {
getSecondAddress().clear();
return;
}
- eDynamicUnset(eFeature);
+ super.eUnset(featureID);
}
/**
@@ -257,8 +253,8 @@ public class AddressListImpl extends EObjectImpl implements AddressList {
* <!-- end-user-doc -->
* @generated
*/
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
case ExtensionPackage.ADDRESS_LIST__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case ExtensionPackage.ADDRESS_LIST__FIRST_ADDRESS:
@@ -266,7 +262,7 @@ public class AddressListImpl extends EObjectImpl implements AddressList {
case ExtensionPackage.ADDRESS_LIST__SECOND_ADDRESS:
return secondAddress != null && !secondAddress.isEmpty();
}
- return eDynamicIsSet(eFeature);
+ return super.eIsSet(featureID);
}
/**
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/DistrictUKAddressImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/DistrictUKAddressImpl.java
index d5ed45876..b2d608a4a 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/DistrictUKAddressImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/DistrictUKAddressImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: DistrictUKAddressImpl.java,v 1.1 2006/07/11 16:56:59 mtaal Exp $
+ * $Id: DistrictUKAddressImpl.java,v 1.2 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl;
@@ -76,7 +76,7 @@ public class DistrictUKAddressImpl extends UKAddressImpl implements DistrictUKAd
* @generated
*/
protected EClass eStaticClass() {
- return ExtensionPackage.eINSTANCE.getDistrictUKAddress();
+ return ExtensionPackage.Literals.DISTRICT_UK_ADDRESS;
}
/**
@@ -130,22 +130,12 @@ public class DistrictUKAddressImpl extends UKAddressImpl implements DistrictUKAd
* <!-- end-user-doc -->
* @generated
*/
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ExtensionPackage.DISTRICT_UK_ADDRESS__NAME:
- return getName();
- case ExtensionPackage.DISTRICT_UK_ADDRESS__STREET:
- return getStreet();
- case ExtensionPackage.DISTRICT_UK_ADDRESS__CITY:
- return getCity();
- case ExtensionPackage.DISTRICT_UK_ADDRESS__POSTCODE:
- return getPostcode();
- case ExtensionPackage.DISTRICT_UK_ADDRESS__EXPORT_CODE:
- return getExportCode();
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
case ExtensionPackage.DISTRICT_UK_ADDRESS__DISTRICT:
return getDistrict();
}
- return eDynamicGet(eFeature, resolve);
+ return super.eGet(featureID, resolve, coreType);
}
/**
@@ -153,28 +143,13 @@ public class DistrictUKAddressImpl extends UKAddressImpl implements DistrictUKAd
* <!-- end-user-doc -->
* @generated
*/
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ExtensionPackage.DISTRICT_UK_ADDRESS__NAME:
- setName((String)newValue);
- return;
- case ExtensionPackage.DISTRICT_UK_ADDRESS__STREET:
- setStreet((String)newValue);
- return;
- case ExtensionPackage.DISTRICT_UK_ADDRESS__CITY:
- setCity((String)newValue);
- return;
- case ExtensionPackage.DISTRICT_UK_ADDRESS__POSTCODE:
- setPostcode((String)newValue);
- return;
- case ExtensionPackage.DISTRICT_UK_ADDRESS__EXPORT_CODE:
- setExportCode((BigInteger)newValue);
- return;
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
case ExtensionPackage.DISTRICT_UK_ADDRESS__DISTRICT:
setDistrict((String)newValue);
return;
}
- eDynamicSet(eFeature, newValue);
+ super.eSet(featureID, newValue);
}
/**
@@ -182,28 +157,13 @@ public class DistrictUKAddressImpl extends UKAddressImpl implements DistrictUKAd
* <!-- end-user-doc -->
* @generated
*/
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ExtensionPackage.DISTRICT_UK_ADDRESS__NAME:
- setName(NAME_EDEFAULT);
- return;
- case ExtensionPackage.DISTRICT_UK_ADDRESS__STREET:
- setStreet(STREET_EDEFAULT);
- return;
- case ExtensionPackage.DISTRICT_UK_ADDRESS__CITY:
- setCity(CITY_EDEFAULT);
- return;
- case ExtensionPackage.DISTRICT_UK_ADDRESS__POSTCODE:
- setPostcode(POSTCODE_EDEFAULT);
- return;
- case ExtensionPackage.DISTRICT_UK_ADDRESS__EXPORT_CODE:
- unsetExportCode();
- return;
+ public void eUnset(int featureID) {
+ switch (featureID) {
case ExtensionPackage.DISTRICT_UK_ADDRESS__DISTRICT:
unsetDistrict();
return;
}
- eDynamicUnset(eFeature);
+ super.eUnset(featureID);
}
/**
@@ -211,22 +171,12 @@ public class DistrictUKAddressImpl extends UKAddressImpl implements DistrictUKAd
* <!-- end-user-doc -->
* @generated
*/
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ExtensionPackage.DISTRICT_UK_ADDRESS__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case ExtensionPackage.DISTRICT_UK_ADDRESS__STREET:
- return STREET_EDEFAULT == null ? street != null : !STREET_EDEFAULT.equals(street);
- case ExtensionPackage.DISTRICT_UK_ADDRESS__CITY:
- return CITY_EDEFAULT == null ? city != null : !CITY_EDEFAULT.equals(city);
- case ExtensionPackage.DISTRICT_UK_ADDRESS__POSTCODE:
- return POSTCODE_EDEFAULT == null ? postcode != null : !POSTCODE_EDEFAULT.equals(postcode);
- case ExtensionPackage.DISTRICT_UK_ADDRESS__EXPORT_CODE:
- return isSetExportCode();
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
case ExtensionPackage.DISTRICT_UK_ADDRESS__DISTRICT:
return isSetDistrict();
}
- return eDynamicIsSet(eFeature);
+ return super.eIsSet(featureID);
}
/**
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/ExtensionFactoryImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/ExtensionFactoryImpl.java
index fe49599f0..46a1bf2bf 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/ExtensionFactoryImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/ExtensionFactoryImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ExtensionFactoryImpl.java,v 1.1 2006/07/11 16:56:59 mtaal Exp $
+ * $Id: ExtensionFactoryImpl.java,v 1.2 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl;
@@ -10,8 +10,12 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
import org.eclipse.emf.ecore.xml.type.XMLTypeFactory;
import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
@@ -25,6 +29,25 @@ import org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.*;
*/
public class ExtensionFactoryImpl extends EFactoryImpl implements ExtensionFactory {
/**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ExtensionFactory init() {
+ try {
+ ExtensionFactory theExtensionFactory = (ExtensionFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension");
+ if (theExtensionFactory != null) {
+ return theExtensionFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ExtensionFactoryImpl();
+ }
+
+ /**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -59,11 +82,8 @@ public class ExtensionFactoryImpl extends EFactoryImpl implements ExtensionFacto
*/
public Object createFromString(EDataType eDataType, String initialValue) {
switch (eDataType.getClassifierID()) {
- case ExtensionPackage.US_STATE: {
- USState result = USState.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
+ case ExtensionPackage.US_STATE:
+ return createUSStateFromString(eDataType, initialValue);
case ExtensionPackage.POSTCODE:
return createPostcodeFromString(eDataType, initialValue);
case ExtensionPackage.UK_POSTCODE:
@@ -83,7 +103,7 @@ public class ExtensionFactoryImpl extends EFactoryImpl implements ExtensionFacto
public String convertToString(EDataType eDataType, Object instanceValue) {
switch (eDataType.getClassifierID()) {
case ExtensionPackage.US_STATE:
- return instanceValue == null ? null : instanceValue.toString();
+ return convertUSStateToString(eDataType, instanceValue);
case ExtensionPackage.POSTCODE:
return convertPostcodeToString(eDataType, instanceValue);
case ExtensionPackage.UK_POSTCODE:
@@ -160,8 +180,28 @@ public class ExtensionFactoryImpl extends EFactoryImpl implements ExtensionFacto
* <!-- end-user-doc -->
* @generated
*/
+ public USState createUSStateFromString(EDataType eDataType, String initialValue) {
+ USState result = USState.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertUSStateToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public String createPostcodeFromString(EDataType eDataType, String initialValue) {
- return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.eINSTANCE.getString(), initialValue);
+ return (String)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.Literals.STRING, initialValue);
}
/**
@@ -170,7 +210,7 @@ public class ExtensionFactoryImpl extends EFactoryImpl implements ExtensionFacto
* @generated
*/
public String convertPostcodeToString(EDataType eDataType, Object instanceValue) {
- return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.eINSTANCE.getString(), instanceValue);
+ return XMLTypeFactory.eINSTANCE.convertToString(XMLTypePackage.Literals.STRING, instanceValue);
}
/**
@@ -179,7 +219,7 @@ public class ExtensionFactoryImpl extends EFactoryImpl implements ExtensionFacto
* @generated
*/
public String createUKPostcodeFromString(EDataType eDataType, String initialValue) {
- return (String)ExtensionFactory.eINSTANCE.createFromString(ExtensionPackage.eINSTANCE.getPostcode(), initialValue);
+ return (String)createPostcodeFromString(ExtensionPackage.Literals.POSTCODE, initialValue);
}
/**
@@ -188,7 +228,7 @@ public class ExtensionFactoryImpl extends EFactoryImpl implements ExtensionFacto
* @generated
*/
public String convertUKPostcodeToString(EDataType eDataType, Object instanceValue) {
- return ExtensionFactory.eINSTANCE.convertToString(ExtensionPackage.eINSTANCE.getPostcode(), instanceValue);
+ return convertPostcodeToString(ExtensionPackage.Literals.POSTCODE, instanceValue);
}
/**
@@ -197,7 +237,7 @@ public class ExtensionFactoryImpl extends EFactoryImpl implements ExtensionFacto
* @generated
*/
public USState createUSStateObjectFromString(EDataType eDataType, String initialValue) {
- return (USState)ExtensionFactory.eINSTANCE.createFromString(ExtensionPackage.eINSTANCE.getUSState(), initialValue);
+ return (USState)createUSStateFromString(ExtensionPackage.Literals.US_STATE, initialValue);
}
/**
@@ -206,7 +246,7 @@ public class ExtensionFactoryImpl extends EFactoryImpl implements ExtensionFacto
* @generated
*/
public String convertUSStateObjectToString(EDataType eDataType, Object instanceValue) {
- return ExtensionFactory.eINSTANCE.convertToString(ExtensionPackage.eINSTANCE.getUSState(), instanceValue);
+ return convertUSStateToString(ExtensionPackage.Literals.US_STATE, instanceValue);
}
/**
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/ExtensionPackageImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/ExtensionPackageImpl.java
index ebdb6ffa6..680f3bdfb 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/ExtensionPackageImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/ExtensionPackageImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ExtensionPackageImpl.java,v 1.1 2006/07/11 16:56:59 mtaal Exp $
+ * $Id: ExtensionPackageImpl.java,v 1.2 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl;
@@ -174,7 +174,7 @@ public class ExtensionPackageImpl extends EPackageImpl implements ExtensionPacka
isInited = true;
// Initialize simple dependencies
- XMLTypePackageImpl.init();
+ XMLTypePackage.eINSTANCE.eClass();
// Create package meta-data objects
theExtensionPackage.createPackageContents();
@@ -511,7 +511,7 @@ public class ExtensionPackageImpl extends EPackageImpl implements ExtensionPacka
setNsURI(eNS_URI);
// Obtain other dependent packages
- XMLTypePackageImpl theXMLTypePackage = (XMLTypePackageImpl)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
+ XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
// Add supertypes to classes
districtUKAddressEClass.getESuperTypes().add(this.getUKAddress());
@@ -564,6 +564,8 @@ public class ExtensionPackageImpl extends EPackageImpl implements ExtensionPacka
// Create annotations
// http:///org/eclipse/emf/ecore/util/ExtendedMetaData
createExtendedMetaDataAnnotations();
+ // teneo.jpa
+ createTeneoAnnotations();
}
/**
@@ -722,7 +724,7 @@ public class ExtensionPackageImpl extends EPackageImpl implements ExtensionPacka
new String[] {
"name", "USAddress",
"kind", "elementOnly"
- });
+ });
addAnnotation
(getUSAddress_State(),
source,
@@ -752,4 +754,20 @@ public class ExtensionPackageImpl extends EPackageImpl implements ExtensionPacka
});
}
+ /**
+ * Initializes the annotations for <b>teneo.jpa</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createTeneoAnnotations() {
+ String source = "teneo.jpa";
+ addAnnotation
+ (usAddressEClass,
+ source,
+ new String[] {
+ "appinfo", "@Table(name=\"UNITEDSTATESADDRESS\")"
+ });
+ }
+
} //ExtensionPackageImpl
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/FirstAddressHolderImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/FirstAddressHolderImpl.java
index a4088f3d2..6a989be24 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/FirstAddressHolderImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/FirstAddressHolderImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: FirstAddressHolderImpl.java,v 1.1 2006/07/11 16:56:59 mtaal Exp $
+ * $Id: FirstAddressHolderImpl.java,v 1.2 2007/02/05 16:13:46 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl;
@@ -60,7 +60,7 @@ public class FirstAddressHolderImpl extends EObjectImpl implements FirstAddressH
* @generated
*/
protected EClass eStaticClass() {
- return ExtensionPackage.eINSTANCE.getFirstAddressHolder();
+ return ExtensionPackage.Literals.FIRST_ADDRESS_HOLDER;
}
/**
@@ -80,12 +80,12 @@ public class FirstAddressHolderImpl extends EObjectImpl implements FirstAddressH
* <!-- end-user-doc -->
* @generated
*/
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
case ExtensionPackage.FIRST_ADDRESS_HOLDER__VALUE:
return getValue();
}
- return eDynamicGet(eFeature, resolve);
+ return super.eGet(featureID, resolve, coreType);
}
/**
@@ -93,14 +93,14 @@ public class FirstAddressHolderImpl extends EObjectImpl implements FirstAddressH
* <!-- end-user-doc -->
* @generated
*/
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
case ExtensionPackage.FIRST_ADDRESS_HOLDER__VALUE:
getValue().clear();
getValue().addAll((Collection)newValue);
return;
}
- eDynamicSet(eFeature, newValue);
+ super.eSet(featureID, newValue);
}
/**
@@ -108,13 +108,13 @@ public class FirstAddressHolderImpl extends EObjectImpl implements FirstAddressH
* <!-- end-user-doc -->
* @generated
*/
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public void eUnset(int featureID) {
+ switch (featureID) {
case ExtensionPackage.FIRST_ADDRESS_HOLDER__VALUE:
getValue().clear();
return;
}
- eDynamicUnset(eFeature);
+ super.eUnset(featureID);
}
/**
@@ -122,12 +122,12 @@ public class FirstAddressHolderImpl extends EObjectImpl implements FirstAddressH
* <!-- end-user-doc -->
* @generated
*/
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
case ExtensionPackage.FIRST_ADDRESS_HOLDER__VALUE:
return value != null && !value.isEmpty();
}
- return eDynamicIsSet(eFeature);
+ return super.eIsSet(featureID);
}
} //FirstAddressHolderImpl
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/InternationalPriceImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/InternationalPriceImpl.java
index 1f9f42ab4..35a9882d5 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/InternationalPriceImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/InternationalPriceImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: InternationalPriceImpl.java,v 1.1 2006/07/11 16:56:59 mtaal Exp $
+ * $Id: InternationalPriceImpl.java,v 1.2 2007/02/05 16:13:46 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl;
@@ -89,7 +89,7 @@ public class InternationalPriceImpl extends EObjectImpl implements International
* @generated
*/
protected EClass eStaticClass() {
- return ExtensionPackage.eINSTANCE.getInternationalPrice();
+ return ExtensionPackage.Literals.INTERNATIONAL_PRICE;
}
/**
@@ -139,14 +139,14 @@ public class InternationalPriceImpl extends EObjectImpl implements International
* <!-- end-user-doc -->
* @generated
*/
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
case ExtensionPackage.INTERNATIONAL_PRICE__VALUE:
return getValue();
case ExtensionPackage.INTERNATIONAL_PRICE__CURRENCY:
return getCurrency();
}
- return eDynamicGet(eFeature, resolve);
+ return super.eGet(featureID, resolve, coreType);
}
/**
@@ -154,8 +154,8 @@ public class InternationalPriceImpl extends EObjectImpl implements International
* <!-- end-user-doc -->
* @generated
*/
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
case ExtensionPackage.INTERNATIONAL_PRICE__VALUE:
setValue((BigDecimal)newValue);
return;
@@ -163,7 +163,7 @@ public class InternationalPriceImpl extends EObjectImpl implements International
setCurrency((String)newValue);
return;
}
- eDynamicSet(eFeature, newValue);
+ super.eSet(featureID, newValue);
}
/**
@@ -171,8 +171,8 @@ public class InternationalPriceImpl extends EObjectImpl implements International
* <!-- end-user-doc -->
* @generated
*/
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public void eUnset(int featureID) {
+ switch (featureID) {
case ExtensionPackage.INTERNATIONAL_PRICE__VALUE:
setValue(VALUE_EDEFAULT);
return;
@@ -180,7 +180,7 @@ public class InternationalPriceImpl extends EObjectImpl implements International
setCurrency(CURRENCY_EDEFAULT);
return;
}
- eDynamicUnset(eFeature);
+ super.eUnset(featureID);
}
/**
@@ -188,14 +188,14 @@ public class InternationalPriceImpl extends EObjectImpl implements International
* <!-- end-user-doc -->
* @generated
*/
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
case ExtensionPackage.INTERNATIONAL_PRICE__VALUE:
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
case ExtensionPackage.INTERNATIONAL_PRICE__CURRENCY:
return CURRENCY_EDEFAULT == null ? currency != null : !CURRENCY_EDEFAULT.equals(currency);
}
- return eDynamicIsSet(eFeature);
+ return super.eIsSet(featureID);
}
/**
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/UKAddressImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/UKAddressImpl.java
index 661425933..dcd027117 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/UKAddressImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/UKAddressImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: UKAddressImpl.java,v 1.1 2006/07/11 16:56:59 mtaal Exp $
+ * $Id: UKAddressImpl.java,v 1.2 2007/02/05 16:13:46 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl;
@@ -97,7 +97,7 @@ public class UKAddressImpl extends AddressImpl implements UKAddress {
* @generated
*/
protected EClass eStaticClass() {
- return ExtensionPackage.eINSTANCE.getUKAddress();
+ return ExtensionPackage.Literals.UK_ADDRESS;
}
/**
@@ -172,20 +172,14 @@ public class UKAddressImpl extends AddressImpl implements UKAddress {
* <!-- end-user-doc -->
* @generated
*/
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ExtensionPackage.UK_ADDRESS__NAME:
- return getName();
- case ExtensionPackage.UK_ADDRESS__STREET:
- return getStreet();
- case ExtensionPackage.UK_ADDRESS__CITY:
- return getCity();
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
case ExtensionPackage.UK_ADDRESS__POSTCODE:
return getPostcode();
case ExtensionPackage.UK_ADDRESS__EXPORT_CODE:
return getExportCode();
}
- return eDynamicGet(eFeature, resolve);
+ return super.eGet(featureID, resolve, coreType);
}
/**
@@ -193,17 +187,8 @@ public class UKAddressImpl extends AddressImpl implements UKAddress {
* <!-- end-user-doc -->
* @generated
*/
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ExtensionPackage.UK_ADDRESS__NAME:
- setName((String)newValue);
- return;
- case ExtensionPackage.UK_ADDRESS__STREET:
- setStreet((String)newValue);
- return;
- case ExtensionPackage.UK_ADDRESS__CITY:
- setCity((String)newValue);
- return;
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
case ExtensionPackage.UK_ADDRESS__POSTCODE:
setPostcode((String)newValue);
return;
@@ -211,7 +196,7 @@ public class UKAddressImpl extends AddressImpl implements UKAddress {
setExportCode((BigInteger)newValue);
return;
}
- eDynamicSet(eFeature, newValue);
+ super.eSet(featureID, newValue);
}
/**
@@ -219,17 +204,8 @@ public class UKAddressImpl extends AddressImpl implements UKAddress {
* <!-- end-user-doc -->
* @generated
*/
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ExtensionPackage.UK_ADDRESS__NAME:
- setName(NAME_EDEFAULT);
- return;
- case ExtensionPackage.UK_ADDRESS__STREET:
- setStreet(STREET_EDEFAULT);
- return;
- case ExtensionPackage.UK_ADDRESS__CITY:
- setCity(CITY_EDEFAULT);
- return;
+ public void eUnset(int featureID) {
+ switch (featureID) {
case ExtensionPackage.UK_ADDRESS__POSTCODE:
setPostcode(POSTCODE_EDEFAULT);
return;
@@ -237,7 +213,7 @@ public class UKAddressImpl extends AddressImpl implements UKAddress {
unsetExportCode();
return;
}
- eDynamicUnset(eFeature);
+ super.eUnset(featureID);
}
/**
@@ -245,20 +221,14 @@ public class UKAddressImpl extends AddressImpl implements UKAddress {
* <!-- end-user-doc -->
* @generated
*/
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ExtensionPackage.UK_ADDRESS__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case ExtensionPackage.UK_ADDRESS__STREET:
- return STREET_EDEFAULT == null ? street != null : !STREET_EDEFAULT.equals(street);
- case ExtensionPackage.UK_ADDRESS__CITY:
- return CITY_EDEFAULT == null ? city != null : !CITY_EDEFAULT.equals(city);
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
case ExtensionPackage.UK_ADDRESS__POSTCODE:
return POSTCODE_EDEFAULT == null ? postcode != null : !POSTCODE_EDEFAULT.equals(postcode);
case ExtensionPackage.UK_ADDRESS__EXPORT_CODE:
return isSetExportCode();
}
- return eDynamicIsSet(eFeature);
+ return super.eIsSet(featureID);
}
/**
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/USAddressImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/USAddressImpl.java
index c0bb3f7a0..223459be3 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/USAddressImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/impl/USAddressImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: USAddressImpl.java,v 1.1 2006/07/11 16:56:59 mtaal Exp $
+ * $Id: USAddressImpl.java,v 1.2 2007/02/05 16:13:45 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.impl;
@@ -107,7 +107,7 @@ public class USAddressImpl extends AddressImpl implements USAddress {
* @generated
*/
protected EClass eStaticClass() {
- return ExtensionPackage.eINSTANCE.getUSAddress();
+ return ExtensionPackage.Literals.US_ADDRESS;
}
/**
@@ -207,20 +207,14 @@ public class USAddressImpl extends AddressImpl implements USAddress {
* <!-- end-user-doc -->
* @generated
*/
- public Object eGet(EStructuralFeature eFeature, boolean resolve) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ExtensionPackage.US_ADDRESS__NAME:
- return getName();
- case ExtensionPackage.US_ADDRESS__STREET:
- return getStreet();
- case ExtensionPackage.US_ADDRESS__CITY:
- return getCity();
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
case ExtensionPackage.US_ADDRESS__STATE:
return getState();
case ExtensionPackage.US_ADDRESS__ZIP:
return getZip();
}
- return eDynamicGet(eFeature, resolve);
+ return super.eGet(featureID, resolve, coreType);
}
/**
@@ -228,17 +222,8 @@ public class USAddressImpl extends AddressImpl implements USAddress {
* <!-- end-user-doc -->
* @generated
*/
- public void eSet(EStructuralFeature eFeature, Object newValue) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ExtensionPackage.US_ADDRESS__NAME:
- setName((String)newValue);
- return;
- case ExtensionPackage.US_ADDRESS__STREET:
- setStreet((String)newValue);
- return;
- case ExtensionPackage.US_ADDRESS__CITY:
- setCity((String)newValue);
- return;
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
case ExtensionPackage.US_ADDRESS__STATE:
setState((USState)newValue);
return;
@@ -246,7 +231,7 @@ public class USAddressImpl extends AddressImpl implements USAddress {
setZip((BigInteger)newValue);
return;
}
- eDynamicSet(eFeature, newValue);
+ super.eSet(featureID, newValue);
}
/**
@@ -254,17 +239,8 @@ public class USAddressImpl extends AddressImpl implements USAddress {
* <!-- end-user-doc -->
* @generated
*/
- public void eUnset(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ExtensionPackage.US_ADDRESS__NAME:
- setName(NAME_EDEFAULT);
- return;
- case ExtensionPackage.US_ADDRESS__STREET:
- setStreet(STREET_EDEFAULT);
- return;
- case ExtensionPackage.US_ADDRESS__CITY:
- setCity(CITY_EDEFAULT);
- return;
+ public void eUnset(int featureID) {
+ switch (featureID) {
case ExtensionPackage.US_ADDRESS__STATE:
unsetState();
return;
@@ -272,7 +248,7 @@ public class USAddressImpl extends AddressImpl implements USAddress {
unsetZip();
return;
}
- eDynamicUnset(eFeature);
+ super.eUnset(featureID);
}
/**
@@ -280,20 +256,14 @@ public class USAddressImpl extends AddressImpl implements USAddress {
* <!-- end-user-doc -->
* @generated
*/
- public boolean eIsSet(EStructuralFeature eFeature) {
- switch (eDerivedStructuralFeatureID(eFeature)) {
- case ExtensionPackage.US_ADDRESS__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case ExtensionPackage.US_ADDRESS__STREET:
- return STREET_EDEFAULT == null ? street != null : !STREET_EDEFAULT.equals(street);
- case ExtensionPackage.US_ADDRESS__CITY:
- return CITY_EDEFAULT == null ? city != null : !CITY_EDEFAULT.equals(city);
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
case ExtensionPackage.US_ADDRESS__STATE:
return isSetState();
case ExtensionPackage.US_ADDRESS__ZIP:
return isSetZip();
}
- return eDynamicIsSet(eFeature);
+ return super.eIsSet(featureID);
}
/**
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionResourceFactoryImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionResourceFactoryImpl.java
index 96dd2ce3b..033bb973c 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionResourceFactoryImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionResourceFactoryImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ExtensionResourceFactoryImpl.java,v 1.1 2006/07/11 16:57:01 mtaal Exp $
+ * $Id: ExtensionResourceFactoryImpl.java,v 1.2 2007/02/05 16:13:46 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.util;
@@ -44,6 +44,8 @@ public class ExtensionResourceFactoryImpl extends ResourceFactoryImpl {
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);
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionValidator.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionValidator.java
index 1d74f0b88..40f3cdb37 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionValidator.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionValidator.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: ExtensionValidator.java,v 1.1 2006/07/11 16:57:01 mtaal Exp $
+ * $Id: ExtensionValidator.java,v 1.2 2007/02/05 16:13:46 mtaal Exp $
*/
package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.util;
@@ -113,7 +113,7 @@ public class ExtensionValidator extends EObjectValidator {
case ExtensionPackage.US_ADDRESS:
return validateUSAddress((USAddress)value, diagnostics, context);
case ExtensionPackage.US_STATE:
- return validateUSState((Object)value, diagnostics, context);
+ return validateUSState((USState)value, diagnostics, context);
case ExtensionPackage.POSTCODE:
return validatePostcode((String)value, diagnostics, context);
case ExtensionPackage.UK_POSTCODE:
@@ -193,7 +193,7 @@ public class ExtensionValidator extends EObjectValidator {
* <!-- end-user-doc -->
* @generated
*/
- public boolean validateUSState(Object usState, DiagnosticChain diagnostics, Map context) {
+ public boolean validateUSState(USState usState, DiagnosticChain diagnostics, Map context) {
return true;
}
@@ -218,7 +218,7 @@ public class ExtensionValidator extends EObjectValidator {
int length = postcode.length();
boolean result = length >= 7;
if (!result && diagnostics != null)
- reportMinLengthViolation(ExtensionPackage.eINSTANCE.getPostcode(), postcode, length, 7, diagnostics, context);
+ reportMinLengthViolation(ExtensionPackage.Literals.POSTCODE, postcode, length, 7, diagnostics, context);
return result;
}
@@ -232,7 +232,7 @@ public class ExtensionValidator extends EObjectValidator {
int length = postcode.length();
boolean result = length <= 7;
if (!result && diagnostics != null)
- reportMaxLengthViolation(ExtensionPackage.eINSTANCE.getPostcode(), postcode, length, 7, diagnostics, context);
+ reportMaxLengthViolation(ExtensionPackage.Literals.POSTCODE, postcode, length, 7, diagnostics, context);
return result;
}
@@ -268,7 +268,7 @@ public class ExtensionValidator extends EObjectValidator {
* @generated
*/
public boolean validateUKPostcode_Pattern(String ukPostcode, DiagnosticChain diagnostics, Map context) {
- return validatePattern(ExtensionPackage.eINSTANCE.getUKPostcode(), ukPostcode, UK_POSTCODE__PATTERN__VALUES, diagnostics, context);
+ return validatePattern(ExtensionPackage.Literals.UK_POSTCODE, ukPostcode, UK_POSTCODE__PATTERN__VALUES, diagnostics, context);
}
/**
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionXMLProcessor.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionXMLProcessor.java
new file mode 100644
index 000000000..590448766
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/extension/util/ExtensionXMLProcessor.java
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ExtensionXMLProcessor.java,v 1.1 2007/02/05 16:13:46 mtaal Exp $
+ */
+package org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+
+import org.eclipse.emf.teneo.samples.emf.schemaconstructs.extension.ExtensionPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ExtensionXMLProcessor extends XMLProcessor {
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExtensionXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ ExtensionPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the ExtensionResourceFactoryImpl factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Map getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new ExtensionResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new ExtensionResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} //ExtensionXMLProcessor
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/Extension.genmodel b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/Extension.genmodel
index 58010b77c..813fc2c30 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/Extension.genmodel
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/Extension.genmodel
@@ -2,8 +2,8 @@
<genmodel:GenModel xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.emf.teneo.samples/src"
- modelPluginID="org.eclipse.emf.teneo.samples" modelName="Extension" importerID="org.eclipse.xsd.ecore.importer">
- <foreignModel>Extension.xsd</foreignModel>
+ modelPluginID="org.eclipse.emf.teneo.samples" modelName="Extension" importerID="org.eclipse.emf.importer.ecore">
+ <foreignModel>extension.ecore</foreignModel>
<genPackages prefix="Extension" basePackage="org.eclipse.emf.teneo.samples.emf.schemaconstructs"
resource="XML" disposableProviderFactory="true" ecorePackage="extension.ecore#/">
<genEnums ecoreEnum="extension.ecore#//USState">
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/Extension.xsd b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/Extension.xsd
deleted file mode 100644
index a95869527..000000000
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/Extension.xsd
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:ext="http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension">
-
- <!-- Tests:
- - Restriction simple type
- - Extension from simple to complex type
- - Abstract type
- - IDREFS
- - Inheritance and abstract
- - Extension of complex type
- - Reference to abstract type
- - nillable of string (district) and integer (zip)
- -->
-
- <!-- simple type definition -->
-
- <xsd:simpleType name="USState">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="AK"/>
- <xsd:enumeration value="AL"/>
- <xsd:enumeration value="AR"/>
- <!-- and so on ... -->
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="Postcode">
- <xsd:restriction base="xsd:string">
- <xsd:length value="7" fixed="true"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="UKPostcode">
- <xsd:restriction base="ext:Postcode">
- <xsd:pattern value="[A-Z]{2}\d\s\d[A-Z]{2}"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- tests derive by extension from simple to complex -->
- <xsd:complexType name="internationalPrice">
- <xsd:simpleContent>
- <xsd:extension base="xsd:decimal">
- <xsd:attribute name="currency" type="xsd:string"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- Also test inheritance and IDREFS -->
- <xsd:complexType name="AddressList">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="firstAddress" type="xsd:IDREFS" ecore:reference="ext:Address"/>
- <xsd:element name="secondAddress" type="xsd:anyURI" ecore:reference="ext:Address" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="Address" abstract="true">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="street" type="xsd:string"/>
- <xsd:element name="city" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="USAddress">
- <xsd:complexContent>
- <xsd:extension base="ext:Address">
- <xsd:sequence>
- <xsd:element name="state" type="ext:USState"/>
- <xsd:element name="zip" type="xsd:positiveInteger" nillable="true"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="UKAddress">
- <xsd:complexContent>
- <xsd:extension base="ext:Address">
- <xsd:sequence>
- <xsd:element name="postcode" type="ext:UKPostcode"/>
- </xsd:sequence>
- <xsd:attribute name="exportCode" type="xsd:positiveInteger" fixed="1"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="DistrictUKAddress">
- <xsd:complexContent>
- <xsd:extension base="ext:UKAddress">
- <xsd:sequence>
- <xsd:element name="district" type="xsd:string" nillable="true"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:schema>
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/extension.ecore b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/extension.ecore
index 46cfea372..69a703cb1 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/extension.ecore
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/schemaconstructs/model/extension.ecore
@@ -2,7 +2,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="extension"
- nsURI="http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension" nsPrefix="extension">
+ nsURI="http://www.eclipse.org/emf/teneo/samples/emf/schemaconstructs/extension"
+ nsPrefix="extension">
<eClassifiers xsi:type="ecore:EClass" name="Address" abstract="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
<details key="name" value="Address"/>
@@ -143,6 +144,9 @@
<details key="name" value="USAddress"/>
<details key="kind" value="elementOnly"/>
</eAnnotations>
+ <eAnnotations source="teneo.jpa">
+ <details key="appinfo" value="@Table(name=&quot;UNITEDSTATESADDRESS&quot;)"/>
+ </eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="state" unique="false" lowerBound="1"
eType="#//USState" defaultValueLiteral="AK" unsettable="true">
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">

Back to the top