- StructuralResource2 STR = StructuralResource2.getInstance(graph);
- Resource type = graph.getPossibleType(parameter.component, STR.Component);
- if(graph.syncRequest(new IsLeafType(type))) return null;
-
- return Functions.computeInterfacePaths(graph, parameter.getVariable(graph).getParent(graph));
+// ConnectionBrowser.reportDescriptor(graph, parameter);
+
+ /*
+ * The componentType is the possibly replaced (STR.ReplaceableDefinedComponentType) type
+ */
+ StructuralComponentClass clazz = StructuralComponentClass.get(graph, parameter.componentType);
+ if(StructuralComponentClass.PRIMITIVE.equals(clazz)) {
+ return null;
+ } else if(StructuralComponentClass.DEFINED.equals(clazz)) {
+ final Collection<InterfaceResolution> interfaces = graph.syncRequest(new DefinedUCInterfaceMap(parameter.componentType));
+ if(interfaces != null) return interfaces;
+ else return Functions.BUILTIN_STRUCTURAL_CPS;
+ } else if(StructuralComponentClass.REPLACEABLE.equals(clazz)) {
+ throw new DatabaseException("ConnectionBrowser does not support nested replaceable defined structural types.");
+ } else {
+ return Functions.computeInterfacePaths(graph, parameter.getVariable(graph).getParent(graph));
+ }