Hi,

i have this ecore,how i can do to  istanciate a class Machine?

core.ecore

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"; name="core"
    nsURI="http://emf.eventb.org/models/core"; nsPrefix="core">
  <eClassifiers xsi:type="ecore:EClass" name="EventBObject" abstract="true"
eSuperTypes="http://www.eclipse.org/emf/2002/Ecore#//EModelElement";>
    <eOperations name="getContaining" lowerBound="1"
eType="#//EventBObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel";>
        <details key="body" value="EventBObject bObject = this;&#xA;while
(!eClass.isSuperTypeOf(
bObject.eClass()))&#xA;&#x9;if (bObject.eContainer() instanceof
EventBObject) bObject=(EventBObject)bObject.eContainer();&#xA;&#x9;else
return null;&#xA;return bObject;"/>
        <details key="documentation" value="returns the nearest container of
this element that is a sub-type eClass&#xD;or null if no container of that
type&#xA;@param &#x9;the EClass that is the super-type of the returned
elements&#xA;@return &#x9;containing EventBObject that is a sub-type of
eClass&#xA;"/>
      </eAnnotations>
      <eParameters name="eClass" lowerBound="1" eType="ecore:EClass
http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
    </eOperations>
    <eOperations name="getAllContained">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel";>
        <details key="body" value="EList&lt;EObject> typeObjects = new
BasicEList&lt;EObject>();&#xA;typeObjects.add(null);&#x9;//include the null
object&#xA;for (TreeIterator&lt;EObject>trit =
EcoreUtil.getAllContents(this, resolve); trit.hasNext();){&#xA;&#x9;EObject
o = trit.next();&#xA;&#x9;if (eClass.isSuperTypeOf(o.eClass()))
typeObjects.add(o);&#xA;}&#xA;return typeObjects;"/>
        <details key="documentation" value="returns a list of elements that
sub-type eClass and&#xD;that are contained (directly or indirectly) by this
element&#xA;@param  eClass - &#x9;the EClass that is the super-type of the
returned elements&#xD;@param resolve - &#x9;whether to resolve
proxies&#xA;"/>
      </eAnnotations>
      <eGenericType eClassifier="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EEList";>
        <eTypeArguments eClassifier="ecore:EClass
http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
      </eGenericType>
      <eParameters name="eClass" lowerBound="1" eType="ecore:EClass
http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
      <eParameters name="resolve" lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
    </eOperations>
    <eOperations name="getURI" lowerBound="1">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel";>
        <details key="body" value="if (eIsProxy()){&#xA;&#x9;return
((InternalEObject)this).eProxyURI();&#xA;}else{&#xA;&#x9;return
eResource().getURI();&#xA;}"/>
        <details key="documentation" value="returns the URI of this
element.&#xD;(If the element is not loaded, the URI is obtained from the
proxy without loading the element)&#xD;&#xD;[AFTER RE-GENERATING REMOVE THE
TYPE PARAMETER &lt;URI>]"/>
      </eAnnotations>
      <eGenericType eTypeParameter="#//EventBObject/getURI/URI"/>
      <eTypeParameters name="URI"/>
    </eOperations>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EventBElement" abstract="true"
eSuperTypes="#//EventBObject">
    <eOperations name="getReferenceWithoutResolving" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString";>
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel";>
        <details key="body" value="if (this.eIsProxy()){&#xA;&#x9;return
((InternalEObject)this).eProxyURI().fragment();&#xA;}else{&#xA;&#x9;return
reference;&#xA;}"/>
        <details key="documentation" value="Returns the 'reference'
attribute of this element.&#xD;If this element is a proxy, the reference is
obtained from the proxy URI fragment. Otherwise the value of the reference
attribute is returned"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="doSetReference">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel";>
        <details key="body" value="if
