]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.district.network.ontology/graph/DistrictNetworkTechType.pgraph
Add enable/disable feature for tech type tables
[simantics/district.git] / org.simantics.district.network.ontology / graph / DistrictNetworkTechType.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
5 DN = <http://www.simantics.org/DistrictNetwork-1.0>
6
7 TT = DN.TechType : L0.Library
8
9 table = TT.TechTypeTable <T L0.Entity
10     // Table data as a CSV string literal
11     >-- table.HasData <R L0.HasProperty : L0.TotalFunction
12         --> L0.String
13     >-- table.HasEnabledItems <R L0.HasProperty : L0.FunctionalRelation
14         --> L0.IntegerArray
15     
16     // Link to corresponding component type
17     >-- table.HasComponentType <R L0.IsRelatedTo : L0.FunctionalRelation
18         --> STR.ComponentType
19         
20     @L0.assert table.HasEnabledItems
21         [] : L0.IntegerArray
22
23 TT.Functions : L0.Library
24 TT.Functions.techTypeCodeValueAccessor : L0.ExternalValue
25   L0.HasValueType "ValueAccessor"
26 TT.Functions.techTypeKeys : L0.Function
27   L0.HasValueType "ReadGraph -> Resource -> a -> b"
28
29 TT.TechTypeCodeParameterType : SEL.GenericParameterType
30     @L0.assert L0.valueAccessor TT.Functions.techTypeCodeValueAccessor