Class TopicViews


  • public class TopicViews
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TopicViews​(java.nio.file.Path target)  
    • Method Summary

      Modifier and Type Method Description
      FileTopicsView getFiles()
      Get a list of topics found by walking all markdown fragments and extracting headers.
      FlatTopicsView getFlat()
      Get a flat view of all topics.
      HeaderTopicsView getHeaders()
      Get an iterable view of all topics that are found by walking all markdown fragments and parsing out all headers.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TopicViews

        public TopicViews​(java.nio.file.Path target)
    • Method Detail

      • getHeaders

        public HeaderTopicsView getHeaders()
        Get an iterable view of all topics that are found by walking all markdown fragments and parsing out all headers. These headers are returned as a topic tree rooted at the top level header or headers in each file, with the header levels compacted for uniform nesting levels in rendering.
        Returns:
        A list of root header topics with sub topics added
      • getFlat

        public FlatTopicsView getFlat()
        Get a flat view of all topics. This is an iterable of topics which are not nested in any way. The heading level is preserved as the topics were originally seen.
        Returns:
        A flat list of topics as they were found in markdown fragments
      • getFiles

        public FileTopicsView getFiles()
        Get a list of topics found by walking all markdown fragments and extracting headers. The first heading of each file is promoted to a root topic. If there are subtopics nested under the first topic, then they are promoted up one structural level. Each topic in the returned list represents a single file, with all the internal topics attached below. The topic levels are compacted for uniform nesting levels in rendering.
        Returns:
        a list of topics by file, with internal topics attached to each