|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface performs parsing of first-order logical text. The content can be either specified by a URL where it is located, or a Reader from which it can be extracted. The result of the parsing is a ClauseIterator.
Method Summary | |
String |
getLanguage()
returns the name of the language of this parser. |
boolean |
getPolarity()
A logical text is parsed in different ways depending on whether it is interpreted as an assertion or a query. |
ClauseIterator |
parse(Reader rdr)
parses the contents extracted from the given Reader |
ClauseIterator |
parse(Reader rdr,
URL url)
parses the contents extracted from the given Reader . |
ClauseIterator |
parse(URL url)
parses the contents retrieved from the given URL |
ClauseIterator |
parse(URL url,
URL publicLocation)
parses the contents retrieved from the given URL |
void |
setPolarity(boolean polarity)
tells the parser whether to interpret the text as an assertion or a query. |
Method Detail |
public ClauseIterator parse(Reader rdr) throws ParsingException
Reader
rdr
- the reader to read the content stream from.
ParsingException
public ClauseIterator parse(Reader rdr, URL url) throws ParsingException
Reader
. The public location of the document is set to
the URL
provided.
rdr
- the reader to read the content stream from.url
- the public location for the document, i.e. where this document is officially supposed to be coming from.
ParsingException
public ClauseIterator parse(URL url) throws ParsingException
URL
url
- the location of content
ParsingException
public ClauseIterator parse(URL url, URL publicLocation) throws ParsingException
URL
url
- the actual location of contentpublicLocation
- the public location for the document, i.e. where this document is officially supposed to be coming
from.
ParsingException
public boolean getPolarity()
public void setPolarity(boolean polarity)
polarity
- true if input is to be interpreted as an assertion.public String getLanguage()
|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |