- introspector = loader.introspectorFromName(parts[i + 1]);
- if (null == previousObj) {
- throw new AAIException(aaiExceptionCode);
- }
- if (previousObj.isContainer() && introspector.isContainer()) {
- throw new AAIException("AAI_3000", uri + " not a valid path. Cannot chain plurals together");
- }
- MultivaluedMap<String, String> uriKeys = new MultivaluedHashMap<>();
- if (i == parts.length - 2 && queryParams != null) {
- Set<String> queryKeys = queryParams.keySet();
- for (String key : queryKeys) {
- uriKeys.put(key, queryParams.get(key));
-
- }
- }
- if (introspector.isContainer()) {
- boolean isFinalContainer = i == parts.length - 2;
- /*
- * Related-to could be COUSIN OR TREE and in some cases BOTH. So Let EdgeRuleBuilder use all the
- * edgeTypes
- */
- p.processContainer(introspector, EdgeType.ALL, uriKeys, isFinalContainer);
- }
+ boolean isFinalContainer = i == parts.length - 2;
+ introspector = parseCousin(p, parts[i + 1], previousObj, isFinalContainer);