private void addDescendants(final DocRef docRef,
                                final Set<DocRef> expandedDocRefs,
                                final Set<String> docTypesToIgnore) {

        final List<ExplorerNode> children = explorerNodeService.getChildren(docRef);
        for (final var child : children) {
            if (ExplorerConstants.isFolder(child)) {
                if (!docTypesToIgnore.contains(child.getType())) {
                    this.addDocRef(child.getDocRef(), expandedDocRefs);
                    this.addDescendants(child.getDocRef(), expandedDocRefs, docTypesToIgnore);
                }
            } else {
                if (!docTypesToIgnore.contains(child.getType())) {
                    this.addDocRef(child.getDocRef(), expandedDocRefs);
                }
            }
        }
    }
Called recursively to add things to the set of Docs to export.
@param docRef The root docref
@param expandedDocRefs The output of the function
@param docTypesToIgnore Any types of doc to ignore and not recurse below.
stroom-importexport/stroom-importexport-impl/src/main/java/stroom/importexport/impl/ImportExportSerializerImpl.java