(this.eIsProxy()){&#xA;&#x9;((InternalEObject)this).eProxyURI().appendFragment(newReference);&#xA;}else{&#xA;&#x9;reference
= newReference;&#xA;}"/>
        <details key="documentation" value="Sets the 'reference' attribute
of this element.&#xD;If this element is a proxy, the reference is seet in
the proxy URI fragment. Otherwise the value of the reference attribute is
set."/>
      </eAnnotations>
      <eParameters name="newReference" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="extensions"
upperBound="-1"
        eType="#//AbstractExtension" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="attributes"
upperBound="-1"
        eType="#//StringToAttributeMapEntry" containment="true"
eKeys="#//StringToAttributeMapEntry/key"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="reference"
lowerBound="1"
        eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"; defaultValueLiteral=""
        iD="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EventBCommented"
abstract="true">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="comment"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EventBCommentedElement"
abstract="true"
      eSuperTypes="#//EventBElement #//EventBCommented"/>
  <eClassifiers xsi:type="ecore:EClass" name="EventBExpression"
abstract="true">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="expression"
lowerBound="1"
        eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString";
defaultValueLiteral="&quot;&quot;"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass"
name="EventBCommentedExpressionElement" abstract="true"
      eSuperTypes="#//EventBCommentedElement #//EventBExpression"/>
  <eClassifiers xsi:type="ecore:EClass" name="EventBNamed" abstract="true">
    <eOperations name="doGetName" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString";>
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel";>
        <details key="body" value="assert (this instanceof
&lt;%org.eventb.emf.core.EventBElement%>);&#xA;String reference =
((EventBElement)this).getReferenceWithoutResolving();&#xA;return
reference.substring(reference.lastIndexOf(&quot;.&quot;)+1);"/>
        <details key="documentation" value="&lt;getName() should be changed
to call this method>&#xD;&#xD;Assumes this is a subclass of
EventBElement.&#xD;Returns this element's name or, if it is a proxy, the
name being referenced.&#xD;The name is derived from the element's
'reference' attribute which&#xD; includes the element type to ensure that
references are unique within a resource.&#xD;(Calling this method will not
resolve any unresolved proxies)."/>
      </eAnnotations>
    </eOperations>
    <eOperations name="doSetName">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel";>
        <details key="body"
value="((EventBElement)this).setReference(this.eStaticClass().getInstanceClassName()+&quot;.&quot;+newName);"/>
        <details key="documentation" value="&lt;setName() should be changed
to call this method>&#xD;&#xD;If this is not a subclass of EventBElement
this method does nothing.&#xD;Sets the name of this element or, if it is a
proxy, the name being referenced. &#xD;The name is stored in the 'reference'
attribute which also contains the element's &#xD;type to ensure that
references are unique winthin a resource.&#xD;(Calling this method will not
resolve any unresolved proxies).&#xD;&#xD;"/>
      </eAnnotations>
      <eParameters name="newName" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString";
        volatile="true" transient="true" defaultValueLiteral=""
derived="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EventBNamedCommentedElement"
abstract="true"
      eSuperTypes="#//EventBCommentedElement #//EventBNamed"/>
  <eClassifiers xsi:type="ecore:EClass" name="EventBPredicate"
abstract="true">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="predicate"
lowerBound="1"
        eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString";
defaultValueLiteral="&quot;true&quot;"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass"
name="EventBNamedCommentedPredicateElement"
      abstract="true" eSuperTypes="#//EventBNamedCommentedElement
#//EventBPredicate"/>
  <eClassifiers xsi:type="ecore:EClass" name="EventBDerived"
abstract="true">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="theorem"
lowerBound="1"
        eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EBoolean";
defaultValueLiteral="false"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass"
name="EventBNamedCommentedDerivedPredicateElement"
      abstract="true" eSuperTypes="#//EventBNamedCommentedPredicateElement
#//EventBDerived"/>
  <eClassifiers xsi:type="ecore:EClass" name="EventBAction" abstract="true">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="action"
lowerBound="1"
        eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass"
name="EventBNamedCommentedActionElement" abstract="true"
      eSuperTypes="#//EventBNamedCommentedElement #//EventBAction"/>
  <eClassifiers xsi:type="ecore:EClass"
name="EventBNamedCommentedComponentElement"
      abstract="true" eSuperTypes="#//EventBNamedCommentedElement"/>
  <eClassifiers xsi:type="ecore:EClass" name="Project"
eSuperTypes="#//EventBNamedCommentedElement">
    <eStructuralFeatures xsi:type="ecore:EReference" name="components"
upperBound="-1"
        eType="#//EventBNamedCommentedComponentElement" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Extension"
eSuperTypes="#//AbstractExtension"/>
  <eClassifiers xsi:type="ecore:EEnum" name="AttributeType">
    <eLiterals name="Boolean" literal="Boolean"/>
    <eLiterals name="Handle" value="1" literal="IRodinElement"/>
    <eLiterals name="Integer" value="2" literal="Integer"/>
    <eLiterals name="Long" value="3" literal="Long"/>
    <eLiterals name="String" value="4" literal="String"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="StringToAttributeMapEntry"
instanceClassName="java.util.Map$Entry">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="key"
lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="value"
eType="#//Attribute"
        containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Attribute"
eSuperTypes="#//EventBObject">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="type"
lowerBound="1" eType="#//AttributeType"
        defaultValueLiteral=""/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="AbstractExtension"
