Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormtaal2007-03-21 16:09:27 +0000
committermtaal2007-03-21 16:09:27 +0000
commit2a6f55e53ab21c772a5f4e1b877509bf120ba4d4 (patch)
tree7be260060b2c877ffa1f5af9dcd61af58aad0424
parenteb7ce83353f2aa2547638e0dba731e3c0915a315 (diff)
downloadorg.eclipse.emf.teneo-2a6f55e53ab21c772a5f4e1b877509bf120ba4d4.tar.gz
org.eclipse.emf.teneo-2a6f55e53ab21c772a5f4e1b877509bf120ba4d4.tar.xz
org.eclipse.emf.teneo-2a6f55e53ab21c772a5f4e1b877509bf120ba4d4.zip
[178471]
[176651] [176710] [178311] [178461]
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/Child.java53
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/Child2.java53
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/ParentOne.java54
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/ParentTwo.java54
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/ParentZero.java54
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/TestinheritanceFactory.java47
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/TestinheritancePackage.java385
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/Child2Impl.java312
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ChildImpl.java245
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ParentOneImpl.java161
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ParentTwoImpl.java161
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ParentZeroImpl.java161
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/TestinheritanceFactoryImpl.java57
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/TestinheritancePackageImpl.java185
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/model/testinheritance.ecore25
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/model/testinheritance.genmodel15
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/util/TestinheritanceAdapterFactory.java87
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/testinheritance/util/TestinheritanceSwitch.java112
18 files changed, 2214 insertions, 7 deletions
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/Child.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/Child.java
new file mode 100644
index 000000000..cc6dc7cb7
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/Child.java
@@ -0,0 +1,53 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Child.java,v 1.1.2.2 2007/03/21 16:09:28 mtaal Exp $
+ */
+package testinheritance;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Child</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link testinheritance.Child#getAge <em>Age</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see testinheritance.TestinheritancePackage#getChild()
+ * @model
+ * @generated
+ */
+public interface Child extends ParentZero, ParentTwo {
+ /**
+ * 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 #setAge(long)
+ * @see testinheritance.TestinheritancePackage#getChild_Age()
+ * @model
+ * @generated
+ */
+ long getAge();
+
+ /**
+ * Sets the value of the '{@link testinheritance.Child#getAge <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Age</em>' attribute.
+ * @see #getAge()
+ * @generated
+ */
+ void setAge(long value);
+
+} // Child \ No newline at end of file
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/Child2.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/Child2.java
new file mode 100644
index 000000000..9031bdfe4
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/Child2.java
@@ -0,0 +1,53 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Child2.java,v 1.1.2.2 2007/03/21 16:09:28 mtaal Exp $
+ */
+package testinheritance;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Child2</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link testinheritance.Child2#getAge <em>Age</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see testinheritance.TestinheritancePackage#getChild2()
+ * @model
+ * @generated
+ */
+public interface Child2 extends ParentZero, ParentOne, ParentTwo {
+ /**
+ * 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 #setAge(long)
+ * @see testinheritance.TestinheritancePackage#getChild2_Age()
+ * @model
+ * @generated
+ */
+ long getAge();
+
+ /**
+ * Sets the value of the '{@link testinheritance.Child2#getAge <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Age</em>' attribute.
+ * @see #getAge()
+ * @generated
+ */
+ void setAge(long value);
+
+} // Child2 \ No newline at end of file
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/ParentOne.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/ParentOne.java
new file mode 100644
index 000000000..08a626103
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/ParentOne.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ParentOne.java,v 1.1.2.2 2007/03/21 16:09:28 mtaal Exp $
+ */
+package testinheritance;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Parent One</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link testinheritance.ParentOne#getAnotherProperty <em>Another Property</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see testinheritance.TestinheritancePackage#getParentOne()
+ * @model
+ * @generated
+ */
+public interface ParentOne extends EObject {
+ /**
+ * Returns the value of the '<em><b>Another Property</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Another Property</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Another Property</em>' attribute.
+ * @see #setAnotherProperty(long)
+ * @see testinheritance.TestinheritancePackage#getParentOne_AnotherProperty()
+ * @model
+ * @generated
+ */
+ long getAnotherProperty();
+
+ /**
+ * Sets the value of the '{@link testinheritance.ParentOne#getAnotherProperty <em>Another Property</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Another Property</em>' attribute.
+ * @see #getAnotherProperty()
+ * @generated
+ */
+ void setAnotherProperty(long value);
+
+} // ParentOne \ No newline at end of file
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/ParentTwo.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/ParentTwo.java
new file mode 100644
index 000000000..689ac8941
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/ParentTwo.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ParentTwo.java,v 1.1.2.2 2007/03/21 16:09:28 mtaal Exp $
+ */
+package testinheritance;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Parent Two</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link testinheritance.ParentTwo#getTestId <em>Test Id</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see testinheritance.TestinheritancePackage#getParentTwo()
+ * @model annotation="teneo.jpa appinfo='@MappedSuperclass'"
+ * @generated
+ */
+public interface ParentTwo extends EObject {
+ /**
+ * Returns the value of the '<em><b>Test Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Test Id</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Test Id</em>' attribute.
+ * @see #setTestId(long)
+ * @see testinheritance.TestinheritancePackage#getParentTwo_TestId()
+ * @model annotation="teneo.jpa appinfo='@Id'"
+ * @generated
+ */
+ long getTestId();
+
+ /**
+ * Sets the value of the '{@link testinheritance.ParentTwo#getTestId <em>Test Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Test Id</em>' attribute.
+ * @see #getTestId()
+ * @generated
+ */
+ void setTestId(long value);
+
+} // ParentTwo \ No newline at end of file
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/ParentZero.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/ParentZero.java
new file mode 100644
index 000000000..ca71cf135
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/ParentZero.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ParentZero.java,v 1.1.2.2 2007/03/21 16:09:28 mtaal Exp $
+ */
+package testinheritance;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Parent Zero</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link testinheritance.ParentZero#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see testinheritance.TestinheritancePackage#getParentZero()
+ * @model annotation="teneo.jpa appinfo='@MappedSuperclass'"
+ * @generated
+ */
+public interface ParentZero extends EObject {
+ /**
+ * 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 testinheritance.TestinheritancePackage#getParentZero_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link testinheritance.ParentZero#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);
+
+} // ParentZero \ No newline at end of file
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/TestinheritanceFactory.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/TestinheritanceFactory.java
index dc85da577..8856c77d2 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/TestinheritanceFactory.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/TestinheritanceFactory.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: TestinheritanceFactory.java,v 1.1.2.2 2007/03/18 22:34:03 mtaal Exp $
+ * $Id: TestinheritanceFactory.java,v 1.1.2.3 2007/03/21 16:09:28 mtaal Exp $
*/
package testinheritance;
@@ -62,6 +62,51 @@ public interface TestinheritanceFactory extends EFactory {
NameValuePair createNameValuePair();
/**
+ * Returns a new object of class '<em>Parent One</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Parent One</em>'.
+ * @generated
+ */
+ ParentOne createParentOne();
+
+ /**
+ * Returns a new object of class '<em>Parent Two</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Parent Two</em>'.
+ * @generated
+ */
+ ParentTwo createParentTwo();
+
+ /**
+ * Returns a new object of class '<em>Parent Zero</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Parent Zero</em>'.
+ * @generated
+ */
+ ParentZero createParentZero();
+
+ /**
+ * Returns a new object of class '<em>Child</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Child</em>'.
+ * @generated
+ */
+ Child createChild();
+
+ /**
+ * Returns a new object of class '<em>Child2</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Child2</em>'.
+ * @generated
+ */
+ Child2 createChild2();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/TestinheritancePackage.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/TestinheritancePackage.java
index 74d253199..eeb07c1a8 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/TestinheritancePackage.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/TestinheritancePackage.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: TestinheritancePackage.java,v 1.1.2.2 2007/03/18 22:34:03 mtaal Exp $
+ * $Id: TestinheritancePackage.java,v 1.1.2.3 2007/03/21 16:09:28 mtaal Exp $
*/
package testinheritance;
@@ -209,6 +209,192 @@ public interface TestinheritancePackage extends EPackage {
/**
+ * The meta object id for the '{@link testinheritance.impl.ParentOneImpl <em>Parent One</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testinheritance.impl.ParentOneImpl
+ * @see testinheritance.impl.TestinheritancePackageImpl#getParentOne()
+ * @generated
+ */
+ int PARENT_ONE = 4;
+
+ /**
+ * The feature id for the '<em><b>Another Property</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARENT_ONE__ANOTHER_PROPERTY = 0;
+
+ /**
+ * The number of structural features of the '<em>Parent One</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARENT_ONE_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link testinheritance.impl.ParentTwoImpl <em>Parent Two</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testinheritance.impl.ParentTwoImpl
+ * @see testinheritance.impl.TestinheritancePackageImpl#getParentTwo()
+ * @generated
+ */
+ int PARENT_TWO = 5;
+
+ /**
+ * The feature id for the '<em><b>Test Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARENT_TWO__TEST_ID = 0;
+
+ /**
+ * The number of structural features of the '<em>Parent Two</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARENT_TWO_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link testinheritance.impl.ParentZeroImpl <em>Parent Zero</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testinheritance.impl.ParentZeroImpl
+ * @see testinheritance.impl.TestinheritancePackageImpl#getParentZero()
+ * @generated
+ */
+ int PARENT_ZERO = 6;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARENT_ZERO__NAME = 0;
+
+ /**
+ * The number of structural features of the '<em>Parent Zero</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARENT_ZERO_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link testinheritance.impl.ChildImpl <em>Child</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testinheritance.impl.ChildImpl
+ * @see testinheritance.impl.TestinheritancePackageImpl#getChild()
+ * @generated
+ */
+ int CHILD = 7;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD__NAME = PARENT_ZERO__NAME;
+
+ /**
+ * The feature id for the '<em><b>Test Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD__TEST_ID = PARENT_ZERO_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Age</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD__AGE = PARENT_ZERO_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Child</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD_FEATURE_COUNT = PARENT_ZERO_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link testinheritance.impl.Child2Impl <em>Child2</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testinheritance.impl.Child2Impl
+ * @see testinheritance.impl.TestinheritancePackageImpl#getChild2()
+ * @generated
+ */
+ int CHILD2 = 8;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD2__NAME = PARENT_ZERO__NAME;
+
+ /**
+ * The feature id for the '<em><b>Another Property</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD2__ANOTHER_PROPERTY = PARENT_ZERO_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Test Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD2__TEST_ID = PARENT_ZERO_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Age</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD2__AGE = PARENT_ZERO_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Child2</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD2_FEATURE_COUNT = PARENT_ZERO_FEATURE_COUNT + 3;
+
+
+ /**
* Returns the meta object for class '{@link testinheritance.SomeResource <em>Some Resource</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -304,6 +490,111 @@ public interface TestinheritancePackage extends EPackage {
EAttribute getNameValuePair_Value();
/**
+ * Returns the meta object for class '{@link testinheritance.ParentOne <em>Parent One</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Parent One</em>'.
+ * @see testinheritance.ParentOne
+ * @generated
+ */
+ EClass getParentOne();
+
+ /**
+ * Returns the meta object for the attribute '{@link testinheritance.ParentOne#getAnotherProperty <em>Another Property</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Another Property</em>'.
+ * @see testinheritance.ParentOne#getAnotherProperty()
+ * @see #getParentOne()
+ * @generated
+ */
+ EAttribute getParentOne_AnotherProperty();
+
+ /**
+ * Returns the meta object for class '{@link testinheritance.ParentTwo <em>Parent Two</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Parent Two</em>'.
+ * @see testinheritance.ParentTwo
+ * @generated
+ */
+ EClass getParentTwo();
+
+ /**
+ * Returns the meta object for the attribute '{@link testinheritance.ParentTwo#getTestId <em>Test Id</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Test Id</em>'.
+ * @see testinheritance.ParentTwo#getTestId()
+ * @see #getParentTwo()
+ * @generated
+ */
+ EAttribute getParentTwo_TestId();
+
+ /**
+ * Returns the meta object for class '{@link testinheritance.ParentZero <em>Parent Zero</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Parent Zero</em>'.
+ * @see testinheritance.ParentZero
+ * @generated
+ */
+ EClass getParentZero();
+
+ /**
+ * Returns the meta object for the attribute '{@link testinheritance.ParentZero#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see testinheritance.ParentZero#getName()
+ * @see #getParentZero()
+ * @generated
+ */
+ EAttribute getParentZero_Name();
+
+ /**
+ * Returns the meta object for class '{@link testinheritance.Child <em>Child</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Child</em>'.
+ * @see testinheritance.Child
+ * @generated
+ */
+ EClass getChild();
+
+ /**
+ * Returns the meta object for the attribute '{@link testinheritance.Child#getAge <em>Age</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Age</em>'.
+ * @see testinheritance.Child#getAge()
+ * @see #getChild()
+ * @generated
+ */
+ EAttribute getChild_Age();
+
+ /**
+ * Returns the meta object for class '{@link testinheritance.Child2 <em>Child2</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Child2</em>'.
+ * @see testinheritance.Child2
+ * @generated
+ */
+ EClass getChild2();
+
+ /**
+ * Returns the meta object for the attribute '{@link testinheritance.Child2#getAge <em>Age</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Age</em>'.
+ * @see testinheritance.Child2#getAge()
+ * @see #getChild2()
+ * @generated
+ */
+ EAttribute getChild2_Age();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -324,7 +615,7 @@ public interface TestinheritancePackage extends EPackage {
* <!-- end-user-doc -->
* @generated
*/
- interface Literals {
+ interface Literals {
/**
* The meta object literal for the '{@link testinheritance.impl.SomeResourceImpl <em>Some Resource</em>}' class.
* <!-- begin-user-doc -->
@@ -405,6 +696,96 @@ public interface TestinheritancePackage extends EPackage {
*/
EAttribute NAME_VALUE_PAIR__VALUE = eINSTANCE.getNameValuePair_Value();
+ /**
+ * The meta object literal for the '{@link testinheritance.impl.ParentOneImpl <em>Parent One</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testinheritance.impl.ParentOneImpl
+ * @see testinheritance.impl.TestinheritancePackageImpl#getParentOne()
+ * @generated
+ */
+ EClass PARENT_ONE = eINSTANCE.getParentOne();
+
+ /**
+ * The meta object literal for the '<em><b>Another Property</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PARENT_ONE__ANOTHER_PROPERTY = eINSTANCE.getParentOne_AnotherProperty();
+
+ /**
+ * The meta object literal for the '{@link testinheritance.impl.ParentTwoImpl <em>Parent Two</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testinheritance.impl.ParentTwoImpl
+ * @see testinheritance.impl.TestinheritancePackageImpl#getParentTwo()
+ * @generated
+ */
+ EClass PARENT_TWO = eINSTANCE.getParentTwo();
+
+ /**
+ * The meta object literal for the '<em><b>Test Id</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PARENT_TWO__TEST_ID = eINSTANCE.getParentTwo_TestId();
+
+ /**
+ * The meta object literal for the '{@link testinheritance.impl.ParentZeroImpl <em>Parent Zero</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testinheritance.impl.ParentZeroImpl
+ * @see testinheritance.impl.TestinheritancePackageImpl#getParentZero()
+ * @generated
+ */
+ EClass PARENT_ZERO = eINSTANCE.getParentZero();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PARENT_ZERO__NAME = eINSTANCE.getParentZero_Name();
+
+ /**
+ * The meta object literal for the '{@link testinheritance.impl.ChildImpl <em>Child</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testinheritance.impl.ChildImpl
+ * @see testinheritance.impl.TestinheritancePackageImpl#getChild()
+ * @generated
+ */
+ EClass CHILD = eINSTANCE.getChild();
+
+ /**
+ * The meta object literal for the '<em><b>Age</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CHILD__AGE = eINSTANCE.getChild_Age();
+
+ /**
+ * The meta object literal for the '{@link testinheritance.impl.Child2Impl <em>Child2</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testinheritance.impl.Child2Impl
+ * @see testinheritance.impl.TestinheritancePackageImpl#getChild2()
+ * @generated
+ */
+ EClass CHILD2 = eINSTANCE.getChild2();
+
+ /**
+ * The meta object literal for the '<em><b>Age</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CHILD2__AGE = eINSTANCE.getChild2_Age();
+
}
} //TestinheritancePackage
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/Child2Impl.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/Child2Impl.java
new file mode 100644
index 000000000..3060e3d90
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/Child2Impl.java
@@ -0,0 +1,312 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: Child2Impl.java,v 1.1.2.2 2007/03/21 16:09:27 mtaal Exp $
+ */
+package testinheritance.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import testinheritance.Child2;
+import testinheritance.ParentOne;
+import testinheritance.ParentTwo;
+import testinheritance.TestinheritancePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Child2</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link testinheritance.impl.Child2Impl#getAnotherProperty <em>Another Property</em>}</li>
+ * <li>{@link testinheritance.impl.Child2Impl#getTestId <em>Test Id</em>}</li>
+ * <li>{@link testinheritance.impl.Child2Impl#getAge <em>Age</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class Child2Impl extends ParentZeroImpl implements Child2 {
+ /**
+ * The default value of the '{@link #getAnotherProperty() <em>Another Property</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAnotherProperty()
+ * @generated
+ * @ordered
+ */
+ protected static final long ANOTHER_PROPERTY_EDEFAULT = 0L;
+
+ /**
+ * The cached value of the '{@link #getAnotherProperty() <em>Another Property</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAnotherProperty()
+ * @generated
+ * @ordered
+ */
+ protected long anotherProperty = ANOTHER_PROPERTY_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getTestId() <em>Test Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTestId()
+ * @generated
+ * @ordered
+ */
+ protected static final long TEST_ID_EDEFAULT = 0L;
+
+ /**
+ * The cached value of the '{@link #getTestId() <em>Test Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTestId()
+ * @generated
+ * @ordered
+ */
+ protected long testId = TEST_ID_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getAge() <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAge()
+ * @generated
+ * @ordered
+ */
+ protected static final long AGE_EDEFAULT = 0L;
+
+ /**
+ * The cached value of the '{@link #getAge() <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAge()
+ * @generated
+ * @ordered
+ */
+ protected long age = AGE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Child2Impl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return TestinheritancePackage.Literals.CHILD2;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public long getAnotherProperty() {
+ return anotherProperty;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAnotherProperty(long newAnotherProperty) {
+ long oldAnotherProperty = anotherProperty;
+ anotherProperty = newAnotherProperty;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestinheritancePackage.CHILD2__ANOTHER_PROPERTY, oldAnotherProperty, anotherProperty));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public long getTestId() {
+ return testId;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTestId(long newTestId) {
+ long oldTestId = testId;
+ testId = newTestId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestinheritancePackage.CHILD2__TEST_ID, oldTestId, testId));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public long getAge() {
+ return age;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAge(long newAge) {
+ long oldAge = age;
+ age = newAge;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestinheritancePackage.CHILD2__AGE, oldAge, age));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TestinheritancePackage.CHILD2__ANOTHER_PROPERTY:
+ return new Long(getAnotherProperty());
+ case TestinheritancePackage.CHILD2__TEST_ID:
+ return new Long(getTestId());
+ case TestinheritancePackage.CHILD2__AGE:
+ return new Long(getAge());
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TestinheritancePackage.CHILD2__ANOTHER_PROPERTY:
+ setAnotherProperty(((Long)newValue).longValue());
+ return;
+ case TestinheritancePackage.CHILD2__TEST_ID:
+ setTestId(((Long)newValue).longValue());
+ return;
+ case TestinheritancePackage.CHILD2__AGE:
+ setAge(((Long)newValue).longValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TestinheritancePackage.CHILD2__ANOTHER_PROPERTY:
+ setAnotherProperty(ANOTHER_PROPERTY_EDEFAULT);
+ return;
+ case TestinheritancePackage.CHILD2__TEST_ID:
+ setTestId(TEST_ID_EDEFAULT);
+ return;
+ case TestinheritancePackage.CHILD2__AGE:
+ setAge(AGE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TestinheritancePackage.CHILD2__ANOTHER_PROPERTY:
+ return anotherProperty != ANOTHER_PROPERTY_EDEFAULT;
+ case TestinheritancePackage.CHILD2__TEST_ID:
+ return testId != TEST_ID_EDEFAULT;
+ case TestinheritancePackage.CHILD2__AGE:
+ return age != AGE_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) {
+ if (baseClass == ParentOne.class) {
+ switch (derivedFeatureID) {
+ case TestinheritancePackage.CHILD2__ANOTHER_PROPERTY: return TestinheritancePackage.PARENT_ONE__ANOTHER_PROPERTY;
+ default: return -1;
+ }
+ }
+ if (baseClass == ParentTwo.class) {
+ switch (derivedFeatureID) {
+ case TestinheritancePackage.CHILD2__TEST_ID: return TestinheritancePackage.PARENT_TWO__TEST_ID;
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) {
+ if (baseClass == ParentOne.class) {
+ switch (baseFeatureID) {
+ case TestinheritancePackage.PARENT_ONE__ANOTHER_PROPERTY: return TestinheritancePackage.CHILD2__ANOTHER_PROPERTY;
+ default: return -1;
+ }
+ }
+ if (baseClass == ParentTwo.class) {
+ switch (baseFeatureID) {
+ case TestinheritancePackage.PARENT_TWO__TEST_ID: return TestinheritancePackage.CHILD2__TEST_ID;
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (anotherProperty: ");
+ result.append(anotherProperty);
+ result.append(", testId: ");
+ result.append(testId);
+ result.append(", age: ");
+ result.append(age);
+ result.append(')');
+ return result.toString();
+ }
+
+} //Child2Impl \ No newline at end of file
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ChildImpl.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ChildImpl.java
new file mode 100644
index 000000000..cdd126b46
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ChildImpl.java
@@ -0,0 +1,245 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ChildImpl.java,v 1.1.2.2 2007/03/21 16:09:27 mtaal Exp $
+ */
+package testinheritance.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import testinheritance.Child;
+import testinheritance.ParentTwo;
+import testinheritance.TestinheritancePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Child</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link testinheritance.impl.ChildImpl#getTestId <em>Test Id</em>}</li>
+ * <li>{@link testinheritance.impl.ChildImpl#getAge <em>Age</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ChildImpl extends ParentZeroImpl implements Child {
+ /**
+ * The default value of the '{@link #getTestId() <em>Test Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTestId()
+ * @generated
+ * @ordered
+ */
+ protected static final long TEST_ID_EDEFAULT = 0L;
+
+ /**
+ * The cached value of the '{@link #getTestId() <em>Test Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTestId()
+ * @generated
+ * @ordered
+ */
+ protected long testId = TEST_ID_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getAge() <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAge()
+ * @generated
+ * @ordered
+ */
+ protected static final long AGE_EDEFAULT = 0L;
+
+ /**
+ * The cached value of the '{@link #getAge() <em>Age</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAge()
+ * @generated
+ * @ordered
+ */
+ protected long age = AGE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ChildImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return TestinheritancePackage.Literals.CHILD;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public long getTestId() {
+ return testId;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTestId(long newTestId) {
+ long oldTestId = testId;
+ testId = newTestId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestinheritancePackage.CHILD__TEST_ID, oldTestId, testId));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public long getAge() {
+ return age;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAge(long newAge) {
+ long oldAge = age;
+ age = newAge;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestinheritancePackage.CHILD__AGE, oldAge, age));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TestinheritancePackage.CHILD__TEST_ID:
+ return new Long(getTestId());
+ case TestinheritancePackage.CHILD__AGE:
+ return new Long(getAge());
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TestinheritancePackage.CHILD__TEST_ID:
+ setTestId(((Long)newValue).longValue());
+ return;
+ case TestinheritancePackage.CHILD__AGE:
+ setAge(((Long)newValue).longValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TestinheritancePackage.CHILD__TEST_ID:
+ setTestId(TEST_ID_EDEFAULT);
+ return;
+ case TestinheritancePackage.CHILD__AGE:
+ setAge(AGE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TestinheritancePackage.CHILD__TEST_ID:
+ return testId != TEST_ID_EDEFAULT;
+ case TestinheritancePackage.CHILD__AGE:
+ return age != AGE_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) {
+ if (baseClass == ParentTwo.class) {
+ switch (derivedFeatureID) {
+ case TestinheritancePackage.CHILD__TEST_ID: return TestinheritancePackage.PARENT_TWO__TEST_ID;
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) {
+ if (baseClass == ParentTwo.class) {
+ switch (baseFeatureID) {
+ case TestinheritancePackage.PARENT_TWO__TEST_ID: return TestinheritancePackage.CHILD__TEST_ID;
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (testId: ");
+ result.append(testId);
+ result.append(", age: ");
+ result.append(age);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ChildImpl \ No newline at end of file
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ParentOneImpl.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ParentOneImpl.java
new file mode 100644
index 000000000..1b48ba186
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ParentOneImpl.java
@@ -0,0 +1,161 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ParentOneImpl.java,v 1.1.2.2 2007/03/21 16:09:27 mtaal Exp $
+ */
+package testinheritance.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 testinheritance.ParentOne;
+import testinheritance.TestinheritancePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Parent One</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link testinheritance.impl.ParentOneImpl#getAnotherProperty <em>Another Property</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ParentOneImpl extends EObjectImpl implements ParentOne {
+ /**
+ * The default value of the '{@link #getAnotherProperty() <em>Another Property</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAnotherProperty()
+ * @generated
+ * @ordered
+ */
+ protected static final long ANOTHER_PROPERTY_EDEFAULT = 0L;
+
+ /**
+ * The cached value of the '{@link #getAnotherProperty() <em>Another Property</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAnotherProperty()
+ * @generated
+ * @ordered
+ */
+ protected long anotherProperty = ANOTHER_PROPERTY_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ParentOneImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return TestinheritancePackage.Literals.PARENT_ONE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public long getAnotherProperty() {
+ return anotherProperty;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAnotherProperty(long newAnotherProperty) {
+ long oldAnotherProperty = anotherProperty;
+ anotherProperty = newAnotherProperty;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestinheritancePackage.PARENT_ONE__ANOTHER_PROPERTY, oldAnotherProperty, anotherProperty));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TestinheritancePackage.PARENT_ONE__ANOTHER_PROPERTY:
+ return new Long(getAnotherProperty());
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TestinheritancePackage.PARENT_ONE__ANOTHER_PROPERTY:
+ setAnotherProperty(((Long)newValue).longValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TestinheritancePackage.PARENT_ONE__ANOTHER_PROPERTY:
+ setAnotherProperty(ANOTHER_PROPERTY_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TestinheritancePackage.PARENT_ONE__ANOTHER_PROPERTY:
+ return anotherProperty != ANOTHER_PROPERTY_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(" (anotherProperty: ");
+ result.append(anotherProperty);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ParentOneImpl \ No newline at end of file
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ParentTwoImpl.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ParentTwoImpl.java
new file mode 100644
index 000000000..e019f88f3
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ParentTwoImpl.java
@@ -0,0 +1,161 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ParentTwoImpl.java,v 1.1.2.2 2007/03/21 16:09:27 mtaal Exp $
+ */
+package testinheritance.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 testinheritance.ParentTwo;
+import testinheritance.TestinheritancePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Parent Two</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link testinheritance.impl.ParentTwoImpl#getTestId <em>Test Id</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ParentTwoImpl extends EObjectImpl implements ParentTwo {
+ /**
+ * The default value of the '{@link #getTestId() <em>Test Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTestId()
+ * @generated
+ * @ordered
+ */
+ protected static final long TEST_ID_EDEFAULT = 0L;
+
+ /**
+ * The cached value of the '{@link #getTestId() <em>Test Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTestId()
+ * @generated
+ * @ordered
+ */
+ protected long testId = TEST_ID_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ParentTwoImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return TestinheritancePackage.Literals.PARENT_TWO;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public long getTestId() {
+ return testId;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTestId(long newTestId) {
+ long oldTestId = testId;
+ testId = newTestId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestinheritancePackage.PARENT_TWO__TEST_ID, oldTestId, testId));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TestinheritancePackage.PARENT_TWO__TEST_ID:
+ return new Long(getTestId());
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TestinheritancePackage.PARENT_TWO__TEST_ID:
+ setTestId(((Long)newValue).longValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TestinheritancePackage.PARENT_TWO__TEST_ID:
+ setTestId(TEST_ID_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TestinheritancePackage.PARENT_TWO__TEST_ID:
+ return testId != TEST_ID_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(" (testId: ");
+ result.append(testId);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ParentTwoImpl \ No newline at end of file
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ParentZeroImpl.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ParentZeroImpl.java
new file mode 100644
index 000000000..b8abfdff4
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/ParentZeroImpl.java
@@ -0,0 +1,161 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ParentZeroImpl.java,v 1.1.2.2 2007/03/21 16:09:27 mtaal Exp $
+ */
+package testinheritance.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 testinheritance.ParentZero;
+import testinheritance.TestinheritancePackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Parent Zero</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link testinheritance.impl.ParentZeroImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ParentZeroImpl extends EObjectImpl implements ParentZero {
+ /**
+ * 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 ParentZeroImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass() {
+ return TestinheritancePackage.Literals.PARENT_ZERO;
+ }
+
+ /**
+ * <!-- 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, TestinheritancePackage.PARENT_ZERO__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TestinheritancePackage.PARENT_ZERO__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 TestinheritancePackage.PARENT_ZERO__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TestinheritancePackage.PARENT_ZERO__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TestinheritancePackage.PARENT_ZERO__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(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ParentZeroImpl \ No newline at end of file
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/TestinheritanceFactoryImpl.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/TestinheritanceFactoryImpl.java
index 12b4fcd48..2c53e0fed 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/TestinheritanceFactoryImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/TestinheritanceFactoryImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: TestinheritanceFactoryImpl.java,v 1.1.2.2 2007/03/18 22:34:03 mtaal Exp $
+ * $Id: TestinheritanceFactoryImpl.java,v 1.1.2.3 2007/03/21 16:09:27 mtaal Exp $
*/
package testinheritance.impl;
@@ -63,6 +63,11 @@ public class TestinheritanceFactoryImpl extends EFactoryImpl implements Testinhe
case TestinheritancePackage.SOME_BASE_CLASS: return createSomeBaseClass();
case TestinheritancePackage.SOME_OTHER_BASE_CLASS: return createSomeOtherBaseClass();
case TestinheritancePackage.NAME_VALUE_PAIR: return createNameValuePair();
+ case TestinheritancePackage.PARENT_ONE: return createParentOne();
+ case TestinheritancePackage.PARENT_TWO: return createParentTwo();
+ case TestinheritancePackage.PARENT_ZERO: return createParentZero();
+ case TestinheritancePackage.CHILD: return createChild();
+ case TestinheritancePackage.CHILD2: return createChild2();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -113,6 +118,56 @@ public class TestinheritanceFactoryImpl extends EFactoryImpl implements Testinhe
* <!-- end-user-doc -->
* @generated
*/
+ public ParentOne createParentOne() {
+ ParentOneImpl parentOne = new ParentOneImpl();
+ return parentOne;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ParentTwo createParentTwo() {
+ ParentTwoImpl parentTwo = new ParentTwoImpl();
+ return parentTwo;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ParentZero createParentZero() {
+ ParentZeroImpl parentZero = new ParentZeroImpl();
+ return parentZero;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Child createChild() {
+ ChildImpl child = new ChildImpl();
+ return child;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Child2 createChild2() {
+ Child2Impl child2 = new Child2Impl();
+ return child2;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public TestinheritancePackage getTestinheritancePackage() {
return (TestinheritancePackage)getEPackage();
}
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/TestinheritancePackageImpl.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/TestinheritancePackageImpl.java
index 93653d615..7e48dede7 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/TestinheritancePackageImpl.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/impl/TestinheritancePackageImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: TestinheritancePackageImpl.java,v 1.1.2.2 2007/03/18 22:34:03 mtaal Exp $
+ * $Id: TestinheritancePackageImpl.java,v 1.1.2.3 2007/03/21 16:09:27 mtaal Exp $
*/
package testinheritance.impl;
@@ -13,7 +13,12 @@ import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
+import testinheritance.Child;
+import testinheritance.Child2;
import testinheritance.NameValuePair;
+import testinheritance.ParentOne;
+import testinheritance.ParentTwo;
+import testinheritance.ParentZero;
import testinheritance.SomeBaseClass;
import testinheritance.SomeOtherBaseClass;
import testinheritance.SomeResource;
@@ -56,6 +61,41 @@ public class TestinheritancePackageImpl extends EPackageImpl implements Testinhe
private EClass nameValuePairEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass parentOneEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass parentTwoEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass parentZeroEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass childEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass child2EClass = 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.
@@ -209,6 +249,96 @@ public class TestinheritancePackageImpl extends EPackageImpl implements Testinhe
* <!-- end-user-doc -->
* @generated
*/
+ public EClass getParentOne() {
+ return parentOneEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getParentOne_AnotherProperty() {
+ return (EAttribute)parentOneEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getParentTwo() {
+ return parentTwoEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getParentTwo_TestId() {
+ return (EAttribute)parentTwoEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getParentZero() {
+ return parentZeroEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getParentZero_Name() {
+ return (EAttribute)parentZeroEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getChild() {
+ return childEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getChild_Age() {
+ return (EAttribute)childEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getChild2() {
+ return child2EClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getChild2_Age() {
+ return (EAttribute)child2EClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public TestinheritanceFactory getTestinheritanceFactory() {
return (TestinheritanceFactory)getEFactoryInstance();
}
@@ -244,6 +374,21 @@ public class TestinheritancePackageImpl extends EPackageImpl implements Testinhe
nameValuePairEClass = createEClass(NAME_VALUE_PAIR);
createEAttribute(nameValuePairEClass, NAME_VALUE_PAIR__NAME);
createEAttribute(nameValuePairEClass, NAME_VALUE_PAIR__VALUE);
+
+ parentOneEClass = createEClass(PARENT_ONE);
+ createEAttribute(parentOneEClass, PARENT_ONE__ANOTHER_PROPERTY);
+
+ parentTwoEClass = createEClass(PARENT_TWO);
+ createEAttribute(parentTwoEClass, PARENT_TWO__TEST_ID);
+
+ parentZeroEClass = createEClass(PARENT_ZERO);
+ createEAttribute(parentZeroEClass, PARENT_ZERO__NAME);
+
+ childEClass = createEClass(CHILD);
+ createEAttribute(childEClass, CHILD__AGE);
+
+ child2EClass = createEClass(CHILD2);
+ createEAttribute(child2EClass, CHILD2__AGE);
}
/**
@@ -272,6 +417,11 @@ public class TestinheritancePackageImpl extends EPackageImpl implements Testinhe
// Add supertypes to classes
someResourceEClass.getESuperTypes().add(this.getSomeBaseClass());
someResourceEClass.getESuperTypes().add(this.getSomeOtherBaseClass());
+ childEClass.getESuperTypes().add(this.getParentZero());
+ childEClass.getESuperTypes().add(this.getParentTwo());
+ child2EClass.getESuperTypes().add(this.getParentZero());
+ child2EClass.getESuperTypes().add(this.getParentOne());
+ child2EClass.getESuperTypes().add(this.getParentTwo());
// Initialize classes and features; add operations and parameters
initEClass(someResourceEClass, SomeResource.class, "SomeResource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -287,6 +437,21 @@ public class TestinheritancePackageImpl extends EPackageImpl implements Testinhe
initEAttribute(getNameValuePair_Name(), ecorePackage.getEString(), "name", null, 0, 1, NameValuePair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getNameValuePair_Value(), ecorePackage.getEString(), "value", null, 0, 1, NameValuePair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(parentOneEClass, ParentOne.class, "ParentOne", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getParentOne_AnotherProperty(), ecorePackage.getELong(), "anotherProperty", null, 0, 1, ParentOne.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(parentTwoEClass, ParentTwo.class, "ParentTwo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getParentTwo_TestId(), ecorePackage.getELong(), "testId", null, 0, 1, ParentTwo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(parentZeroEClass, ParentZero.class, "ParentZero", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getParentZero_Name(), ecorePackage.getEString(), "name", null, 0, 1, ParentZero.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(childEClass, Child.class, "Child", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getChild_Age(), ecorePackage.getELong(), "age", null, 0, 1, Child.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(child2EClass, Child2.class, "Child2", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getChild2_Age(), ecorePackage.getELong(), "age", null, 0, 1, Child2.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
// Create resource
createResource(eNS_URI);
@@ -308,6 +473,24 @@ public class TestinheritancePackageImpl extends EPackageImpl implements Testinhe
source,
new String[] {
"appinfo", "@Transient"
+ });
+ addAnnotation
+ (parentTwoEClass,
+ source,
+ new String[] {
+ "appinfo", "@MappedSuperclass"
+ });
+ addAnnotation
+ (getParentTwo_TestId(),
+ source,
+ new String[] {
+ "appinfo", "@Id"
+ });
+ addAnnotation
+ (parentZeroEClass,
+ source,
+ new String[] {
+ "appinfo", "@MappedSuperclass"
});
}
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/model/testinheritance.ecore b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/model/testinheritance.ecore
index 2f65263c5..7a55498a6 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/model/testinheritance.ecore
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/model/testinheritance.ecore
@@ -19,4 +19,29 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ParentOne">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="anotherProperty" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ParentTwo">
+ <eAnnotations source="teneo.jpa">
+ <details key="appinfo" value="@MappedSuperclass"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="testId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong">
+ <eAnnotations source="teneo.jpa">
+ <details key="appinfo" value="@Id"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ParentZero">
+ <eAnnotations source="teneo.jpa">
+ <details key="appinfo" value="@MappedSuperclass"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Child" eSuperTypes="#//ParentZero #//ParentTwo">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="age" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Child2" eSuperTypes="#//ParentZero #//ParentOne #//ParentTwo">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="age" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/model/testinheritance.genmodel b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/model/testinheritance.genmodel
index 41cdea4ec..a2a0840bb 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/model/testinheritance.genmodel
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/model/testinheritance.genmodel
@@ -17,5 +17,20 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute testinheritance.ecore#//NameValuePair/name"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute testinheritance.ecore#//NameValuePair/value"/>
</genClasses>
+ <genClasses ecoreClass="testinheritance.ecore#//ParentOne">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute testinheritance.ecore#//ParentOne/anotherProperty"/>
+ </genClasses>
+ <genClasses ecoreClass="testinheritance.ecore#//ParentTwo">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute testinheritance.ecore#//ParentTwo/testId"/>
+ </genClasses>
+ <genClasses ecoreClass="testinheritance.ecore#//ParentZero">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute testinheritance.ecore#//ParentZero/name"/>
+ </genClasses>
+ <genClasses ecoreClass="testinheritance.ecore#//Child">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute testinheritance.ecore#//Child/age"/>
+ </genClasses>
+ <genClasses ecoreClass="testinheritance.ecore#//Child2">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute testinheritance.ecore#//Child2/age"/>
+ </genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/util/TestinheritanceAdapterFactory.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/util/TestinheritanceAdapterFactory.java
index 538d816d1..d7ec186b2 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/util/TestinheritanceAdapterFactory.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/util/TestinheritanceAdapterFactory.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: TestinheritanceAdapterFactory.java,v 1.1.2.2 2007/03/18 22:34:03 mtaal Exp $
+ * $Id: TestinheritanceAdapterFactory.java,v 1.1.2.3 2007/03/21 16:09:28 mtaal Exp $
*/
package testinheritance.util;
@@ -82,6 +82,21 @@ public class TestinheritanceAdapterFactory extends AdapterFactoryImpl {
public Object caseNameValuePair(NameValuePair object) {
return createNameValuePairAdapter();
}
+ public Object caseParentOne(ParentOne object) {
+ return createParentOneAdapter();
+ }
+ public Object caseParentTwo(ParentTwo object) {
+ return createParentTwoAdapter();
+ }
+ public Object caseParentZero(ParentZero object) {
+ return createParentZeroAdapter();
+ }
+ public Object caseChild(Child object) {
+ return createChildAdapter();
+ }
+ public Object caseChild2(Child2 object) {
+ return createChild2Adapter();
+ }
public Object defaultCase(EObject object) {
return createEObjectAdapter();
}
@@ -157,6 +172,76 @@ public class TestinheritanceAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link testinheritance.ParentOne <em>Parent One</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 testinheritance.ParentOne
+ * @generated
+ */
+ public Adapter createParentOneAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link testinheritance.ParentTwo <em>Parent Two</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 testinheritance.ParentTwo
+ * @generated
+ */
+ public Adapter createParentTwoAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link testinheritance.ParentZero <em>Parent Zero</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 testinheritance.ParentZero
+ * @generated
+ */
+ public Adapter createParentZeroAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link testinheritance.Child <em>Child</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 testinheritance.Child
+ * @generated
+ */
+ public Adapter createChildAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link testinheritance.Child2 <em>Child2</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 testinheritance.Child2
+ * @generated
+ */
+ public Adapter createChild2Adapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
diff --git a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/util/TestinheritanceSwitch.java b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/util/TestinheritanceSwitch.java
index 1c49074fa..52f165ecf 100644
--- a/examples/org.eclipse.emf.teneo.samples/src/testinheritance/util/TestinheritanceSwitch.java
+++ b/examples/org.eclipse.emf.teneo.samples/src/testinheritance/util/TestinheritanceSwitch.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: TestinheritanceSwitch.java,v 1.1.2.2 2007/03/18 22:34:03 mtaal Exp $
+ * $Id: TestinheritanceSwitch.java,v 1.1.2.3 2007/03/21 16:09:28 mtaal Exp $
*/
package testinheritance.util;
@@ -113,6 +113,41 @@ public class TestinheritanceSwitch {
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case TestinheritancePackage.PARENT_ONE: {
+ ParentOne parentOne = (ParentOne)theEObject;
+ Object result = caseParentOne(parentOne);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestinheritancePackage.PARENT_TWO: {
+ ParentTwo parentTwo = (ParentTwo)theEObject;
+ Object result = caseParentTwo(parentTwo);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestinheritancePackage.PARENT_ZERO: {
+ ParentZero parentZero = (ParentZero)theEObject;
+ Object result = caseParentZero(parentZero);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestinheritancePackage.CHILD: {
+ Child child = (Child)theEObject;
+ Object result = caseChild(child);
+ if (result == null) result = caseParentZero(child);
+ if (result == null) result = caseParentTwo(child);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case TestinheritancePackage.CHILD2: {
+ Child2 child2 = (Child2)theEObject;
+ Object result = caseChild2(child2);
+ if (result == null) result = caseParentZero(child2);
+ if (result == null) result = caseParentOne(child2);
+ if (result == null) result = caseParentTwo(child2);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -178,6 +213,81 @@ public class TestinheritanceSwitch {
}
/**
+ * Returns the result of interpretting the object as an instance of '<em>Parent One</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 interpretting the object as an instance of '<em>Parent One</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseParentOne(ParentOne object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Parent Two</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 interpretting the object as an instance of '<em>Parent Two</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseParentTwo(ParentTwo object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Parent Zero</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 interpretting the object as an instance of '<em>Parent Zero</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseParentZero(ParentZero object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Child</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 interpretting the object as an instance of '<em>Child</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseChild(Child object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Child2</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 interpretting the object as an instance of '<em>Child2</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseChild2(Child2 object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpretting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;

Back to the top