/** * * Copyright 2005 The Apache Software Foundation or its licensors, as applicable. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tuscany.das.rdb.test.customer.impl; import org.apache.tuscany.das.rdb.test.customer.AnOrder; import org.apache.tuscany.das.rdb.test.customer.Customer; import org.apache.tuscany.das.rdb.test.customer.CustomerFactory; import org.apache.tuscany.das.rdb.test.customer.DataGraphRoot; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EFactory; 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; /** * * The Package for the model. * It contains accessors for the meta objects to represent * * * @see org.apache.tuscany.das.rdb.test.customer.CustomerFactory * @generated */ public class CustomerPackageImpl extends EPackageImpl { /** * The package name. * * * @generated */ public static final String eNAME = "customer"; /** * The package namespace URI. * * * @generated */ public static final String eNS_URI = "http:///org.apache.tuscany.das.rdb.test/customer.xsd"; /** * The package namespace name. * * * @generated */ public static final String eNS_PREFIX = "customer"; /** * The singleton instance of the package. * * * @generated */ public static final CustomerPackageImpl eINSTANCE = org.apache.tuscany.das.rdb.test.customer.impl.CustomerPackageImpl.init(); /** * The meta object id for the '{@link org.apache.tuscany.das.rdb.test.customer.impl.AnOrderImpl An Order}' class. * * * @see org.apache.tuscany.das.rdb.test.customer.impl.AnOrderImpl * @see org.apache.tuscany.das.rdb.test.customer.impl.CustomerPackageImpl#getAnOrder() * @generated */ public static final int AN_ORDER = 0; /** * The feature id for the 'ID' attribute. * * * @generated * @ordered */ public static final int AN_ORDER__ID = 0; /** * The feature id for the 'Product' attribute. * * * @generated * @ordered */ public static final int AN_ORDER__PRODUCT = 1; /** * The feature id for the 'Quantity' attribute. * * * @generated * @ordered */ public static final int AN_ORDER__QUANTITY = 2; /** * The feature id for the 'Customer ID' attribute. * * * @generated * @ordered */ public static final int AN_ORDER__CUSTOMER_ID = 3; /** * The number of structural features of the 'An Order' class. * * * @generated * @ordered */ public static final int AN_ORDER_FEATURE_COUNT = 4; /** * The meta object id for the '{@link org.apache.tuscany.das.rdb.test.customer.impl.CustomerImpl Customer}' class. * * * @see org.apache.tuscany.das.rdb.test.customer.impl.CustomerImpl * @see org.apache.tuscany.das.rdb.test.customer.impl.CustomerPackageImpl#getCustomer() * @generated */ public static final int CUSTOMER = 1; /** * The feature id for the 'ID' attribute. * * * @generated * @ordered */ public static final int CUSTOMER__ID = 0; /** * The feature id for the 'Last Name' attribute. * * * @generated * @ordered */ public static final int CUSTOMER__LAST_NAME = 1; /** * The feature id for the 'Address' attribute. * * * @generated * @ordered */ public static final int CUSTOMER__ADDRESS = 2; /** * The feature id for the 'Orders' containment reference list. * * * @generated * @ordered */ public static final int CUSTOMER__ORDERS = 3; /** * The number of structural features of the 'Customer' class. * * * @generated * @ordered */ public static final int CUSTOMER_FEATURE_COUNT = 4; /** * The meta object id for the '{@link org.apache.tuscany.das.rdb.test.customer.impl.DataGraphRootImpl Data Graph Root}' class. * * * @see org.apache.tuscany.das.rdb.test.customer.impl.DataGraphRootImpl * @see org.apache.tuscany.das.rdb.test.customer.impl.CustomerPackageImpl#getDataGraphRoot() * @generated */ public static final int DATA_GRAPH_ROOT = 2; /** * The feature id for the 'Customers' containment reference list. * * * @generated * @ordered */ public static final int DATA_GRAPH_ROOT__CUSTOMERS = 0; /** * The feature id for the 'Orders' containment reference list. * * * @generated * @ordered */ public static final int DATA_GRAPH_ROOT__ORDERS = 1; /** * The number of structural features of the 'Data Graph Root' class. * * * @generated * @ordered */ public static final int DATA_GRAPH_ROOT_FEATURE_COUNT = 2; /** * * * @generated */ private EClass anOrderEClass = null; /** * * * @generated */ private EClass customerEClass = null; /** * * * @generated */ private EClass dataGraphRootEClass = null; /** * Creates an instance of the model Package, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package * package URI value. *

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. * * * @see org.eclipse.emf.ecore.EPackage.Registry * @see org.apache.tuscany.das.rdb.test.customer.impl.CustomerPackageImpl#eNS_URI * @see #init() * @generated */ private CustomerPackageImpl() { super(eNS_URI, ((EFactory)CustomerFactory.INSTANCE)); } /** * * * @generated */ private static boolean isInited = false; /** * Creates, registers, and initializes the Package 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. *

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. *

Invocation of this method will not affect any packages that have * already been initialized. * * * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static CustomerPackageImpl init() { if (isInited) return (CustomerPackageImpl)EPackage.Registry.INSTANCE.getEPackage(CustomerPackageImpl.eNS_URI); // Obtain or create and register package CustomerPackageImpl theCustomerPackageImpl = (CustomerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof CustomerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new CustomerPackageImpl()); isInited = true; // Initialize simple dependencies XMLTypePackage.eINSTANCE.eClass(); // Create package meta-data objects theCustomerPackageImpl.createPackageContents(); // Initialize created meta-data theCustomerPackageImpl.initializePackageContents(); // Mark meta-data to indicate it can't be changed theCustomerPackageImpl.freeze(); return theCustomerPackageImpl; } /** * Returns the meta object for class '{@link org.apache.tuscany.das.rdb.test.customer.AnOrder An Order}'. * * * @return the meta object for class 'An Order'. * @see org.apache.tuscany.das.rdb.test.customer.AnOrder * @generated */ public EClass getAnOrder() { return anOrderEClass; } /** * Returns the meta object for the attribute '{@link org.apache.tuscany.das.rdb.test.customer.AnOrder#getID ID}'. * * * @return the meta object for the attribute 'ID'. * @see org.apache.tuscany.das.rdb.test.customer.AnOrder#getID() * @see #getAnOrder() * @generated */ public EAttribute getAnOrder_ID() { return (EAttribute)anOrderEClass.getEStructuralFeatures().get(0); } /** * Returns the meta object for the attribute '{@link org.apache.tuscany.das.rdb.test.customer.AnOrder#getProduct Product}'. * * * @return the meta object for the attribute 'Product'. * @see org.apache.tuscany.das.rdb.test.customer.AnOrder#getProduct() * @see #getAnOrder() * @generated */ public EAttribute getAnOrder_Product() { return (EAttribute)anOrderEClass.getEStructuralFeatures().get(1); } /** * Returns the meta object for the attribute '{@link org.apache.tuscany.das.rdb.test.customer.AnOrder#getQuantity Quantity}'. * * * @return the meta object for the attribute 'Quantity'. * @see org.apache.tuscany.das.rdb.test.customer.AnOrder#getQuantity() * @see #getAnOrder() * @generated */ public EAttribute getAnOrder_Quantity() { return (EAttribute)anOrderEClass.getEStructuralFeatures().get(2); } /** * Returns the meta object for the attribute '{@link org.apache.tuscany.das.rdb.test.customer.AnOrder#getCustomerID Customer ID}'. * * * @return the meta object for the attribute 'Customer ID'. * @see org.apache.tuscany.das.rdb.test.customer.AnOrder#getCustomerID() * @see #getAnOrder() * @generated */ public EAttribute getAnOrder_CustomerID() { return (EAttribute)anOrderEClass.getEStructuralFeatures().get(3); } /** * Returns the meta object for class '{@link org.apache.tuscany.das.rdb.test.customer.Customer Customer}'. * * * @return the meta object for class 'Customer'. * @see org.apache.tuscany.das.rdb.test.customer.Customer * @generated */ public EClass getCustomer() { return customerEClass; } /** * Returns the meta object for the attribute '{@link org.apache.tuscany.das.rdb.test.customer.Customer#getID ID}'. * * * @return the meta object for the attribute 'ID'. * @see org.apache.tuscany.das.rdb.test.customer.Customer#getID() * @see #getCustomer() * @generated */ public EAttribute getCustomer_ID() { return (EAttribute)customerEClass.getEStructuralFeatures().get(0); } /** * Returns the meta object for the attribute '{@link org.apache.tuscany.das.rdb.test.customer.Customer#getLastName Last Name}'. * * * @return the meta object for the attribute 'Last Name'. * @see org.apache.tuscany.das.rdb.test.customer.Customer#getLastName() * @see #getCustomer() * @generated */ public EAttribute getCustomer_LastName() { return (EAttribute)customerEClass.getEStructuralFeatures().get(1); } /** * Returns the meta object for the attribute '{@link org.apache.tuscany.das.rdb.test.customer.Customer#getAddress Address}'. * * * @return the meta object for the attribute 'Address'. * @see org.apache.tuscany.das.rdb.test.customer.Customer#getAddress() * @see #getCustomer() * @generated */ public EAttribute getCustomer_Address() { return (EAttribute)customerEClass.getEStructuralFeatures().get(2); } /** * Returns the meta object for the containment reference list '{@link org.apache.tuscany.das.rdb.test.customer.Customer#getOrders Orders}'. * * * @return the meta object for the containment reference list 'Orders'. * @see org.apache.tuscany.das.rdb.test.customer.Customer#getOrders() * @see #getCustomer() * @generated */ public EReference getCustomer_Orders() { return (EReference)customerEClass.getEStructuralFeatures().get(3); } /** * Returns the meta object for class '{@link org.apache.tuscany.das.rdb.test.customer.DataGraphRoot Data Graph Root}'. * * * @return the meta object for class 'Data Graph Root'. * @see org.apache.tuscany.das.rdb.test.customer.DataGraphRoot * @generated */ public EClass getDataGraphRoot() { return dataGraphRootEClass; } /** * Returns the meta object for the containment reference list '{@link org.apache.tuscany.das.rdb.test.customer.DataGraphRoot#getCustomers Customers}'. * * * @return the meta object for the containment reference list 'Customers'. * @see org.apache.tuscany.das.rdb.test.customer.DataGraphRoot#getCustomers() * @see #getDataGraphRoot() * @generated */ public EReference getDataGraphRoot_Customers() { return (EReference)dataGraphRootEClass.getEStructuralFeatures().get(0); } /** * Returns the meta object for the containment reference list '{@link org.apache.tuscany.das.rdb.test.customer.DataGraphRoot#getOrders Orders}'. * * * @return the meta object for the containment reference list 'Orders'. * @see org.apache.tuscany.das.rdb.test.customer.DataGraphRoot#getOrders() * @see #getDataGraphRoot() * @generated */ public EReference getDataGraphRoot_Orders() { return (EReference)dataGraphRootEClass.getEStructuralFeatures().get(1); } /** * Returns the factory that creates the instances of the model. * * * @return the factory that creates the instances of the model. * @generated */ public CustomerFactory getCustomerFactory() { return (CustomerFactory)getEFactoryInstance(); } /** * * * @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. * * * @generated */ public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features anOrderEClass = createEClass(AN_ORDER); createEAttribute(anOrderEClass, AN_ORDER__ID); createEAttribute(anOrderEClass, AN_ORDER__PRODUCT); createEAttribute(anOrderEClass, AN_ORDER__QUANTITY); createEAttribute(anOrderEClass, AN_ORDER__CUSTOMER_ID); customerEClass = createEClass(CUSTOMER); createEAttribute(customerEClass, CUSTOMER__ID); createEAttribute(customerEClass, CUSTOMER__LAST_NAME); createEAttribute(customerEClass, CUSTOMER__ADDRESS); createEReference(customerEClass, CUSTOMER__ORDERS); dataGraphRootEClass = createEClass(DATA_GRAPH_ROOT); createEReference(dataGraphRootEClass, DATA_GRAPH_ROOT__CUSTOMERS); createEReference(dataGraphRootEClass, DATA_GRAPH_ROOT__ORDERS); } /** * * * @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. * * * @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(anOrderEClass, AnOrder.class, "AnOrder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getAnOrder_ID(), theXMLTypePackage.getInt(), "iD", null, 1, 1, AnOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getAnOrder_Product(), theXMLTypePackage.getString(), "product", null, 1, 1, AnOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getAnOrder_Quantity(), theXMLTypePackage.getInt(), "quantity", null, 1, 1, AnOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getAnOrder_CustomerID(), theXMLTypePackage.getInt(), "customerID", null, 1, 1, AnOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(customerEClass, Customer.class, "Customer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getCustomer_ID(), theXMLTypePackage.getInt(), "iD", null, 1, 1, Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getCustomer_LastName(), theXMLTypePackage.getString(), "lastName", null, 1, 1, Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getCustomer_Address(), theXMLTypePackage.getString(), "address", null, 1, 1, Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getCustomer_Orders(), this.getAnOrder(), null, "orders", null, 1, -1, Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(dataGraphRootEClass, DataGraphRoot.class, "DataGraphRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getDataGraphRoot_Customers(), this.getCustomer(), null, "customers", null, 0, -1, DataGraphRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getDataGraphRoot_Orders(), this.getAnOrder(), null, "orders", null, 0, -1, DataGraphRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, 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 http:///org/eclipse/emf/ecore/util/ExtendedMetaData. * * * @generated */ protected void createExtendedMetaDataAnnotations() { String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; addAnnotation (anOrderEClass, source, new String[] { "name", "AnOrder", "kind", "elementOnly" }); addAnnotation (getAnOrder_ID(), source, new String[] { "kind", "element", "name", "ID" }); addAnnotation (getAnOrder_Product(), source, new String[] { "kind", "element", "name", "Product" }); addAnnotation (getAnOrder_Quantity(), source, new String[] { "kind", "element", "name", "Quantity" }); addAnnotation (getAnOrder_CustomerID(), source, new String[] { "kind", "element", "name", "Customer_ID" }); addAnnotation (customerEClass, source, new String[] { "name", "Customer", "kind", "elementOnly" }); addAnnotation (getCustomer_ID(), source, new String[] { "kind", "element", "name", "ID" }); addAnnotation (getCustomer_LastName(), source, new String[] { "kind", "element", "name", "lastName" }); addAnnotation (getCustomer_Address(), source, new String[] { "kind", "element", "name", "address" }); addAnnotation (getCustomer_Orders(), source, new String[] { "kind", "element", "name", "orders" }); addAnnotation (dataGraphRootEClass, source, new String[] { "name", "DataGraphRoot", "kind", "elementOnly" }); addAnnotation (getDataGraphRoot_Customers(), source, new String[] { "kind", "element", "name", "customers" }); addAnnotation (getDataGraphRoot_Orders(), source, new String[] { "kind", "element", "name", "orders" }); } /** * * Defines literals for the meta objects that represent *

* * @generated */ public interface Literals { /** * The meta object literal for the '{@link org.apache.tuscany.das.rdb.test.customer.impl.AnOrderImpl An Order}' class. * * * @see org.apache.tuscany.das.rdb.test.customer.impl.AnOrderImpl * @see org.apache.tuscany.das.rdb.test.customer.impl.CustomerPackageImpl#getAnOrder() * @generated */ public static final EClass AN_ORDER = eINSTANCE.getAnOrder(); /** * The meta object literal for the 'ID' attribute feature. * * * @generated */ public static final EAttribute AN_ORDER__ID = eINSTANCE.getAnOrder_ID(); /** * The meta object literal for the 'Product' attribute feature. * * * @generated */ public static final EAttribute AN_ORDER__PRODUCT = eINSTANCE.getAnOrder_Product(); /** * The meta object literal for the 'Quantity' attribute feature. * * * @generated */ public static final EAttribute AN_ORDER__QUANTITY = eINSTANCE.getAnOrder_Quantity(); /** * The meta object literal for the 'Customer ID' attribute feature. * * * @generated */ public static final EAttribute AN_ORDER__CUSTOMER_ID = eINSTANCE.getAnOrder_CustomerID(); /** * The meta object literal for the '{@link org.apache.tuscany.das.rdb.test.customer.impl.CustomerImpl Customer}' class. * * * @see org.apache.tuscany.das.rdb.test.customer.impl.CustomerImpl * @see org.apache.tuscany.das.rdb.test.customer.impl.CustomerPackageImpl#getCustomer() * @generated */ public static final EClass CUSTOMER = eINSTANCE.getCustomer(); /** * The meta object literal for the 'ID' attribute feature. * * * @generated */ public static final EAttribute CUSTOMER__ID = eINSTANCE.getCustomer_ID(); /** * The meta object literal for the 'Last Name' attribute feature. * * * @generated */ public static final EAttribute CUSTOMER__LAST_NAME = eINSTANCE.getCustomer_LastName(); /** * The meta object literal for the 'Address' attribute feature. * * * @generated */ public static final EAttribute CUSTOMER__ADDRESS = eINSTANCE.getCustomer_Address(); /** * The meta object literal for the 'Orders' containment reference list feature. * * * @generated */ public static final EReference CUSTOMER__ORDERS = eINSTANCE.getCustomer_Orders(); /** * The meta object literal for the '{@link org.apache.tuscany.das.rdb.test.customer.impl.DataGraphRootImpl Data Graph Root}' class. * * * @see org.apache.tuscany.das.rdb.test.customer.impl.DataGraphRootImpl * @see org.apache.tuscany.das.rdb.test.customer.impl.CustomerPackageImpl#getDataGraphRoot() * @generated */ public static final EClass DATA_GRAPH_ROOT = eINSTANCE.getDataGraphRoot(); /** * The meta object literal for the 'Customers' containment reference list feature. * * * @generated */ public static final EReference DATA_GRAPH_ROOT__CUSTOMERS = eINSTANCE.getDataGraphRoot_Customers(); /** * The meta object literal for the 'Orders' containment reference list feature. * * * @generated */ public static final EReference DATA_GRAPH_ROOT__ORDERS = eINSTANCE.getDataGraphRoot_Orders(); } } //CustomerPackageImpl