Skip to main content
summaryrefslogtreecommitdiffstats
blob: 8e63a8705a88d44db8b5e2ca522f3010456c7e54 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?xml version="1.0" encoding="UTF-8"?>
<qvti:ImperativeModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:pivot="http://www.eclipse.org/ocl/2015/Pivot" xmlns:qvtb="http://www.eclipse.org/qvt/2015/QVTbase"
    xmlns:qvti="http://www.eclipse.org/qvt/2015/QVTimperative"
    xsi:schemaLocation="http://www.eclipse.org/ocl/2015/Pivot java://org.eclipse.ocl.pivot.PivotPackage http://www.eclipse.org/qvt/2015/QVTbase java://org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage http://www.eclipse.org/qvt/2015/QVTimperative java://org.eclipse.qvtd.pivot.qvtimperative.QVTimperativePackage"
    name="ClassesCS2ASv2.qvti" externalURI="platform:/resource/org.eclipse.qvtd.xtext.qvtimperative.tests/src/org/eclipse/qvtd/xtext/qvtimperative/tests/ClassesCS2AS/bug457239/ClassesCS2ASv2.qvti">
  <ownedImports name="classes" importedNamespace="pivot:Model ../Classes.ecore.oclas#/"/>
  <ownedImports name="classescs" importedNamespace="pivot:Model ../ClassesCS.ecore.oclas#/"/>
  <ownedImports importedNamespace="pivot:Model helpers.ocl.oclas#/"/>
  <ownedPackages xmi:id="P." name="">
    <ownedClasses xsi:type="qvtb:Transformation" xmi:id="T..classescs2as" name="classescs2as"
        superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclElement">
      <modelParameter xmi:id="qT..classescs2as.leftCS" name="leftCS" usedPackage="../ClassesCS.ecore.oclas#P.classescs"/>
      <modelParameter xmi:id="qT..classescs2as.rightAS" name="rightAS" usedPackage="../Classes.ecore.oclas#P.classes"/>
      <rule xsi:type="qvti:Mapping" xmi:id="m..classescs2as.createPackage" name="createPackage">
        <domain xsi:type="qvti:ImperativeDomain" isCheckable="true" isEnforceable="false"
            typedModel="#qT..classescs2as.leftCS">
          <guardPattern>
            <variable xmi:id="qV..classescs2as.createPackage.leftCS.guard.packageCS"
                name="packageCS" type="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"/>
          </guardPattern>
          <bottomPattern/>
        </domain>
        <domain xsi:type="qvti:ImperativeDomain" isCheckable="false" isEnforceable="true"
            typedModel="#qT..classescs2as.rightAS">
          <guardPattern/>
          <bottomPattern>
            <realizedVariable xmi:id="qV..classescs2as.createPackage.rightAS.bottom.package"
                name="package" type="pivot:Class ../Classes.ecore.oclas#T.classes.Package"/>
          </bottomPattern>
        </domain>
        <guardPattern/>
        <bottomPattern>
          <assignment xsi:type="qvti:PropertyAssignment" isDefault="false" targetProperty="../Classes.ecore.oclas#p.classes.NamedElement.name">
            <value xsi:type="pivot:IfExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String">
              <ownedCondition xsi:type="pivot:OperationCallExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#Boolean"
                  referredOperation="helpers.ocl.oclas#o.ocl.OclElement.aBooleanElementOp">
                <ownedSource xsi:type="pivot:VariableExp" type="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"
                    referredVariable="#qV..classescs2as.createPackage.leftCS.guard.packageCS"/>
              </ownedCondition>
              <ownedElse xsi:type="pivot:StringLiteralExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
                  stringSymbol="unexpected"/>
              <ownedThen xsi:type="pivot:StringLiteralExp" type="pivot:PrimitiveType http://www.eclipse.org/ocl/2015/Library.oclas#String"
                  stringSymbol="transformation worked"/>
            </value>
            <slotExpression xsi:type="pivot:VariableExp" type="pivot:Class ../Classes.ecore.oclas#T.classes.Package"
                referredVariable="#qV..classescs2as.createPackage.rightAS.bottom.package"/>
          </assignment>
        </bottomPattern>
      </rule>
      <rule xsi:type="qvti:Mapping" xmi:id="m..classescs2as.__root__" name="__root__">
        <guardPattern/>
        <bottomPattern/>
          <ownedStatements xsi:type="qvti:MappingLoop">
            <ownedSource xsi:type="pivot:OperationCallExp" type="#//@ownedPackages.1/@ownedClasses.0"
                referredOperation="http://www.eclipse.org/ocl/2015/Library.oclas#o.ocl.OclElement.allInstances">
              <ownedSource xsi:type="pivot:TypeExp" type="pivot:Class http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.Class"
                  referredType="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"/>
            </ownedSource>
              <ownedMappingStatements xsi:type="qvti:MappingCall" referredMapping="#m..classescs2as.createPackage">
                <binding boundVariable="#qV..classescs2as.createPackage.leftCS.guard.packageCS">
                  <value xsi:type="pivot:VariableExp" type="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"
                      referredVariable="#i..classescs2as.__root__.0.0.packageCS"/>
                </binding>
              </ownedMappingStatements>
            <ownedIterators xmi:id="i..classescs2as.__root__.0.0.packageCS" name="packageCS"
                type="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"/>
          </ownedStatements>
       </rule>
    </ownedClasses>
  </ownedPackages>
  <ownedPackages xmi:id="P.$$" name="$$" URI="http://www.eclipse.org/ocl/2015/Orphanage"
      nsPrefix="orphanage">
    <ownedClasses xsi:type="pivot:SetType" name="Set" superClasses="#//@ownedPackages.1/@ownedClasses.1"
        elementType="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS">
      <ownedBindings>
        <ownedSubstitutions actual="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"
            formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..SetT"/>
      </ownedBindings>
    </ownedClasses>
    <ownedClasses xsi:type="pivot:CollectionType" name="UniqueCollection" superClasses="#//@ownedPackages.1/@ownedClasses.2"
        elementType="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS">
      <ownedBindings>
        <ownedSubstitutions actual="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"
            formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..UniqueCollectionT"/>
      </ownedBindings>
    </ownedClasses>
    <ownedClasses xsi:type="pivot:CollectionType" name="Collection" superClasses="http://www.eclipse.org/ocl/2015/Library.oclas#T.ocl.OclAny"
        elementType="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS">
      <ownedBindings>
        <ownedSubstitutions actual="pivot:Class ../ClassesCS.ecore.oclas#T.classescs.PackageCS"
            formal="http://www.eclipse.org/ocl/2015/Library.oclas#t.ocl..CollectionT"/>
      </ownedBindings>
    </ownedClasses>
  </ownedPackages>
</qvti:ImperativeModel>

Back to the top