/** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 com.example.simple.impl; import com.example.simple.Quote; import com.example.simple.SimpleFactory; 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 com.example.simple.SimpleFactory * @generated */ public class SimplePackageImpl extends EPackageImpl { /** * The package name. * * * @generated */ public static final String eNAME = "simple"; /** * The package namespace URI. * * * @generated */ public static final String eNS_URI = "http://www.example.com/simple"; /** * The package namespace name. * * * @generated */ public static final String eNS_PREFIX = "simple"; /** * The singleton instance of the package. * * * @generated */ public static final SimplePackageImpl eINSTANCE = com.example.simple.impl.SimplePackageImpl.init(); /** * The meta object id for the '{@link com.example.simple.impl.DocumentRootImpl Document Root}' class. * * * @see com.example.simple.impl.DocumentRootImpl * @see com.example.simple.impl.SimplePackageImpl#getDocumentRoot() * @generated */ public static final int DOCUMENT_ROOT = 0; /** * The feature id for the 'Mixed' attribute list. * * * @generated * @ordered */ public static final int DOCUMENT_ROOT__MIXED = 0; /** * The feature id for the 'XMLNS Prefix Map' map. * * * @generated * @ordered */ public static final int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1; /** * The feature id for the 'XSI Schema Location' map. * * * @generated * @ordered */ public static final int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2; /** * The feature id for the 'Stock Quote' containment reference. * * * @generated * @ordered */ public static final int DOCUMENT_ROOT__STOCK_QUOTE = 3; /** * The number of structural features of the 'Document Root' class. * * * @generated * @ordered */ public static final int DOCUMENT_ROOT_FEATURE_COUNT = 4; /** * The meta object id for the '{@link com.example.simple.impl.QuoteImpl Quote}' class. * * * @see com.example.simple.impl.QuoteImpl * @see com.example.simple.impl.SimplePackageImpl#getQuote() * @generated */ public static final int QUOTE = 1; /** * The feature id for the 'Symbol' attribute. * * * @generated * @ordered */ public static final int QUOTE__SYMBOL = 0; /** * The feature id for the 'Company Name' attribute. * * * @generated * @ordered */ public static final int QUOTE__COMPANY_NAME = 1; /** * The feature id for the 'Price' attribute. * * * @generated * @ordered */ public static final int QUOTE__PRICE = 2; /** * The feature id for the 'Open1' attribute. * * * @generated * @ordered */ public static final int QUOTE__OPEN1 = 3; /** * The feature id for the 'High' attribute. * * * @generated * @ordered */ public static final int QUOTE__HIGH = 4; /** * The feature id for the 'Low' attribute. * * * @generated * @ordered */ public static final int QUOTE__LOW = 5; /** * The feature id for the 'Volume' attribute. * * * @generated * @ordered */ public static final int QUOTE__VOLUME = 6; /** * The feature id for the 'Change1' attribute. * * * @generated * @ordered */ public static final int QUOTE__CHANGE1 = 7; /** * The feature id for the 'Quotes' containment reference list. * * * @generated * @ordered */ public static final int QUOTE__QUOTES = 8; /** * The number of structural features of the 'Quote' class. * * * @generated * @ordered */ public static final int QUOTE_FEATURE_COUNT = 9; /** * * * @generated */ private EClass documentRootEClass = null; /** * * * @generated */ private EClass quoteEClass = 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 com.example.simple.impl.SimplePackageImpl#eNS_URI * @see #init() * @generated */ private SimplePackageImpl() { super(eNS_URI, ((EFactory)SimpleFactory.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 SimplePackageImpl init() { if (isInited) return (SimplePackageImpl)EPackage.Registry.INSTANCE.getEPackage(SimplePackageImpl.eNS_URI); // Obtain or create and register package SimplePackageImpl theSimplePackageImpl = (SimplePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof SimplePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new SimplePackageImpl()); isInited = true; // Initialize simple dependencies XMLTypePackage.eINSTANCE.eClass(); // Create package meta-data objects theSimplePackageImpl.createPackageContents(); // Initialize created meta-data theSimplePackageImpl.initializePackageContents(); // Mark meta-data to indicate it can't be changed theSimplePackageImpl.freeze(); return theSimplePackageImpl; } /** * Returns the meta object for class '{@link org.eclipse.emf.ecore.EObject Document Root}'. * * * @return the meta object for class 'Document Root'. * @see org.eclipse.emf.ecore.EObject * @generated */ public EClass getDocumentRoot() { return documentRootEClass; } /** * Returns the meta object for the attribute list '{@link org.eclipse.emf.ecore.EObject#getMixed Mixed}'. * * * @return the meta object for the attribute list 'Mixed'. * @see org.eclipse.emf.ecore.EObject#getMixed() * @see #getDocumentRoot() * @generated */ public EAttribute getDocumentRoot_Mixed() { return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0); } /** * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap XMLNS Prefix Map}'. * * * @return the meta object for the map 'XMLNS Prefix Map'. * @see org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap() * @see #getDocumentRoot() * @generated */ public EReference getDocumentRoot_XMLNSPrefixMap() { return (EReference)documentRootEClass.getEStructuralFeatures().get(1); } /** * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXSISchemaLocation XSI Schema Location}'. * * * @return the meta object for the map 'XSI Schema Location'. * @see org.eclipse.emf.ecore.EObject#getXSISchemaLocation() * @see #getDocumentRoot() * @generated */ public EReference getDocumentRoot_XSISchemaLocation() { return (EReference)documentRootEClass.getEStructuralFeatures().get(2); } /** * Returns the meta object for the containment reference '{@link org.eclipse.emf.ecore.EObject#getStockQuote Stock Quote}'. * * * @return the meta object for the containment reference 'Stock Quote'. * @see org.eclipse.emf.ecore.EObject#getStockQuote() * @see #getDocumentRoot() * @generated */ public EReference getDocumentRoot_StockQuote() { return (EReference)documentRootEClass.getEStructuralFeatures().get(3); } /** * Returns the meta object for class '{@link com.example.simple.Quote Quote}'. * * * @return the meta object for class 'Quote'. * @see com.example.simple.Quote * @generated */ public EClass getQuote() { return quoteEClass; } /** * Returns the meta object for the attribute '{@link com.example.simple.Quote#getSymbol Symbol}'. * * * @return the meta object for the attribute 'Symbol'. * @see com.example.simple.Quote#getSymbol() * @see #getQuote() * @generated */ public EAttribute getQuote_Symbol() { return (EAttribute)quoteEClass.getEStructuralFeatures().get(0); } /** * Returns the meta object for the attribute '{@link com.example.simple.Quote#getCompanyName Company Name}'. * * * @return the meta object for the attribute 'Company Name'. * @see com.example.simple.Quote#getCompanyName() * @see #getQuote() * @generated */ public EAttribute getQuote_CompanyName() { return (EAttribute)quoteEClass.getEStructuralFeatures().get(1); } /** * Returns the meta object for the attribute '{@link com.example.simple.Quote#getPrice Price}'. * * * @return the meta object for the attribute 'Price'. * @see com.example.simple.Quote#getPrice() * @see #getQuote() * @generated */ public EAttribute getQuote_Price() { return (EAttribute)quoteEClass.getEStructuralFeatures().get(2); } /** * Returns the meta object for the attribute '{@link com.example.simple.Quote#getOpen1 Open1}'. * * * @return the meta object for the attribute 'Open1'. * @see com.example.simple.Quote#getOpen1() * @see #getQuote() * @generated */ public EAttribute getQuote_Open1() { return (EAttribute)quoteEClass.getEStructuralFeatures().get(3); } /** * Returns the meta object for the attribute '{@link com.example.simple.Quote#getHigh High}'. * * * @return the meta object for the attribute 'High'. * @see com.example.simple.Quote#getHigh() * @see #getQuote() * @generated */ public EAttribute getQuote_High() { return (EAttribute)quoteEClass.getEStructuralFeatures().get(4); } /** * Returns the meta object for the attribute '{@link com.example.simple.Quote#getLow Low}'. * * * @return the meta object for the attribute 'Low'. * @see com.example.simple.Quote#getLow() * @see #getQuote() * @generated */ public EAttribute getQuote_Low() { return (EAttribute)quoteEClass.getEStructuralFeatures().get(5); } /** * Returns the meta object for the attribute '{@link com.example.simple.Quote#getVolume Volume}'. * * * @return the meta object for the attribute 'Volume'. * @see com.example.simple.Quote#getVolume() * @see #getQuote() * @generated */ public EAttribute getQuote_Volume() { return (EAttribute)quoteEClass.getEStructuralFeatures().get(6); } /** * Returns the meta object for the attribute '{@link com.example.simple.Quote#getChange1 Change1}'. * * * @return the meta object for the attribute 'Change1'. * @see com.example.simple.Quote#getChange1() * @see #getQuote() * @generated */ public EAttribute getQuote_Change1() { return (EAttribute)quoteEClass.getEStructuralFeatures().get(7); } /** * Returns the meta object for the containment reference list '{@link com.example.simple.Quote#getQuotes Quotes}'. * * * @return the meta object for the containment reference list 'Quotes'. * @see com.example.simple.Quote#getQuotes() * @see #getQuote() * @generated */ public EReference getQuote_Quotes() { return (EReference)quoteEClass.getEStructuralFeatures().get(8); } /** * Returns the factory that creates the instances of the model. * * * @return the factory that creates the instances of the model. * @generated */ public SimpleFactory getSimpleFactory() { return (SimpleFactory)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 documentRootEClass = createEClass(DOCUMENT_ROOT); createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED); createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP); createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); createEReference(documentRootEClass, DOCUMENT_ROOT__STOCK_QUOTE); quoteEClass = createEClass(QUOTE); createEAttribute(quoteEClass, QUOTE__SYMBOL); createEAttribute(quoteEClass, QUOTE__COMPANY_NAME); createEAttribute(quoteEClass, QUOTE__PRICE); createEAttribute(quoteEClass, QUOTE__OPEN1); createEAttribute(quoteEClass, QUOTE__HIGH); createEAttribute(quoteEClass, QUOTE__LOW); createEAttribute(quoteEClass, QUOTE__VOLUME); createEAttribute(quoteEClass, QUOTE__CHANGE1); createEReference(quoteEClass, QUOTE__QUOTES); } /** * * * @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(documentRootEClass, null, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); initEAttribute(getDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(), "mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getDocumentRoot_XMLNSPrefixMap(), ecorePackage.getEStringToStringMapEntry(), null, "xMLNSPrefixMap", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getDocumentRoot_StockQuote(), this.getQuote(), null, "stockQuote", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); initEClass(quoteEClass, Quote.class, "Quote", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getQuote_Symbol(), theXMLTypePackage.getString(), "symbol", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getQuote_CompanyName(), theXMLTypePackage.getString(), "companyName", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getQuote_Price(), theXMLTypePackage.getDecimal(), "price", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getQuote_Open1(), theXMLTypePackage.getDecimal(), "open1", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getQuote_High(), theXMLTypePackage.getDecimal(), "high", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getQuote_Low(), theXMLTypePackage.getDecimal(), "low", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getQuote_Volume(), theXMLTypePackage.getDouble(), "volume", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getQuote_Change1(), theXMLTypePackage.getDouble(), "change1", null, 1, 1, Quote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getQuote_Quotes(), this.getQuote(), null, "quotes", null, 0, -1, Quote.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 (documentRootEClass, source, new String[] { "name", "", "kind", "mixed" }); addAnnotation (getDocumentRoot_Mixed(), source, new String[] { "kind", "elementWildcard", "name", ":mixed" }); addAnnotation (getDocumentRoot_XMLNSPrefixMap(), source, new String[] { "kind", "attribute", "name", "xmlns:prefix" }); addAnnotation (getDocumentRoot_XSISchemaLocation(), source, new String[] { "kind", "attribute", "name", "xsi:schemaLocation" }); addAnnotation (getDocumentRoot_StockQuote(), source, new String[] { "kind", "element", "name", "stockQuote", "namespace", "##targetNamespace" }); addAnnotation (quoteEClass, source, new String[] { "name", "Quote", "kind", "elementOnly" }); addAnnotation (getQuote_Symbol(), source, new String[] { "kind", "element", "name", "symbol" }); addAnnotation (getQuote_CompanyName(), source, new String[] { "kind", "element", "name", "companyName" }); addAnnotation (getQuote_Price(), source, new String[] { "kind", "element", "name", "price" }); addAnnotation (getQuote_Open1(), source, new String[] { "kind", "element", "name", "open1" }); addAnnotation (getQuote_High(), source, new String[] { "kind", "element", "name", "high" }); addAnnotation (getQuote_Low(), source, new String[] { "kind", "element", "name", "low" }); addAnnotation (getQuote_Volume(), source, new String[] { "kind", "element", "name", "volume" }); addAnnotation (getQuote_Change1(), source, new String[] { "kind", "element", "name", "change1" }); addAnnotation (getQuote_Quotes(), source, new String[] { "kind", "element", "name", "quotes" }); } /** * * Defines literals for the meta objects that represent *

* * @generated */ public interface Literals { /** * The meta object literal for the '{@link com.example.simple.impl.DocumentRootImpl Document Root}' class. * * * @see com.example.simple.impl.DocumentRootImpl * @see com.example.simple.impl.SimplePackageImpl#getDocumentRoot() * @generated */ public static final EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot(); /** * The meta object literal for the 'Mixed' attribute list feature. * * * @generated */ public static final EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed(); /** * The meta object literal for the 'XMLNS Prefix Map' map feature. * * * @generated */ public static final EReference DOCUMENT_ROOT__XMLNS_PREFIX_MAP = eINSTANCE.getDocumentRoot_XMLNSPrefixMap(); /** * The meta object literal for the 'XSI Schema Location' map feature. * * * @generated */ public static final EReference DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = eINSTANCE.getDocumentRoot_XSISchemaLocation(); /** * The meta object literal for the 'Stock Quote' containment reference feature. * * * @generated */ public static final EReference DOCUMENT_ROOT__STOCK_QUOTE = eINSTANCE.getDocumentRoot_StockQuote(); /** * The meta object literal for the '{@link com.example.simple.impl.QuoteImpl Quote}' class. * * * @see com.example.simple.impl.QuoteImpl * @see com.example.simple.impl.SimplePackageImpl#getQuote() * @generated */ public static final EClass QUOTE = eINSTANCE.getQuote(); /** * The meta object literal for the 'Symbol' attribute feature. * * * @generated */ public static final EAttribute QUOTE__SYMBOL = eINSTANCE.getQuote_Symbol(); /** * The meta object literal for the 'Company Name' attribute feature. * * * @generated */ public static final EAttribute QUOTE__COMPANY_NAME = eINSTANCE.getQuote_CompanyName(); /** * The meta object literal for the 'Price' attribute feature. * * * @generated */ public static final EAttribute QUOTE__PRICE = eINSTANCE.getQuote_Price(); /** * The meta object literal for the 'Open1' attribute feature. * * * @generated */ public static final EAttribute QUOTE__OPEN1 = eINSTANCE.getQuote_Open1(); /** * The meta object literal for the 'High' attribute feature. * * * @generated */ public static final EAttribute QUOTE__HIGH = eINSTANCE.getQuote_High(); /** * The meta object literal for the 'Low' attribute feature. * * * @generated */ public static final EAttribute QUOTE__LOW = eINSTANCE.getQuote_Low(); /** * The meta object literal for the 'Volume' attribute feature. * * * @generated */ public static final EAttribute QUOTE__VOLUME = eINSTANCE.getQuote_Volume(); /** * The meta object literal for the 'Change1' attribute feature. * * * @generated */ public static final EAttribute QUOTE__CHANGE1 = eINSTANCE.getQuote_Change1(); /** * The meta object literal for the 'Quotes' containment reference list feature. * * * @generated */ public static final EReference QUOTE__QUOTES = eINSTANCE.getQuote_Quotes(); } } //SimplePackageImpl