Class MarkdownReader


  • public class MarkdownReader
    extends java.lang.Object
    The MarkdownReader implements a reader based on Markdown. The Reader starts from a file an includes referenced files to create a single huge Markdown file.
    • Constructor Summary

      Constructors 
      Constructor Description
      MarkdownReader​(java.io.File file, java.util.Properties properties)
      Constructs an instance of MarkdownReader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int getFootnote​(java.lang.String file, java.lang.String name)
      Get the footnote index.
      protected java.lang.String getFootnote​(java.lang.String file, java.lang.String name, java.lang.String text)
      Calculates the new footnote reference.
      protected java.lang.String getProperty​(java.lang.String name)
      Get an environment variable by name.
      protected void merge​(java.io.File file, java.lang.String header, java.io.PrintWriter writer)
      Merge the files to the markdown content.
      java.lang.String readAll()
      Reads all data.
      • Methods inherited from class java.lang.Object

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

      • MarkdownReader

        public MarkdownReader​(java.io.File file,
                              java.util.Properties properties)
        Constructs an instance of MarkdownReader.
        Parameters:
        file -
        properties -
    • Method Detail

      • getProperty

        protected final java.lang.String getProperty​(java.lang.String name)
        Get an environment variable by name.
        Parameters:
        name -
      • getFootnote

        protected final int getFootnote​(java.lang.String file,
                                        java.lang.String name)
        Get the footnote index.
        Parameters:
        file -
        name -
      • getFootnote

        protected final java.lang.String getFootnote​(java.lang.String file,
                                                     java.lang.String name,
                                                     java.lang.String text)
        Calculates the new footnote reference.
        Parameters:
        file -
        name -
        text -
      • merge

        protected final void merge​(java.io.File file,
                                   java.lang.String header,
                                   java.io.PrintWriter writer)
                            throws java.io.IOException
        Merge the files to the markdown content.
        Parameters:
        file -
        header -
        writer -
        Throws:
        java.io.IOException
      • readAll

        public java.lang.String readAll()
                                 throws java.io.IOException
        Reads all data.
        Throws:
        java.io.IOException