]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.annotation.ontology/graph/Annotation.pgraph
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.annotation.ontology / graph / Annotation.pgraph
diff --git a/bundles/org.simantics.annotation.ontology/graph/Annotation.pgraph b/bundles/org.simantics.annotation.ontology/graph/Annotation.pgraph
new file mode 100644 (file)
index 0000000..09b40fc
--- /dev/null
@@ -0,0 +1,43 @@
+L0 = <http://www.simantics.org/Layer0-1.1>
+STR = <http://www.simantics.org/Structural-1.2>
+SEL = <http://www.simantics.org/SelectionView-1.2>
+MOD = <http://www.simantics.org/Modeling-1.2>
+
+ANNO = <http://www.simantics.org/Annotation-1.0> : L0.Ontology
+    @L0.new
+    L0.HasResourceClass "org.simantics.annotation.ontology.AnnotationResource"
+
+/*
+TODO: This is what an annotation type should look like in the graph:
+
+    @template %property %value
+      %property --> %value <R L0.HasProperty : L0.TotalFunction
+      %value <T ANNO.Annotation
+
+*/
+
+ANNO.Functions : L0.Library
+
+ANNO.AnnotationType <T L0.Type : MOD.TypeWithChangeInformation
+    L0.HasDescription "An entity consisting of arbitrary properties."
+
+ANNO.Annotation <T L0.Value : ANNO.AnnotationType : MOD.TypeWithChangeInformation
+    L0.HasDescription "Abstract base class for annotation object types."
+    @L0.tag L0.Abstract
+    @L0.assert L0.domainChildren ANNO.Functions.domainChildren
+    @L0.assert SEL.HasDisplayProperty
+      _ : SEL.DisplayProperty
+    @L0.assert L0.entityReplacer
+      _ : L0.SCLValue
+        L0.SCLValue.expression "copyAnnotationData"
+        L0.HasValueType "Resource -> Resource -> <WriteGraph> ()"
+    >-- ANNO.Annotation.HasEntry --> ANNO.Annotation <R L0.DependsOn
+
+ANNO.Functions.domainChildren : L0.ExternalValue
+  L0.HasValueType "ValueAccessor"
+
+ANNO.HasAnnotationPropertySubrelation <-- L0.IndexRoot --> L0.Relation <R L0.IsRelatedTo : L0.FunctionalRelation
+    L0.HasDescription """When a new annotation type is created, its annotation property relation will be made a subrelation of the relation type specified by this relation. If unspecified, the new annotation property relation inherits L0.HasProperty."""
+
+ANNO.HasAnnotationTypeSupertype <-- L0.IndexRoot --> ANNO.AnnotationType <R L0.IsRelatedTo : L0.FunctionalRelation
+    L0.HasDescription """When a new annotation type is created, it inherits the type specified by this relation. If unspecified, the new annotation type inherits ANNO.Annotation."""