]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.document.ontology/graph/Document.pgraph
Move graph file document codes around a bit
[simantics/platform.git] / bundles / org.simantics.document.ontology / graph / Document.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 L0X = <http://www.simantics.org/Layer0X-1.1>
3 SG = <http://www.simantics.org/Scenegraph-1.1>
4 SEL = <http://www.simantics.org/SelectionView-1.2>
5 GF = <http://www.simantics.org/GraphFile-0.1>
6 ACT = <http://www.simantics.org/Action-1.1>
7
8 DOC = <http://www.simantics.org/Document-1.2> : L0.Ontology
9     @L0.new
10     L0.HasResourceClass "org.simantics.document.DocumentResource"
11     
12 DOC.cssDocument <R L0.HasProperty --> L0.String : L0.FunctionalRelation
13
14 DOC.DocumentSettings <T L0.Literal
15     @L0.assert L0.HasDataType ${ marginLeft : Integer, marginRight : Integer, marginTop : Integer, marginBottom : Integer }
16
17 DOC.DocumentSettings."n-marginLeft" <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
18     ==> "Integer"
19     L0.HasSubliteralPredicate.Inverse DOC.DocumentSettings    
20     L0.HasLabel "Left Margin"
21     SEL.SortingName "1"
22
23 DOC.DocumentSettings."n-marginRight" <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
24     ==> "Integer"
25     L0.HasSubliteralPredicate.Inverse DOC.DocumentSettings    
26     L0.HasLabel "Right Margin"
27     SEL.SortingName "2"
28     
29 DOC.DocumentSettings."n-marginTop" <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
30     ==> "Integer"
31     L0.HasSubliteralPredicate.Inverse DOC.DocumentSettings    
32     L0.HasLabel "Top Margin"
33     SEL.SortingName "3"
34
35 DOC.DocumentSettings."n-marginBottom" <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
36     ==> "Integer"
37     L0.HasSubliteralPredicate.Inverse DOC.DocumentSettings    
38     L0.HasLabel "Bottom Margin"
39     SEL.SortingName "4"
40
41 DOC.documentSettings <R L0.HasProperty : L0.FunctionalRelation : SEL.GenericParameterType
42     L0.HasLabel "Wiki Document Settings"
43     --> DOC.DocumentSettings
44     SEL.HasDisplayValue ""
45     L0.readOnly true
46     SEL.canBeLifted false
47     
48 // Attachment relations    
49 DOC.HasDocument <R L0.DependsOn
50     L0.HasRange DOC.Document
51
52 DOC.HasDocumentation <R DOC.HasDocument : L0.FunctionalRelation
53     L0.HasRange DOC.ScenegraphDocument
54
55 // Document types
56 DOC.Document <T L0.Entity
57
58 DOC.WikiDocument <T DOC.Document
59     >-- DOC.WikiDocument.wikiText --> DOC.WikiDocument.WikiText <R L0.HasProperty : L0.FunctionalRelation
60 //DOC.MicrosoftWordDocument <T DOC.Document
61 //    >-- DOC.MicrosoftWordDocument.data --> DOC.MicrosoftWordDocument.Data <R L0.HasProperty : L0.FunctionalRelation
62 DOC.PlainTextFileDocument <T DOC.Document    
63     >-- DOC.PlainTextFileDocument.filePath --> DOC.PlainTextFileDocument.FilePath <R L0.HasProperty : L0.FunctionalRelation
64 DOC.ScenegraphDocument <T DOC.Document
65     >-- DOC.ScenegraphDocument.scenegraph --> DOC.Scenegraph.Node <R L0.DependsOn : L0.FunctionalRelation    
66
67 DOC.FileDocument <T DOC.Document <T GF.File
68
69 DOC.HasUrl <R L0.HasProperty : L0.FunctionalRelation
70     L0.HasRange L0.URI
71     L0.HasDomain DOC.UrlDocument
72
73 DOC.UrlDocument <T DOC.Document
74
75 // TODO: this should be removed after it is no longer used in Sysdyn.
76 DOC.Report <T DOC.Document
77     // [Tuukka] I've no idea what to replace this with
78     @L0.tag L0.Deprecated
79     //@L0.singleProperty DOC.HasDocumentation
80     //@L0.singleProperty DOC.HasWikiText
81
82 // Literals
83 DOC.WikiDocument.WikiText <T L0.String
84 //    @L0.assert L0.HasDataType $String
85 //    @L0.assert L0.HasValueType "String"
86 //DOC.MicrosoftWordDocument.Data <T L0.ByteArray
87 //    @L0.assert L0.HasDataType $(Byte[])
88 //    @L0.assert L0.HasValueType "ByteArray"
89 DOC.PlainTextFileDocument.FilePath <T L0.String
90 //    @L0.assert L0.HasDataType $String
91 //    @L0.assert L0.HasValueType "String"
92
93 // Functions    
94 DOC.Functions : L0.Library    
95 DOC.Functions.documentationRootVariable : L0.Function
96  L0.HasValueType "Variable"
97 DOC.Functions.documentationText : L0.Function
98  L0.HasValueType "String"
99 DOC.Functions.standardEditText : L0.Function
100   L0.HasValueType "String"
101
102 // Document scene graph
103     
104 DOC.Scenegraph : L0.Library
105
106 DOC.Scenegraph.ParameterType <T L0.FunctionalRelation
107   @L0.assert SEL.HasDisplayProperty
108     _ : SEL.DisplayProperty
109   @L0.assert SEL.HasDisplayValue
110     _ : SEL.DisplayValue
111   @L0.assert SEL.HasDisplayUnit
112     _ : SEL.DisplayUnit
113   @L0.assert SEL.HasStandardPropertyInfo
114     DOC.Scenegraph.CategoryHidden : SEL.StandardPropertyInfo
115       SEL.StandardPropertyInfo.CategoryName ""
116       SEL.StandardPropertyInfo.CategorySortingName ""
117       SEL.StandardPropertyInfo.IsHidden true
118
119 DOC.Scenegraph.Node <T SG.Node
120   >-- DOC.Scenegraph.Node.printInPDF ==> "Boolean" <R SG.Node.HasProperty : DOC.Scenegraph.ParameterType
121   >-- DOC.Scenegraph.Node.editText ==> "String" <R SG.Node.HasProperty : DOC.Scenegraph.ParameterType
122   @L0.assert DOC.Scenegraph.Node.editText ""//DOC.Functions.standardEditText
123
124 DOC.Scenegraph.Composite <T DOC.Scenegraph.Node
125
126 DOC.Scenegraph.Wiki <T DOC.Scenegraph.Node
127   >-- DOC.Scenegraph.Wiki.text ==> "String" <R SG.Node.HasProperty : DOC.Scenegraph.ParameterType
128
129 DOC.Scenegraph.Diagram <T DOC.Scenegraph.Node
130   >-- DOC.Scenegraph.Diagram.path ==> "String" <R SG.Node.HasProperty : DOC.Scenegraph.ParameterType
131     
132 DOC.DocumentTypeBinding <T L0.Entity
133   >-- DOC.DocumentTypeBinding.HasType --> L0.Type <R L0.DependsOn
134   >-- DOC.DocumentTypeBinding.HasDocumentType --> DOC.Scenegraph <R L0.DependsOn
135   >-- DOC.DocumentTypeBinding.priority ==> "Double" <R L0.HasProperty : L0.TotalFunction
136   @L0.assert DOC.DocumentTypeBinding.priority 0.0
137
138
139 // Deprecated
140 DOC.HasReportFactory <R L0.DependsOn
141     L0.HasRange DOC.Report
142 DOC.HasDocumentTemplate <R L0.DependsOn
143     L0.HasRange DOC.DocumentTemplate
144 DOC.DocumentTemplate <T L0.Entity
145     @L0.singleProperty DOC.HasDocumentation
146     
147     
148 DOC.HasOlderVersion <R L0.IsWeaklyRelatedTo
149    L0.InverseOf DOC.HasNewerVersion <R L0.IsWeaklyRelatedTo
150    
151 DOC.HasLibraryRelation <R L0.IsWeaklyRelatedTo
152    L0.HasRange L0.Relation
153
154 DOC.HasVersionType <R L0.IsRelatedTo
155    L0.HasRange L0.String
156
157 DOC.PlainTextDocument <T DOC.Document
158    >-- DOC.PlainTextDocument.text ==> "String" <R L0.HasProperty : L0.FunctionalRelation
159
160
161 DOC.DocumentLibrary <T L0.Library
162
163 DOC.Actions : L0.Library
164
165 DOC.Actions.ImportFileDocument : ACT.Action
166