]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram.ontology/graph/Diagram.pgraph
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.diagram.ontology / graph / Diagram.pgraph
diff --git a/bundles/org.simantics.diagram.ontology/graph/Diagram.pgraph b/bundles/org.simantics.diagram.ontology/graph/Diagram.pgraph
new file mode 100644 (file)
index 0000000..687e9dd
--- /dev/null
@@ -0,0 +1,127 @@
+L0 = <http://www.simantics.org/Layer0-1.1>
+L0X = <http://www.simantics.org/Layer0X-1.1>
+G2D = <http://www.simantics.org/G2D-1.1>
+STR = <http://www.simantics.org/Structural-1.2>
+DATA = <http://www.simantics.org/Datatypes-1.1>
+SEL = <http://www.simantics.org/SelectionView-1.2>
+
+DIA = <http://www.simantics.org/Diagram-2.2> : L0.Ontology
+    @L0.new
+    L0.HasResourceClass "org.simantics.diagram.stubs.DiagramResource"
+
+//// Import / Export
+
+DIA.DiagramSubgraphExtent : L0X.SubgraphExtent
+
+//// Objects and types
+
+DIA.ElementClass <T STR.ComponentType
+    L0.HasDescription """Abstract element that has a position on diagram"""
+    @L0.tag L0.Abstract
+    //TODO [STR.IsDefinedBy all Element]
+
+DIA.Element <T STR.Component : DIA.ElementClass
+    @L0.property L0.HasNext
+    @L0.property L0.HasPrevious
+    @L0.tag L0.Abstract 
+    >-- DIA.HasTransform
+    @L0.assert DIA.HasDynamicTransform
+        DIA.Functions.modelledTransform : L0.Function
+    @L0.assert DIA.Element.profileMonitorOffset
+        (0.0,0.0) : DATA.Vec2d
+    @L0.assert DIA.Element.profileMonitorSpacing 0.0
+    @L0.assert DIA.Element.hideProfileMonitors false
+    @L0.assert DIA.Element.upProfileMonitors true
+    >-- DIA.Element.profileMonitorOffset --> DATA.Vec2d <R L0.HasProperty : L0.FunctionalRelation  : SEL.GenericParameterType
+      L0.HasLabel "Profile Monitor Offset"
+      SEL.HasDisplayValue ""
+    >-- DIA.Element.profileMonitorSpacing --> L0.Double <R L0.HasProperty : L0.FunctionalRelation  : SEL.GenericParameterType
+      L0.HasLabel "Profile Monitor Spacing"
+    >-- DIA.Element.hideProfileMonitors --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation  : SEL.GenericParameterType
+      L0.HasLabel "Hide Profile Monitors?"
+    >-- DIA.Element.upProfileMonitors --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
+      L0.HasLabel "Grow Profile Monitors Upward?"
+
+DIA.DiagramContainer <T L0.Entity
+    @L0.singleProperty L0.HasName
+    @L0.property L0.ConsistsOf
+
+DIA.Composite <T STR.OrderedComposite <T DIA.Element
+    L0.HasDescription """A diagram composite is z-ordered. First elements in the list are drawn first."""
+    //TODO [L0.OrderedSetElements all Element]
+
+DIA.IOTableRename <T L0.Entity
+    >-- DIA.IOTableRename.From --> L0.String <R L0.HasProperty : L0.FunctionalRelation
+    >-- DIA.IOTableRename.To --> L0.String <R L0.HasProperty : L0.FunctionalRelation
+    @L0.assert DIA.IOTableRename.From
+        "" : L0.String
+    @L0.assert DIA.IOTableRename.To
+        "" : L0.String
+
+DIA.Diagram <T DIA.Composite
+    >-- DIA.Diagram.IOTableRenaming --> DIA.IOTableRename <T L0.DependsOn 
+    @L0.optionalProperty DIA.HasModCount
+
+DIA.HasModCount <R L0.HasProperty
+    L0.HasLabel "Modification Counter"
+    L0.HasDescription "A counter for modifications performed on the property owner resource. Used for naming elements with running number IDs."
+    L0.HasDomain DIA.Composite
+    L0.HasRange L0.Long
+
+DIA.Terminal <T DIA.Element
+    @L0.singleProperty DIA.HasConnectionPoint
+    @L0.tag L0.Abstract
+    >-- DIA.Terminal.AllowedDirections --> L0.Integer <R L0.HasProperty : L0.FunctionalRelation
+        L0.HasDescription """Used to describe allowed terminal exit/enter directions for incoming/outgoing connections.
+The integer value is a bit mask with the following meanings:
+bit  meaning
+0    right (1,0)
+1    down  (0,1)
+2    left  (-1,0)
+3    up    (0,-1)
+"""
+
+DIA.DefinedElement <T DIA.Element
+    @L0.tag L0.Abstract
+    @L0.singleProperty STR.IsDefinedBy
+
+DIA.HasTransform <R G2D.HasTransform   : SEL.GenericParameterType
+    L0.HasLabel "Transform"
+    L0.InverseOf DIA.IsTransformOf
+    L0.HasDomain DIA.Element
+    L0.HasRange G2D.Transform
+    L0.HasRange L0.DoubleArray
+    ==> "Vector Double"
+    SEL.HasDisplayValue ""
+
+DIA.HasDynamicTransform <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasDomain DIA.Element
+    L0.HasRange L0.Value
+
+DIA.HasConnectionPoint <R L0.DependsOn
+    L0.HasDomain DIA.Element
+    L0.HasRange STR.ConnectionRelation
+
+DIA.Functions : L0.Library
+
+DIA.Functions.availableProfiles : L0.Function
+    L0.HasValueType "[(String, Resource)]"
+DIA.Functions.selectedProfile : L0.Function
+    L0.HasValueType "String"
+DIA.Functions.activeProfileModifier : L0.Function
+    L0.HasValueType "String -> String"
+DIA.Functions.diagramElementIssuePath : L0.Function
+
+DIA.DefinedElement
+  >-- DIA.symbolCode ==> "[String]" <R L0.HasProperty : L0.FunctionalRelation
+  >-- DIA.symbolDropHandler ==> "[WorkbenchSelectionElement] -> <WriteGraph,Proc> ()" <R L0.HasProperty : L0.FunctionalRelation
+
+DIA.DiagramActivityCondition <T L0.Entity
+  --> DIA.DiagramActivityCondition.test ==> "Resource -> <ReadGraph> String" <R L0.HasProperty : L0.FunctionalRelation 
+
+DIA.diagramActivityCondition : L0.Template
+    @template %subject %expression
+        %subject : DIA.DiagramActivityCondition
+            DIA.DiagramActivityCondition.test _ : STR.SCLValue
+                L0.SCLValue.expression %expression
+                L0.HasValueType "Resource -> <ReadGraph> String"