workspace.removeProperties(context, rootPath, root.getProperties().keySet());
workspace.setProperties(context, rootPath, origRoot.getProperties());
// Loop over each child and call this method to copy the immediate children (and below).
for (Segment childSegment : origRoot.getChildSegments()) {
Path childPath = pathFactory.create(origRoot.getPath(), childSegment);
PathNode originalNode = original.getNode(childPath);
workspace.copyNode(context, originalNode, original, root, childSegment.getName(), true);
}
}