]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram.ontology/graph/DiagramFlags.pgraph
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.diagram.ontology / graph / DiagramFlags.pgraph
diff --git a/bundles/org.simantics.diagram.ontology/graph/DiagramFlags.pgraph b/bundles/org.simantics.diagram.ontology/graph/DiagramFlags.pgraph
new file mode 100644 (file)
index 0000000..9bc54f7
--- /dev/null
@@ -0,0 +1,78 @@
+L0 = <http://www.simantics.org/Layer0-1.1>\r
+STR = <http://www.simantics.org/Structural-1.2>\r
+G2D = <http://www.simantics.org/G2D-1.1>\r
+DIA = <http://www.simantics.org/Diagram-2.2>\r
+SEL = <http://www.simantics.org/SelectionView-1.2>\r
+\r
+DIA.HasFlagType <R L0.IsRelatedTo : L0.FunctionalRelation\r
+    L0.HasLabel "Flag Type"\r
+    --> DIA.FlagType\r
+\r
+DIA.FlagType <T L0.Property\r
+    L0.HasDescription "Connection flag type (input or output)"\r
+    @L0.tag L0.Enumeration\r
+DIA.FlagType.InputFlag : DIA.FlagType\r
+DIA.FlagType.OutputFlag : DIA.FlagType\r
+\r
+DIA.FlagLabel <T L0.String\r
+    L0.HasDescription "This specialized label type exists because we need to attach a custom StringModifier to it."\r
+\r
+DIA.Flag <T DIA.DefinedElement\r
+    L0.HasDescription "Flags are used on diagrams for cutting connections and continuing them elsewhere."\r
+    @L0.singleProperty DIA.HasFlagType\r
+    @L0.property DIA.ExternalFlag\r
+    >-- DIA.Flag.HasIOTableBinding --> L0.String <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType\r
+        L0.HasLabel "I/O Table Binding"\r
+    >-- DIA.Flag.HasIOTableRowIndex --> L0.Integer <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType\r
+        L0.HasLabel "I/O Table Row Index"\r
+    @L0.assert DIA.Flag.HasIOTableRowIndex\r
+        -1 : L0.Integer\r
+    @L0.assert DIA.Flag.HasIOTableBinding\r
+        "" : L0.String\r
+    @L0.property DIA.FlagIsJoinedBy\r
+    @L0.optionalProperty L0.HasLabel\r
+    @L0.assert DIA.HasFlagType DIA.FlagType.InputFlag\r
+    @L0.assert L0.HasLabel\r
+        "" : DIA.FlagLabel\r
+    STR.IsDefinedBy _ : DIA.Composite <R L0.HasNext\r
+        @L0.orderedSet\r
+            DIA.Flag.Terminal : DIA.Terminal\r
+                DIA.HasTransform [1,0,0,1,0,0] : G2D.Transform\r
+                DIA.HasConnectionPoint DIA.Flag.ConnectionPoint\r
+                    <-- DIA.Flag\r
+    @L0.assert DIA.HasDynamicTransform\r
+        DIA.Functions.flagTransform : L0.Function\r
+\r
+DIA.Flag.ConnectionPoint <R STR.IsConnectedTo : L0.FunctionalRelation\r
+\r
+DIA.ExternalFlag\r
+    @L0.defTag \r
+    L0.HasDescription "Used for tagging flags as external flows. External flows cannot be continued on the same or other diagrams of the same model."\r
+    <-- DIA.Flag\r
+    --> DIA.Flag\r
+\r
+\r
+DIA.JoinsFlag <R L0.IsRelatedTo \r
+    L0.InverseOf DIA.FlagIsJoinedBy <R L0.IsRelatedTo\r
+        @L0.tag L0.SharedRange\r
+        <-- DIA.Flag\r
+        --> STR.ConnectionJoin\r
+\r
+DIA.IsLiftedAs <R L0.IsRelatedTo : L0.FunctionalRelation\r
+    <-- DIA.Flag\r
+    --> STR.ConnectionRelation\r
+    L0.InverseOf DIA.Lifts <R L0.IsRelatedTo : L0.FunctionalRelation\r
+\r
+\r
+//// Preferences for labeling diagram flags\r
+\r
+DIA.UsesLocalFlagLabelingScheme <R L0.IsRelatedTo\r
+\r
+DIA.FlagLabelingScheme <T L0.Entity\r
+    @L0.tag L0.Enumeration\r
+DIA.FlagLabelingScheme.Alphabetical : DIA.FlagLabelingScheme\r
+    L0.HasLabel "Alphabetical"\r
+    L0.HasDescription "Alphabetical labeling scheme. A, B; C, ..., X, Y, Z, AA, AB, AC, ..."\r
+DIA.FlagLabelingScheme.Numeric : DIA.FlagLabelingScheme\r
+    L0.HasLabel "Numeric"\r
+    L0.HasDescription "Numeric labeling scheme. 1, 2, 3, ..."\r