/** * * 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 org.apache.tuscany.sdo.util.metadata.impl; import org.apache.tuscany.sdo.impl.SDOPackageImpl; import org.apache.tuscany.sdo.model.impl.ModelPackageImpl; import org.apache.tuscany.sdo.util.metadata.JavaMetaData; import org.apache.tuscany.sdo.util.metadata.MetadataFactory; import org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup; import org.apache.tuscany.sdo.util.metadata.TypeMetaData; import org.apache.tuscany.sdo.util.metadata.XSDMetaData; 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; /** * * The Package for the model. * It contains accessors for the meta objects to represent *
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.sdo.util.metadata.impl.MetadataPackageImpl#eNS_URI * @see #init() * @generated */ private MetadataPackageImpl() { super(eNS_URI, ((EFactory)MetadataFactory.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 MetadataPackageImpl init() { if (isInited) return (MetadataPackageImpl)EPackage.Registry.INSTANCE.getEPackage(MetadataPackageImpl.eNS_URI); // Obtain or create and register package MetadataPackageImpl theMetadataPackageImpl = (MetadataPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof MetadataPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new MetadataPackageImpl()); isInited = true; // Initialize simple dependencies SDOPackageImpl.eINSTANCE.eClass(); ModelPackageImpl.eINSTANCE.eClass(); // Create package meta-data objects theMetadataPackageImpl.createPackageContents(); // Initialize created meta-data theMetadataPackageImpl.initializePackageContents(); // Mark meta-data to indicate it can't be changed theMetadataPackageImpl.freeze(); return theMetadataPackageImpl; } /** * 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#getSdoMetaDataGroup Sdo Meta Data Group}'. * * * @return the meta object for the containment reference 'Sdo Meta Data Group'. * @see org.eclipse.emf.ecore.EObject#getSdoMetaDataGroup() * @see #getDocumentRoot() * @generated */ public EReference getDocumentRoot_SdoMetaDataGroup() { return (EReference)documentRootEClass.getEStructuralFeatures().get(3); } /** * Returns the meta object for class '{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData Java Meta Data}'. * * * @return the meta object for class 'Java Meta Data'. * @see org.apache.tuscany.sdo.util.metadata.JavaMetaData * @generated */ public EClass getJavaMetaData() { return javaMetaDataEClass; } /** * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getFactoryInterface Factory Interface}'. * * * @return the meta object for the attribute 'Factory Interface'. * @see org.apache.tuscany.sdo.util.metadata.JavaMetaData#getFactoryInterface() * @see #getJavaMetaData() * @generated */ public EAttribute getJavaMetaData_FactoryInterface() { return (EAttribute)javaMetaDataEClass.getEStructuralFeatures().get(0); } /** * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.util.metadata.JavaMetaData#getTypeInterface Type Interface}'. * * * @return the meta object for the attribute 'Type Interface'. * @see org.apache.tuscany.sdo.util.metadata.JavaMetaData#getTypeInterface() * @see #getJavaMetaData() * @generated */ public EAttribute getJavaMetaData_TypeInterface() { return (EAttribute)javaMetaDataEClass.getEStructuralFeatures().get(1); } /** * Returns the meta object for class '{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup SDO Meta Data Group}'. * * * @return the meta object for class 'SDO Meta Data Group'. * @see org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup * @generated */ public EClass getSDOMetaDataGroup() { return sdoMetaDataGroupEClass; } /** * Returns the meta object for the containment reference list '{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getJavaMetaData Java Meta Data}'. * * * @return the meta object for the containment reference list 'Java Meta Data'. * @see org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getJavaMetaData() * @see #getSDOMetaDataGroup() * @generated */ public EReference getSDOMetaDataGroup_JavaMetaData() { return (EReference)sdoMetaDataGroupEClass.getEStructuralFeatures().get(0); } /** * Returns the meta object for the containment reference list '{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getXsdMetaData Xsd Meta Data}'. * * * @return the meta object for the containment reference list 'Xsd Meta Data'. * @see org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getXsdMetaData() * @see #getSDOMetaDataGroup() * @generated */ public EReference getSDOMetaDataGroup_XsdMetaData() { return (EReference)sdoMetaDataGroupEClass.getEStructuralFeatures().get(1); } /** * Returns the meta object for the containment reference list '{@link org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getTypeMetaData Type Meta Data}'. * * * @return the meta object for the containment reference list 'Type Meta Data'. * @see org.apache.tuscany.sdo.util.metadata.SDOMetaDataGroup#getTypeMetaData() * @see #getSDOMetaDataGroup() * @generated */ public EReference getSDOMetaDataGroup_TypeMetaData() { return (EReference)sdoMetaDataGroupEClass.getEStructuralFeatures().get(2); } /** * Returns the meta object for class '{@link org.apache.tuscany.sdo.util.metadata.TypeMetaData Type Meta Data}'. * * * @return the meta object for class 'Type Meta Data'. * @see org.apache.tuscany.sdo.util.metadata.TypeMetaData * @generated */ public EClass getTypeMetaData() { return typeMetaDataEClass; } /** * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.util.metadata.TypeMetaData#getLocation Location}'. * * * @return the meta object for the attribute 'Location'. * @see org.apache.tuscany.sdo.util.metadata.TypeMetaData#getLocation() * @see #getTypeMetaData() * @generated */ public EAttribute getTypeMetaData_Location() { return (EAttribute)typeMetaDataEClass.getEStructuralFeatures().get(0); } /** * Returns the meta object for class '{@link org.apache.tuscany.sdo.util.metadata.XSDMetaData XSD Meta Data}'. * * * @return the meta object for class 'XSD Meta Data'. * @see org.apache.tuscany.sdo.util.metadata.XSDMetaData * @generated */ public EClass getXSDMetaData() { return xsdMetaDataEClass; } /** * Returns the meta object for the attribute '{@link org.apache.tuscany.sdo.util.metadata.XSDMetaData#getLocation Location}'. * * * @return the meta object for the attribute 'Location'. * @see org.apache.tuscany.sdo.util.metadata.XSDMetaData#getLocation() * @see #getXSDMetaData() * @generated */ public EAttribute getXSDMetaData_Location() { return (EAttribute)xsdMetaDataEClass.getEStructuralFeatures().get(0); } /** * Returns the factory that creates the instances of the model. * * * @return the factory that creates the instances of the model. * @generated */ public MetadataFactory getMetadataFactory() { return (MetadataFactory)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__SDO_META_DATA_GROUP); javaMetaDataEClass = createEClass(JAVA_META_DATA); createEAttribute(javaMetaDataEClass, JAVA_META_DATA__FACTORY_INTERFACE); createEAttribute(javaMetaDataEClass, JAVA_META_DATA__TYPE_INTERFACE); sdoMetaDataGroupEClass = createEClass(SDO_META_DATA_GROUP); createEReference(sdoMetaDataGroupEClass, SDO_META_DATA_GROUP__JAVA_META_DATA); createEReference(sdoMetaDataGroupEClass, SDO_META_DATA_GROUP__XSD_META_DATA); createEReference(sdoMetaDataGroupEClass, SDO_META_DATA_GROUP__TYPE_META_DATA); typeMetaDataEClass = createEClass(TYPE_META_DATA); createEAttribute(typeMetaDataEClass, TYPE_META_DATA__LOCATION); xsdMetaDataEClass = createEClass(XSD_META_DATA); createEAttribute(xsdMetaDataEClass, XSD_META_DATA__LOCATION); } /** * * * @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 ModelPackageImpl theModelPackageImpl = (ModelPackageImpl)EPackage.Registry.INSTANCE.getEPackage(ModelPackageImpl.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_SdoMetaDataGroup(), this.getSDOMetaDataGroup(), null, "sdoMetaDataGroup", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); initEClass(javaMetaDataEClass, JavaMetaData.class, "JavaMetaData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getJavaMetaData_FactoryInterface(), theModelPackageImpl.getString(), "factoryInterface", null, 0, 1, JavaMetaData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getJavaMetaData_TypeInterface(), theModelPackageImpl.getString(), "typeInterface", null, 0, 1, JavaMetaData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(sdoMetaDataGroupEClass, SDOMetaDataGroup.class, "SDOMetaDataGroup", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getSDOMetaDataGroup_JavaMetaData(), this.getJavaMetaData(), null, "javaMetaData", null, 0, -1, SDOMetaDataGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getSDOMetaDataGroup_XsdMetaData(), this.getXSDMetaData(), null, "xsdMetaData", null, 0, -1, SDOMetaDataGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getSDOMetaDataGroup_TypeMetaData(), this.getTypeMetaData(), null, "typeMetaData", null, 0, -1, SDOMetaDataGroup.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(typeMetaDataEClass, TypeMetaData.class, "TypeMetaData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getTypeMetaData_Location(), theModelPackageImpl.getString(), "location", null, 1, 1, TypeMetaData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(xsdMetaDataEClass, XSDMetaData.class, "XSDMetaData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getXSDMetaData_Location(), theModelPackageImpl.getString(), "location", null, 1, 1, XSDMetaData.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 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_SdoMetaDataGroup(), source, new String[] { "kind", "element", "name", "sdoMetaDataGroup", "namespace", "##targetNamespace" }); addAnnotation (javaMetaDataEClass, source, new String[] { "name", "JavaMetaData", "kind", "empty" }); addAnnotation (getJavaMetaData_FactoryInterface(), source, new String[] { "kind", "attribute", "name", "factoryInterface" }); addAnnotation (getJavaMetaData_TypeInterface(), source, new String[] { "kind", "attribute", "name", "typeInterface" }); addAnnotation (sdoMetaDataGroupEClass, source, new String[] { "name", "SDOMetaDataGroup", "kind", "elementOnly" }); addAnnotation (getSDOMetaDataGroup_JavaMetaData(), source, new String[] { "kind", "element", "name", "javaMetaData" }); addAnnotation (getSDOMetaDataGroup_XsdMetaData(), source, new String[] { "kind", "element", "name", "xsdMetaData" }); addAnnotation (getSDOMetaDataGroup_TypeMetaData(), source, new String[] { "kind", "element", "name", "typeMetaData" }); addAnnotation (typeMetaDataEClass, source, new String[] { "name", "TypeMetaData", "kind", "empty" }); addAnnotation (getTypeMetaData_Location(), source, new String[] { "kind", "attribute", "name", "location" }); addAnnotation (xsdMetaDataEClass, source, new String[] { "name", "XSDMetaData", "kind", "empty" }); addAnnotation (getXSDMetaData_Location(), source, new String[] { "kind", "attribute", "name", "location" }); } /** * * Defines literals for the meta objects that represent *