Class IndexingSink

    • Constructor Detail

      • IndexingSink

        public IndexingSink​(org.apache.maven.doxia.sink.Sink delegate)
    • Method Detail

      • getRootEntry

        public IndexEntry getRootEntry()
        This should only be called once the sink is closed. Before that the tree might not be complete.
        Returns:
        the tree of entries starting from the root
        Throws:
        java.lang.IllegalStateException - in case the sink was not closed yet
      • title

        public void title​(org.apache.maven.doxia.sink.SinkEventAttributes attributes)
        Specified by:
        title in interface org.apache.maven.doxia.sink.Sink
        Overrides:
        title in class SinkWrapper
      • title_

        public void title_()
        Specified by:
        title_ in interface org.apache.maven.doxia.sink.Sink
        Overrides:
        title_ in class SinkWrapper
      • section

        public void section​(int level,
                            org.apache.maven.doxia.sink.SinkEventAttributes attributes)
        Specified by:
        section in interface org.apache.maven.doxia.sink.Sink
        Overrides:
        section in class SinkWrapper
      • section_

        public void section_​(int level)
        Specified by:
        section_ in interface org.apache.maven.doxia.sink.Sink
        Overrides:
        section_ in class SinkWrapper
      • sectionTitle_

        public void sectionTitle_​(int level)
        Specified by:
        sectionTitle_ in interface org.apache.maven.doxia.sink.Sink
        Overrides:
        sectionTitle_ in class SinkWrapper
      • text

        public void text​(java.lang.String text,
                         org.apache.maven.doxia.sink.SinkEventAttributes attributes)
        Specified by:
        text in interface org.apache.maven.doxia.sink.Sink
        Overrides:
        text in class SinkWrapper
      • anchor

        public void anchor​(java.lang.String name,
                           org.apache.maven.doxia.sink.SinkEventAttributes attributes)
        Specified by:
        anchor in interface org.apache.maven.doxia.sink.Sink
        Overrides:
        anchor in class SinkWrapper
      • onIndexEntry

        protected void onIndexEntry​(IndexEntry entry)
        Called at the beginning of each entry (once all metadata about it is collected). The events for the metadata are buffered and only flushed after this method was called.
        Parameters:
        entry - the newly collected entry
      • push

        public void push​(IndexEntry entry)
        Pushes an IndexEntry onto the top of this stack.
        Parameters:
        entry - to put.
      • pop

        public void pop()
        Removes the IndexEntry at the top of this stack.
      • peek

        public IndexEntry peek()

        peek.

        Returns:
        Looks at the IndexEntry at the top of this stack.
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface org.apache.maven.doxia.sink.Sink
        Overrides:
        close in class SinkWrapper