org.cruxframework.crux.core.declarativeui
Class ViewParser
java.lang.Object
org.cruxframework.crux.core.declarativeui.ViewParser
public class ViewParser
- extends Object
Parses Crux view pages to extract metadata and generate the equivalent html for host pages.
- Author:
- Thiago da Rosa de Bustamante
|
Constructor Summary |
ViewParser(String viewId,
boolean escapeXML,
boolean indentOutput,
boolean xhtmlInput)
Constructor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CRUX_VIEW_PREFIX
public static final String CRUX_VIEW_PREFIX
- See Also:
- Constant Field Values
ViewParser
public ViewParser(String viewId,
boolean escapeXML,
boolean indentOutput,
boolean xhtmlInput)
throws ViewParserException
- Constructor.
- Parameters:
escapeXML - If true will escape all inner text nodes to ensure that the generated outputs will be parsed correctly by a XML parser.indentOutput - True makes the generated outputs be indented.xhtmlInput - True if the given document represents a valid XHTML page. If false, parser will assume that the input is
composed by a root tag representing a the view.
- Throws:
ViewParserException
extractCruxMetaData
public String extractCruxMetaData(Document view)
throws ViewParserException
- Extract the view metadata form the current document
- Parameters:
element -
- Throws:
ViewParserException
generateHTMLHostPage
public void generateHTMLHostPage(Document cruxPageDocument,
Writer out)
throws ViewParserException
- Generates the HTML page from the given .crux.xml page.
- Parameters:
viewId - The id of the screen associated with the .crux.xml page.cruxPageDocument - a XML Document representing the .crux.xml page.out - Where the generated HTML will be written.
- Throws:
ViewParserException
Copyright © 2014. All rights reserved.