abstract="true" eSuperTypes="#//EventBElement">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="extensionId"
lowerBound="1"
        eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>
  <eSubpackages name="machine" nsURI="
http://emf.eventb.org/models/core/machine"; nsPrefix="machine">
    <eClassifiers xsi:type="ecore:EClass" name="Machine"
eSuperTypes="#//EventBNamedCommentedComponentElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="refines"
upperBound="-1"
          eType="#//machine/Machine"/>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="refinesNames"
upperBound="-1"
          eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString";
          volatile="true" transient="true" derived="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="sees"
upperBound="-1"
          eType="#//context/Context"/>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="seesNames"
upperBound="-1"
          eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString";
          volatile="true" transient="true" derived="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="variables"
upperBound="-1"
          eType="#//machine/Variable" containment="true"
resolveProxies="false"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="invariants"
upperBound="-1"
          eType="#//machine/Invariant" containment="true"
resolveProxies="false"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="variant"
eType="#//machine/Variant"
          containment="true" resolveProxies="false"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="events"
upperBound="-1"
          eType="#//machine/Event" containment="true"
resolveProxies="false"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Variable"
eSuperTypes="#//EventBNamedCommentedElement"/>
    <eClassifiers xsi:type="ecore:EClass" name="Invariant"
eSuperTypes="#//EventBNamedCommentedDerivedPredicateElement"/>
    <eClassifiers xsi:type="ecore:EClass" name="Variant"
eSuperTypes="#//EventBCommentedExpressionElement"/>
    <eClassifiers xsi:type="ecore:EClass" name="Event"
eSuperTypes="#//EventBNamedCommentedElement">
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="convergence"
eType="#//machine/Convergence"/>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="extended"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean";
          unsettable="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="refines"
upperBound="-1"
          eType="#//machine/Event"/>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="refinesNames"
upperBound="-1"
          eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString";
          volatile="true" transient="true" derived="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="parameters"
upperBound="-1"
          eType="#//machine/Parameter" containment="true"
resolveProxies="false"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="guards"
upperBound="-1"
          eType="#//machine/Guard" containment="true"
resolveProxies="false"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="witnesses"
upperBound="-1"
          eType="#//machine/Witness" containment="true"
resolveProxies="false"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="actions"
upperBound="-1"
          eType="#//machine/Action" containment="true"
resolveProxies="false"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EEnum" name="Convergence">
      <eLiterals name="ordinary" literal="ordinary"/>
      <eLiterals name="convergent" value="1" literal="convergent"/>
      <eLiterals name="anticipated" value="2" literal="anticipated"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Parameter"
eSuperTypes="#//EventBNamedCommentedElement"/>
    <eClassifiers xsi:type="ecore:EClass" name="Guard"
eSuperTypes="#//EventBNamedCommentedDerivedPredicateElement"/>
    <eClassifiers xsi:type="ecore:EClass" name="Witness"
eSuperTypes="#//EventBNamedCommentedPredicateElement"/>
    <eClassifiers xsi:type="ecore:EClass" name="Action"
eSuperTypes="#//EventBNamedCommentedActionElement"/>
  </eSubpackages>
  <eSubpackages name="context" nsURI="
http://emf.eventb.org/models/core/context"; nsPrefix="context">
    <eClassifiers xsi:type="ecore:EClass" name="Context"
eSuperTypes="#//EventBNamedCommentedComponentElement">
      <eStructuralFeatures xsi:type="ecore:EReference" name="extends"
upperBound="-1"
          eType="#//context/Context"/>
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="extendsNames"
upperBound="-1"
          eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString";
          volatile="true" transient="true" derived="true"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="sets"
upperBound="-1"
          eType="#//context/CarrierSet" containment="true"
resolveProxies="false"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="constants"
upperBound="-1"
          eType="#//context/Constant" containment="true"
resolveProxies="false"/>
      <eStructuralFeatures xsi:type="ecore:EReference" name="axioms"
upperBound="-1"
          eType="#//context/Axiom" containment="true"
resolveProxies="false"/>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Constant"
eSuperTypes="#//EventBNamedCommentedElement"/>
    <eClassifiers xsi:type="ecore:EClass" name="CarrierSet"
eSuperTypes="#//EventBNamedCommentedElement"/>
    <eClassifiers xsi:type="ecore:EClass" name="Axiom"
eSuperTypes="#//EventBNamedCommentedDerivedPredicateElement"/>
  </eSubpackages>
</ecore:EPackage>
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users

Reply via email to