|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jtp.fol.kif.KIF2CNF
KIF2CNF.java Created: Mon Jun 26 05:49:35 2000
Constructor Summary | |
KIF2CNF()
|
Method Summary | |
void |
addNamespaceMapping(String from,
String to)
creates mapping between two namespaces, Whenever the parser encounters in the input a symbol in the "from" namespace, it will replace it with the corresponding symbol in the "to" namespace. |
static FirstOrderLogicTranslator |
createTranslator()
|
boolean |
getDefaultUpperCase()
|
String |
getLanguage()
returns the name of the language of this parser. |
Map |
getNamespaceMap()
returns an unmodifyable namespace replacement map. |
boolean |
getPolarity()
A logical text is parsed in different ways depending on whether it is interpreted as an assertion or a query. |
boolean |
isCaseSensitiveSymbols()
|
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 actualLocation,
URL publicLocation)
parses the contents retrieved from the given URL |
void |
removeNamespaceMapping(String namespace)
removes mapping for a namespace. |
void |
setCaseSensitiveSymbols(boolean newCaseSensitiveSymbols)
|
void |
setDefaultUpperCase(boolean v)
KIF symbols are normally case-insensitive. |
void |
setPolarity(boolean polarity)
tells the parser whether to interpret the text as an assertion or a query. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KIF2CNF()
Method Detail |
public void addNamespaceMapping(String from, String to)
from
- the namespace to look forto
- its replacementpublic void removeNamespaceMapping(String namespace)
namespace
- a namespace that used to be replaced with another.addNamespaceMapping(java.lang.String, java.lang.String)
public Map getNamespaceMap()
addNamespaceMapping(java.lang.String, java.lang.String)
public ClauseIterator parse(URL url) throws ParsingException
FirstOrderLogicParser
URL
parse
in interface FirstOrderLogicParser
url
- the location of content
ParsingException
public ClauseIterator parse(Reader rdr)
FirstOrderLogicParser
Reader
parse
in interface FirstOrderLogicParser
rdr
- the reader to read the content stream from.
public ClauseIterator parse(Reader rdr, URL url)
FirstOrderLogicParser
Reader
. The public location of the document is set to
the URL
provided.
parse
in interface FirstOrderLogicParser
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.
public ClauseIterator parse(URL actualLocation, URL publicLocation) throws ParsingException
FirstOrderLogicParser
URL
parse
in interface FirstOrderLogicParser
actualLocation
- 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()
FirstOrderLogicParser
getPolarity
in interface FirstOrderLogicParser
public void setPolarity(boolean polarity)
FirstOrderLogicParser
setPolarity
in interface FirstOrderLogicParser
polarity
- true if input is to be interpreted as an assertion.public String getLanguage()
FirstOrderLogicParser
getLanguage
in interface FirstOrderLogicParser
public boolean getDefaultUpperCase()
setDefaultUpperCase(boolean)
public void setDefaultUpperCase(boolean v)
v
- true if by default, case-insensitive symbols are cast to upper case; false if
to lowercase.public boolean isCaseSensitiveSymbols()
public void setCaseSensitiveSymbols(boolean newCaseSensitiveSymbols)
public static FirstOrderLogicTranslator createTranslator()
|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |