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