Package org.nineml.coffeefilter
Class InvisibleXmlFailureDocument
java.lang.Object
org.nineml.coffeefilter.InvisibleXmlDocument
org.nineml.coffeefilter.InvisibleXmlFailureDocument
A failure document represents the results of a failed parse.
This is a subclass of the
InvisibleXmlDocument that generates the
result document for a failed parse.-
Method Summary
Modifier and TypeMethodDescriptionlongReturn the number of available parses of this document.getTree()Return an XML representation of the current parse.voidgetTree(PrintStream output) Write an XML representation of the current parse to the stream.voidgetTree(org.nineml.coffeegrinder.trees.TreeBuilder builder) Process the result with your ownTreeBuilder.voidgetTree(ContentHandler handler) Write an XML representation of the current parse to a SAX ContentHandler.voidgetTree(ContentHandler handler, ParserOptions options) Write an XML representation of the current parse to a SAX ContentHandler using a different set of options.booleanDid the parse succeed?Methods inherited from class org.nineml.coffeefilter.InvisibleXmlDocument
getAdapter, getColumnNumber, getLineNumber, getOffset, getOptions, getParserType, getParserVersion, getResult, isAmbiguous, isInfinitelyAmbiguous, parseTime
-
Method Details
-
succeeded
public boolean succeeded()Description copied from class:InvisibleXmlDocumentDid the parse succeed?- Overrides:
succeededin classInvisibleXmlDocument- Returns:
- true if the parse was successful
-
getNumberOfParses
public long getNumberOfParses()Description copied from class:InvisibleXmlDocumentReturn the number of available parses of this document.Will return 0 if there are no successful parses.
- Overrides:
getNumberOfParsesin classInvisibleXmlDocument- Returns:
- The number of parses.
-
getTree
Description copied from class:InvisibleXmlDocumentReturn an XML representation of the current parse.- Overrides:
getTreein classInvisibleXmlDocument- Returns:
- the XML.
-
getTree
Description copied from class:InvisibleXmlDocumentWrite an XML representation of the current parse to the stream.- Overrides:
getTreein classInvisibleXmlDocument- Parameters:
output- the output stream.
-
getTree
Description copied from class:InvisibleXmlDocumentWrite an XML representation of the current parse to a SAX ContentHandler.- Overrides:
getTreein classInvisibleXmlDocument- Parameters:
handler- the content handler.
-
getTree
Description copied from class:InvisibleXmlDocumentWrite an XML representation of the current parse to a SAX ContentHandler using a different set of options.- Overrides:
getTreein classInvisibleXmlDocument- Parameters:
handler- the content handler.options- the options.
-
getTree
public void getTree(org.nineml.coffeegrinder.trees.TreeBuilder builder) Description copied from class:InvisibleXmlDocumentProcess the result with your ownTreeBuilder.This API needs work.
- Overrides:
getTreein classInvisibleXmlDocument- Parameters:
builder- the tree builder.
-