blob: b56b7903a156e8928ac1acabbb7a8f298587cc6d [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<gmfmap:Mapping
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"
xmlns:gmfmap="http://www.eclipse.org/gmf/2008/mappings"
xmlns:gmftool="http://www.eclipse.org/gmf/2005/ToolDefinition">
<nodes>
<containmentFeature
href="taipan.ecore#//Aquatory/ports"/>
<ownedChild>
<domainMetaElement
href="taipan.ecore#//Port"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewMethod="NATIVE"
editMethod="NATIVE">
<diagramLabel
href="taipan.gmfgraph#PortLocation"/>
<features
href="taipan.ecore#//Port/location"/>
</labelMappings>
<relatedDiagrams
href="port.gmfmap#//@diagram"/>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.0/@tools.0"/>
<diagramNode
href="taipan.gmfgraph#Port"/>
</ownedChild>
</nodes>
<nodes>
<containmentFeature
href="taipan.ecore#//Aquatory/ships"/>
<ownedChild>
<domainMetaElement
href="taipan.ecore#//Ship"/>
<domainSpecialization
body="not self.oclIsKindOf(Warship)"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewMethod="NATIVE"
editMethod="NATIVE">
<diagramLabel
href="taipan.gmfgraph#ShipName"/>
<features
href="taipan.ecore#//Ship/name"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.0/@tools.1"/>
<diagramNode
href="taipan.gmfgraph#Ship"/>
<children
compartment="//@nodes.1/@ownedChild/@compartments.0">
<containmentFeature
href="taipan.ecore#//Ship/cargo"/>
<ownedChild>
<domainMetaElement
href="taipan.ecore#//SmallItems"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="- %1$s [%2$d]"
editorPattern="%1$s:%2$s"
editPattern=":"
viewMethod="PRINTF"
editMethod="REGEXP">
<diagramLabel
href="taipan.gmfgraph#SmallItems"/>
<features
href="taipan.ecore#//Item/article"/>
<features
href="taipan.ecore#//SmallItems/quantity"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.0/@tools.3"/>
<diagramNode
href="taipan.gmfgraph#SmallItems"/>
</ownedChild>
</children>
<children
compartment="//@nodes.1/@ownedChild/@compartments.1">
<containmentFeature
href="taipan.ecore#//Ship/cargo"/>
<ownedChild>
<domainMetaElement
href="taipan.ecore#//LargeItem"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewMethod="NATIVE"
editMethod="NATIVE">
<diagramLabel
href="taipan.gmfgraph#LargeItemArticle"/>
<features
href="taipan.ecore#//Item/article"/>
</labelMappings>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewMethod="NATIVE"
editMethod="NATIVE">
<diagramLabel
href="taipan.gmfgraph#LargeItemWeight"/>
<features
href="taipan.ecore#//LargeItem/weight"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.0/@tools.4"/>
<diagramNode
href="taipan.gmfgraph#LargeItem"/>
</ownedChild>
</children>
<children
compartment="//@nodes.1/@ownedChild/@compartments.1">
<containmentFeature
href="taipan.ecore#//Ship/cargo"/>
<ownedChild>
<domainMetaElement
href="taipan.ecore#//EmptyBox"/>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.0/@tools.5"/>
<diagramNode
href="taipan.gmfgraph#EmptyBox"/>
</ownedChild>
</children>
<compartments
children="//@nodes.1/@ownedChild/@children.0">
<compartment
href="taipan.gmfgraph#SmallCargo"/>
</compartments>
<compartments
children="//@nodes.1/@ownedChild/@children.1 //@nodes.1/@ownedChild/@children.2">
<compartment
href="taipan.gmfgraph#LargeCargo"/>
</compartments>
</ownedChild>
</nodes>
<nodes>
<containmentFeature
href="taipan.ecore#//Aquatory/ships"/>
<ownedChild>
<domainMetaElement
href="taipan.ecore#//Warship"/>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewMethod="NATIVE"
editMethod="NATIVE">
<diagramLabel
href="taipan.gmfgraph#WarshipName"/>
<features
href="taipan.ecore#//Ship/name"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.0/@tools.2"/>
<diagramNode
href="taipan.gmfgraph#Warship"/>
<children
compartment="//@nodes.2/@ownedChild/@compartments.0"
referencedChild="//@nodes.1/@ownedChild/@children.0/@ownedChild">
<containmentFeature
href="taipan.ecore#//Ship/cargo"/>
</children>
<children
compartment="//@nodes.2/@ownedChild/@compartments.1"
referencedChild="//@nodes.1/@ownedChild/@children.1/@ownedChild">
<containmentFeature
href="taipan.ecore#//Ship/cargo"/>
</children>
<children
compartment="//@nodes.2/@ownedChild/@compartments.1"
referencedChild="//@nodes.1/@ownedChild/@children.2/@ownedChild">
<containmentFeature
href="taipan.ecore#//Ship/cargo"/>
</children>
<compartments
children="//@nodes.2/@ownedChild/@children.0">
<compartment
href="taipan.gmfgraph#SmallCargo"/>
</compartments>
<compartments
children="//@nodes.2/@ownedChild/@children.1 //@nodes.2/@ownedChild/@children.2">
<compartment
href="taipan.gmfgraph#LargeCargo"/>
</compartments>
</ownedChild>
</nodes>
<links>
<labelMappings
xsi:type="gmfmap:DesignLabelMapping">
<diagramLabel
href="taipan.gmfgraph#ShipDestinationMarker"/>
</labelMappings>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.1/@tools.3"/>
<diagramLink
href="taipan.gmfgraph#ShipDestination"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="taipan.ecore#//Ship/destination"/>
</links>
<links>
<domainMetaElement
href="taipan.ecore#//Route"/>
<domainSpecialization
body="reliability >= 0.5"/>
<domainInitializer
xsi:type="gmfmap:FeatureSeqInitializer">
<initializers
xsi:type="gmfmap:FeatureValueSpec">
<feature
xsi:type="ecore:EAttribute"
href="taipan.ecore#//Route/reliability"/>
<value
body="0.8"/>
</initializers>
</domainInitializer>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="route : {0}"
editorPattern="{0}"
editPattern="{0}">
<diagramLabel
href="taipan.gmfgraph#RouteDescription"/>
<features
href="taipan.ecore#//Route/description"/>
</labelMappings>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="reliability : {0,number,percent}"
editorPattern="{0,number,percent}"
editPattern="{0,number,percent}">
<diagramLabel
href="taipan.gmfgraph#RouteReliability"/>
<features
href="taipan.ecore#//Route/reliability"/>
</labelMappings>
<containmentFeature
href="taipan.ecore#//Aquatory/routes"/>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.1/@tools.0"/>
<diagramLink
href="taipan.gmfgraph#ReliableRoute"/>
<sourceMetaFeature
xsi:type="ecore:EReference"
href="taipan.ecore#//Route/source"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="taipan.ecore#//Route/destination"/>
</links>
<links>
<domainMetaElement
href="taipan.ecore#//Route"/>
<domainSpecialization
body="reliability &lt; 0.5"/>
<domainInitializer
xsi:type="gmfmap:FeatureSeqInitializer">
<initializers
xsi:type="gmfmap:FeatureValueSpec">
<feature
xsi:type="ecore:EAttribute"
href="taipan.ecore#//Route/reliability"/>
<value
body="0.2"/>
</initializers>
</domainInitializer>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="route : {0}"
editorPattern="{0}"
editPattern="{0}">
<diagramLabel
href="taipan.gmfgraph#RouteDescription"/>
<features
href="taipan.ecore#//Route/description"/>
</labelMappings>
<labelMappings
xsi:type="gmfmap:FeatureLabelMapping"
viewPattern="reliability : {0,number,percent}"
editorPattern="{0,number,percent}"
editPattern="{0,number,percent}">
<diagramLabel
href="taipan.gmfgraph#RouteReliability"/>
<features
href="taipan.ecore#//Route/reliability"/>
</labelMappings>
<containmentFeature
href="taipan.ecore#//Aquatory/routes"/>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.1/@tools.1"/>
<diagramLink
href="taipan.gmfgraph#UnreliableRoute"/>
<sourceMetaFeature
xsi:type="ecore:EReference"
href="taipan.ecore#//Route/source"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="taipan.ecore#//Route/destination"/>
</links>
<links>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.1/@tools.4"/>
<diagramLink
href="taipan.gmfgraph#ShipRoute"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="taipan.ecore#//Ship/route"/>
</links>
<links>
<domainMetaElement
href="taipan.ecore#//BesiegePortOrder"/>
<containmentFeature
href="taipan.ecore#//Warship/attackOrders"/>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.1/@tools.5"/>
<diagramLink
href="taipan.gmfgraph#BesiegePortOrder"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="taipan.ecore#//BesiegePortOrder/port"/>
<creationConstraints>
<sourceEnd
body="self.attackOrders->select(order | order.port = oppositeEnd)->isEmpty()"/>
</creationConstraints>
</links>
<links>
<domainMetaElement
href="taipan.ecore#//EscortShipsOrder"/>
<containmentFeature
href="taipan.ecore#//Warship/escortOrder"/>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.1/@tools.6"/>
<diagramLink
href="taipan.gmfgraph#EscortShipsOrder"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="taipan.ecore#//EscortShipsOrder/ships"/>
<creationConstraints>
<sourceEnd
body="self.escortOrder->isEmpty() or self.escortOrder.ships->select(ship | ship = oppositeEnd)->isEmpty()"/>
<targetEnd
body="not self.oclIsKindOf(Warship)"/>
</creationConstraints>
</links>
<links>
<tool
xsi:type="gmftool:CreationTool"
href="taipan.gmftool#//@palette/@tools.1/@tools.2"/>
<diagramLink
href="taipan.gmfgraph#Registration"/>
<linkMetaFeature
xsi:type="ecore:EReference"
href="taipan.ecore#//Port/register"/>
</links>
<diagram>
<diagramCanvas
href="taipan.gmfgraph#taipan"/>
<domainModel
href="taipan.ecore#/"/>
<domainMetaElement
href="taipan.ecore#//Aquatory"/>
<palette
href="taipan.gmftool#//@palette"/>
</diagram>
<audits
id="taipan"
name="TaiPan Audits"
description="All TaiPan audits">
<audits
name="Port Location"
description="Empty port location check"
id="port_location"
message="Port location should not be empty">
<rule
body="location.size() > 0"/>
<target
xsi:type="gmfmap:DomainElementTarget">
<element
href="taipan.ecore#//Port"/>
</target>
</audits>
<audits
name="Ship Name"
description="Empty ship name check"
id="ship_name"
message="Ship name should not be empty">
<rule
body="self.length() > 0"
language="java"/>
<target
xsi:type="gmfmap:DomainAttributeTarget"
nullAsError="true">
<attribute
href="taipan.ecore#//Ship/name"/>
</target>
</audits>
<audits
name="Large Item Weight"
description="Large item weight check"
id="litem_weight"
message="Large item weight should be greater than zero.">
<rule
body="weight > 0"/>
<target
xsi:type="gmfmap:DomainElementTarget">
<element
href="taipan.ecore#//LargeItem"/>
</target>
</audits>
<audits
name="Ship Type"
description="Ship type check"
id="ship_type"
message="Invalid ship type.">
<rule
body="element.eClass().name = 'Ship'"/>
<target
xsi:type="gmfmap:DiagramElementTarget"
element="//@nodes.1/@ownedChild"/>
</audits>
</audits>
<metrics>
<metrics
name="Route Reliability"
description="Safety of the route."
key="RouteRelb"
lowLimit="0.1"
highLimit="0.9">
<rule
body="reliability"/>
<target
xsi:type="gmfmap:DomainElementTarget">
<element
href="taipan.ecore#//Route"/>
</target>
</metrics>
<metrics
name="Ship Load"
description="Quantity of items loaded on ship."
key="ShipLoad"
lowLimit="1.0"
highLimit="5.0">
<rule
body="cargo.size()"
language="java"/>
<target
xsi:type="gmfmap:DomainElementTarget">
<element
href="taipan.ecore#//Ship"/>
</target>
</metrics>
</metrics>
</gmfmap:Mapping>