]> gerrit.simantics Code Review - simantics/platform.git/blob - 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
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 L0X = <http://www.simantics.org/Layer0X-1.1>
3 G2D = <http://www.simantics.org/G2D-1.1>
4 STR = <http://www.simantics.org/Structural-1.2>
5 DATA = <http://www.simantics.org/Datatypes-1.1>
6 SEL = <http://www.simantics.org/SelectionView-1.2>
7
8 DIA = <http://www.simantics.org/Diagram-2.2> : L0.Ontology
9     @L0.new
10     L0.HasResourceClass "org.simantics.diagram.stubs.DiagramResource"
11
12 //// Import / Export
13
14 DIA.DiagramSubgraphExtent : L0X.SubgraphExtent
15
16 //// Objects and types
17
18 DIA.ElementClass <T STR.ComponentType
19     L0.HasDescription """Abstract element that has a position on diagram"""
20     @L0.tag L0.Abstract
21     //TODO [STR.IsDefinedBy all Element]
22
23 DIA.Element <T STR.Component : DIA.ElementClass
24     @L0.property L0.HasNext
25     @L0.property L0.HasPrevious
26     @L0.tag L0.Abstract 
27     >-- DIA.HasTransform
28     @L0.assert DIA.HasDynamicTransform
29         DIA.Functions.modelledTransform : L0.Function
30     @L0.assert DIA.Element.profileMonitorOffset
31         (0.0,0.0) : DATA.Vec2d
32     @L0.assert DIA.Element.profileMonitorSpacing 0.0
33     @L0.assert DIA.Element.hideProfileMonitors false
34     @L0.assert DIA.Element.upProfileMonitors true
35     >-- DIA.Element.profileMonitorOffset --> DATA.Vec2d <R L0.HasProperty : L0.FunctionalRelation  : SEL.GenericParameterType
36       L0.HasLabel "Profile Monitor Offset"
37       SEL.HasDisplayValue ""
38     >-- DIA.Element.profileMonitorSpacing --> L0.Double <R L0.HasProperty : L0.FunctionalRelation  : SEL.GenericParameterType
39       L0.HasLabel "Profile Monitor Spacing"
40     >-- DIA.Element.hideProfileMonitors --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation  : SEL.GenericParameterType
41       L0.HasLabel "Hide Profile Monitors?"
42     >-- DIA.Element.upProfileMonitors --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
43       L0.HasLabel "Grow Profile Monitors Upward?"
44
45 DIA.DiagramContainer <T L0.Entity
46     @L0.singleProperty L0.HasName
47     @L0.property L0.ConsistsOf
48
49 DIA.Composite <T STR.OrderedComposite <T DIA.Element
50     L0.HasDescription """A diagram composite is z-ordered. First elements in the list are drawn first."""
51     //TODO [L0.OrderedSetElements all Element]
52
53 DIA.IOTableRename <T L0.Entity
54     >-- DIA.IOTableRename.From --> L0.String <R L0.HasProperty : L0.FunctionalRelation
55     >-- DIA.IOTableRename.To --> L0.String <R L0.HasProperty : L0.FunctionalRelation
56     @L0.assert DIA.IOTableRename.From
57         "" : L0.String
58     @L0.assert DIA.IOTableRename.To
59         "" : L0.String
60
61 DIA.Diagram <T DIA.Composite
62     >-- DIA.Diagram.IOTableRenaming --> DIA.IOTableRename <T L0.DependsOn 
63     @L0.optionalProperty DIA.HasModCount
64
65 DIA.HasModCount <R L0.HasProperty
66     L0.HasLabel "Modification Counter"
67     L0.HasDescription "A counter for modifications performed on the property owner resource. Used for naming elements with running number IDs."
68     L0.HasDomain DIA.Composite
69     L0.HasRange L0.Long
70
71 DIA.Terminal <T DIA.Element
72     @L0.singleProperty DIA.HasConnectionPoint
73     @L0.tag L0.Abstract
74     >-- DIA.Terminal.AllowedDirections --> L0.Integer <R L0.HasProperty : L0.FunctionalRelation
75         L0.HasDescription """Used to describe allowed terminal exit/enter directions for incoming/outgoing connections.
76 The integer value is a bit mask with the following meanings:
77 bit  meaning
78 0    right (1,0)
79 1    down  (0,1)
80 2    left  (-1,0)
81 3    up    (0,-1)
82 """
83
84 DIA.DefinedElement <T DIA.Element
85     @L0.tag L0.Abstract
86     @L0.singleProperty STR.IsDefinedBy
87
88 DIA.HasTransform <R G2D.HasTransform   : SEL.GenericParameterType
89     L0.HasLabel "Transform"
90     L0.InverseOf DIA.IsTransformOf
91     L0.HasDomain DIA.Element
92     L0.HasRange G2D.Transform
93     L0.HasRange L0.DoubleArray
94     ==> "Vector Double"
95     SEL.HasDisplayValue ""
96
97 DIA.HasDynamicTransform <R L0.HasProperty : L0.FunctionalRelation
98     L0.HasDomain DIA.Element
99     L0.HasRange L0.Value
100
101 DIA.HasConnectionPoint <R L0.DependsOn
102     L0.HasDomain DIA.Element
103     L0.HasRange STR.ConnectionRelation
104
105 DIA.Functions : L0.Library
106
107 DIA.Functions.availableProfiles : L0.Function
108     L0.HasValueType "[(String, Resource)]"
109 DIA.Functions.selectedProfile : L0.Function
110     L0.HasValueType "String"
111 DIA.Functions.activeProfileModifier : L0.Function
112     L0.HasValueType "String -> String"
113 DIA.Functions.diagramElementIssuePath : L0.Function
114
115 DIA.DefinedElement
116   >-- DIA.symbolCode ==> "[String]" <R L0.HasProperty : L0.FunctionalRelation
117   >-- DIA.symbolDropHandler ==> "[WorkbenchSelectionElement] -> <WriteGraph,Proc> ()" <R L0.HasProperty : L0.FunctionalRelation
118
119 DIA.DiagramActivityCondition <T L0.Entity
120   --> DIA.DiagramActivityCondition.test ==> "Resource -> <ReadGraph> String" <R L0.HasProperty : L0.FunctionalRelation 
121
122 DIA.diagramActivityCondition : L0.Template
123     @template %subject %expression
124         %subject : DIA.DiagramActivityCondition
125             DIA.DiagramActivityCondition.test _ : STR.SCLValue
126                 L0.SCLValue.expression %expression
127                 L0.HasValueType "Resource -> <ReadGraph> String"