throw new RuntimeException("Attempt to access virtual " +
"property 'contains' on non-list resource");
}
int pos = arrayPos[0];
if (pos >= list.size()) {
throw new FieldIndexOutOfBoundsException(pathSections[0],arrayPos, currentDimension);
}
ExpandedNode listNode = new ExpandedNode(list.get(pos));
if (pathSections.length == 1) {
return listNode;
}
return listNode.getChild(Arrays.copyOfRange(pathSections, 1, pathSections.length),
Arrays.copyOfRange(arrayPos, 1, arrayPos.length), currentDimension);
}
String fieldName = pathSections[0];
boolean inverseResolve;
if (fieldName.charAt(0) == '-') {
fieldName = fieldName.substring(1);
inverseResolve = true;
} else {
inverseResolve = false;
}
String uriString = getUriFromCuri(fieldName);
UriRef property = new UriRef(uriString);
List<ExpandedNode> childList = getChildList(property, inverseResolve);
if (arrayPos.length == 0) {
arrayPos = new int[1];
currentDimension = 0;
arrayPos[0] = 0;
}
int pos = arrayPos[0];
if (pos >= childList.size()) {
throw new FieldIndexOutOfBoundsException(uriString, arrayPos, currentDimension);
}
currentDimension++;
return childList.get(pos).getChild(
Arrays.copyOfRange(pathSections, 1, pathSections.length),