generatedOutWriter.removeChild(oldId);
persistDocument(generatedOutId, generatedOutWriter.document());
// Remove the document at '/doc{n}/generate-out/{name}' ...
removeDocument(oldId);
changes.nodeRemoved(oldId, documentId, oldPath, JcrNtLexicon.UNSTRUCTURED, Collections.<Name>emptySet(),
isQueryable());
// Remove the child documents, but we don't need to fire events for the subnodes of a deleted node ...
DocumentReader reader = readDocument(oldDoc);
for (String childId : reader.getChildrenMap().keySet()) {