/**
 */
package org.etsi.mts.tdl.extendedconfigurations.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.etsi.mts.tdl.extendedconfigurations.ComponentAlias;
import org.etsi.mts.tdl.extendedconfigurations.ComponentHide;
import org.etsi.mts.tdl.extendedconfigurations.ComponentMerge;
import org.etsi.mts.tdl.extendedconfigurations.ComponentReference;
import org.etsi.mts.tdl.extendedconfigurations.ExtendedConfigurationsFactory;
import org.etsi.mts.tdl.extendedconfigurations.ExtendedConfigurationsPackage;
import org.etsi.mts.tdl.extendedconfigurations.ExtendedGateReference;
import org.etsi.mts.tdl.extendedconfigurations.ExtendedTestConfiguration;
import org.etsi.mts.tdl.extendedconfigurations.ReassignRole;
import org.etsi.mts.tdl.extendedconfigurations.TestConfigurationInstance;
import org.etsi.mts.tdl.extendedconfigurations.TestConfigurationOperation;

import org.etsi.mts.tdl.impl.tdlPackageImpl;

import org.etsi.mts.tdl.structuredobjectives.StructuredObjectivesPackage;

import org.etsi.mts.tdl.structuredobjectives.impl.StructuredObjectivesPackageImpl;

import org.etsi.mts.tdl.tdlPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class ExtendedConfigurationsPackageImpl extends EPackageImpl implements ExtendedConfigurationsPackage
{
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass extendedTestConfigurationEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass testConfigurationInstanceEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass testConfigurationOperationEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass componentReferenceEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass componentMergeEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass componentHideEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass reassignRoleEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass componentAliasEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass extendedGateReferenceEClass = 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.etsi.mts.tdl.extendedconfigurations.ExtendedConfigurationsPackage#eNS_URI
	 * @see #init()
	 * @generated
	 */
	private ExtendedConfigurationsPackageImpl()
	{
		super(eNS_URI, ExtendedConfigurationsFactory.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 ExtendedConfigurationsPackage#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 ExtendedConfigurationsPackage init()
	{
		if (isInited) return (ExtendedConfigurationsPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedConfigurationsPackage.eNS_URI);

		// Obtain or create and register package
		Object registeredExtendedConfigurationsPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
		ExtendedConfigurationsPackageImpl theExtendedConfigurationsPackage = registeredExtendedConfigurationsPackage instanceof ExtendedConfigurationsPackageImpl ? (ExtendedConfigurationsPackageImpl)registeredExtendedConfigurationsPackage : new ExtendedConfigurationsPackageImpl();

		isInited = true;

		// Obtain or create and register interdependencies
		Object registeredPackage = EPackage.Registry.INSTANCE.getEPackage(tdlPackage.eNS_URI);
		tdlPackageImpl thetdlPackage = (tdlPackageImpl)(registeredPackage instanceof tdlPackageImpl ? registeredPackage : tdlPackage.eINSTANCE);
		registeredPackage = EPackage.Registry.INSTANCE.getEPackage(StructuredObjectivesPackage.eNS_URI);
		StructuredObjectivesPackageImpl theStructuredObjectivesPackage = (StructuredObjectivesPackageImpl)(registeredPackage instanceof StructuredObjectivesPackageImpl ? registeredPackage : StructuredObjectivesPackage.eINSTANCE);

		// Create package meta-data objects
		theExtendedConfigurationsPackage.createPackageContents();
		thetdlPackage.createPackageContents();
		theStructuredObjectivesPackage.createPackageContents();

		// Initialize created meta-data
		theExtendedConfigurationsPackage.initializePackageContents();
		thetdlPackage.initializePackageContents();
		theStructuredObjectivesPackage.initializePackageContents();

		// Mark meta-data to indicate it can't be changed
		theExtendedConfigurationsPackage.freeze();

		// Update the registry and return the package
		EPackage.Registry.INSTANCE.put(ExtendedConfigurationsPackage.eNS_URI, theExtendedConfigurationsPackage);
		return theExtendedConfigurationsPackage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EClass getExtendedTestConfiguration()
	{
		return extendedTestConfigurationEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EReference getExtendedTestConfiguration_Configurations()
	{
		return (EReference)extendedTestConfigurationEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EReference getExtendedTestConfiguration_Operations()
	{
		return (EReference)extendedTestConfigurationEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EClass getTestConfigurationInstance()
	{
		return testConfigurationInstanceEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EReference getTestConfigurationInstance_Configuration()
	{
		return (EReference)testConfigurationInstanceEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EClass getTestConfigurationOperation()
	{
		return testConfigurationOperationEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EReference getTestConfigurationOperation_Component()
	{
		return (EReference)testConfigurationOperationEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EClass getComponentReference()
	{
		return componentReferenceEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EReference getComponentReference_Component()
	{
		return (EReference)componentReferenceEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EReference getComponentReference_Configuration()
	{
		return (EReference)componentReferenceEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EClass getComponentMerge()
	{
		return componentMergeEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EReference getComponentMerge_Target()
	{
		return (EReference)componentMergeEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EClass getComponentHide()
	{
		return componentHideEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EClass getReassignRole()
	{
		return reassignRoleEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EAttribute getReassignRole_Role()
	{
		return (EAttribute)reassignRoleEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EClass getComponentAlias()
	{
		return componentAliasEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EClass getExtendedGateReference()
	{
		return extendedGateReferenceEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EReference getExtendedGateReference_Configuration()
	{
		return (EReference)extendedGateReferenceEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public ExtendedConfigurationsFactory getExtendedConfigurationsFactory()
	{
		return (ExtendedConfigurationsFactory)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
		extendedTestConfigurationEClass = createEClass(EXTENDED_TEST_CONFIGURATION);
		createEReference(extendedTestConfigurationEClass, EXTENDED_TEST_CONFIGURATION__CONFIGURATIONS);
		createEReference(extendedTestConfigurationEClass, EXTENDED_TEST_CONFIGURATION__OPERATIONS);

		testConfigurationInstanceEClass = createEClass(TEST_CONFIGURATION_INSTANCE);
		createEReference(testConfigurationInstanceEClass, TEST_CONFIGURATION_INSTANCE__CONFIGURATION);

		testConfigurationOperationEClass = createEClass(TEST_CONFIGURATION_OPERATION);
		createEReference(testConfigurationOperationEClass, TEST_CONFIGURATION_OPERATION__COMPONENT);

		componentReferenceEClass = createEClass(COMPONENT_REFERENCE);
		createEReference(componentReferenceEClass, COMPONENT_REFERENCE__COMPONENT);
		createEReference(componentReferenceEClass, COMPONENT_REFERENCE__CONFIGURATION);

		componentMergeEClass = createEClass(COMPONENT_MERGE);
		createEReference(componentMergeEClass, COMPONENT_MERGE__TARGET);

		componentHideEClass = createEClass(COMPONENT_HIDE);

		reassignRoleEClass = createEClass(REASSIGN_ROLE);
		createEAttribute(reassignRoleEClass, REASSIGN_ROLE__ROLE);

		componentAliasEClass = createEClass(COMPONENT_ALIAS);

		extendedGateReferenceEClass = createEClass(EXTENDED_GATE_REFERENCE);
		createEReference(extendedGateReferenceEClass, EXTENDED_GATE_REFERENCE__CONFIGURATION);
	}

	/**
	 * <!-- 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
		tdlPackage thetdlPackage = (tdlPackage)EPackage.Registry.INSTANCE.getEPackage(tdlPackage.eNS_URI);

		// Create type parameters

		// Set bounds for type parameters

		// Add supertypes to classes
		extendedTestConfigurationEClass.getESuperTypes().add(thetdlPackage.getTestConfiguration());
		testConfigurationInstanceEClass.getESuperTypes().add(thetdlPackage.getElement());
		testConfigurationOperationEClass.getESuperTypes().add(thetdlPackage.getElement());
		componentReferenceEClass.getESuperTypes().add(thetdlPackage.getElement());
		componentMergeEClass.getESuperTypes().add(this.getTestConfigurationOperation());
		componentHideEClass.getESuperTypes().add(this.getTestConfigurationOperation());
		reassignRoleEClass.getESuperTypes().add(this.getTestConfigurationOperation());
		componentAliasEClass.getESuperTypes().add(this.getTestConfigurationOperation());
		extendedGateReferenceEClass.getESuperTypes().add(thetdlPackage.getGateReference());

		// Initialize classes, features, and operations; add parameters
		initEClass(extendedTestConfigurationEClass, ExtendedTestConfiguration.class, "ExtendedTestConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getExtendedTestConfiguration_Configurations(), this.getTestConfigurationInstance(), null, "configurations", null, 0, -1, ExtendedTestConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
		initEReference(getExtendedTestConfiguration_Operations(), this.getTestConfigurationOperation(), null, "operations", null, 0, -1, ExtendedTestConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);

		initEClass(testConfigurationInstanceEClass, TestConfigurationInstance.class, "TestConfigurationInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getTestConfigurationInstance_Configuration(), thetdlPackage.getTestConfiguration(), null, "configuration", null, 1, 1, TestConfigurationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(testConfigurationOperationEClass, TestConfigurationOperation.class, "TestConfigurationOperation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getTestConfigurationOperation_Component(), this.getComponentReference(), null, "component", null, 1, 1, TestConfigurationOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(componentReferenceEClass, ComponentReference.class, "ComponentReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getComponentReference_Component(), thetdlPackage.getComponentInstance(), null, "component", null, 1, 1, ComponentReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getComponentReference_Configuration(), this.getTestConfigurationInstance(), null, "configuration", null, 1, 1, ComponentReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(componentMergeEClass, ComponentMerge.class, "ComponentMerge", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getComponentMerge_Target(), this.getComponentReference(), null, "target", null, 1, 1, ComponentMerge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(componentHideEClass, ComponentHide.class, "ComponentHide", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		initEClass(reassignRoleEClass, ReassignRole.class, "ReassignRole", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getReassignRole_Role(), thetdlPackage.getComponentInstanceRole(), "role", null, 1, 1, ReassignRole.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(componentAliasEClass, ComponentAlias.class, "ComponentAlias", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		initEClass(extendedGateReferenceEClass, ExtendedGateReference.class, "ExtendedGateReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getExtendedGateReference_Configuration(), this.getTestConfigurationInstance(), null, "configuration", null, 1, 1, ExtendedGateReference.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://www.eclipse.org/OCL/Import
		createImportAnnotations();
	}

	/**
	 * Initializes the annotations for <b>http://www.eclipse.org/OCL/Import</b>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected void createImportAnnotations()
	{
		String source = "http://www.eclipse.org/OCL/Import";
		addAnnotation
		  (this,
		   source,
		   new String[]
		   {
			   "tdl", "tdl.ecore#/"
		   });
	}

} //ExtendedConfigurationsPackageImpl
