import gnu.trove.map.hash.THashMap;
+import java.util.Collections;
import java.util.Map;
import org.simantics.databoard.Bindings;
@Override
public Map<String, ComponentTypeProperty> perform(ReadGraph graph)
throws DatabaseException {
-
+ if (resource == null)
+ return Collections.emptyMap();
+
THashMap<String, ComponentTypeProperty> result =
new THashMap<String, ComponentTypeProperty>();
- collect(graph, resource, result);
+ // TODO: For Antti to consider
+ // resource == null with procedural user components
+ if (resource != null)
+ collect(graph, resource, result);
//for(Resource t : graph.getSupertypes(resource)) collect(graph, t, result);
return result;