]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.layer0/graph/Layer0GraphCompiler.pgraph
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.layer0 / graph / Layer0GraphCompiler.pgraph
1 L0 = <http://www.simantics.org/Layer0-1.1>\r
2 \r
3 \r
4 // Templates\r
5 \r
6 L0.new : L0.Template \r
7     L0.HasDescription "A builtin template that is only used in graph compilation."\r
8 L0.loadBytes : L0.Template \r
9     L0.HasDescription "A builtin template that is only used in graph compilation."\r
10 L0.loadString : L0.Template \r
11     L0.HasDescription "A builtin template that is only used in graph compilation."\r
12 L0.loadDataValue : L0.Template \r
13     L0.HasDescription "A builtin template that is only used in graph compilation."        \r
14 \r
15 // Literal types   \r
16 L0.Graph <T L0.Literal\r
17     @L0.assert L0.HasDataType ${\r
18         resourceCount : Integer,\r
19         extensions : Map(String, Variant),\r
20         identities : {\r
21             resource : Integer,\r
22             definition : \r
23               | Root { name : String, type : String }\r
24               | External { parent : Integer, name : String }\r
25               | Optional { parent : Integer, name : String }\r
26               | Internal { parent : Integer, name : String }\r
27         }[],\r
28         statements : Integer[],\r
29         values : { resource : Integer, value : Variant }[]\r
30     }\r
31     \r
32 L0.Ontology    \r
33     >-- L0.HasResourceClass --> L0.String <R L0.HasProperty\r
34         L0.HasDescription "A Java classname for a file containing selected resources from ontology."\r
35     \r
36 L0.Template <T L0.Entity\r
37     L0.HasDescription """Template defines a subgraph. Instances can be adapted to org.simantics.db.layer0.adapter.Template"""\r
38     >-- L0.HasTemplate --> L0.Graph <R L0.HasProperty : L0.FunctionalRelation\r
39     >-- L0.HasTemplateParameters --> L0.StringArray <R L0.HasProperty : L0.TotalFunction\r
40     @L0.singleProperty L0.HasTemplate\r
41     @L0.singleProperty L0.HasTemplateParameters\r