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