pb.addLast(elems[j]);
}
Path remainingPath = pb.getPath();
NodeId parentId = entry.getId();
IdFactory idFactory = factory.getIdFactory();
NodeId nodeId = idFactory.createNodeId(parentId, remainingPath);
NodeEntry ne = entry.loadNodeEntry(nodeId);
if (ne != null) {
return ne;
} else {
if (index != Path.INDEX_DEFAULT) {
throw new PathNotFoundException(path.toString());
}
// maybe a property entry exists
parentId = (remainingPath.getLength() == 1) ? parentId : idFactory.createNodeId(parentId, remainingPath.getAncestor(1));
PropertyId propId = idFactory.createPropertyId(parentId, remainingPath.getNameElement().getName());
PropertyEntry pe = entry.loadPropertyEntry(propId);
if (pe != null) {
return pe;
} else {
throw new PathNotFoundException(path.toString());