public static List<NewDocumentType> sort(Collection<NewDocumentType> documentTypes) {
        TopologicalDocumentTypeSorter sorter = new TopologicalDocumentTypeSorter(documentTypes);
        return new ArrayList<>(sorter.sortedTypes.values());
    }
Class that sorts a list of document types in topological order
according to the document references between the types.

Document types without any outgoing document references are considered
to be first in the topological order.

@author geirst
config-model/src/main/java/com/yahoo/vespa/model/content/TopologicalDocumentTypeSorter.java