Set<Node> matchSet = new HashSet<Node>();
collectNodes(value, Collections.singleton(propertyName), ntName, root.getNodes(), matchSet, true, 1);
NodeIterator it = new NodeIteratorAdapter(matchSet);
if (it.hasNext()) {
return it.nextNode();
}
} catch (PathNotFoundException e) {
// should not get here
log.warn("Error while retrieving node " + sr);
}