return this;
}
public String execute() {
HtmlDocumentBuilder documentBuilder = new HtmlDocumentBuilder(new HtmlElementWriter("html"));
/** <head>...</head> */
documentBuilder.startElement(new HtmlElementWriter("head"))
.startElement(new HtmlElementWriter("title").textContent(reportName))
.endElement()
.startElement(new HtmlElementWriter("link")
.attribute("rel", "stylesheet")
.attribute("href", "http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"))
.endElement()
.startElement(new HtmlElementWriter("link")
.attribute("rel", "stylesheet")
.attribute("href", "http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css"))
.endElement()
.endElement();
/** <body> */
HtmlDocumentBuilder bodyBuilder = documentBuilder.startElement(new HtmlElementWriter("body"))
.startElement(new HtmlElementWriter("div").attribute("class", "container"));
/** build Headline row */
bodyBuilder
.startElement(new HtmlElementWriter("div").attribute("class", "row"))
.startElement(new HtmlElementWriter("div").attribute("class", "coll-md-12"))
.startElement(new HtmlElementWriter("h1").textContent(reportName))
.endElement()
.endElement()
.endElement();
if(jsonSourceFileName != null || csvSourceFileName != null) {
HtmlDocumentBuilder sourceRow = bodyBuilder
.startElement(new HtmlElementWriter("div").attribute("class", "row"))
.startElement(new HtmlElementWriter("div").attribute("class", "coll-md-12"))
.startElement(new HtmlElementWriter("p"));
if(jsonSourceFileName != null) {
sourceRow.startElement(new HtmlElementWriter("a")
.attribute("href", jsonSourceFileName)
.textContent("This Report as JSON"))
.endElement();
}
if(jsonSourceFileName != null && jsonSourceFileName != null) {
sourceRow.startElement(new HtmlElementWriter("span").textContent(" | ")).endElement();
}
if(jsonSourceFileName != null) {
sourceRow.startElement(new HtmlElementWriter("a")
.attribute("href", csvSourceFileName)
.textContent("This Report as CSV"))
.endElement();
}
sourceRow
.endElement()
.endElement()
.endElement();
}