// We either walked up to an entry below root or up to an uniqueID. In the former
// case we construct an NodeId with an absolute path. In the latter case we construct
// a NodeId from an uuid and a relative path.
if (entry.getParent() == null) {
pathBuilder.addRoot();
return idFactory.createNodeId((String) null, pathBuilder.getPath());
}
else {
return idFactory.createNodeId(entry.getUniqueID(), pathBuilder.getPath());
}