]> gerrit.simantics Code Review - simantics/platform.git/blob - 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
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 STR = <http://www.simantics.org/Structural-1.2>
3 SEL = <http://www.simantics.org/SelectionView-1.2>
4 MOD = <http://www.simantics.org/Modeling-1.2>
5
6 ANNO = <http://www.simantics.org/Annotation-1.0> : L0.Ontology
7     @L0.new
8     L0.HasResourceClass "org.simantics.annotation.ontology.AnnotationResource"
9
10 /*
11 TODO: This is what an annotation type should look like in the graph:
12
13     @template %property %value
14       %property --> %value <R L0.HasProperty : L0.TotalFunction
15       %value <T ANNO.Annotation
16
17 */
18
19 ANNO.Functions : L0.Library
20
21 ANNO.AnnotationType <T L0.Type : MOD.TypeWithChangeInformation
22     L0.HasDescription "An entity consisting of arbitrary properties."
23
24 ANNO.Annotation <T L0.Value : ANNO.AnnotationType : MOD.TypeWithChangeInformation
25     L0.HasDescription "Abstract base class for annotation object types."
26     @L0.tag L0.Abstract
27     @L0.assert L0.domainChildren ANNO.Functions.domainChildren
28     @L0.assert SEL.HasDisplayProperty
29       _ : SEL.DisplayProperty
30     @L0.assert L0.entityReplacer
31       _ : L0.SCLValue
32         L0.SCLValue.expression "copyAnnotationData"
33         L0.HasValueType "Resource -> Resource -> <WriteGraph> ()"
34     >-- ANNO.Annotation.HasEntry --> ANNO.Annotation <R L0.DependsOn
35
36 ANNO.Functions.domainChildren : L0.ExternalValue
37   L0.HasValueType "ValueAccessor"
38
39 ANNO.HasAnnotationPropertySubrelation <-- L0.IndexRoot --> L0.Relation <R L0.IsRelatedTo : L0.FunctionalRelation
40     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."""
41
42 ANNO.HasAnnotationTypeSupertype <-- L0.IndexRoot --> ANNO.AnnotationType <R L0.IsRelatedTo : L0.FunctionalRelation
43     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."""