Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/sample/inv/impl/InventoryPackageImpl.java')
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/sample/inv/impl/InventoryPackageImpl.java382
1 files changed, 382 insertions, 0 deletions
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/sample/inv/impl/InventoryPackageImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/sample/inv/impl/InventoryPackageImpl.java
new file mode 100644
index 000000000..25a90ed6b
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/sample/inv/impl/InventoryPackageImpl.java
@@ -0,0 +1,382 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: InventoryPackageImpl.java,v 1.1 2006/07/11 16:57:08 mtaal Exp $
+ */
+package org.eclipse.emf.teneo.samples.emf.sample.inv.impl;
+
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.teneo.samples.emf.sample.inv.InventoryFactory;
+import org.eclipse.emf.teneo.samples.emf.sample.inv.InventoryPackage;
+import org.eclipse.emf.teneo.samples.emf.sample.inv.PDeclaration;
+import org.eclipse.emf.teneo.samples.emf.sample.inv.PType;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class InventoryPackageImpl extends EPackageImpl implements InventoryPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass pTypeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass pDeclarationEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.emf.teneo.samples.emf.sample.inv.InventoryPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private InventoryPackageImpl() {
+ super(eNS_URI, InventoryFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this
+ * model, and for any others upon which it depends. Simple
+ * dependencies are satisfied by calling this method on all
+ * dependent packages before doing anything else. This method drives
+ * initialization for interdependent packages directly, in parallel
+ * with this package, itself.
+ * <p>Of this package and its interdependencies, all packages which
+ * have not yet been registered by their URI values are first created
+ * and registered. The packages are then initialized in two steps:
+ * meta-model objects for all of the packages are created before any
+ * are initialized, since one package's meta-model objects may refer to
+ * those of another.
+ * <p>Invocation of this method will not affect any packages that have
+ * already been initialized.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static InventoryPackage init() {
+ if (isInited) return (InventoryPackage)EPackage.Registry.INSTANCE.getEPackage(InventoryPackage.eNS_URI);
+
+ // Obtain or create and register package
+ InventoryPackageImpl theInventoryPackage = (InventoryPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof InventoryPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new InventoryPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theInventoryPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theInventoryPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theInventoryPackage.freeze();
+
+ return theInventoryPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPType() {
+ return pTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPType_Id() {
+ return (EAttribute)pTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPType_Name() {
+ return (EAttribute)pTypeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPType_Base() {
+ return (EReference)pTypeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPType_SubTypes() {
+ return (EReference)pTypeEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPType_SubNOTypes() {
+ return (EReference)pTypeEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPType_InfoReferences() {
+ return (EReference)pTypeEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPDeclaration() {
+ return pDeclarationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPDeclaration_Id() {
+ return (EAttribute)pDeclarationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPDeclaration_Name() {
+ return (EAttribute)pDeclarationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InventoryFactory getInventoryFactory() {
+ return (InventoryFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ pTypeEClass = createEClass(PTYPE);
+ createEAttribute(pTypeEClass, PTYPE__ID);
+ createEAttribute(pTypeEClass, PTYPE__NAME);
+ createEReference(pTypeEClass, PTYPE__BASE);
+ createEReference(pTypeEClass, PTYPE__SUB_TYPES);
+ createEReference(pTypeEClass, PTYPE__SUB_NO_TYPES);
+ createEReference(pTypeEClass, PTYPE__INFO_REFERENCES);
+
+ pDeclarationEClass = createEClass(PDECLARATION);
+ createEAttribute(pDeclarationEClass, PDECLARATION__ID);
+ createEAttribute(pDeclarationEClass, PDECLARATION__NAME);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Add supertypes to classes
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(pTypeEClass, PType.class, "PType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPType_Id(), ecorePackage.getELong(), "id", null, 0, 1, PType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getPType_Name(), ecorePackage.getEString(), "name", null, 0, 1, PType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPType_Base(), this.getPType(), this.getPType_SubTypes(), "base", null, 0, 1, PType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPType_SubTypes(), this.getPType(), this.getPType_Base(), "subTypes", null, 0, -1, PType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getPType_SubNOTypes(), this.getPType(), null, "subNOTypes", null, 0, -1, PType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getPType_InfoReferences(), this.getPDeclaration(), null, "infoReferences", "", 0, -1, PType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(pDeclarationEClass, PDeclaration.class, "PDeclaration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getPDeclaration_Id(), ecorePackage.getELong(), "id", null, 0, 1, PDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getPDeclaration_Name(), ecorePackage.getEString(), "name", null, 0, 1, PDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http://annotation.elver.org/SequenceGenerator
+ createSequenceGeneratorAnnotations();
+ // http://annotation.elver.org/Id
+ createIdAnnotations();
+ // http://annotation.elver.org/GeneratedValue
+ createGeneratedValueAnnotations();
+ // http://annotation.elver.org/Indexed
+ createIndexedAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://annotation.elver.org/SequenceGenerator</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createSequenceGeneratorAnnotations() {
+ String source = "http://annotation.elver.org/SequenceGenerator";
+ addAnnotation
+ (this,
+ source,
+ new String[] {
+ "name", "GENERATOR",
+ "sequenceName", "IDSEQUENCE"
+ });
+ }
+
+ /**
+ * Initializes the annotations for <b>http://annotation.elver.org/Id</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createIdAnnotations() {
+ String source = "http://annotation.elver.org/Id";
+ addAnnotation
+ (getPType_Id(),
+ source,
+ new String[] {
+ "appinfo", "true"
+ });
+ addAnnotation
+ (getPDeclaration_Id(),
+ source,
+ new String[] {
+ "appinfo", "true"
+ });
+ }
+
+ /**
+ * Initializes the annotations for <b>http://annotation.elver.org/GeneratedValue</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createGeneratedValueAnnotations() {
+ String source = "http://annotation.elver.org/GeneratedValue";
+ addAnnotation
+ (getPType_Id(),
+ source,
+ new String[] {
+ "appinfo", "true"
+ });
+ addAnnotation
+ (getPDeclaration_Id(),
+ source,
+ new String[] {
+ "appinfo", "true"
+ });
+ }
+
+ /**
+ * Initializes the annotations for <b>http://annotation.elver.org/Indexed</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createIndexedAnnotations() {
+ String source = "http://annotation.elver.org/Indexed";
+ addAnnotation
+ (getPType_SubTypes(),
+ source,
+ new String[] {
+ "value", "false"
+ });
+ addAnnotation
+ (getPType_SubNOTypes(),
+ source,
+ new String[] {
+ "value", "false"
+ });
+ addAnnotation
+ (getPType_InfoReferences(),
+ source,
+ new String[] {
+ "value", "false"
+ });
+ }
+
+} //InventoryPackageImpl

Back to the top