import org.simantics.db.Resource;\r
import org.simantics.db.common.request.ResourceRead;\r
import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.layer0.util.Layer0Utils;\r
import org.simantics.layer0.Layer0;\r
import org.simantics.scl.compiler.environment.Environment;\r
import org.simantics.scl.compiler.environment.Environments;\r
\r
private void collect(ReadGraph graph, Resource t, THashMap<String, ComponentTypeProperty> result) throws DatabaseException {\r
Layer0 L0 = Layer0.getInstance(graph);\r
- for(Resource relation : graph.getObjects(t, L0.DomainOf)) {\r
+ Map<String,Resource> domain = Layer0Utils.getDomainOf(graph, t); \r
+ for(Map.Entry<String, Resource> entry : domain.entrySet()) {\r
+ String name = entry.getKey();\r
+ Resource relation = entry.getValue();\r
if(graph.isSubrelationOf(relation, L0.HasProperty)) {\r
- String name = graph.getRelatedValue(relation, L0.HasName, Bindings.STRING);\r
String typeName = graph.getPossibleRelatedValue(relation, L0.RequiresValueType, Bindings.STRING);\r
if(typeName == null) continue;\r
Type type;\r
new THashMap<String, ComponentTypeProperty>();\r
\r
collect(graph, resource, result);\r
- for(Resource t : graph.getSupertypes(resource)) collect(graph, t, result);\r
+ //for(Resource t : graph.getSupertypes(resource)) collect(graph, t, result);\r
\r
return result;\r
\r