Commit c8af2027 authored by Martti Käärik's avatar Martti Käärik
Browse files

Added TO specific 'Element' class to implement TO specific 'Element'...

Added TO specific 'Element' class to implement TO specific 'Element' operations + added missing operations.
parent 75f6f8cb
Loading
Loading
Loading
Loading
+38 −14
Original line number Original line Diff line number Diff line
@@ -5,7 +5,31 @@
  <eAnnotations source="http://www.eclipse.org/OCL/Import">
  <eAnnotations source="http://www.eclipse.org/OCL/Import">
    <details key="tdl" value="tdl.ecore#/"/>
    <details key="tdl" value="tdl.ecore#/"/>
  </eAnnotations>
  </eAnnotations>
  <eClassifiers xsi:type="ecore:EClass" name="Element" eSuperTypes="tdl.ecore#//Element">
    <eOperations name="getTestObjective" eType="#//StructuredTestObjective">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="  &#xA;            if (not self.container().oclIsUndefined()) then&#xA;                if (self.container().oclIsKindOf(StructuredTestObjective)) then&#xA;                    self.container().oclAsType(StructuredTestObjective)&#xA;                else&#xA;                    self.container().oclAsType(Element).getTestObjective()&#xA;                endif&#xA;            else &#xA;                null&#xA;            endif"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="contains" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self->closure(oclContents())->includes(object)"/>
      </eAnnotations>
      <eParameters name="object" eType="#//Element"/>
    </eOperations>
    <eOperations name="getNotes" ordered="false" upperBound="-1" eType="ecore:EClass tdl.ecore#//Comment">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self->closure(oclContents())->select(e | &#xA;&#x9;e.oclIsKindOf(tdl::Comment) and not e.oclAsType(tdl::Comment).name.oclIsUndefined()&#xA;).oclAsType(tdl::Comment)->asSet()"/>
      </eAnnotations>
    </eOperations>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="StructuredTestObjective" eSuperTypes="tdl.ecore#//TestObjective">
  <eClassifiers xsi:type="ecore:EClass" name="StructuredTestObjective" eSuperTypes="tdl.ecore#//TestObjective">
    <eOperations name="indexOf" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self->asOrderedSet()->closure(oclContents())->indexOf(object)"/>
      </eAnnotations>
      <eParameters name="object" eType="#//Element"/>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="configuration" eType="ecore:EClass tdl.ecore#//TestConfiguration"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="configuration" eType="ecore:EClass tdl.ecore#//TestConfiguration"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="initialConditions" eType="#//InitialConditions"
    <eStructuralFeatures xsi:type="ecore:EReference" name="initialConditions" eType="#//InitialConditions"
        containment="true"/>
        containment="true"/>
@@ -18,31 +42,31 @@
    <eStructuralFeatures xsi:type="ecore:EReference" name="variants" eType="#//Variants"
    <eStructuralFeatures xsi:type="ecore:EReference" name="variants" eType="#//Variants"
        containment="true"/>
        containment="true"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="InitialConditions" eSuperTypes="tdl.ecore#//Element">
  <eClassifiers xsi:type="ecore:EClass" name="InitialConditions" eSuperTypes="#//Element">
    <eStructuralFeatures xsi:type="ecore:EReference" name="conditions" lowerBound="1"
    <eStructuralFeatures xsi:type="ecore:EReference" name="conditions" lowerBound="1"
        eType="#//EventSequence" containment="true"/>
        eType="#//EventSequence" containment="true"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EventSequence" eSuperTypes="tdl.ecore#//Element">
  <eClassifiers xsi:type="ecore:EClass" name="EventSequence" eSuperTypes="#//Element">
    <eStructuralFeatures xsi:type="ecore:EReference" name="events" upperBound="-1"
    <eStructuralFeatures xsi:type="ecore:EReference" name="events" upperBound="-1"
        eType="#//EventOccurrence" containment="true"/>
        eType="#//EventOccurrence" containment="true"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EventOccurrence" eSuperTypes="tdl.ecore#//Element">
  <eClassifiers xsi:type="ecore:EClass" name="EventOccurrence" eSuperTypes="#//Element">
    <eStructuralFeatures xsi:type="ecore:EReference" name="timeConstraint" upperBound="-1"
    <eStructuralFeatures xsi:type="ecore:EReference" name="timeConstraint" upperBound="-1"
        eType="ecore:EClass tdl.ecore#//TimeConstraint" containment="true"/>
        eType="ecore:EClass tdl.ecore#//TimeConstraint" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="timeLabel" eType="ecore:EClass tdl.ecore#//TimeLabel"
    <eStructuralFeatures xsi:type="ecore:EReference" name="timeLabel" eType="ecore:EClass tdl.ecore#//TimeLabel"
        containment="true"/>
        containment="true"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ExpectedBehaviour" eSuperTypes="tdl.ecore#//Element">
  <eClassifiers xsi:type="ecore:EClass" name="ExpectedBehaviour" eSuperTypes="#//Element">
    <eStructuralFeatures xsi:type="ecore:EReference" name="whenClause" eType="#//EventSequence"
    <eStructuralFeatures xsi:type="ecore:EReference" name="whenClause" eType="#//EventSequence"
        containment="true"/>
        containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="thenClause" lowerBound="1"
    <eStructuralFeatures xsi:type="ecore:EReference" name="thenClause" lowerBound="1"
        eType="#//EventSequence" containment="true"/>
        eType="#//EventSequence" containment="true"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="FinalConditions" eSuperTypes="tdl.ecore#//Element">
  <eClassifiers xsi:type="ecore:EClass" name="FinalConditions" eSuperTypes="#//Element">
    <eStructuralFeatures xsi:type="ecore:EReference" name="conditions" lowerBound="1"
    <eStructuralFeatures xsi:type="ecore:EReference" name="conditions" lowerBound="1"
        eType="#//EventSequence" containment="true"/>
        eType="#//EventSequence" containment="true"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="PICSReference" eSuperTypes="tdl.ecore#//Element">
  <eClassifiers xsi:type="ecore:EClass" name="PICSReference" eSuperTypes="#//Element">
    <eStructuralFeatures xsi:type="ecore:EReference" name="pics" lowerBound="1" eType="#//PICS"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="pics" lowerBound="1" eType="#//PICS"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="PICS" eSuperTypes="tdl.ecore#//PackageableElement"/>
  <eClassifiers xsi:type="ecore:EClass" name="PICS" eSuperTypes="tdl.ecore#//PackageableElement"/>
@@ -58,20 +82,20 @@
    <eStructuralFeatures xsi:type="ecore:EReference" name="eventArgument" eType="#//Value"
    <eStructuralFeatures xsi:type="ecore:EReference" name="eventArgument" eType="#//Value"
        containment="true"/>
        containment="true"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EntityReference" eSuperTypes="tdl.ecore#//Element">
  <eClassifiers xsi:type="ecore:EClass" name="EntityReference" eSuperTypes="#//Element">
    <eStructuralFeatures xsi:type="ecore:EReference" name="entity" eType="#//Entity"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="entity" eType="#//Entity"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="component" eType="ecore:EClass tdl.ecore#//ComponentInstance"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="component" eType="ecore:EClass tdl.ecore#//ComponentInstance"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EventReference" eSuperTypes="tdl.ecore#//Element">
  <eClassifiers xsi:type="ecore:EClass" name="EventReference" eSuperTypes="#//Element">
    <eStructuralFeatures xsi:type="ecore:EReference" name="event" lowerBound="1" eType="#//Event"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="event" lowerBound="1" eType="#//Event"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Value" abstract="true" eSuperTypes="tdl.ecore#//Element"/>
  <eClassifiers xsi:type="ecore:EClass" name="Value" abstract="true" eSuperTypes="#//Element"/>
  <eClassifiers xsi:type="ecore:EClass" name="EventArgument" eSuperTypes="tdl.ecore#//Element"/>
  <eClassifiers xsi:type="ecore:EClass" name="EventArgument" eSuperTypes="#//Element"/>
  <eClassifiers xsi:type="ecore:EClass" name="DataReference" eSuperTypes="#//Value">
  <eClassifiers xsi:type="ecore:EClass" name="DataReference" eSuperTypes="#//Value">
    <eStructuralFeatures xsi:type="ecore:EReference" name="content" lowerBound="1"
    <eStructuralFeatures xsi:type="ecore:EReference" name="content" lowerBound="1"
        eType="ecore:EClass tdl.ecore#//StaticDataUse" containment="true"/>
        eType="ecore:EClass tdl.ecore#//StaticDataUse" containment="true"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Content" eSuperTypes="tdl.ecore#//Element">
  <eClassifiers xsi:type="ecore:EClass" name="Content" eSuperTypes="#//Element">
    <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="#//Value"
    <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="#//Value"
        containment="true"/>
        containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="content" ordered="false"
    <eStructuralFeatures xsi:type="ecore:EReference" name="content" ordered="false"
@@ -109,13 +133,13 @@
    <eStructuralFeatures xsi:type="ecore:EReference" name="eventSpecification" lowerBound="1"
    <eStructuralFeatures xsi:type="ecore:EReference" name="eventSpecification" lowerBound="1"
        eType="#//EventOccurrenceSpecification" containment="true"/>
        eType="#//EventOccurrenceSpecification" containment="true"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EntityBinding" eSuperTypes="tdl.ecore#//Element">
  <eClassifiers xsi:type="ecore:EClass" name="EntityBinding" eSuperTypes="#//Element">
    <eStructuralFeatures xsi:type="ecore:EReference" name="templateEntity" lowerBound="1"
    <eStructuralFeatures xsi:type="ecore:EReference" name="templateEntity" lowerBound="1"
        eType="#//EntityReference" containment="true"/>
        eType="#//EntityReference" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="occurrenceEntity" lowerBound="1"
    <eStructuralFeatures xsi:type="ecore:EReference" name="occurrenceEntity" lowerBound="1"
        eType="#//EntityReference" containment="true"/>
        eType="#//EntityReference" containment="true"/>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Variants" eSuperTypes="tdl.ecore#//Element">
  <eClassifiers xsi:type="ecore:EClass" name="Variants" eSuperTypes="#//Element">
    <eStructuralFeatures xsi:type="ecore:EReference" name="variants" upperBound="-1"
    <eStructuralFeatures xsi:type="ecore:EReference" name="variants" upperBound="-1"
        eType="#//TestObjectiveVariant" containment="true"/>
        eType="#//TestObjectiveVariant" containment="true"/>
  </eClassifiers>
  </eClassifiers>
@@ -129,7 +153,7 @@
      </eAnnotations>
      </eAnnotations>
    </eStructuralFeatures>
    </eStructuralFeatures>
  </eClassifiers>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="VariantBinding" eSuperTypes="tdl.ecore#//Element">
  <eClassifiers xsi:type="ecore:EClass" name="VariantBinding" eSuperTypes="#//Element">
    <eStructuralFeatures xsi:type="ecore:EReference" name="value" lowerBound="1" eType="#//Value"
    <eStructuralFeatures xsi:type="ecore:EReference" name="value" lowerBound="1" eType="#//Value"
        containment="true"/>
        containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="boundTo" lowerBound="1"
    <eStructuralFeatures xsi:type="ecore:EReference" name="boundTo" lowerBound="1"
+10 −0
Original line number Original line Diff line number Diff line
@@ -7,6 +7,13 @@
  <foreignModel>structured.ecore</foreignModel>
  <foreignModel>structured.ecore</foreignModel>
  <genPackages prefix="StructuredObjectives" basePackage="org.etsi.mts.tdl" disposableProviderFactory="true"
  <genPackages prefix="StructuredObjectives" basePackage="org.etsi.mts.tdl" disposableProviderFactory="true"
      ecorePackage="structured.ecore#/">
      ecorePackage="structured.ecore#/">
    <genClasses ecoreClass="structured.ecore#//Element">
      <genOperations ecoreOperation="structured.ecore#//Element/getTestObjective"/>
      <genOperations ecoreOperation="structured.ecore#//Element/contains">
        <genParameters ecoreParameter="structured.ecore#//Element/contains/object"/>
      </genOperations>
      <genOperations ecoreOperation="structured.ecore#//Element/getNotes"/>
    </genClasses>
    <genClasses ecoreClass="structured.ecore#//StructuredTestObjective">
    <genClasses ecoreClass="structured.ecore#//StructuredTestObjective">
      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference structured.ecore#//StructuredTestObjective/configuration"/>
      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference structured.ecore#//StructuredTestObjective/configuration"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference structured.ecore#//StructuredTestObjective/initialConditions"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference structured.ecore#//StructuredTestObjective/initialConditions"/>
@@ -14,6 +21,9 @@
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference structured.ecore#//StructuredTestObjective/finalConditions"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference structured.ecore#//StructuredTestObjective/finalConditions"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference structured.ecore#//StructuredTestObjective/picsReference"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference structured.ecore#//StructuredTestObjective/picsReference"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference structured.ecore#//StructuredTestObjective/variants"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference structured.ecore#//StructuredTestObjective/variants"/>
      <genOperations ecoreOperation="structured.ecore#//StructuredTestObjective/indexOf">
        <genParameters ecoreParameter="structured.ecore#//StructuredTestObjective/indexOf/object"/>
      </genOperations>
    </genClasses>
    </genClasses>
    <genClasses ecoreClass="structured.ecore#//InitialConditions">
    <genClasses ecoreClass="structured.ecore#//InitialConditions">
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference structured.ecore#//InitialConditions/conditions"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference structured.ecore#//InitialConditions/conditions"/>