]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.layer0/graph/Layer0.pgraph
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.layer0 / graph / Layer0.pgraph
diff --git a/bundles/org.simantics.layer0/graph/Layer0.pgraph b/bundles/org.simantics.layer0/graph/Layer0.pgraph
new file mode 100644 (file)
index 0000000..2a8a24b
--- /dev/null
@@ -0,0 +1,126 @@
+<http:/> : L0.Library\r
+    @L0.new\r
+<http://www.simantics.org> : L0.Library\r
+L0 = <http://www.simantics.org/Layer0-1.1> : L0.Ontology\r
+    L0.HasResourceClass "org.simantics.layer0.Layer0"\r
+\r
+// Types\r
+L0.Entity : L0.Type\r
+    L0.HasDescription "All types are inherited from this type."\r
+    >-- L0.InstanceOf --> L0.Type <R L0.IsRelatedTo\r
+        @L0.tag L0.Final \r
+    >-- L0.HasName --> L0.String  <R L0.HasProperty : L0.FunctionalRelation\r
+        L0.HasLabel "Name" \r
+        L0.InverseOf L0.NameOf\r
+        @L0.tag L0.Final\r
+    >-- L0.HasLabel --> L0.Value <R L0.HasProperty : L0.FunctionalRelation\r
+        L0.HasLabel "Label"\r
+        L0.RequiresValueType "String"\r
+    >-- L0.HasDescription --> L0.Value <R L0.HasProperty : L0.FunctionalRelation\r
+        L0.HasLabel "Description"\r
+        L0.RequiresValueType "String"\r
+    >-- L0.identifier <R L0.HasProperty : L0.FunctionalRelation\r
+        L0.HasLabel "Identifier"\r
+        --> L0.GUID\r
+    >-- L0.typeURI <R L0.HasProperty : L0.FunctionalRelation\r
+        L0.HasLabel "Type URI"\r
+        --> L0.String\r
+    >-- L0.HasComment --> L0.String <R L0.HasProperty\r
+    >-- L0.ConsistsOf --> L0.Entity <R L0.IsComposedOf\r
+        L0.InverseOf L0.PartOf : L0.FunctionalRelation\r
+        @L0.tag L0.Final\r
+    >-- L0.IsLinkedTo --> L0.Entity       <R L0.DependsOn        \r
+    @L0.property L0.InstanceOf\r
+    @L0.property L0.HasProperty\r
+    @L0.property L0.HasNext\r
+    >-- L0.Entity.published --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation\r
+      L0.readOnly true\r
+L0.Type <T L0.Entity\r
+    L0.HasDescription "All types are instances of this type."\r
+    >-- L0.Asserts --> L0.Assertion <R L0.IsComposedOf\r
+        L0.HasDescription "The statement modelled by an assertion is implied for all instances of the asserting type."\r
+        @L0.tag L0.Final\r
+    >-- L0.Inherits --> L0.Type     <R L0.DependsOn\r
+        L0.InverseOf L0.SupertypeOf\r
+        @L0.tag L0.Final\r
+    @L0.property L0.HasPropertyDefinition        \r
+    @L0.property L0.Asserts\r
+    @L0.property L0.Inherits\r
+L0.Assertion <T L0.Entity\r
+    L0.HasDescription "The statement modelled by an assertion is implied for all instances of the asserting type."\r
+    >-- L0.HasPredicate --> L0.Relation <R L0.IsRelatedTo : L0.TotalFunction\r
+        L0.InverseOf L0.HasPredicateInverse <R L0.IsWeaklyRelatedTo\r
+    >-- L0.HasObject --> L0.Entity      <R L0.IsRelatedTo : L0.TotalFunction\r
+        L0.InverseOf L0.HasObjectInverse <R L0.IsWeaklyRelatedTo\r
+    @L0.singleProperty L0.HasPredicate\r
+    @L0.singleProperty L0.HasObject\r
+    \r
+// Relations    \r
+L0.Relation <T L0.Entity //<T L0.BinaryPredicate\r
+    L0.HasDescription "All relations are instances of this type."\r
+    >-- L0.SubrelationOf --> L0.Relation <R L0.DependsOn    \r
+        L0.InverseOf L0.SuperrelationOf\r
+        @L0.tag L0.Final\r
+    >-- L0.InverseOf --> L0.Relation     <R L0.DependsOn : L0.FunctionalRelation\r
+        L0.HasDescription "States that subject and object (relations) are inverses."\r
+        @L0.symmetric\r
+        @L0.tag L0.Final\r
+    >-- L0.HasDomain --> L0.Type         <R L0.DependsOn\r
+        L0.InverseOf L0.DomainOf         <R L0.IsRelatedTo\r
+    >-- L0.HasRange --> L0.Type          <R L0.DependsOn\r
+    @L0.property L0.SubrelationOf\r
+    @L0.property L0.InverseOf\r
+    @L0.property L0.SuperrelationOf\r
+L0.FunctionalRelation <T L0.Relation\r
+    L0.HasDescription "The cardinality of this relation for any subject is at most one."\r
+L0.TotalFunction <T L0.FunctionalRelation\r
+    L0.HasDescription "The cardinality of this relation for any subject is exactly one."         \r
+L0.Tag <T L0.Relation\r
+    L0.HasDescription "A relation for which subject = object, used to model simple boolean statements."\r
+L0.PropertyRelation <T L0.Relation\r
+    L0.HasDescription "Base type for all property relations."\r
+   \r
+// Base relations\r
+L0.IsWeaklyRelatedTo : L0.Relation\r
+    L0.HasDescription "A basis for all relations. Makes as weak as possible connection between its subject and object."\r
+L0.IsRelatedTo <R L0.IsWeaklyRelatedTo\r
+    L0.HasDescription "A typical relation, does not imply dependency." \r
+L0.DependsOn <R L0.IsRelatedTo\r
+    L0.HasDescription "States that subject depends on the object."\r
+    L0.InverseOf L0.IsDependencyOf <R L0.IsWeaklyRelatedTo \r
+L0.IsComposedOf <R L0.DependsOn\r
+    L0.HasDescription "States that subject owns the object."\r
+    L0.InverseOf L0.IsOwnedBy\r
+L0.HasProperty <R L0.IsComposedOf : L0.PropertyRelation\r
+    L0.InverseOf L0.PropertyOf\r
+    L0.HasRange L0.Value\r
+    \r
+    \r
+// Libraries\r
+L0.IndexRootType <T L0.Type\r
+L0.IndexRoot <T L0.Entity : L0.IndexRootType\r
+    @L0.tag L0.Abstract\r
+L0.Library <T L0.Entity\r
+    @L0.singleProperty L0.HasName\r
+    @L0.property L0.ConsistsOf    \r
+L0.Ontology <T L0.Library <T L0.IndexRoot\r
+    >-- L0.Ontology.global <R L0.HasProperty : L0.FunctionalRelation\r
+        L0.HasLabel "Global?"\r
+        --> L0.Boolean\r
+        \r
+L0.SharedOntology <T L0.Ontology\r
+    >-- L0.SharedOntology.treatAsSystemOntology --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation\r
+    @L0.assert L0.SharedOntology.treatAsSystemOntology false\r
+    @L0.tag L0.Abstract\r
+    >-- L0.SharedOntology.tg <R L0.HasProperty : L0.FunctionalRelation\r
+        --> L0.Graph\r
+    >-- L0.SharedOntology.tgResources <R L0.HasProperty : L0.FunctionalRelation\r
+        --> L0.ResourceIdArray\r
+        \r
+L0.ResourceIdArray <T L0.Literal        \r
+    @L0.assert L0.HasDataType $(Long(unit="resource")[])\r
\r
+L0.PGraph <T L0.Entity\r
+    >-- L0.PGraph.definition --> L0.String <R L0.HasProperty : L0.TotalFunction\r
+    @L0.assert L0.PGraph.definition ""\r
\ No newline at end of file