Package io.john.amiscaray.stir.util
Class FormatProcessor
java.lang.Object
io.john.amiscaray.stir.util.FormatProcessor
public class FormatProcessor extends Object
Processes HTMLDocument formats, converting them to the corresponding markup
-
Field Summary
Fields Modifier and Type Field Description private static FormatProcessor
instance
private ElementProcessor
processor
-
Constructor Summary
Constructors Modifier Constructor Description private
FormatProcessor()
-
Method Summary
Modifier and Type Method Description static FormatProcessor
getInstance()
String
processDocument(HTMLDocument document)
Processes a document's elements and template to produce its HTML markup output.private String
processInnerTemplateBlock(String expression, HTMLDocument doc, Integer indentationSize)
Parses the inner content of a template block, converting it to the appropriate HTML content
-
Field Details
-
instance
-
processor
-
-
Constructor Details
-
FormatProcessor
private FormatProcessor()
-
-
Method Details
-
getInstance
-
processDocument
Processes a document's elements and template to produce its HTML markup output. See the README for more info- Parameters:
document
- The document to process- Returns:
- The document converted to HTML markup
-
processInnerTemplateBlock
private String processInnerTemplateBlock(String expression, HTMLDocument doc, Integer indentationSize)Parses the inner content of a template block, converting it to the appropriate HTML content- Parameters:
expression
- The expression to parsedoc
- The HTML document being formattedindentationSize
- The indentation size for the content- Returns:
- The resulting content
-