SmachDSLPackageImpl.java
Go to the documentation of this file.
00001 
00003 package org.best.of.robotics.smachDSL.impl;
00004 
00005 import org.best.of.robotics.smachDSL.ActionClient;
00006 import org.best.of.robotics.smachDSL.ActionState;
00007 import org.best.of.robotics.smachDSL.PrimitivePackage;
00008 import org.best.of.robotics.smachDSL.ServiceClient;
00009 import org.best.of.robotics.smachDSL.SmachDSLFactory;
00010 import org.best.of.robotics.smachDSL.SmachDSLPackage;
00011 import org.best.of.robotics.smachDSL.StateMachine;
00012 import org.best.of.robotics.smachDSL.Test;
00013 import org.best.of.robotics.smachDSL.Transition;
00014 
00015 import org.eclipse.emf.ecore.EAttribute;
00016 import org.eclipse.emf.ecore.EClass;
00017 import org.eclipse.emf.ecore.EPackage;
00018 import org.eclipse.emf.ecore.EReference;
00019 
00020 import org.eclipse.emf.ecore.impl.EPackageImpl;
00021 
00028 public class SmachDSLPackageImpl extends EPackageImpl implements SmachDSLPackage
00029 {
00035   private EClass primitivePackageEClass = null;
00036 
00042   private EClass testEClass = null;
00043 
00049   private EClass stateMachineEClass = null;
00050 
00056   private EClass actionClientEClass = null;
00057 
00063   private EClass serviceClientEClass = null;
00064 
00070   private EClass actionStateEClass = null;
00071 
00077   private EClass transitionEClass = null;
00078 
00094   private SmachDSLPackageImpl()
00095   {
00096     super(eNS_URI, SmachDSLFactory.eINSTANCE);
00097   }
00098 
00104   private static boolean isInited = false;
00105 
00118   public static SmachDSLPackage init()
00119   {
00120     if (isInited) return (SmachDSLPackage)EPackage.Registry.INSTANCE.getEPackage(SmachDSLPackage.eNS_URI);
00121 
00122     // Obtain or create and register package
00123     SmachDSLPackageImpl theSmachDSLPackage = (SmachDSLPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SmachDSLPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SmachDSLPackageImpl());
00124 
00125     isInited = true;
00126 
00127     // Create package meta-data objects
00128     theSmachDSLPackage.createPackageContents();
00129 
00130     // Initialize created meta-data
00131     theSmachDSLPackage.initializePackageContents();
00132 
00133     // Mark meta-data to indicate it can't be changed
00134     theSmachDSLPackage.freeze();
00135 
00136   
00137     // Update the registry and return the package
00138     EPackage.Registry.INSTANCE.put(SmachDSLPackage.eNS_URI, theSmachDSLPackage);
00139     return theSmachDSLPackage;
00140   }
00141 
00147   public EClass getPrimitivePackage()
00148   {
00149     return primitivePackageEClass;
00150   }
00151 
00157   public EReference getPrimitivePackage_Statemachines()
00158   {
00159     return (EReference)primitivePackageEClass.getEStructuralFeatures().get(0);
00160   }
00161 
00167   public EClass getTest()
00168   {
00169     return testEClass;
00170   }
00171 
00177   public EAttribute getTest_Ros()
00178   {
00179     return (EAttribute)testEClass.getEStructuralFeatures().get(0);
00180   }
00181 
00187   public EClass getStateMachine()
00188   {
00189     return stateMachineEClass;
00190   }
00191 
00197   public EAttribute getStateMachine_Name()
00198   {
00199     return (EAttribute)stateMachineEClass.getEStructuralFeatures().get(0);
00200   }
00201 
00207   public EReference getStateMachine_Actionclients()
00208   {
00209     return (EReference)stateMachineEClass.getEStructuralFeatures().get(1);
00210   }
00211 
00217   public EReference getStateMachine_Serviceclients()
00218   {
00219     return (EReference)stateMachineEClass.getEStructuralFeatures().get(2);
00220   }
00221 
00227   public EReference getStateMachine_Actionsstates()
00228   {
00229     return (EReference)stateMachineEClass.getEStructuralFeatures().get(3);
00230   }
00231 
00237   public EClass getActionClient()
00238   {
00239     return actionClientEClass;
00240   }
00241 
00247   public EAttribute getActionClient_Name()
00248   {
00249     return (EAttribute)actionClientEClass.getEStructuralFeatures().get(0);
00250   }
00251 
00257   public EAttribute getActionClient_Actionname()
00258   {
00259     return (EAttribute)actionClientEClass.getEStructuralFeatures().get(1);
00260   }
00261 
00267   public EAttribute getActionClient_Actiontype()
00268   {
00269     return (EAttribute)actionClientEClass.getEStructuralFeatures().get(2);
00270   }
00271 
00277   public EClass getServiceClient()
00278   {
00279     return serviceClientEClass;
00280   }
00281 
00287   public EAttribute getServiceClient_Name()
00288   {
00289     return (EAttribute)serviceClientEClass.getEStructuralFeatures().get(0);
00290   }
00291 
00297   public EAttribute getServiceClient_Servicename()
00298   {
00299     return (EAttribute)serviceClientEClass.getEStructuralFeatures().get(1);
00300   }
00301 
00307   public EAttribute getServiceClient_Servicesrv()
00308   {
00309     return (EAttribute)serviceClientEClass.getEStructuralFeatures().get(2);
00310   }
00311 
00317   public EClass getActionState()
00318   {
00319     return actionStateEClass;
00320   }
00321 
00327   public EAttribute getActionState_Name()
00328   {
00329     return (EAttribute)actionStateEClass.getEStructuralFeatures().get(0);
00330   }
00331 
00337   public EReference getActionState_Clientname()
00338   {
00339     return (EReference)actionStateEClass.getEStructuralFeatures().get(1);
00340   }
00341 
00347   public EReference getActionState_Transitions()
00348   {
00349     return (EReference)actionStateEClass.getEStructuralFeatures().get(2);
00350   }
00351 
00357   public EClass getTransition()
00358   {
00359     return transitionEClass;
00360   }
00361 
00367   public EAttribute getTransition_Outcome()
00368   {
00369     return (EAttribute)transitionEClass.getEStructuralFeatures().get(0);
00370   }
00371 
00377   public EReference getTransition_State()
00378   {
00379     return (EReference)transitionEClass.getEStructuralFeatures().get(1);
00380   }
00381 
00387   public SmachDSLFactory getSmachDSLFactory()
00388   {
00389     return (SmachDSLFactory)getEFactoryInstance();
00390   }
00391 
00397   private boolean isCreated = false;
00398 
00406   public void createPackageContents()
00407   {
00408     if (isCreated) return;
00409     isCreated = true;
00410 
00411     // Create classes and their features
00412     primitivePackageEClass = createEClass(PRIMITIVE_PACKAGE);
00413     createEReference(primitivePackageEClass, PRIMITIVE_PACKAGE__STATEMACHINES);
00414 
00415     testEClass = createEClass(TEST);
00416     createEAttribute(testEClass, TEST__ROS);
00417 
00418     stateMachineEClass = createEClass(STATE_MACHINE);
00419     createEAttribute(stateMachineEClass, STATE_MACHINE__NAME);
00420     createEReference(stateMachineEClass, STATE_MACHINE__ACTIONCLIENTS);
00421     createEReference(stateMachineEClass, STATE_MACHINE__SERVICECLIENTS);
00422     createEReference(stateMachineEClass, STATE_MACHINE__ACTIONSSTATES);
00423 
00424     actionClientEClass = createEClass(ACTION_CLIENT);
00425     createEAttribute(actionClientEClass, ACTION_CLIENT__NAME);
00426     createEAttribute(actionClientEClass, ACTION_CLIENT__ACTIONNAME);
00427     createEAttribute(actionClientEClass, ACTION_CLIENT__ACTIONTYPE);
00428 
00429     serviceClientEClass = createEClass(SERVICE_CLIENT);
00430     createEAttribute(serviceClientEClass, SERVICE_CLIENT__NAME);
00431     createEAttribute(serviceClientEClass, SERVICE_CLIENT__SERVICENAME);
00432     createEAttribute(serviceClientEClass, SERVICE_CLIENT__SERVICESRV);
00433 
00434     actionStateEClass = createEClass(ACTION_STATE);
00435     createEAttribute(actionStateEClass, ACTION_STATE__NAME);
00436     createEReference(actionStateEClass, ACTION_STATE__CLIENTNAME);
00437     createEReference(actionStateEClass, ACTION_STATE__TRANSITIONS);
00438 
00439     transitionEClass = createEClass(TRANSITION);
00440     createEAttribute(transitionEClass, TRANSITION__OUTCOME);
00441     createEReference(transitionEClass, TRANSITION__STATE);
00442   }
00443 
00449   private boolean isInitialized = false;
00450 
00458   public void initializePackageContents()
00459   {
00460     if (isInitialized) return;
00461     isInitialized = true;
00462 
00463     // Initialize package
00464     setName(eNAME);
00465     setNsPrefix(eNS_PREFIX);
00466     setNsURI(eNS_URI);
00467 
00468     // Create type parameters
00469 
00470     // Set bounds for type parameters
00471 
00472     // Add supertypes to classes
00473 
00474     // Initialize classes and features; add operations and parameters
00475     initEClass(primitivePackageEClass, PrimitivePackage.class, "PrimitivePackage", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
00476     initEReference(getPrimitivePackage_Statemachines(), this.getStateMachine(), null, "statemachines", null, 0, -1, PrimitivePackage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00477 
00478     initEClass(testEClass, Test.class, "Test", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
00479     initEAttribute(getTest_Ros(), ecorePackage.getEString(), "ros", null, 0, 1, Test.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00480 
00481     initEClass(stateMachineEClass, StateMachine.class, "StateMachine", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
00482     initEAttribute(getStateMachine_Name(), ecorePackage.getEString(), "name", null, 0, 1, StateMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00483     initEReference(getStateMachine_Actionclients(), this.getActionClient(), null, "actionclients", null, 0, -1, StateMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00484     initEReference(getStateMachine_Serviceclients(), this.getServiceClient(), null, "serviceclients", null, 0, -1, StateMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00485     initEReference(getStateMachine_Actionsstates(), this.getActionState(), null, "actionsstates", null, 0, -1, StateMachine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00486 
00487     initEClass(actionClientEClass, ActionClient.class, "ActionClient", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
00488     initEAttribute(getActionClient_Name(), ecorePackage.getEString(), "name", null, 0, 1, ActionClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00489     initEAttribute(getActionClient_Actionname(), ecorePackage.getEString(), "actionname", null, 0, 1, ActionClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00490     initEAttribute(getActionClient_Actiontype(), ecorePackage.getEString(), "actiontype", null, 0, 1, ActionClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00491 
00492     initEClass(serviceClientEClass, ServiceClient.class, "ServiceClient", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
00493     initEAttribute(getServiceClient_Name(), ecorePackage.getEString(), "name", null, 0, 1, ServiceClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00494     initEAttribute(getServiceClient_Servicename(), ecorePackage.getEString(), "servicename", null, 0, 1, ServiceClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00495     initEAttribute(getServiceClient_Servicesrv(), ecorePackage.getEString(), "servicesrv", null, 0, 1, ServiceClient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00496 
00497     initEClass(actionStateEClass, ActionState.class, "ActionState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
00498     initEAttribute(getActionState_Name(), ecorePackage.getEString(), "name", null, 0, 1, ActionState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00499     initEReference(getActionState_Clientname(), this.getActionClient(), null, "clientname", null, 0, 1, ActionState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00500     initEReference(getActionState_Transitions(), this.getTransition(), null, "transitions", null, 0, -1, ActionState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00501 
00502     initEClass(transitionEClass, Transition.class, "Transition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
00503     initEAttribute(getTransition_Outcome(), ecorePackage.getEString(), "outcome", null, 0, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00504     initEReference(getTransition_State(), this.getActionState(), null, "state", null, 0, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
00505 
00506     // Create resource
00507     createResource(eNS_URI);
00508   }
00509 
00510 } //SmachDSLPackageImpl


bride_plugin_source
Author(s): Alexander Bubeck
autogenerated on Sun Oct 5 2014 22:38:34