n.setNodeTypes(nodeTypes);
n.setInheritedNodeTypes(inheritedTypes);
n.setProviderKey(node.getProvider().getKey());
BitSet bs = node.getPermissionsAsBitSet();
GWTBitSet gwtBs = new GWTBitSet(bs.size());
for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i+1)) {
gwtBs.set(i);
}
n.setPermissions(gwtBs);
n.setLockable(node.isLockable());