/**
*/
package org.archstudio.xadl3.xadlcore_3_0.impl;
import org.archstudio.xadl3.xadlcore_3_0.DocumentRoot;
import org.archstudio.xadl3.xadlcore_3_0.Extension;
import org.archstudio.xadl3.xadlcore_3_0.SimpleLink;
import org.archstudio.xadl3.xadlcore_3_0.XADLType;
import org.archstudio.xadl3.xadlcore_3_0.Xadlcore_3_0Factory;
import org.archstudio.xadl3.xadlcore_3_0.Xadlcore_3_0Package;
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.w3.xlink.XlinkPackage;
import org.w3.xlink.impl.XlinkPackageImpl;
/**
* <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc -->
*
* @generated
*/
public class Xadlcore_3_0PackageImpl extends EPackageImpl implements Xadlcore_3_0Package {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
private EClass documentRootEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
private EClass extensionEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
private EClass simpleLinkEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
private EClass xadlTypeEClass = 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.archstudio.xadl3.xadlcore_3_0.Xadlcore_3_0Package#eNS_URI
* @see #init()
* @generated
*/
private Xadlcore_3_0PackageImpl() {
super(eNS_URI, Xadlcore_3_0Factory.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.
* <p>
* This method is used to initialize {@link Xadlcore_3_0Package#eINSTANCE} when that field is accessed. Clients
* should not invoke it directly. Instead, they should simply access that field to obtain the package. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static Xadlcore_3_0Package init() {
if (isInited) {
return (Xadlcore_3_0Package) EPackage.Registry.INSTANCE.getEPackage(Xadlcore_3_0Package.eNS_URI);
}
// Obtain or create and register package
Xadlcore_3_0PackageImpl theXadlcore_3_0Package =
(Xadlcore_3_0PackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Xadlcore_3_0PackageImpl
? EPackage.Registry.INSTANCE.get(eNS_URI) : new Xadlcore_3_0PackageImpl());
isInited = true;
// Initialize simple dependencies
XMLTypePackage.eINSTANCE.eClass();
// Obtain or create and register interdependencies
XlinkPackageImpl theXlinkPackage = (XlinkPackageImpl) (EPackage.Registry.INSTANCE
.getEPackage(XlinkPackage.eNS_URI) instanceof XlinkPackageImpl
? EPackage.Registry.INSTANCE.getEPackage(XlinkPackage.eNS_URI) : XlinkPackage.eINSTANCE);
// Create package meta-data objects
theXadlcore_3_0Package.createPackageContents();
theXlinkPackage.createPackageContents();
// Initialize created meta-data
theXadlcore_3_0Package.initializePackageContents();
theXlinkPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theXadlcore_3_0Package.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(Xadlcore_3_0Package.eNS_URI, theXadlcore_3_0Package);
return theXadlcore_3_0Package;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EClass getDocumentRoot() {
return documentRootEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EAttribute getDocumentRoot_Mixed() {
return (EAttribute) documentRootEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EReference getDocumentRoot_XMLNSPrefixMap() {
return (EReference) documentRootEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EReference getDocumentRoot_XSISchemaLocation() {
return (EReference) documentRootEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EReference getDocumentRoot_TopLevelElement() {
return (EReference) documentRootEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EReference getDocumentRoot_XADL() {
return (EReference) documentRootEClass.getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EClass getExtension() {
return extensionEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EClass getSimpleLink() {
return simpleLinkEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EAttribute getSimpleLink_Href() {
return (EAttribute) simpleLinkEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EAttribute getSimpleLink_Id() {
return (EAttribute) simpleLinkEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EAttribute getSimpleLink_Type() {
return (EAttribute) simpleLinkEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EClass getXADLType() {
return xadlTypeEClass;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EReference getXADLType_TopLevelElement() {
return (EReference) xadlTypeEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public Xadlcore_3_0Factory getXadlcore_3_0Factory() {
return (Xadlcore_3_0Factory) 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
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__TOP_LEVEL_ELEMENT);
createEReference(documentRootEClass, DOCUMENT_ROOT__XADL);
extensionEClass = createEClass(EXTENSION);
simpleLinkEClass = createEClass(SIMPLE_LINK);
createEAttribute(simpleLinkEClass, SIMPLE_LINK__HREF);
createEAttribute(simpleLinkEClass, SIMPLE_LINK__ID);
createEAttribute(simpleLinkEClass, SIMPLE_LINK__TYPE);
xadlTypeEClass = createEClass(XADL_TYPE);
createEReference(xadlTypeEClass, XADL_TYPE__TOP_LEVEL_ELEMENT);
}
/**
* <!-- 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);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
// Initialize classes, features, and operations; add parameters
initEClass(documentRootEClass, DocumentRoot.class, "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_TopLevelElement(), ecorePackage.getEObject(), null, "topLevelElement", null, 0,
-2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, IS_DERIVED, IS_ORDERED);
initEReference(getDocumentRoot_XADL(), this.getXADLType(), null, "xADL", null, 0, -2, null, IS_TRANSIENT,
IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED,
IS_ORDERED);
initEClass(extensionEClass, Extension.class, "Extension", IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEClass(simpleLinkEClass, SimpleLink.class, "SimpleLink", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getSimpleLink_Href(), theXMLTypePackage.getAnyURI(), "href", null, 1, 1, SimpleLink.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getSimpleLink_Id(), theXMLTypePackage.getID(), "id", null, 1, 1, SimpleLink.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getSimpleLink_Type(), theXMLTypePackage.getString(), "type", "simple", 1, 1, SimpleLink.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(xadlTypeEClass, XADLType.class, "XADLType", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEReference(getXADLType_TopLevelElement(), ecorePackage.getEObject(), null, "topLevelElement", null, 0, -1,
XADLType.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 <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(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_TopLevelElement(), source,
new String[] { "kind", "element", "name", "topLevelElement", "namespace", "##targetNamespace" });
addAnnotation(getDocumentRoot_XADL(), source,
new String[] { "kind", "element", "name", "xADL", "namespace", "##targetNamespace" });
addAnnotation(extensionEClass, source, new String[] { "name", "Extension", "kind", "empty" });
addAnnotation(simpleLinkEClass, source, new String[] { "name", "SimpleLink", "kind", "empty" });
addAnnotation(getSimpleLink_Href(), source,
new String[] { "kind", "attribute", "name", "href", "namespace", "http://www.w3.org/1999/xlink" });
addAnnotation(getSimpleLink_Id(), source,
new String[] { "kind", "attribute", "name", "id", "namespace", "##targetNamespace" });
addAnnotation(getSimpleLink_Type(), source,
new String[] { "kind", "attribute", "name", "type", "namespace", "http://www.w3.org/1999/xlink" });
addAnnotation(xadlTypeEClass, source, new String[] { "name", "xADL_._type", "kind", "elementOnly" });
addAnnotation(getXADLType_TopLevelElement(), source,
new String[] { "kind", "element", "name", "topLevelElement", "namespace", "##targetNamespace" });
}
} // Xadlcore_3_0PackageImpl