/**
* @see NodeEntry#getWorkspaceId()
*/
public NodeId getWorkspaceId() throws InvalidItemStateException, RepositoryException {
IdFactory idFactory = factory.getIdFactory();
if (uniqueID != null || parent == null) {
// uniqueID and root-node -> internal id is always the same as getId().
return getId();
} else {
PathFactory pf = factory.getPathFactory();
NodeId parentId = (revertInfo != null) ? revertInfo.oldParent.getWorkspaceId() : parent.getWorkspaceId();
return idFactory.createNodeId(parentId, pf.create(getName(true), getIndex(true)));
}
}