]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.layer0/graph/Layer0.pgraph
Work in progress
[simantics/platform.git] / bundles / org.simantics.layer0 / graph / Layer0.pgraph
1 <http:/> : L0.Library
2     @L0.new
3 <http://www.simantics.org> : L0.Library
4 L0 = <http://www.simantics.org/Layer0-1.1> : L0.Ontology
5     L0.HasResourceClass "org.simantics.layer0.Layer0"
6
7 // Types
8 L0.Entity : L0.Type
9     L0.HasDescription "All types are inherited from this type."
10     >-- L0.InstanceOf --> L0.Type <R L0.IsRelatedTo
11         @L0.tag L0.Final 
12     >-- L0.HasName --> L0.String  <R L0.HasProperty : L0.FunctionalRelation
13         L0.HasLabel "Name" 
14         L0.InverseOf L0.NameOf
15         @L0.tag L0.Final
16     >-- L0.HasLabel --> L0.Value <R L0.HasProperty : L0.FunctionalRelation
17         L0.HasLabel "Label"
18         L0.RequiresValueType "String"
19     >-- L0.HasDescription --> L0.Value <R L0.HasProperty : L0.FunctionalRelation
20         L0.HasLabel "Description"
21         L0.RequiresValueType "String"
22     >-- L0.identifier <R L0.HasProperty : L0.FunctionalRelation
23         L0.HasLabel "Identifier"
24         --> L0.GUID
25     >-- L0.typeURI <R L0.HasProperty : L0.FunctionalRelation
26         L0.HasLabel "Type URI"
27         --> L0.String
28     >-- L0.typeResource <R L0.HasProperty : L0.FunctionalRelation
29         L0.HasLabel "Type Resource"
30         ==> "Variable -> Resource -> <ReadGraph> Resource"
31     >-- L0.representsResource <R L0.HasProperty : L0.FunctionalRelation
32         L0.HasLabel "Representing Resource"
33         ==> "Variable -> <ReadGraph> Resource"
34     >-- L0.HasComment --> L0.String <R L0.HasProperty
35     >-- L0.ConsistsOf --> L0.Entity <R L0.IsComposedOf
36         L0.InverseOf L0.PartOf : L0.FunctionalRelation
37         @L0.tag L0.Final
38     >-- L0.IsLinkedTo --> L0.Entity       <R L0.DependsOn        
39     @L0.property L0.InstanceOf
40     @L0.property L0.HasProperty
41     @L0.property L0.HasNext
42     >-- L0.Entity.published --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation
43       L0.readOnly true
44     >-- L0.Entity.methods
45     @L0.assert L0.Entity.methods
46       _ : L0.Value
47     
48 L0.Entity.methods --> L0.Value <R L0.HasProperty : L0.FunctionalRelation
49   L0.domainProperties L0.Functions.methodsPropertyDomainProperties
50   
51 L0.Entity.method <R L0.HasProperty : L0.FunctionalRelation
52     
53 L0.Type <T L0.Entity
54     L0.HasDescription "All types are instances of this type."
55     >-- L0.Asserts --> L0.Assertion <R L0.IsComposedOf
56         L0.HasDescription "The statement modelled by an assertion is implied for all instances of the asserting type."
57         @L0.tag L0.Final
58     >-- L0.Inherits --> L0.Type     <R L0.DependsOn
59         L0.InverseOf L0.SupertypeOf
60         @L0.tag L0.Final
61     @L0.property L0.HasPropertyDefinition        
62     @L0.property L0.Asserts
63     @L0.property L0.Inherits
64     >-- L0.Type.instantiateUnder ==> "Resource -> Resource -> <WriteGraph> Resource" <R L0.HasMethod : L0.FunctionalRelation
65     @L0.assert L0.Type.instantiateUnder L0.Functions.defaultInstantiateUnder
66 L0.Assertion <T L0.Entity
67     L0.HasDescription "The statement modelled by an assertion is implied for all instances of the asserting type."
68     >-- L0.HasPredicate --> L0.Relation <R L0.IsRelatedTo : L0.TotalFunction
69         L0.InverseOf L0.HasPredicateInverse <R L0.IsWeaklyRelatedTo
70     >-- L0.HasObject --> L0.Entity      <R L0.IsRelatedTo : L0.TotalFunction
71         L0.InverseOf L0.HasObjectInverse <R L0.IsWeaklyRelatedTo
72     @L0.singleProperty L0.HasPredicate
73     @L0.singleProperty L0.HasObject
74     
75 // Relations    
76 L0.Relation <T L0.Entity //<T L0.BinaryPredicate
77     L0.HasDescription "All relations are instances of this type."
78     >-- L0.SubrelationOf --> L0.Relation <R L0.DependsOn    
79         L0.InverseOf L0.SuperrelationOf
80         @L0.tag L0.Final
81     >-- L0.InverseOf --> L0.Relation     <R L0.DependsOn : L0.FunctionalRelation
82         L0.HasDescription "States that subject and object (relations) are inverses."
83         @L0.symmetric
84         @L0.tag L0.Final
85     >-- L0.HasDomain --> L0.Type         <R L0.DependsOn
86         L0.InverseOf L0.DomainOf         <R L0.IsRelatedTo
87     >-- L0.HasRange --> L0.Type          <R L0.DependsOn
88     @L0.property L0.SubrelationOf
89     @L0.property L0.InverseOf
90     @L0.property L0.SuperrelationOf
91 L0.FunctionalRelation <T L0.Relation
92     L0.HasDescription "The cardinality of this relation for any subject is at most one."
93 L0.TotalFunction <T L0.FunctionalRelation
94     L0.HasDescription "The cardinality of this relation for any subject is exactly one."         
95 L0.Tag <T L0.Relation
96     L0.HasDescription "A relation for which subject = object, used to model simple boolean statements."
97 L0.PropertyRelation <T L0.Relation
98     L0.HasDescription "Base type for all property relations."
99    
100 // Base relations
101 L0.IsWeaklyRelatedTo : L0.Relation
102     L0.HasDescription "A basis for all relations. Makes as weak as possible connection between its subject and object."
103 L0.IsRelatedTo <R L0.IsWeaklyRelatedTo
104     L0.HasDescription "A typical relation, does not imply dependency." 
105 L0.DependsOn <R L0.IsRelatedTo
106     L0.HasDescription "States that subject depends on the object."
107     L0.InverseOf L0.IsDependencyOf <R L0.IsWeaklyRelatedTo 
108 L0.IsComposedOf <R L0.DependsOn
109     L0.HasDescription "States that subject owns the object."
110     L0.InverseOf L0.IsOwnedBy
111 L0.HasProperty <R L0.IsComposedOf : L0.PropertyRelation
112     L0.InverseOf L0.PropertyOf
113     L0.HasRange L0.Value
114     
115 L0.HasMethod <R L0.DependsOn
116     L0.InverseOf L0.MethodOf
117     L0.HasRange L0.Value
118     
119 // Libraries
120 L0.IndexRootType <T L0.Type
121 L0.IndexRoot <T L0.Entity : L0.IndexRootType
122     @L0.tag L0.Abstract
123 L0.Library <T L0.Entity
124     @L0.singleProperty L0.HasName
125     @L0.property L0.ConsistsOf    
126 L0.Ontology <T L0.Library <T L0.IndexRoot
127     >-- L0.Ontology.global <R L0.HasProperty : L0.FunctionalRelation
128         L0.HasLabel "Global?"
129         --> L0.Boolean
130     >-- L0.Ontology.download --> L0.String <R L0.HasProperty : L0.FunctionalRelation
131             
132 L0.SharedOntology <T L0.Ontology
133     >-- L0.SharedOntology.treatAsSystemOntology --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation
134     @L0.assert L0.SharedOntology.treatAsSystemOntology false
135     @L0.tag L0.Abstract
136     >-- L0.SharedOntology.tg <R L0.HasProperty : L0.FunctionalRelation
137         --> L0.Graph
138     >-- L0.SharedOntology.tgResources <R L0.HasProperty : L0.FunctionalRelation
139         --> L0.ResourceIdArray
140         
141 L0.ResourceIdArray <T L0.Literal        
142     @L0.assert L0.HasDataType $(Long(unit="resource")[])
143  
144 L0.PGraph <T L0.Entity
145     >-- L0.PGraph.definition --> L0.String <R L0.HasProperty : L0.TotalFunction
146     @L0.assert L0.PGraph.definition ""
147     
148 L0.ExternalEntity <T L0.Entity    
149