/**
*/
package org.eclipse.gmf.tooling.examples.affixednode.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.eclipse.gmf.tooling.examples.affixednode.AffixedNodeFactory;
import org.eclipse.gmf.tooling.examples.affixednode.AffixedNodePackage;
import org.eclipse.gmf.tooling.examples.affixednode.Bundle;
import org.eclipse.gmf.tooling.examples.affixednode.Canvas;
import org.eclipse.gmf.tooling.examples.affixednode.Communication;
import org.eclipse.gmf.tooling.examples.affixednode.IncomingCommunicator;
import org.eclipse.gmf.tooling.examples.affixednode.OutcomingCommunicator;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class AffixedNodePackageImpl extends EPackageImpl implements AffixedNodePackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass canvasEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass incomingCommunicatorEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass outcomingCommunicatorEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass bundleEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass communicationEClass = 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.eclipse.gmf.tooling.examples.affixednode.AffixedNodePackage#eNS_URI
* @see #init()
* @generated
*/
private AffixedNodePackageImpl() {
super(eNS_URI, AffixedNodeFactory.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 AffixedNodePackage#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 AffixedNodePackage init() {
if (isInited) return (AffixedNodePackage)EPackage.Registry.INSTANCE.getEPackage(AffixedNodePackage.eNS_URI);
// Obtain or create and register package
AffixedNodePackageImpl theAffixedNodePackage = (AffixedNodePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof AffixedNodePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new AffixedNodePackageImpl());
isInited = true;
// Create package meta-data objects
theAffixedNodePackage.createPackageContents();
// Initialize created meta-data
theAffixedNodePackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theAffixedNodePackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(AffixedNodePackage.eNS_URI, theAffixedNodePackage);
return theAffixedNodePackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getCanvas() {
return canvasEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getCanvas_Bundles() {
return (EReference)canvasEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getCanvas_Communications() {
return (EReference)canvasEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getIncomingCommunicator() {
return incomingCommunicatorEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getOutcomingCommunicator() {
return outcomingCommunicatorEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getBundle() {
return bundleEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getBundle_Name() {
return (EAttribute)bundleEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getBundle_OutcomingCommunicator() {
return (EReference)bundleEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getBundle_IncomingCommunicator() {
return (EReference)bundleEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getCommunication() {
return communicationEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getCommunication_OutcomingCommunicator() {
return (EReference)communicationEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getCommunication_IncomingCommunicator() {
return (EReference)communicationEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public AffixedNodeFactory getAffixedNodeFactory() {
return (AffixedNodeFactory)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
canvasEClass = createEClass(CANVAS);
createEReference(canvasEClass, CANVAS__BUNDLES);
createEReference(canvasEClass, CANVAS__COMMUNICATIONS);
incomingCommunicatorEClass = createEClass(INCOMING_COMMUNICATOR);
outcomingCommunicatorEClass = createEClass(OUTCOMING_COMMUNICATOR);
bundleEClass = createEClass(BUNDLE);
createEAttribute(bundleEClass, BUNDLE__NAME);
createEReference(bundleEClass, BUNDLE__OUTCOMING_COMMUNICATOR);
createEReference(bundleEClass, BUNDLE__INCOMING_COMMUNICATOR);
communicationEClass = createEClass(COMMUNICATION);
createEReference(communicationEClass, COMMUNICATION__OUTCOMING_COMMUNICATOR);
createEReference(communicationEClass, COMMUNICATION__INCOMING_COMMUNICATOR);
}
/**
* <!-- 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);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
// Initialize classes, features, and operations; add parameters
initEClass(canvasEClass, Canvas.class, "Canvas", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getCanvas_Bundles(), this.getBundle(), null, "bundles", null, 0, -1, Canvas.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getCanvas_Communications(), this.getCommunication(), null, "communications", null, 0, -1, Canvas.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(incomingCommunicatorEClass, IncomingCommunicator.class, "IncomingCommunicator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(outcomingCommunicatorEClass, OutcomingCommunicator.class, "OutcomingCommunicator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(bundleEClass, Bundle.class, "Bundle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getBundle_Name(), ecorePackage.getEString(), "name", "", 0, 1, Bundle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getBundle_OutcomingCommunicator(), this.getOutcomingCommunicator(), null, "outcomingCommunicator", null, 0, 1, Bundle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getBundle_IncomingCommunicator(), this.getIncomingCommunicator(), null, "incomingCommunicator", null, 0, 1, Bundle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(communicationEClass, Communication.class, "Communication", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getCommunication_OutcomingCommunicator(), this.getOutcomingCommunicator(), null, "outcomingCommunicator", null, 0, 1, Communication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getCommunication_IncomingCommunicator(), this.getIncomingCommunicator(), null, "incomingCommunicator", null, 0, 1, Communication.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);
}
} //AffixedNodePackageImpl