/** * <copyright> * </copyright> * * $Id$ */ package process.impl; import operation.OperationPackage; import operation.impl.OperationPackageImpl; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EEnum; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.impl.EPackageImpl; import process.Activity; import process.Gateway; import process.ProcessElement; import process.ProcessFactory; import process.ProcessPackage; import process.Task; import process.TaskKind; import system.SystemPackage; import system.impl.SystemPackageImpl; /** * <!-- begin-user-doc --> * An implementation of the model <b>Package</b>. * <!-- end-user-doc --> * @generated */ public class ProcessPackageImpl extends EPackageImpl implements ProcessPackage { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass taskEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass processEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass processElementEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass gatewayEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass activityEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EEnum taskKindEEnum = 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 process.ProcessPackage#eNS_URI * @see #init() * @generated */ private ProcessPackageImpl() { super(eNS_URI, ProcessFactory.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 ProcessPackage#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 ProcessPackage init() { if (isInited) return (ProcessPackage)EPackage.Registry.INSTANCE.getEPackage(ProcessPackage.eNS_URI); // Obtain or create and register package ProcessPackageImpl theProcessPackage = (ProcessPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ProcessPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ProcessPackageImpl()); isInited = true; // Obtain or create and register interdependencies OperationPackageImpl theOperationPackage = (OperationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(OperationPackage.eNS_URI) instanceof OperationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(OperationPackage.eNS_URI) : OperationPackage.eINSTANCE); SystemPackageImpl theSystemPackage = (SystemPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SystemPackage.eNS_URI) instanceof SystemPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SystemPackage.eNS_URI) : SystemPackage.eINSTANCE); // Create package meta-data objects theProcessPackage.createPackageContents(); theOperationPackage.createPackageContents(); theSystemPackage.createPackageContents(); // Initialize created meta-data theProcessPackage.initializePackageContents(); theOperationPackage.initializePackageContents(); theSystemPackage.initializePackageContents(); // Mark meta-data to indicate it can't be changed theProcessPackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(ProcessPackage.eNS_URI, theProcessPackage); return theProcessPackage; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getTask() { return taskEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getTask_Kind() { return (EAttribute)taskEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getProcess() { return processEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getProcess_Contents() { return (EReference)processEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getProcessElement() { return processElementEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getProcessElement_Id() { return (EAttribute)processElementEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getProcessElement_Name() { return (EAttribute)processElementEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getGateway() { return gatewayEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getActivity() { return activityEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getActivity_Parent() { return (EReference)activityEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getActivity_Next() { return (EReference)activityEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getActivity_Previous() { return (EReference)activityEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EEnum getTaskKind() { return taskKindEEnum; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ProcessFactory getProcessFactory() { return (ProcessFactory)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 taskEClass = createEClass(TASK); createEAttribute(taskEClass, TASK__KIND); processEClass = createEClass(PROCESS); createEReference(processEClass, PROCESS__CONTENTS); processElementEClass = createEClass(PROCESS_ELEMENT); createEAttribute(processElementEClass, PROCESS_ELEMENT__ID); createEAttribute(processElementEClass, PROCESS_ELEMENT__NAME); gatewayEClass = createEClass(GATEWAY); activityEClass = createEClass(ACTIVITY); createEReference(activityEClass, ACTIVITY__PARENT); createEReference(activityEClass, ACTIVITY__NEXT); createEReference(activityEClass, ACTIVITY__PREVIOUS); // Create enums taskKindEEnum = createEEnum(TASK_KIND); } /** * <!-- 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); // Add supertypes to classes taskEClass.getESuperTypes().add(this.getActivity()); processEClass.getESuperTypes().add(this.getProcessElement()); gatewayEClass.getESuperTypes().add(this.getActivity()); activityEClass.getESuperTypes().add(this.getProcessElement()); // Initialize classes and features; add operations and parameters initEClass(taskEClass, Task.class, "Task", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getTask_Kind(), this.getTaskKind(), "kind", null, 1, 1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(processEClass, process.Process.class, "Process", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getProcess_Contents(), this.getActivity(), this.getActivity_Parent(), "contents", null, 0, -1, process.Process.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(processElementEClass, ProcessElement.class, "ProcessElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getProcessElement_Id(), ecorePackage.getEString(), "id", null, 1, 1, ProcessElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getProcessElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, ProcessElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(gatewayEClass, Gateway.class, "Gateway", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(activityEClass, Activity.class, "Activity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getActivity_Parent(), this.getProcess(), this.getProcess_Contents(), "parent", null, 1, 1, Activity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getActivity_Next(), this.getActivity(), this.getActivity_Previous(), "next", null, 0, -1, Activity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getActivity_Previous(), this.getActivity(), this.getActivity_Next(), "previous", null, 0, -1, Activity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Initialize enums and add enum literals initEEnum(taskKindEEnum, TaskKind.class, "TaskKind"); addEEnumLiteral(taskKindEEnum, TaskKind.USER_LITERAL); addEEnumLiteral(taskKindEEnum, TaskKind.MANUAL_LITERAL); addEEnumLiteral(taskKindEEnum, TaskKind.SERVICE_LITERAL); // Create resource createResource(eNS_URI); } } //ProcessPackageImpl