G2D = <http://www.simantics.org/G2D-1.1>\r
DIA = <http://www.simantics.org/Diagram-2.2>\r
SYSDYN = <http://www.simantics.org/Sysdyn-1.1>\r
+IMAGE = <http://www.simantics.org/Image2-1.2>\r
+MOD = <http://www.simantics.org/Modeling-1.2>\r
\r
-GENERAL = SYSDYN.SymbolReferences.GeneralSymbols : DIA.SymbolReferenceLibrary\r
+GENERAL = SYSDYN.SymbolReferences.CommentSymbols : DIA.SymbolReferenceLibrary\r
L0.HasDescription "General graphical components"\r
\r
SYSDYN.AdditionalSymbols : L0.Library\r
L0.HasLabel "Comment"\r
L0.IsDependencyOf GENERAL\r
G2D.HasSVGDocument """<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" overflow="visible" version="1.1"><g style="fill:#000000;fill-opacity:1;stroke:none"><path d="m 4.2699962,-2.1489344 -0.4716797,0 C 3.7572928,-2.3129896 3.6832369,-2.5078137 3.5761485,-2.733407 3.4690444,-2.9589851 3.3494156,-3.1720383 3.2172618,-3.3725672 3.0805357,-3.5821941 2.9312845,-3.7656249 2.7695079,-3.9228601 2.6077171,-4.0800777 2.4516301,-4.1700841 2.3012462,-4.1928797 2.1599637,-4.2110997 1.9822295,-4.2247716 1.768043,-4.2338953 1.5538445,-4.2430007 1.3556025,-4.247558 1.1733165,-4.2475672 l -0.3964844,0 0,7.7587891 c -5.05e-6,0.1503919 0.031896,0.2882498 0.0957031,0.4135742 0.0637969,0.1253264 0.17545037,0.2221687 0.33496097,0.2905273 0.082026,0.031902 0.2540632,0.075196 0.5161132,0.1298829 0.2620381,0.054688 0.4659766,0.08431 0.6118165,0.088867 l 0,0.4853516 -4.5800782,0 0,-0.4853516 c 0.127602,-0.00911 0.3224261,-0.027343 0.5844727,-0.054687 0.2620414,-0.027343 0.4431935,-0.061523 0.543457,-0.102539 0.15038733,-0.059244 0.26090154,-0.1446932 0.33154298,-0.2563477 0.0706345,-0.1116526 0.10595343,-0.2609038 0.10595704,-0.4477539 l 0,-7.8203125 -0.39648442,0 c -0.1412791,9.2e-6 -0.3167346,0.00343 -0.5263671,0.010254 -0.2096379,0.00685 -0.4101586,0.021656 -0.6015625,0.044434 -0.1503926,0.018238 -0.3064797,0.1082447 -0.4682618,0.2700196 -0.1617853,0.1617925 -0.3110364,0.3452233 -0.4477539,0.5502929 -0.1367197,0.2050862 -0.2574879,0.4226967 -0.3623047,0.6528321 -0.1048184,0.2301506 -0.177735,0.4204173 -0.21875,0.5708007 l -0.4785156,0 0,-2.6318359 8.4492188,0 z" /></g></svg>""" : L0.String\r
+\r
+SYSDYN.Loop <T SYSDYN.Component <T DIA.FontProvider <T DIA.ColorProvider //<T DIA.TextElement\r
+ >-- SYSDYN.Loop.Clockwise --> L0.Boolean <R L0.ConsistsOf : L0.FunctionalRelation\r
+ >-- SYSDYN.Loop.Comment --> L0.String <R L0.ConsistsOf : L0.FunctionalRelation\r
+ >-- SYSDYN.Loop.Items --> L0.List <R L0.DependsOn : L0.FunctionalRelation\r
+ @L0.assert SYSDYN.Loop.Clockwise L0.True\r
+ @L0.assert SYSDYN.Loop.Comment "$$AUTO$$"\r
+ @L0.assert G2D.HasFont SYSDYN.DefaultFont \r
+ @L0.assert G2D.HasColor \r
+ [0.0,0.0,1.0,1.0] : G2D.Color \r
+ \r
+SYSDYN.LoopSymbol <T SYSDYN.SysdynSymbol\r
+ @MOD.defSymbol "Loop" SYSDYN.Loop\r
+// L0.HasDescription "(Shift+L)"\r
+ L0.IsDependencyOf GENERAL\r
+ G2D.HasSVGDocument \r
+ _ : IMAGE.SvgImage \r
+ @L0.loadString "svg/loop.svg"
\ No newline at end of file
DIA.HasSymbolContribution _ : DIA.BasicSymbolContribution
DIA.BasicSymbolContributionHasSymbolLibrary
BasicSymbols
- SYSDYN.SymbolReferences.GeneralSymbols
+ SYSDYN.SymbolReferences.CommentSymbols
>-- SYSDYN.ConfigurationDiagram.selection --> DIA.Element <R L0.HasProperty
SYSDYN.ConfigurationDiagramTemplate : MOD.DiagramTemplate
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="210mm"
+ height="297mm"
+ id="svg1901"
+ sodipodi:version="0.32"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="arrowHead.svg"
+ version="1.1">
+ <defs
+ id="defs1903">
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="TriangleInL"
+ style="overflow:visible">
+ <path
+ id="path4265"
+ d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
+ transform="scale(-0.8)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lend"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow2Lend"
+ style="overflow:visible;">
+ <path
+ id="path4153"
+ style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
+ d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
+ transform="scale(1.1) rotate(180) translate(1,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Lstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow2Lstart"
+ style="overflow:visible">
+ <path
+ id="path4150"
+ style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
+ transform="scale(1.1) translate(1,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Lstart"
+ style="overflow:visible">
+ <path
+ id="path4132"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
+ transform="scale(0.8) translate(12.5,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Mstart"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Mstart"
+ style="overflow:visible">
+ <path
+ id="path4138"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
+ transform="scale(0.4) translate(10,0)" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Lend"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Arrow1Lend"
+ style="overflow:visible;">
+ <path
+ id="path4135"
+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
+ transform="scale(0.8) rotate(180) translate(12.5,0)" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.70710678"
+ inkscape:cx="26.330076"
+ inkscape:cy="194.93962"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:window-width="1006"
+ inkscape:window-height="739"
+ inkscape:window-x="1428"
+ inkscape:window-y="52"
+ showgrid="false"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata1906">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Taso 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ style="opacity:1">
+ <path
+ sodipodi:type="star"
+ style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="path2982"
+ sodipodi:sides="3"
+ sodipodi:cx="322.85715"
+ sodipodi:cy="309.50504"
+ sodipodi:r1="177.90733"
+ sodipodi:r2="88.953667"
+ sodipodi:arg1="2.9394727"
+ sodipodi:arg2="3.9866703"
+ inkscape:flatsided="true"
+ inkscape:rounded="0"
+ inkscape:randomized="0"
+ d="m 148.57144,345.21932 230.49908,-204.50728 61.85896,301.8717 z"
+ inkscape:transform-center-y="-0.37884722"
+ transform="matrix(0.00747689,-0.00472065,0.00249533,0.01414476,7.2395258,1043.2168)" />
+ <path
+ sodipodi:type="arc"
+ style="fill:none;stroke:#000000;stroke-width:0.88339353;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-mid:none;marker-end:none"
+ id="path2996"
+ sodipodi:cx="38.035713"
+ sodipodi:cy="1014.4158"
+ sodipodi:rx="21.785715"
+ sodipodi:ry="13.121153"
+ d="m 59.821428,1014.4158 a 21.785715,13.121153 0 1 1 -22.182754,-13.119"
+ transform="matrix(0.23486318,0,0,0.36599586,-3.551648,675.89564)"
+ sodipodi:start="0"
+ sodipodi:end="4.6941632"
+ sodipodi:open="true" />
+ </g>
+</svg>
public final Resource LookupExpression;\r
public final Resource LookupExpression_lookup;\r
public final Resource LookupExpression_lookup_Inverse;\r
+ public final Resource Loop;\r
+ public final Resource LoopSymbol;\r
+ public final Resource Loop_Clockwise;\r
+ public final Resource Loop_Clockwise_Inverse;\r
+ public final Resource Loop_Comment;\r
+ public final Resource Loop_Comment_Inverse;\r
+ public final Resource Loop_Items;\r
+ public final Resource Loop_Items_Inverse;\r
public final Resource Migration;\r
public final Resource Migration_from1$6to1$7;\r
public final Resource Migration_from1$6to1$7_Ontologies;\r
public final Resource StockSymbol;\r
public final Resource SymbolReferences;\r
public final Resource SymbolReferences_BasicSymbols;\r
- public final Resource SymbolReferences_GeneralSymbols;\r
+ public final Resource SymbolReferences_CommentSymbols;\r
public final Resource Symbols;\r
public final Resource SysdynConnectionType;\r
public final Resource SysdynDiagramModelingRules;\r
public static final String LookupExpression = "http://www.simantics.org/Sysdyn-1.1/LookupExpression";\r
public static final String LookupExpression_lookup = "http://www.simantics.org/Sysdyn-1.1/LookupExpression/lookup";\r
public static final String LookupExpression_lookup_Inverse = "http://www.simantics.org/Sysdyn-1.1/LookupExpression/lookup/Inverse";\r
+ public static final String Loop = "http://www.simantics.org/Sysdyn-1.1/Loop";\r
+ public static final String LoopSymbol = "http://www.simantics.org/Sysdyn-1.1/LoopSymbol";\r
+ public static final String Loop_Clockwise = "http://www.simantics.org/Sysdyn-1.1/Loop/Clockwise";\r
+ public static final String Loop_Clockwise_Inverse = "http://www.simantics.org/Sysdyn-1.1/Loop/Clockwise/Inverse";\r
+ public static final String Loop_Comment = "http://www.simantics.org/Sysdyn-1.1/Loop/Comment";\r
+ public static final String Loop_Comment_Inverse = "http://www.simantics.org/Sysdyn-1.1/Loop/Comment/Inverse";\r
+ public static final String Loop_Items = "http://www.simantics.org/Sysdyn-1.1/Loop/Items";\r
+ public static final String Loop_Items_Inverse = "http://www.simantics.org/Sysdyn-1.1/Loop/Items/Inverse";\r
public static final String Migration = "http://www.simantics.org/Sysdyn-1.1/Migration";\r
public static final String Migration_from1$6to1$7 = "http://www.simantics.org/Sysdyn-1.1/Migration/from1.6to1.7";\r
public static final String Migration_from1$6to1$7_Ontologies = "http://www.simantics.org/Sysdyn-1.1/Migration/from1.6to1.7/Ontologies";\r
public static final String StockSymbol = "http://www.simantics.org/Sysdyn-1.1/StockSymbol";\r
public static final String SymbolReferences = "http://www.simantics.org/Sysdyn-1.1/SymbolReferences";\r
public static final String SymbolReferences_BasicSymbols = "http://www.simantics.org/Sysdyn-1.1/SymbolReferences/BasicSymbols";\r
- public static final String SymbolReferences_GeneralSymbols = "http://www.simantics.org/Sysdyn-1.1/SymbolReferences/GeneralSymbols";\r
+ public static final String SymbolReferences_CommentSymbols = "http://www.simantics.org/Sysdyn-1.1/SymbolReferences/CommentSymbols";\r
public static final String Symbols = "http://www.simantics.org/Sysdyn-1.1/Symbols";\r
public static final String SysdynConnectionType = "http://www.simantics.org/Sysdyn-1.1/SysdynConnectionType";\r
public static final String SysdynDiagramModelingRules = "http://www.simantics.org/Sysdyn-1.1/SysdynDiagramModelingRules";\r
LookupExpression = getResourceOrNull(graph, URIs.LookupExpression);\r
LookupExpression_lookup = getResourceOrNull(graph, URIs.LookupExpression_lookup);\r
LookupExpression_lookup_Inverse = getResourceOrNull(graph, URIs.LookupExpression_lookup_Inverse);\r
+ Loop = getResourceOrNull(graph, URIs.Loop);\r
+ LoopSymbol = getResourceOrNull(graph, URIs.LoopSymbol);\r
+ Loop_Clockwise = getResourceOrNull(graph, URIs.Loop_Clockwise);\r
+ Loop_Clockwise_Inverse = getResourceOrNull(graph, URIs.Loop_Clockwise_Inverse);\r
+ Loop_Comment = getResourceOrNull(graph, URIs.Loop_Comment);\r
+ Loop_Comment_Inverse = getResourceOrNull(graph, URIs.Loop_Comment_Inverse);\r
+ Loop_Items = getResourceOrNull(graph, URIs.Loop_Items);\r
+ Loop_Items_Inverse = getResourceOrNull(graph, URIs.Loop_Items_Inverse);\r
Migration = getResourceOrNull(graph, URIs.Migration);\r
Migration_from1$6to1$7 = getResourceOrNull(graph, URIs.Migration_from1$6to1$7);\r
Migration_from1$6to1$7_Ontologies = getResourceOrNull(graph, URIs.Migration_from1$6to1$7_Ontologies);\r
StockSymbol = getResourceOrNull(graph, URIs.StockSymbol);\r
SymbolReferences = getResourceOrNull(graph, URIs.SymbolReferences);\r
SymbolReferences_BasicSymbols = getResourceOrNull(graph, URIs.SymbolReferences_BasicSymbols);\r
- SymbolReferences_GeneralSymbols = getResourceOrNull(graph, URIs.SymbolReferences_GeneralSymbols);\r
+ SymbolReferences_CommentSymbols = getResourceOrNull(graph, URIs.SymbolReferences_CommentSymbols);\r
Symbols = getResourceOrNull(graph, URIs.Symbols);\r
SysdynConnectionType = getResourceOrNull(graph, URIs.SysdynConnectionType);\r
SysdynDiagramModelingRules = getResourceOrNull(graph, URIs.SysdynDiagramModelingRules);\r
VTT Technical Research Centre of Finland - initial API and implementation\r
-->\r
-<adapters>\r\r <target interface="org.simantics.db.layer0.adapter.Realization">\r <type uri="http://www.simantics.org/Sysdyn-0.0/Module"\r class="org.simantics.structural2.realization.StructuralRealization">\r <this />\r </type>\r </target>\r\r <target interface="org.simantics.layer0.utils.triggers.ITrigger">\r <type uri = "http://www.simantics.org/Sysdyn-0.0/DiagramToCompositeMapping"\r class = "org.simantics.sysdyn.ui.editor.DiagramToCompositeMapping3">\r <graph/>\r <this />\r </type>\r </target>\r \r <target interface="org.simantics.structural.ui.modelBrowser.nodes.AbstractNode">\r <type uri="http://www.simantics.org/Sysdyn-0.0/SysdynModel"\r class="org.simantics.structural.ui.modelBrowser.nodes.ModelNode">\r <this />\r </type>\r </target> \r \r\r <target\r interface="org.simantics.browsing.ui.common.node.AbstractNode">\r <type\r uri="http://www.simantics.org/Sysdyn-0.0/SysdynModel"\r class="org.simantics.sysdyn.ui.browser.nodes.ModelNode">\r <this />\r </type>\r\r <resource\r uri="http://www.simantics.org/Sysdyn-0.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.browser.nodes.SymbolNode">\r <this />\r </resource>\r\r <type\r uri="http://www.simantics.org/Simulation-0.0/Experiment"\r class="org.simantics.sysdyn.ui.browser.nodes.ExperimentNode">\r <this />\r </type>\r \r <type\r uri="http://www.simantics.org/Sysdyn-0.0/Result"\r class="org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode">\r <this />\r </type>\r \r </target>\r\r <!-- Inject default connection routing algorithm for sysdyn diagrams -->\r <target interface="org.simantics.g2d.diagram.DiagramClass">\r <adapter uri="http://www.simantics.org/Sysdyn-0.0/ConfigurationDiagram"\r adapterClass="org.simantics.sysdyn.ui.elements.ConfigurationDiagramClassAdapter" />\r </target>\r\r <!-- Sysdyn symbols -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/StockSymbol"\r class="org.simantics.sysdyn.ui.elements.StockFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.elements.ModuleFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ValveSymbol"\r class="org.simantics.sysdyn.ui.elements.ValveFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/AuxiliarySymbol"\r class="org.simantics.sysdyn.ui.elements.AuxiliaryFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/CloudSymbol"\r class="org.simantics.sysdyn.ui.elements.CloudFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/InputSymbol"\r class="org.simantics.sysdyn.ui.elements.InputFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ShadowSymbol"\r class="org.simantics.sysdyn.ui.elements.ShadowFactory" /> \r\r <type uri="http://www.simantics.org/Sysdyn-0.0/StockSymbol"\r class="org.simantics.sysdyn.ui.elements.StockFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.elements.ModuleFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/ValveSymbol"\r class="org.simantics.sysdyn.ui.elements.ValveFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/AuxiliarySymbol"\r class="org.simantics.sysdyn.ui.elements.AuxiliaryFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/CloudSymbol"\r class="org.simantics.sysdyn.ui.elements.CloudFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/InputSymbol"\r class="org.simantics.sysdyn.ui.elements.InputFactory" /> \r <type uri="http://www.simantics.org/Sysdyn-0.0/ShadowSymbol"\r class="org.simantics.sysdyn.ui.elements.ShadowFactory" /> \r </target>\r \r <!-- Additional symbols -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/AdditionalSymbols/MultilineText"\r class="org.simantics.sysdyn.ui.elements.MultilineTextElementFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/AdditionalSymbols/MultilineText"\r class="org.simantics.sysdyn.ui.elements.MultilineTextElementFactory" /> \r </target> \r \r <!-- Sysdyn connections -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <!-- Edges --> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements.connections.RouteFlowEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements.connections.RouteFlowEdgeFactory" /> \r <type uri="http://www.simantics.org/Sysdyn-0.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements.connections.RouteFlowConnectionFactory">\r <graph/>\r </type> \r \r <resource uri="http://www.simantics.org/Sysdyn-0.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements.connections.DependencyEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements.connections.DependencyEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements.connections.DependencyConnectionFactory" />\r </target>\r \r <target interface="org.simantics.g2d.connection.EdgeVisualsConfigurer">\r <baseType uri="http://www.simantics.org/Diagram-0.0/HasConnector" />\r <resource uri="http://www.simantics.org/Diagram-0.0/HasPlainConnector"\r class="org.simantics.diagram.content.ArrowConfigurer">\r <string>none 0</string>\r </resource>\r <resource uri="http://www.simantics.org/Diagram-0.0/HasArrowConnector"\r class="org.simantics.diagram.content.ArrowConfigurer">\r <string>fill 1</string>\r </resource>\r </target>\r \r <!-- ModelBrowser2 -->\r \r <target interface="org.simantics.browsing.ui.model.children.ChildRule">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ModuleTypeChildRule"\r class="org.simantics.sysdyn.ui.browser.childrules.ModuleTypeChildRule"/>\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ModuleContentChildRule"\r class="org.simantics.sysdyn.ui.browser.childrules.ModuleContentChildRule"/> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/VariableChildRule"\r class="org.simantics.sysdyn.ui.browser.childrules.VariableChildRule"/> \r \r <resource uri="http://www.simantics.org/Sysdyn-0.0/HistoryDataset/HistoryDatasetVariablesBrowseContext/VariableChildRule"\r class="org.simantics.sysdyn.ui.properties.widgets.historyDataset.VariableChildRule"/> \r <resource uri=" http://www.simantics.org/Sysdyn-0.0/Module/ParameterOverrideBrowseContext/ParameterChildRule"\r class="org.simantics.sysdyn.ui.properties.widgets.modules.ParameterChildRule"/> \r \r \r <!-- Sensitivity analysis -->\r <resource uri="http://www.simantics.org/Sysdyn-0.0/SensitivityAnalysisExperiment/ParameterBrowseContext/ParameterChildRule"\r class="org.simantics.sysdyn.ui.properties.widgets.sensitivity.ParameterChildRule"/> \r </target>\r \r <target interface="org.simantics.browsing.ui.model.visuals.VisualsRule">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ModuleTypeLabelRule"\r class="org.simantics.sysdyn.ui.browser.labelrules.ModuleTypeLabelRule"/>\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/VariableNameLabelRule"\r class="org.simantics.sysdyn.ui.browser.labelrules.VariableNameLabelRule"/>\r\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/VariableImageRule"\r class="org.simantics.sysdyn.ui.browser.imagerules.VariableImageRule"/> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ChartImageRule"\r class="org.simantics.sysdyn.ui.browser.imagerules.ChartImageRule"/> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ResultImageRule"\r class="org.simantics.sysdyn.ui.browser.imagerules.ResultImageRule"/> \r \r \r <resource uri="http://www.simantics.org/Sysdyn-0.0/HistoryDataset/HistoryDatasetVariablesBrowseContext/VariableLabelRule"\r class="org.simantics.sysdyn.ui.properties.widgets.historyDataset.VariableLabelRule"/> \r\r \r <resource uri="http://www.simantics.org/Sysdyn-0.0/Module/ParameterOverrideBrowseContext/ParameterLabelRule"\r class="org.simantics.sysdyn.ui.properties.widgets.modules.ParameterLabelRule"/> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/Module/ParameterOverrideBrowseContext/ParameterLabelDecorationRule"\r class="org.simantics.sysdyn.ui.properties.widgets.modules.ParameterLabelDecorationRule"/> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/Module/ParameterOverrideBrowseContext/ParameterModifierRule"\r class="org.simantics.sysdyn.ui.properties.widgets.modules.ParameterModifierRule"/> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/Module/ParameterOverrideBrowseContext/ParameterSorterRule"\r class="org.simantics.sysdyn.ui.properties.widgets.modules.ParameterSorterRule"/> \r \r <!-- Sensitivity analysis -->\r <resource uri="http://www.simantics.org/Sysdyn-0.0/SensitivityAnalysisExperiment/ParameterBrowseContext/ParameterLabelRule"\r class="org.simantics.sysdyn.ui.properties.widgets.sensitivity.ParameterLabelRule"/>\r\r </target> \r \r <target interface="org.simantics.db.layer0.adapter.ActionFactory">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewModuleType"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewModuleTypeAction" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewEnumeration"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewEnumerationAction" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewFunction"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewFunctionAction" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewFunctionLibrary"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewFunctionLibraryAction" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewSharedFunctionLibrary"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewSharedFunctionLibraryAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewExperiment"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewExperimentAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewSimulationPlaybackExperiment"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewSimulationPlaybackExperimentAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewLineChart"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewLineChartAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewBarChart"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewBarChartAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewPieChart"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewPieChartAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewSheet"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewSheetAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewHistoryData"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewHistoryDataAction" /> \r </target> \r \r <target interface="org.simantics.db.layer0.adapter.DropActionFactory">\r <resource\r uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/FunctionDropAction"\r class="org.simantics.sysdyn.ui.browser.actions.drop.FunctionDropAction" />\r <resource\r uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/ChartDropAction"\r class="org.simantics.sysdyn.ui.browser.actions.drop.ChartDropAction" /> \r \r \r </target> \r \r <target interface="org.simantics.db.layer0.adapter.Remover">\r <type uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ModuleSymbol"\r class="org.simantics.sysdyn.ui.browser.actions.remove.ModuleTypeRemover">\r <graph />\r <this />\r </type>\r <type uri="http://www.simantics.org/Sysdyn-0.0/Variable"\r class="org.simantics.sysdyn.ui.actions.SysdynVariableRemover">\r <this />\r </type>\r </target>\r \r \r <target interface="org.simantics.browsing.ui.model.nodetypes.NodeType">\r <baseType uri="http://www.simantics.org/Layer0-0.0/Entity" />\r <type\r uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ModuleSymbolNodeType"\r class="org.simantics.sysdyn.ui.browser.nodeTypes.ModuleSymbolNodeType"\r constructor="create">\r <this/>\r </type> \r </target>\r \r <!-- PROFILES -->\r <target interface="org.simantics.scenegraph.profile.Style">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/SimulationPlaybackStyle"\r class="org.simantics.sysdyn.ui.elements.profiles.SimulationPlaybackStyle">\r </resource>\r <resource uri="http://www.simantics.org/Sysdyn-0.0/IssueStyle"\r class="org.simantics.sysdyn.ui.elements.profiles.IssueDecorationStyle">\r </resource>\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ShadowStyle"\r class="org.simantics.sysdyn.ui.elements.profiles.ShadowStyle">\r </resource> \r </target>\r \r \r <!-- TODO: currently maps jfree concepts directly to Sysdyn implementations. Sysdyn needs tool specific types for the datasets. -->\r <!-- TODO: AllVariablesOfModel query is run on random Resources; listing all possible types explicitly is cumbersome, we need a better implementation. -->\r <target interface="org.simantics.jfreechart.chart.properties.IAllVariablesOfModel"> \r <type uri="http://www.simantics.org/Sysdyn-1.1/SysdynModel"\r class="org.simantics.sysdyn.ui.trend.AllVariablesOfModel">\r <this />\r </type> \r <type uri="http://www.simantics.org/JFreeChart-1.0/NumberAxis"\r class="org.simantics.sysdyn.ui.trend.AllVariablesOfModel">\r <this />\r </type> \r <type uri="http://www.simantics.org/JFreeChart-1.0/Series"\r class="org.simantics.sysdyn.ui.trend.AllVariablesOfModel">\r <this />\r </type> \r <type uri="http://www.simantics.org/Sysdyn-0.0/SensitivityAnalysisExperiment/Parameter"\r class="org.simantics.sysdyn.ui.trend.AllParametersOfModel">\r <this />\r </type>\r </target> \r \r <target interface="org.simantics.jfreechart.chart.properties.RangeHandlerFactory"> \r <type uri="http://www.simantics.org/JFreeChart-1.0/Series"\r class="org.simantics.sysdyn.ui.trend.SysdynRangeHandlerFactory">\r </type> \r <type uri="http://www.simantics.org/Sysdyn-0.0/SensitivityAnalysisExperiment/Parameter"\r class="org.simantics.sysdyn.ui.properties.widgets.sensitivity.SensitivityRangeHandlerFactory">\r </type>\r </target> \r \r <!-- TODO: currently maps jfree concepts directly to Sysdyn implementations. Sysdyn needs tool specific types for the datasets. -->\r <target interface="org.simantics.jfreechart.chart.IDataset">\r <type uri="http://www.simantics.org/JFreeChart-0.0/XYDataset"\r class="org.simantics.sysdyn.ui.trend.XYDataset">\r <graph />\r <this />\r </type>\r <type uri="http://www.simantics.org/JFreeChart-0.0/CategoryDataset"\r class="org.simantics.sysdyn.ui.trend.CategoryDataset">\r <graph />\r <this />\r </type> \r <type uri="http://www.simantics.org/JFreeChart-0.0/PieDataset"\r class="org.simantics.sysdyn.ui.trend.PieDataset">\r <graph />\r <this />\r </type> \r <type uri="http://www.simantics.org/Sysdyn-0.0/Charts/SensitivityDataset"\r class="org.simantics.sysdyn.ui.trend.SensitivityDataset">\r <graph />\r <this />\r </type>\r </target>\r \r <!-- Sensitivity analysis -->\r <target\r interface="org.simantics.sysdyn.ui.properties.widgets.sensitivity.IDistributionProperties">\r <type\r uri="http://www.simantics.org/Sysdyn-0.0/NormalDistribution"\r class="org.simantics.sysdyn.ui.properties.widgets.sensitivity.NormalDistributionProperties">\r <this />\r </type> \r <type\r uri="http://www.simantics.org/Sysdyn-0.0/UniformDistribution"\r class="org.simantics.sysdyn.ui.properties.widgets.sensitivity.UniformDistributionProperties">\r <this />\r </type> \r <type\r uri="http://www.simantics.org/Sysdyn-0.0/Interval"\r class="org.simantics.sysdyn.ui.properties.widgets.sensitivity.IntervalProperties">\r <this />\r </type>\r </target>\r \r <!-- Search -->\r <target interface="org.simantics.scl.runtime.function.Function">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModulesSearchFunction"\r class="org.simantics.sysdyn.ui.function.ModulesSearchFunction">\r </resource>\r </target>\r \r
+<adapters>\r\r <target interface="org.simantics.db.layer0.adapter.Realization">\r <type uri="http://www.simantics.org/Sysdyn-0.0/Module"\r class="org.simantics.structural2.realization.StructuralRealization">\r <this />\r </type>\r </target>\r\r <target interface="org.simantics.layer0.utils.triggers.ITrigger">\r <type uri = "http://www.simantics.org/Sysdyn-0.0/DiagramToCompositeMapping"\r class = "org.simantics.sysdyn.ui.editor.DiagramToCompositeMapping3">\r <graph/>\r <this />\r </type>\r </target>\r \r <target interface="org.simantics.structural.ui.modelBrowser.nodes.AbstractNode">\r <type uri="http://www.simantics.org/Sysdyn-0.0/SysdynModel"\r class="org.simantics.structural.ui.modelBrowser.nodes.ModelNode">\r <this />\r </type>\r </target> \r \r\r <target\r interface="org.simantics.browsing.ui.common.node.AbstractNode">\r <type\r uri="http://www.simantics.org/Sysdyn-0.0/SysdynModel"\r class="org.simantics.sysdyn.ui.browser.nodes.ModelNode">\r <this />\r </type>\r\r <resource\r uri="http://www.simantics.org/Sysdyn-0.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.browser.nodes.SymbolNode">\r <this />\r </resource>\r\r <type\r uri="http://www.simantics.org/Simulation-0.0/Experiment"\r class="org.simantics.sysdyn.ui.browser.nodes.ExperimentNode">\r <this />\r </type>\r \r <type\r uri="http://www.simantics.org/Sysdyn-0.0/Result"\r class="org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode">\r <this />\r </type>\r \r </target>\r\r <!-- Inject default connection routing algorithm for sysdyn diagrams -->\r <target interface="org.simantics.g2d.diagram.DiagramClass">\r <adapter uri="http://www.simantics.org/Sysdyn-0.0/ConfigurationDiagram"\r adapterClass="org.simantics.sysdyn.ui.elements.ConfigurationDiagramClassAdapter" />\r </target>\r\r <!-- Sysdyn symbols -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/StockSymbol"\r class="org.simantics.sysdyn.ui.elements.StockFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.elements.ModuleFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ValveSymbol"\r class="org.simantics.sysdyn.ui.elements.ValveFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/AuxiliarySymbol"\r class="org.simantics.sysdyn.ui.elements.AuxiliaryFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/CloudSymbol"\r class="org.simantics.sysdyn.ui.elements.CloudFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/InputSymbol"\r class="org.simantics.sysdyn.ui.elements.InputFactory" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ShadowSymbol"\r class="org.simantics.sysdyn.ui.elements.ShadowFactory" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/LoopSymbol"\r class="org.simantics.sysdyn.ui.elements.LoopFactory" /> \r\r <type uri="http://www.simantics.org/Sysdyn-0.0/StockSymbol"\r class="org.simantics.sysdyn.ui.elements.StockFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/ModuleSymbol"\r class="org.simantics.sysdyn.ui.elements.ModuleFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/ValveSymbol"\r class="org.simantics.sysdyn.ui.elements.ValveFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/AuxiliarySymbol"\r class="org.simantics.sysdyn.ui.elements.AuxiliaryFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/CloudSymbol"\r class="org.simantics.sysdyn.ui.elements.CloudFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/InputSymbol"\r class="org.simantics.sysdyn.ui.elements.InputFactory" /> \r <type uri="http://www.simantics.org/Sysdyn-0.0/ShadowSymbol"\r class="org.simantics.sysdyn.ui.elements.ShadowFactory" /> \r <type uri="http://www.simantics.org/Sysdyn-0.0/LoopSymbol"\r class="org.simantics.sysdyn.ui.elements.LoopFactory" /> \r </target>\r \r <!-- Additional symbols -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/AdditionalSymbols/MultilineText"\r class="org.simantics.sysdyn.ui.elements.MultilineTextElementFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/AdditionalSymbols/MultilineText"\r class="org.simantics.sysdyn.ui.elements.MultilineTextElementFactory" /> \r </target> \r \r <!-- Sysdyn connections -->\r <target interface="org.simantics.diagram.adapter.ElementFactory">\r <!-- Edges --> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements.connections.RouteFlowEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements.connections.RouteFlowEdgeFactory" /> \r <type uri="http://www.simantics.org/Sysdyn-0.0/FlowConnection"\r class="org.simantics.sysdyn.ui.elements.connections.RouteFlowConnectionFactory">\r <graph/>\r </type> \r \r <resource uri="http://www.simantics.org/Sysdyn-0.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements.connections.DependencyEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements.connections.DependencyEdgeFactory" />\r <type uri="http://www.simantics.org/Sysdyn-0.0/DependencyConnection"\r class="org.simantics.sysdyn.ui.elements.connections.DependencyConnectionFactory" />\r </target>\r \r <target interface="org.simantics.g2d.connection.EdgeVisualsConfigurer">\r <baseType uri="http://www.simantics.org/Diagram-0.0/HasConnector" />\r <resource uri="http://www.simantics.org/Diagram-0.0/HasPlainConnector"\r class="org.simantics.diagram.content.ArrowConfigurer">\r <string>none 0</string>\r </resource>\r <resource uri="http://www.simantics.org/Diagram-0.0/HasArrowConnector"\r class="org.simantics.diagram.content.ArrowConfigurer">\r <string>fill 1</string>\r </resource>\r </target>\r \r <!-- ModelBrowser2 -->\r \r <target interface="org.simantics.browsing.ui.model.children.ChildRule">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ModuleTypeChildRule"\r class="org.simantics.sysdyn.ui.browser.childrules.ModuleTypeChildRule"/>\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ModuleContentChildRule"\r class="org.simantics.sysdyn.ui.browser.childrules.ModuleContentChildRule"/> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/VariableChildRule"\r class="org.simantics.sysdyn.ui.browser.childrules.VariableChildRule"/> \r \r <resource uri="http://www.simantics.org/Sysdyn-0.0/HistoryDataset/HistoryDatasetVariablesBrowseContext/VariableChildRule"\r class="org.simantics.sysdyn.ui.properties.widgets.historyDataset.VariableChildRule"/> \r <resource uri=" http://www.simantics.org/Sysdyn-0.0/Module/ParameterOverrideBrowseContext/ParameterChildRule"\r class="org.simantics.sysdyn.ui.properties.widgets.modules.ParameterChildRule"/> \r \r \r <!-- Sensitivity analysis -->\r <resource uri="http://www.simantics.org/Sysdyn-0.0/SensitivityAnalysisExperiment/ParameterBrowseContext/ParameterChildRule"\r class="org.simantics.sysdyn.ui.properties.widgets.sensitivity.ParameterChildRule"/> \r </target>\r \r <target interface="org.simantics.browsing.ui.model.visuals.VisualsRule">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ModuleTypeLabelRule"\r class="org.simantics.sysdyn.ui.browser.labelrules.ModuleTypeLabelRule"/>\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/VariableNameLabelRule"\r class="org.simantics.sysdyn.ui.browser.labelrules.VariableNameLabelRule"/>\r\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/VariableImageRule"\r class="org.simantics.sysdyn.ui.browser.imagerules.VariableImageRule"/> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ChartImageRule"\r class="org.simantics.sysdyn.ui.browser.imagerules.ChartImageRule"/> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ResultImageRule"\r class="org.simantics.sysdyn.ui.browser.imagerules.ResultImageRule"/> \r \r \r <resource uri="http://www.simantics.org/Sysdyn-0.0/HistoryDataset/HistoryDatasetVariablesBrowseContext/VariableLabelRule"\r class="org.simantics.sysdyn.ui.properties.widgets.historyDataset.VariableLabelRule"/> \r\r \r <resource uri="http://www.simantics.org/Sysdyn-0.0/Module/ParameterOverrideBrowseContext/ParameterLabelRule"\r class="org.simantics.sysdyn.ui.properties.widgets.modules.ParameterLabelRule"/> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/Module/ParameterOverrideBrowseContext/ParameterLabelDecorationRule"\r class="org.simantics.sysdyn.ui.properties.widgets.modules.ParameterLabelDecorationRule"/> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/Module/ParameterOverrideBrowseContext/ParameterModifierRule"\r class="org.simantics.sysdyn.ui.properties.widgets.modules.ParameterModifierRule"/> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/Module/ParameterOverrideBrowseContext/ParameterSorterRule"\r class="org.simantics.sysdyn.ui.properties.widgets.modules.ParameterSorterRule"/> \r \r <!-- Sensitivity analysis -->\r <resource uri="http://www.simantics.org/Sysdyn-0.0/SensitivityAnalysisExperiment/ParameterBrowseContext/ParameterLabelRule"\r class="org.simantics.sysdyn.ui.properties.widgets.sensitivity.ParameterLabelRule"/>\r\r </target> \r \r <target interface="org.simantics.db.layer0.adapter.ActionFactory">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewModuleType"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewModuleTypeAction" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewEnumeration"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewEnumerationAction" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewFunction"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewFunctionAction" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewFunctionLibrary"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewFunctionLibraryAction" />\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewSharedFunctionLibrary"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewSharedFunctionLibraryAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewExperiment"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewExperimentAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewSimulationPlaybackExperiment"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewSimulationPlaybackExperimentAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewLineChart"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewLineChartAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewBarChart"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewBarChartAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewPieChart"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewPieChartAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewSheet"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewSheetAction" /> \r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/NewHistoryData"\r class="org.simantics.sysdyn.ui.browser.actions.newActions.NewHistoryDataAction" /> \r </target> \r \r <target interface="org.simantics.db.layer0.adapter.DropActionFactory">\r <resource\r uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/FunctionDropAction"\r class="org.simantics.sysdyn.ui.browser.actions.drop.FunctionDropAction" />\r <resource\r uri="http://www.simantics.org/Sysdyn-0.0/ModelingActionContext/Actions/ChartDropAction"\r class="org.simantics.sysdyn.ui.browser.actions.drop.ChartDropAction" /> \r \r \r </target> \r \r <target interface="org.simantics.db.layer0.adapter.Remover">\r <type uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ModuleSymbol"\r class="org.simantics.sysdyn.ui.browser.actions.remove.ModuleTypeRemover">\r <graph />\r <this />\r </type>\r <type uri="http://www.simantics.org/Sysdyn-0.0/Variable"\r class="org.simantics.sysdyn.ui.actions.SysdynVariableRemover">\r <this />\r </type>\r </target>\r \r \r <target interface="org.simantics.browsing.ui.model.nodetypes.NodeType">\r <baseType uri="http://www.simantics.org/Layer0-0.0/Entity" />\r <type\r uri="http://www.simantics.org/Sysdyn-0.0/ModelingBrowseContext/ModuleSymbolNodeType"\r class="org.simantics.sysdyn.ui.browser.nodeTypes.ModuleSymbolNodeType"\r constructor="create">\r <this/>\r </type> \r </target>\r \r <!-- PROFILES -->\r <target interface="org.simantics.scenegraph.profile.Style">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/SimulationPlaybackStyle"\r class="org.simantics.sysdyn.ui.elements.profiles.SimulationPlaybackStyle">\r </resource>\r <resource uri="http://www.simantics.org/Sysdyn-0.0/IssueStyle"\r class="org.simantics.sysdyn.ui.elements.profiles.IssueDecorationStyle">\r </resource>\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ShadowStyle"\r class="org.simantics.sysdyn.ui.elements.profiles.ShadowStyle">\r </resource> \r </target>\r \r \r <!-- TODO: currently maps jfree concepts directly to Sysdyn implementations. Sysdyn needs tool specific types for the datasets. -->\r <!-- TODO: AllVariablesOfModel query is run on random Resources; listing all possible types explicitly is cumbersome, we need a better implementation. -->\r <target interface="org.simantics.jfreechart.chart.properties.IAllVariablesOfModel"> \r <type uri="http://www.simantics.org/Sysdyn-1.1/SysdynModel"\r class="org.simantics.sysdyn.ui.trend.AllVariablesOfModel">\r <this />\r </type> \r <type uri="http://www.simantics.org/JFreeChart-1.0/NumberAxis"\r class="org.simantics.sysdyn.ui.trend.AllVariablesOfModel">\r <this />\r </type> \r <type uri="http://www.simantics.org/JFreeChart-1.0/Series"\r class="org.simantics.sysdyn.ui.trend.AllVariablesOfModel">\r <this />\r </type> \r <type uri="http://www.simantics.org/Sysdyn-0.0/SensitivityAnalysisExperiment/Parameter"\r class="org.simantics.sysdyn.ui.trend.AllParametersOfModel">\r <this />\r </type>\r </target> \r \r <target interface="org.simantics.jfreechart.chart.properties.RangeHandlerFactory"> \r <type uri="http://www.simantics.org/JFreeChart-1.0/Series"\r class="org.simantics.sysdyn.ui.trend.SysdynRangeHandlerFactory">\r </type> \r <type uri="http://www.simantics.org/Sysdyn-0.0/SensitivityAnalysisExperiment/Parameter"\r class="org.simantics.sysdyn.ui.properties.widgets.sensitivity.SensitivityRangeHandlerFactory">\r </type>\r </target> \r \r <!-- TODO: currently maps jfree concepts directly to Sysdyn implementations. Sysdyn needs tool specific types for the datasets. -->\r <target interface="org.simantics.jfreechart.chart.IDataset">\r <type uri="http://www.simantics.org/JFreeChart-0.0/XYDataset"\r class="org.simantics.sysdyn.ui.trend.XYDataset">\r <graph />\r <this />\r </type>\r <type uri="http://www.simantics.org/JFreeChart-0.0/CategoryDataset"\r class="org.simantics.sysdyn.ui.trend.CategoryDataset">\r <graph />\r <this />\r </type> \r <type uri="http://www.simantics.org/JFreeChart-0.0/PieDataset"\r class="org.simantics.sysdyn.ui.trend.PieDataset">\r <graph />\r <this />\r </type> \r <type uri="http://www.simantics.org/Sysdyn-0.0/Charts/SensitivityDataset"\r class="org.simantics.sysdyn.ui.trend.SensitivityDataset">\r <graph />\r <this />\r </type>\r </target>\r \r <!-- Sensitivity analysis -->\r <target\r interface="org.simantics.sysdyn.ui.properties.widgets.sensitivity.IDistributionProperties">\r <type\r uri="http://www.simantics.org/Sysdyn-0.0/NormalDistribution"\r class="org.simantics.sysdyn.ui.properties.widgets.sensitivity.NormalDistributionProperties">\r <this />\r </type> \r <type\r uri="http://www.simantics.org/Sysdyn-0.0/UniformDistribution"\r class="org.simantics.sysdyn.ui.properties.widgets.sensitivity.UniformDistributionProperties">\r <this />\r </type> \r <type\r uri="http://www.simantics.org/Sysdyn-0.0/Interval"\r class="org.simantics.sysdyn.ui.properties.widgets.sensitivity.IntervalProperties">\r <this />\r </type>\r </target>\r \r <!-- Search -->\r <target interface="org.simantics.scl.runtime.function.Function">\r <resource uri="http://www.simantics.org/Sysdyn-0.0/ModulesSearchFunction"\r class="org.simantics.sysdyn.ui.function.ModulesSearchFunction">\r </resource>\r </target>\r \r
</adapters>
\ No newline at end of file
SysdynResource.URIs.ShadowSymbol,\r
(ShapeNode)ShadowFactory.GHOST_IMAGE.init(parent)\r
);\r
+ /*} else if (kpe.keyCode == java.awt.event.KeyEvent.VK_L) {\r
+ variableInformation = new VariableInformation(\r
+ java.awt.event.KeyEvent.VK_L,\r
+ SysdynResource.URIs.LoopSymbol,\r
+ (ShapeNode)LoopFactory.LOOP_STATIC_IMAGE.init(parent)\r
+ );*/\r
}\r
\r
if (variableInformation != null) {\r
--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.sysdyn.ui.elements;\r
+\r
+import java.awt.BasicStroke;\r
+import java.awt.Shape;\r
+import java.awt.geom.Arc2D;\r
+import java.awt.geom.Path2D;\r
+import java.util.Collection;\r
+\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.common.utils.NameUtils;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.diagram.stubs.G2DResource;\r
+import org.simantics.g2d.canvas.ICanvasContext;\r
+import org.simantics.g2d.diagram.IDiagram;\r
+import org.simantics.g2d.element.ElementClass;\r
+import org.simantics.g2d.element.handler.impl.BoundsOutline;\r
+import org.simantics.g2d.element.handler.impl.DefaultTransform;\r
+import org.simantics.g2d.element.handler.impl.ObjectTerminal;\r
+import org.simantics.g2d.element.handler.impl.OutlinePick;\r
+import org.simantics.g2d.element.handler.impl.SimpleElementLayers;\r
+import org.simantics.g2d.element.handler.impl.StaticObjectAdapter;\r
+import org.simantics.g2d.element.handler.impl.StaticSymbolImageInitializer;\r
+import org.simantics.g2d.element.handler.impl.StaticSymbolImpl;\r
+import org.simantics.g2d.element.handler.impl.TextColorImpl;\r
+import org.simantics.g2d.element.handler.impl.TextFontImpl;\r
+import org.simantics.g2d.element.handler.impl.TextImpl;\r
+import org.simantics.g2d.elementclass.ImageClass.StaticImageElementHandler;\r
+import org.simantics.g2d.image.DefaultImages;\r
+import org.simantics.g2d.image.Image;\r
+import org.simantics.g2d.image.impl.ShapeImage;\r
+import org.simantics.g2d.svg.SVGImage;\r
+\r
+/**\r
+ * @author Tuomas Miettinen\r
+ */\r
+public class LoopFactory extends SysdynElementFactory {\r
+\r
+ public static final Image LOOP_STATIC_IMAGE = new ShapeImage(getLoopShape(), null, new BasicStroke(1), true);\r
+\r
+ @Override\r
+ public ElementClass create(ReadGraph graph, ICanvasContext canvas,\r
+ IDiagram diagram, Resource elementType) throws DatabaseException {\r
+ \r
+ G2DResource g2d = G2DResource.getInstance(graph);\r
+ String svgDoc = graph.getPossibleRelatedValue(elementType, g2d.HasSVGDocument);\r
+ Image image = null;\r
+ String id = "TextElement: " + NameUtils.getSafeName(graph, elementType);\r
+ if (svgDoc != null)\r
+ image = new SVGImage(id+".svg", svgDoc);\r
+ else\r
+ image = DefaultImages.ERROR_DECORATOR.get();\r
+ \r
+ return ElementClass.compile(\r
+ SimpleElementLayers.INSTANCE,\r
+ OutlinePick.INSTANCE,\r
+ TextImpl.INSTANCE,\r
+ TextColorImpl.BLACK,\r
+ TextFontImpl.DEFAULT,\r
+ DefaultTransform.INSTANCE,\r
+ new StaticSymbolImpl(image),\r
+ new StaticImageElementHandler(image),\r
+ new StaticObjectAdapter(elementType),\r
+ StaticSymbolImageInitializer.INSTANCE,\r
+ //new HoverTextElementHandler(0, 0, Alignment.LEADING, 0, 1.5, 1.5, true),\r
+ BoundsOutline.INSTANCE\r
+ ).setId(LoopFactory.class.getSimpleName());\r
+ }\r
+\r
+ static Shape getLoopShape() {\r
+ Path2D loop = new Path2D.Double();\r
+ loop.moveTo(1, 2);\r
+ loop.lineTo(0, 0);\r
+ loop.lineTo(-1, 2);\r
+ loop.closePath();\r
+ \r
+ loop.append(new Arc2D.Double(-10, -3, 10, 10, 0, -270, Arc2D.OPEN), false);\r
+ return loop;\r
+ }\r
+\r
+ @Override\r
+ protected ElementClass compileElementClass(Resource elementType,\r
+ Collection<ObjectTerminal> terminals) {\r
+ // TODO Auto-generated method stub\r
+ return null;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2010, 2012 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.sysdyn.ui.properties;\r
+\r
+import org.eclipse.jface.layout.GridDataFactory;\r
+import org.eclipse.jface.layout.GridLayoutFactory;\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Group;\r
+import org.eclipse.ui.IWorkbenchSite;\r
+import org.simantics.browsing.ui.swt.widgets.Button;\r
+import org.simantics.browsing.ui.swt.widgets.StringPropertyModifier;\r
+import org.simantics.browsing.ui.swt.widgets.TrackedText;\r
+import org.simantics.browsing.ui.swt.widgets.impl.ReadFactoryImpl;\r
+import org.simantics.browsing.ui.swt.widgets.impl.SelectionListenerImpl;\r
+import org.simantics.browsing.ui.swt.widgets.impl.WidgetSupport;\r
+import org.simantics.databoard.Bindings;\r
+import org.simantics.databoard.util.ObjectUtils;\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.WriteGraph;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.management.ISessionContext;\r
+import org.simantics.sysdyn.SysdynResource;\r
+import org.simantics.utils.datastructures.Pair;\r
+import org.simantics.utils.datastructures.Triple;\r
+\r
+/**\r
+ * Tab for displaying information of a loop\r
+ * @author Tuomas Miettinen\r
+ *\r
+ */\r
+public class LoopTab extends LabelPropertyTabContributor {\r
+\r
+ Button auto, balancing, reinforcing, other, inside, outside;\r
+ TrackedText loopComment, polarityLocationText;\r
+ public static final String AUTO = "$$AUTO$$";\r
+ \r
+ @Override\r
+ public void createControls(Composite body, IWorkbenchSite site, ISessionContext context, WidgetSupport support) {\r
+ Composite composite = new Composite(body, SWT.NONE);\r
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(composite);\r
+ GridLayoutFactory.fillDefaults().margins(3, 3).numColumns(2).applyTo(composite);\r
+ \r
+ Group commentGroup = new Group(composite, SWT.NONE);\r
+ commentGroup.setText("Comment");\r
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(commentGroup);\r
+ GridLayoutFactory.fillDefaults().numColumns(5).applyTo(commentGroup);\r
+ \r
+ auto = new Button(commentGroup, support, SWT.RADIO);\r
+ auto.setText("Auto");\r
+ auto.setSelectionFactory(new CommentRadioSelectionFactory("$$AUTO$$"));\r
+ auto.addSelectionListener(new CommentSelectionListener(context, "$$AUTO$$"));\r
+ \r
+ balancing = new Button(commentGroup, support, SWT.RADIO);\r
+ balancing.setText("B");\r
+ balancing.setSelectionFactory(new CommentRadioSelectionFactory("B"));\r
+ balancing.addSelectionListener(new CommentSelectionListener(context, "B"));\r
+ \r
+ reinforcing = new Button(commentGroup, support, SWT.RADIO);\r
+ reinforcing.setText("R");\r
+ reinforcing.setSelectionFactory(new CommentRadioSelectionFactory("R"));\r
+ reinforcing.addSelectionListener(new CommentSelectionListener(context, "R"));\r
+ \r
+ other = new Button(commentGroup, support, SWT.RADIO);\r
+ other.setText("other");\r
+ other.setSelectionFactory(new OtherCommentSelectionFactory(new String[] {null, "B", "R", AUTO}));\r
+ \r
+ loopComment = new TrackedText(commentGroup, support, SWT.BORDER);\r
+ loopComment.setTextFactory(new OtherCommentStringPropertyFactory());\r
+ loopComment.addModifyListener(new StringPropertyModifier(context, SysdynResource.URIs.Loop_Comment));\r
+ GridDataFactory.fillDefaults().grab(true, false).applyTo(loopComment.getWidget());\r
+ \r
+ Group rotationGroup = new Group(composite, SWT.NONE);\r
+ GridDataFactory.fillDefaults().applyTo(rotationGroup);\r
+ GridLayoutFactory.fillDefaults().applyTo(rotationGroup);\r
+ rotationGroup.setText("Direction of Rotation");\r
+ \r
+ inside = new Button(rotationGroup, support, SWT.RADIO);\r
+ inside.setText("Clockwise");\r
+ inside.setSelectionFactory(new ClockwiseRotationRadioSelectionFactory(true));\r
+ inside.addSelectionListener(new ClockwiseRotationSelectionListener(context, true));\r
+ \r
+ outside = new Button(rotationGroup, support, SWT.RADIO);\r
+ outside.setText("Counterclockwise");\r
+ outside.setSelectionFactory(new ClockwiseRotationRadioSelectionFactory(false));\r
+ outside.addSelectionListener(new ClockwiseRotationSelectionListener(context, false));\r
+ }\r
+ \r
+ class OtherCommentStringPropertyFactory extends ReadFactoryImpl<Resource, String> {\r
+\r
+ private final String propertyURI;\r
+\r
+ public OtherCommentStringPropertyFactory() {\r
+ this.propertyURI = SysdynResource.URIs.Loop_Comment;\r
+ }\r
+\r
+ @Override\r
+ public Object getIdentity(Object inputContents) {\r
+ return new Triple<Resource, String, Object>((Resource)inputContents, propertyURI, getClass());\r
+ }\r
+\r
+ @Override\r
+ public String perform(ReadGraph graph, Resource resource) throws DatabaseException {\r
+ String value = graph.getPossibleRelatedValue(resource, graph.getResource(propertyURI));;\r
+ if (value == null || AUTO.equals(value))\r
+ return "";\r
+ return value;\r
+ } \r
+ }\r
+ \r
+ class ClockwiseRotationSelectionListener extends SelectionListenerImpl<Resource> {\r
+ private boolean clockwise;\r
+\r
+ public ClockwiseRotationSelectionListener(ISessionContext context, boolean clockwise) {\r
+ super(context);\r
+ this.clockwise = clockwise;\r
+ }\r
+ \r
+ @Override\r
+ public void apply(WriteGraph graph, Resource connectionElement) throws DatabaseException {\r
+ SysdynResource sr = SysdynResource.getInstance(graph);\r
+ graph.claimLiteral(connectionElement, sr.Loop_Clockwise, clockwise);\r
+ }\r
+ \r
+ }\r
+ \r
+ class ClockwiseRotationRadioSelectionFactory extends ReadFactoryImpl<Resource, Boolean> {\r
+ private boolean clockwise;\r
+\r
+ public ClockwiseRotationRadioSelectionFactory(boolean clockwise) {\r
+ this.clockwise = clockwise;\r
+ }\r
+\r
+ @Override\r
+ public Object getIdentity(Object inputContents) {\r
+ return new Triple<Object, Object, Class<?>>(inputContents, clockwise, getClass());\r
+ }\r
+\r
+ @Override\r
+ public Boolean perform(ReadGraph graph, Resource dependencyConnection) throws DatabaseException {\r
+ SysdynResource sr = SysdynResource.getInstance(graph);\r
+ Boolean clockwise = graph.getPossibleRelatedValue(dependencyConnection, sr.Loop_Clockwise, Bindings.BOOLEAN); \r
+ return ObjectUtils.objectEquals(this.clockwise, clockwise);\r
+ }\r
+ }\r
+ \r
+ class CommentSelectionListener extends SelectionListenerImpl<Resource> {\r
+ private String comment;\r
+\r
+ public CommentSelectionListener(ISessionContext context, String comment) {\r
+ super(context);\r
+ this.comment = comment;\r
+ }\r
+ \r
+ @Override\r
+ public void apply(WriteGraph graph, Resource connectionElement) throws DatabaseException {\r
+ SysdynResource sr = SysdynResource.getInstance(graph);\r
+ graph.claimLiteral(connectionElement, sr.Loop_Comment, comment.trim());\r
+ }\r
+ \r
+ }\r
+ \r
+ class CommentRadioSelectionFactory extends ReadFactoryImpl<Resource, Boolean> {\r
+ private String comment;\r
+\r
+ public CommentRadioSelectionFactory(String comment) {\r
+ this.comment = comment;\r
+ }\r
+\r
+ @Override\r
+ public Object getIdentity(Object inputContents) {\r
+ return new Triple<Object, Object, Class<?>>(inputContents, comment, getClass());\r
+ }\r
+\r
+ @Override\r
+ public Boolean perform(ReadGraph graph, Resource dependencyConnection) throws DatabaseException {\r
+ SysdynResource sr = SysdynResource.getInstance(graph);\r
+ String comment = graph.getPossibleRelatedValue(dependencyConnection, sr.Loop_Comment, Bindings.STRING); \r
+ if(comment == null && this.comment.equals(""))\r
+ return true;\r
+ return ObjectUtils.objectEquals(comment, this.comment);\r
+ }\r
+ }\r
+ \r
+ class OtherCommentSelectionFactory extends ReadFactoryImpl<Resource, Boolean> {\r
+\r
+ String[] limits;\r
+ \r
+ public OtherCommentSelectionFactory(String[] limits) {\r
+ this.limits = limits;\r
+ }\r
+ \r
+ @Override\r
+ public Object getIdentity(Object inputContents) {\r
+ return new Pair<Object, Class<?>>(inputContents, getClass());\r
+ }\r
+\r
+ @Override\r
+ public Boolean perform(ReadGraph graph, Resource dependencyConnection) throws DatabaseException {\r
+ SysdynResource sr = SysdynResource.getInstance(graph);\r
+ String comment = graph.getPossibleRelatedValue(dependencyConnection, sr.Loop_Comment, Bindings.STRING);\r
+ for(String s : limits) {\r
+ if(ObjectUtils.objectEquals(comment, s))\r
+ return false;\r
+ }\r
+ return true;\r
+ }\r
+ }\r
+\r
+}\r
}\r
}\r
\r
+ // If loop\r
+ if(backend.isInstanceOf(r, sr.Loop)) {\r
+ return Collections.singleton(\r
+ (new ComparableTabContributor(\r
+ new LoopTab(),\r
+ 1,\r
+ r,\r
+ "Loop")));\r
+ }\r
+\r
// Independent variable\r
if (backend.isInstanceOf(r, sr.IndependentVariable)) {\r
Resource activeExpression = backend.getPossibleObject(r, sr.IndependentVariable_activeExpression);\r
--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.sysdyn.representation;\r
+\r
+import java.util.ArrayList;\r
+\r
+import org.simantics.layer0.Layer0;\r
+import org.simantics.objmap.annotations.GraphType;\r
+import org.simantics.objmap.annotations.RelatedElement;\r
+import org.simantics.objmap.annotations.RelatedListElements;\r
+import org.simantics.objmap.annotations.RelatedValue;\r
+import org.simantics.sysdyn.SysdynResource;\r
+import org.simantics.sysdyn.representation.visitors.IElementVisitorVoid;\r
+\r
+\r
+@GraphType(SysdynResource.URIs.Loop)\r
+public class Loop implements IElement {\r
+\r
+ @RelatedValue(Layer0.URIs.HasName)\r
+ protected String name;\r
+ \r
+ @RelatedElement(Layer0.URIs.PartOf)\r
+ protected Object parent;\r
+ \r
+ @RelatedElement(SysdynResource.URIs.Loop_Clockwise)\r
+ protected boolean clockwise;\r
+ \r
+ @RelatedListElements(SysdynResource.URIs.Loop_Comment)\r
+ protected String comment;\r
+ \r
+ @RelatedListElements(SysdynResource.URIs.Loop_Items)\r
+ protected ArrayList<Object> items = new ArrayList<Object>();\r
+ \r
+ @Override\r
+ public void accept(IElementVisitorVoid v) {\r
+ v.visit(this); \r
+ }\r
+ \r
+ /**\r
+ * \r
+ * @return The name of this loop\r
+ */\r
+ public String getName() {\r
+ return this.name;\r
+ }\r
+ \r
+ /**\r
+ * \r
+ * @return The comment of this loop\r
+ */\r
+ public String getComment() {\r
+ return this.comment;\r
+ }\r
+ \r
+ /**\r
+ * \r
+ * @return The variables and dependencies of this loop\r
+ */\r
+ public ArrayList<Object> getItems() {\r
+ return this.items;\r
+ }\r
+ \r
+ /**\r
+ * \r
+ * @return true iff loop rotates clockwise.\r
+ */\r
+ public boolean isClockwise() {\r
+ return this.clockwise;\r
+ }\r
+ \r
+ /**\r
+ *\r
+ * @return Parent configuration of this loop (or null if something is wrong)\r
+ */\r
+ public Configuration getParentConfiguration() {\r
+ if(parent instanceof Configuration) {\r
+ return (Configuration)parent;\r
+ } else {\r
+ return null;\r
+ }\r
+ }\r
+\r
+}\r
addLinkType(MappingSchemas.fromAnnotations(g, Entity.class));\r
addLinkType(MappingSchemas.fromAnnotations(g, ParameterOverride.class));\r
addLinkType(MappingSchemas.fromAnnotations(g, Shadow.class));\r
+ addLinkType(MappingSchemas.fromAnnotations(g, Loop.class));\r
} catch (DatabaseException e) {\r
e.printStackTrace();\r
} catch (InstantiationException e) {\r
import org.simantics.sysdyn.representation.Flow;\r
import org.simantics.sysdyn.representation.Input;\r
import org.simantics.sysdyn.representation.LibraryDummy;\r
+import org.simantics.sysdyn.representation.Loop;\r
import org.simantics.sysdyn.representation.Module;\r
import org.simantics.sysdyn.representation.Stock;\r
import org.simantics.sysdyn.representation.Valve;\r
@Override\r
public void visit(Variable variable) {\r
}\r
+ \r
+ @Override\r
+ public void visit(Loop loop) {\r
+ }\r
}\r
import org.simantics.sysdyn.representation.Flow;\r
import org.simantics.sysdyn.representation.Input;\r
import org.simantics.sysdyn.representation.LibraryDummy;\r
+import org.simantics.sysdyn.representation.Loop;\r
import org.simantics.sysdyn.representation.Module;\r
import org.simantics.sysdyn.representation.Stock;\r
import org.simantics.sysdyn.representation.Valve;\r
void visit(Book sheet);\r
void visit(DiagramContainerDummy container);\r
void visit(Variable variable);\r
+ void visit(Loop loop);\r
+ \r
}\r