try {
Session session = connector().find(repository).session(workspace);
Node n = session.getNode(path);
// convert into value object
JcrNode node = new JcrNode(repository, workspace, n.getName(), n.getPath(), n.getPrimaryNodeType().getName());
node.setMixins(mixinTypes(n));
node.setProperties(getProperties(repository, workspace, path, n));
node.setPropertyDefs(propertyDefs(n));
node.setAcl(getAcl(repository, workspace, path));
NodeIterator it = n.getNodes();
while (it.hasNext()) {
Node child = it.nextNode();
node.addChild(new JcrNode(repository, workspace, child.getName(), child.getPath(), child.getPrimaryNodeType().getName()));
}
return node;
} catch (AccessDeniedException | SecurityException ade) {
throw new RemoteException(RemoteException.SECURITY_ERROR, ade.getMessage());
} catch (RepositoryException e) {