public static Resource structuralTypeResource(ReadGraph graph, Variable component, Resource baseType) throws DatabaseException {
StructuralOverrideData od = StructuralOverrideData.compute(graph, component);
- return od.type();
+ if (od != null)
+ return od.type();
+ return null;
}
public static Resource getComponentType(ReadGraph graph, Variable configuration, Resource component) throws DatabaseException {
-
Variable componentVariable = configuration.browse(graph, component);
return componentVariable.getType(graph);
-
}
+ public static Resource getPossibleComponentType(ReadGraph graph, Variable configuration, Resource component) throws DatabaseException {
+ Variable componentVariable = configuration.browsePossible(graph, component);
+ if(componentVariable == null) return null;
+ StructuralResource2 STR = StructuralResource2.getInstance(graph);
+ return componentVariable.getPossibleType(graph, STR.Component);
+ }
}