]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.ontology/graph/Typicals.pgraph
Merge changes I78c3a258,I7bf72f04
[simantics/platform.git] / bundles / org.simantics.modeling.ontology / graph / Typicals.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>
2 L0X = <http://www.simantics.org/Layer0X-1.1>
3 STR = <http://www.simantics.org/Structural-1.2>
4 G2D = <http://www.simantics.org/G2D-1.1>
5 DIA = <http://www.simantics.org/Diagram-2.2>
6 SIMU = <http://www.simantics.org/Simulation-1.1>
7 DOC = <http://www.simantics.org/Document-1.2>
8 ISSUE = <http://www.simantics.org/Issue-1.2>
9 SG = <http://www.simantics.org/Scenegraph-1.1>
10 MOD = <http://www.simantics.org/Modeling-1.2>
11 ACT = <http://www.simantics.org/Action-1.1>
12
13 PRED = L0X.Predicate
14
15 //##########################################################################
16 //## Actions
17 //##########################################################################
18
19 MOD.NewMasterTypicalDiagram : ACT.Action
20 MOD.NewTypicalDiagramInstance : ACT.Action
21
22 //##########################################################################
23 //## Concepts
24 //##########################################################################
25
26 MOD.MasterTypicalCompositeType <T L0.Entity : MOD.TypeWithChangeInformation
27     L0.HasDescription "Indicates the original template instance of a typical composite. This is for searching purposes to differetiate typical template instances from linked copies of the template."
28
29 MOD.TypicalComposite <T STR.Composite
30     L0.HasDescription "All typical composite types must inherit this base type."
31     >-- MOD.TypicalComposite.typicalNamingFunction --> L0.ExternalValue ==> "ReadGraph -> Resource -> Resource -> String -> String" <R L0.HasProperty : L0.FunctionalRelation
32
33 // For associating typical diagram source and instance structures with each other
34 MOD.HasDiagramSource <R L0.IsRelatedTo
35     L0.InverseOf MOD.DiagramHasInstance <R L0.IsWeaklyRelatedTo
36     <-- DIA.Diagram --> DIA.Diagram
37 MOD.HasElementSource <R L0.IsRelatedTo
38     L0.InverseOf MOD.ElementHasInstance <R L0.IsWeaklyRelatedTo
39     <-- DIA.Element --> DIA.Element
40
41 MOD.IsTemplatized
42     L0.HasDescription "A tag for marking elements of typical diagram template instances as being controlled by the template. These tags are used to identify elements that still exist in the instance but no longer in the template."
43     @L0.defTag
44     @L0.symmetric
45
46 MOD.TypicalSynchronizationRule <T L0.Entity
47     L0.HasDescription "These entities shall be adaptable to interface org.simantics.modeling.typicals.ITypicalSynchronizationRule. They can be attached to diagram elements."
48     >-- MOD.TypicalSynchronizationRule.alwaysEnabled --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation
49         L0.HasDescription "When true, tells that a typical synchronization rule shall always be applied during synchronization and is not to be presented to the user for (de)selection."
50
51 MOD.HasTypicalSynchronizationRule <R L0.IsRelatedTo
52     <-- DIA.Element
53     --> MOD.TypicalSynchronizationRule
54
55 MOD.PageSettingsTypicalRule : MOD.TypicalSynchronizationRule
56     L0.HasLabel "Diagram Page Settings"
57
58 //##########################################################################
59 //## MOD.StructuralModel additions
60 //##########################################################################
61
62 // Add typical diagram support
63 MOD.StructuralModel
64     // For creating new master typical diagrams
65     >-- MOD.StructuralModel.HasTypicalCompositeBaseType --> L0.Type <R L0.IsRelatedTo : L0.FunctionalRelation
66         L0.HasDescription """Defines the structural composite base type from which to inherit typical diagrams created in this type of model."""
67     >-- MOD.StructuralModel.HasTypicalDiagramBaseType --> L0.Type <R L0.IsRelatedTo : L0.FunctionalRelation
68         L0.HasDescription """Defines the structural diagram base type from which to inherit typical diagrams created in this type of model."""
69     >-- MOD.StructuralModel.HasMasterTypicalCompositeType --> L0.Type <R L0.IsRelatedTo : L0.FunctionalRelation
70         L0.HasDescription """Defines a secondary type that master typical composite shall inherit when created in this type of model. This type can be used for searching for all typical master diagrams."""
71     >-- MOD.StructuralModel.CloneTypicalDiagramSymbolContributionsFrom --> L0.Type <R L0.IsRelatedTo
72         L0.HasDescription """Defines diagram types to copy diagram symbol contributions from into newly created typical diagrams."""
73     >-- MOD.StructuralModel.typicalInstantiationFunction --> L0.ExternalValue ==> "Resource -> Resource -> Resource" <R L0.HasProperty : L0.FunctionalRelation
74
75     @L0.assert MOD.StructuralModel.HasTypicalCompositeBaseType MOD.TypicalComposite
76     @L0.assert MOD.StructuralModel.HasMasterTypicalCompositeType MOD.MasterTypicalCompositeType
77     @L0.assert MOD.StructuralModel.typicalInstantiationFunction MOD.Functions.standardTypicalInstantiator
78
79 MOD.Functions.standardTypicalInstantiator : L0.ExternalValue
80     L0.HasDescription "See org.simantics.modeling.ui.functions.All.standardTypicalInstantiator"