- if (types.size() != 1)\r
- throw new UnsupportedOperationException("Multi-instances not supported!");\r
- Resource type = types.iterator().next().getResource();\r
- return paths.getValues(type);\r
+ if (types.size() != 1) {\r
+ // for multi-instances we check if any of the types have paths\r
+ // no we return paths for a single type (it is possible to combine paths for all types)\r
+ for (IEntity type : types) {\r
+ Resource r = type.getResource();\r
+ List<List<Resource>> path = paths.getValues(r);\r
+ if (path != null)\r
+ return path;\r
+ }\r
+ return null;\r
+ } else {\r
+ Resource type = types.iterator().next().getResource();\r
+ return paths.getValues(type);\r
+ }\r