/**
* <copyright>
* </copyright>
*
* $Id$
*/
package workflow.impl;
import FederationOffice.FederationOfficePackage;
import FederationOffice.federationscenarios.FederationscenariosPackage;
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 workflow.Activity;
import workflow.Flow;
import workflow.Fork;
import workflow.Join;
import workflow.Workflow;
import workflow.WorkflowFactory;
import workflow.WorkflowPackage;
import workflow.workflowElement;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class WorkflowPackageImpl extends EPackageImpl implements WorkflowPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass workflowEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass activityEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass forkEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass joinEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass workflowElementEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass flowEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EEnum tasK_STATUSEEnum = 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 workflow.WorkflowPackage#eNS_URI
* @see #init()
* @generated
*/
private WorkflowPackageImpl() {
super(eNS_URI, WorkflowFactory.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 WorkflowPackage#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 WorkflowPackage init() {
if (isInited) return (WorkflowPackage)EPackage.Registry.INSTANCE.getEPackage(WorkflowPackage.eNS_URI);
// Obtain or create and register package
WorkflowPackageImpl theWorkflowPackage = (WorkflowPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof WorkflowPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new WorkflowPackageImpl());
isInited = true;
// Initialize simple dependencies
FederationOfficePackage.eINSTANCE.eClass();
// Create package meta-data objects
theWorkflowPackage.createPackageContents();
// Initialize created meta-data
theWorkflowPackage.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theWorkflowPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(WorkflowPackage.eNS_URI, theWorkflowPackage);
return theWorkflowPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getWorkflow() {
return workflowEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWorkflow_HasActivities() {
return (EReference)workflowEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWorkflow_HasForks() {
return (EReference)workflowEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWorkflow_HasJoins() {
return (EReference)workflowEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getActivity() {
return activityEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getActivity_DependsFrom() {
return (EReference)activityEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getActivity_Status() {
return (EAttribute)activityEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getActivity_ResourceRequest() {
return (EReference)activityEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getFork() {
return forkEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getJoin() {
return joinEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getworkflowElement() {
return workflowElementEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getworkflowElement_Name() {
return (EAttribute)workflowElementEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getFlow() {
return flowEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFlow_Source() {
return (EReference)flowEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getFlow_Target() {
return (EReference)flowEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EEnum getTASK_STATUS() {
return tasK_STATUSEEnum;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public WorkflowFactory getWorkflowFactory() {
return (WorkflowFactory)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
workflowEClass = createEClass(WORKFLOW);
createEReference(workflowEClass, WORKFLOW__HAS_ACTIVITIES);
createEReference(workflowEClass, WORKFLOW__HAS_FORKS);
createEReference(workflowEClass, WORKFLOW__HAS_JOINS);
activityEClass = createEClass(ACTIVITY);
createEReference(activityEClass, ACTIVITY__DEPENDS_FROM);
createEAttribute(activityEClass, ACTIVITY__STATUS);
createEReference(activityEClass, ACTIVITY__RESOURCE_REQUEST);
forkEClass = createEClass(FORK);
joinEClass = createEClass(JOIN);
workflowElementEClass = createEClass(WORKFLOW_ELEMENT);
createEAttribute(workflowElementEClass, WORKFLOW_ELEMENT__NAME);
flowEClass = createEClass(FLOW);
createEReference(flowEClass, FLOW__SOURCE);
createEReference(flowEClass, FLOW__TARGET);
// Create enums
tasK_STATUSEEnum = createEEnum(TASK_STATUS);
}
/**
* <!-- 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
FederationscenariosPackage theFederationscenariosPackage = (FederationscenariosPackage)EPackage.Registry.INSTANCE.getEPackage(FederationscenariosPackage.eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
activityEClass.getESuperTypes().add(this.getworkflowElement());
forkEClass.getESuperTypes().add(this.getworkflowElement());
joinEClass.getESuperTypes().add(this.getworkflowElement());
flowEClass.getESuperTypes().add(this.getworkflowElement());
// Initialize classes and features; add operations and parameters
initEClass(workflowEClass, Workflow.class, "Workflow", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getWorkflow_HasActivities(), this.getActivity(), null, "hasActivities", null, 0, -1, Workflow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getWorkflow_HasForks(), this.getFork(), null, "hasForks", null, 0, -1, Workflow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getWorkflow_HasJoins(), this.getJoin(), null, "hasJoins", null, 0, -1, Workflow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(activityEClass, Activity.class, "Activity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getActivity_DependsFrom(), this.getActivity(), null, "dependsFrom", null, 0, -1, Activity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getActivity_Status(), this.getTASK_STATUS(), "status", "UNKNOWN", 0, 1, Activity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getActivity_ResourceRequest(), theFederationscenariosPackage.getResourceRequest(), null, "resourceRequest", null, 0, 1, Activity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(forkEClass, Fork.class, "Fork", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(joinEClass, Join.class, "Join", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(workflowElementEClass, workflowElement.class, "workflowElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getworkflowElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, workflowElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(flowEClass, Flow.class, "Flow", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getFlow_Source(), this.getworkflowElement(), null, "source", null, 0, 1, Flow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFlow_Target(), this.getworkflowElement(), null, "target", null, 0, 1, Flow.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(tasK_STATUSEEnum, workflow.TASK_STATUS.class, "TASK_STATUS");
addEEnumLiteral(tasK_STATUSEEnum, workflow.TASK_STATUS.STARTING);
addEEnumLiteral(tasK_STATUSEEnum, workflow.TASK_STATUS.RUNNING);
addEEnumLiteral(tasK_STATUSEEnum, workflow.TASK_STATUS.STOPPING);
addEEnumLiteral(tasK_STATUSEEnum, workflow.TASK_STATUS.STOPPED);
addEEnumLiteral(tasK_STATUSEEnum, workflow.TASK_STATUS.FAILED);
addEEnumLiteral(tasK_STATUSEEnum, workflow.TASK_STATUS.UNKNOWN);
// Create resource
createResource(eNS_URI);
}
} //WorkflowPackageImpl