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/product/impl/ProductPackageImpl.java')
-rw-r--r--examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/sample/product/impl/ProductPackageImpl.java359
1 files changed, 359 insertions, 0 deletions
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/sample/product/impl/ProductPackageImpl.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/sample/product/impl/ProductPackageImpl.java
new file mode 100644
index 000000000..6cd038ded
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/sample/product/impl/ProductPackageImpl.java
@@ -0,0 +1,359 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: ProductPackageImpl.java,v 1.1 2006/07/11 16:57:10 mtaal Exp $
+ */
+package org.eclipse.emf.teneo.samples.emf.sample.product.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+
+import org.eclipse.emf.ecore.xml.type.impl.XMLTypePackageImpl;
+
+import org.eclipse.emf.teneo.samples.emf.sample.product.ProductFactory;
+import org.eclipse.emf.teneo.samples.emf.sample.product.ProductPackage;
+import org.eclipse.emf.teneo.samples.emf.sample.product.ProductType;
+import org.eclipse.emf.teneo.samples.emf.sample.product.SupplierType;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ProductPackageImpl extends EPackageImpl implements ProductPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass productTypeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass supplierTypeEClass = 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.product.ProductPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ProductPackageImpl() {
+ super(eNS_URI, ProductFactory.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 ProductPackage init() {
+ if (isInited) return (ProductPackage)EPackage.Registry.INSTANCE.getEPackage(ProductPackage.eNS_URI);
+
+ // Obtain or create and register package
+ ProductPackageImpl theProductPackage = (ProductPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof ProductPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ProductPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ XMLTypePackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theProductPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theProductPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theProductPackage.freeze();
+
+ return theProductPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getProductType() {
+ return productTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getProductType_Code() {
+ return (EAttribute)productTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getProductType_Id() {
+ return (EAttribute)productTypeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getProductType_Supplier() {
+ return (EReference)productTypeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getProductType_Price() {
+ return (EAttribute)productTypeEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getProductType_CreatedOn() {
+ return (EAttribute)productTypeEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getSupplierType() {
+ return supplierTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSupplierType_Name() {
+ return (EAttribute)supplierTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSupplierType_NoOfEmployees() {
+ return (EAttribute)supplierTypeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProductFactory getProductFactory() {
+ return (ProductFactory)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
+ productTypeEClass = createEClass(PRODUCT_TYPE);
+ createEAttribute(productTypeEClass, PRODUCT_TYPE__CODE);
+ createEAttribute(productTypeEClass, PRODUCT_TYPE__ID);
+ createEReference(productTypeEClass, PRODUCT_TYPE__SUPPLIER);
+ createEAttribute(productTypeEClass, PRODUCT_TYPE__PRICE);
+ createEAttribute(productTypeEClass, PRODUCT_TYPE__CREATED_ON);
+
+ supplierTypeEClass = createEClass(SUPPLIER_TYPE);
+ createEAttribute(supplierTypeEClass, SUPPLIER_TYPE__NAME);
+ createEAttribute(supplierTypeEClass, SUPPLIER_TYPE__NO_OF_EMPLOYEES);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
+
+ // Add supertypes to classes
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(productTypeEClass, ProductType.class, "ProductType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getProductType_Code(), theXMLTypePackage.getString(), "code", "c1", 1, 1, ProductType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getProductType_Id(), theXMLTypePackage.getID(), "id", null, 1, 1, ProductType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getProductType_Supplier(), this.getSupplierType(), null, "supplier", null, 1, 1, ProductType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getProductType_Price(), theXMLTypePackage.getDouble(), "price", null, 1, 1, ProductType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getProductType_CreatedOn(), theXMLTypePackage.getDate(), "createdOn", null, 1, 1, ProductType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(supplierTypeEClass, SupplierType.class, "SupplierType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSupplierType_Name(), theXMLTypePackage.getString(), "name", null, 1, 1, SupplierType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSupplierType_NoOfEmployees(), theXMLTypePackage.getInt(), "noOfEmployees", null, 1, 1, SupplierType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
+ createExtendedMetaDataAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createExtendedMetaDataAnnotations() {
+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
+ addAnnotation
+ (productTypeEClass,
+ source,
+ new String[] {
+ "name", "ProductType",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getProductType_Code(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "Code"
+ });
+ addAnnotation
+ (getProductType_Id(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "id"
+ });
+ addAnnotation
+ (getProductType_Supplier(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "Supplier"
+ });
+ addAnnotation
+ (getProductType_Price(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "Price"
+ });
+ addAnnotation
+ (getProductType_CreatedOn(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "CreatedOn"
+ });
+ addAnnotation
+ (supplierTypeEClass,
+ source,
+ new String[] {
+ "name", "SupplierType",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getSupplierType_Name(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "Name"
+ });
+ addAnnotation
+ (getSupplierType_NoOfEmployees(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "NoOfEmployees"
+ });
+ }
+
+} //ProductPackageImpl

Back to the top