Package it.smartio.docs.markdown
Class MarkdownReader
- java.lang.Object
-
- it.smartio.docs.markdown.MarkdownReader
-
public class MarkdownReader extends java.lang.ObjectTheMarkdownReaderimplements 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 ofMarkdownReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intgetFootnote(java.lang.String file, java.lang.String name)Get the footnote index.protected java.lang.StringgetFootnote(java.lang.String file, java.lang.String name, java.lang.String text)Calculates the new footnote reference.protected java.lang.StringgetProperty(java.lang.String name)Get an environment variable by name.protected voidmerge(java.io.File file, java.lang.String header, java.io.PrintWriter writer)Merge the files to the markdown content.java.lang.StringreadAll()Reads all data.
-
-
-
Constructor Detail
-
MarkdownReader
public MarkdownReader(java.io.File file, java.util.Properties properties)Constructs an instance ofMarkdownReader.- 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.IOExceptionMerge the files to the markdown content.- Parameters:
file-header-writer-- Throws:
java.io.IOException
-
readAll
public java.lang.String readAll() throws java.io.IOExceptionReads all data.- Throws:
java.io.IOException
-
-