|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectai.krr.fol.KifKnowledgeBaseAdaptor
public class KifKnowledgeBaseAdaptor
| Field Summary | |
|---|---|
protected java.util.Properties |
props
the properties used for reading and writing |
protected inf.compilers.LexicalAnalyzer |
scanner
the lexical analyzer used for tokenizing the input |
| Constructor Summary | |
|---|---|
KifKnowledgeBaseAdaptor()
This constructor creates a SyntaxAdaptor that can be used to read statements in a (propositional) KIF syntax and create a propositional Sentence for it, or it can be used to write out a propositional Sentence in KIF syntax. |
|
| Method Summary | |
|---|---|
protected KifKnowledgeBaseAdaptor |
clone()
|
java.lang.Class<KnowledgeBase> |
getInternalClass()
|
java.lang.String |
getProperty(java.lang.String key)
This function gets the property that is associated with the given key. |
java.lang.String |
getSyntaxName()
|
static KnowledgeBase |
parseKnowledgeBase(inf.compilers.LexicalAnalyzer scanner,
java.util.Properties props)
|
void |
prettyPrint(int indent,
KnowledgeBase kb,
java.io.Writer w)
|
static void |
prettyPrintKnowledgeBase(int indent,
KnowledgeBase kb,
java.io.Writer w,
java.util.Properties props)
|
KnowledgeBase |
read(java.io.Reader r)
|
void |
setProperty(java.lang.String key,
java.lang.String value)
This function sets the property associated with the given key to the given value. |
void |
write(KnowledgeBase kb,
java.io.Writer w)
|
static void |
writeKnowledgeBase(KnowledgeBase kb,
java.io.Writer w,
java.util.Properties props)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected inf.compilers.LexicalAnalyzer scanner
protected java.util.Properties props
| Constructor Detail |
|---|
public KifKnowledgeBaseAdaptor()
This constructor creates a SyntaxAdaptor that can be used to read statements in a (propositional) KIF syntax and create a propositional Sentence for it, or it can be used to write out a propositional Sentence in KIF syntax.
| Method Detail |
|---|
protected KifKnowledgeBaseAdaptor clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic java.lang.Class<KnowledgeBase> getInternalClass()
getInternalClass in interface inf.compilers.SyntaxAdaptor<KnowledgeBase>public java.lang.String getSyntaxName()
getSyntaxName in interface inf.compilers.SyntaxAdaptor<KnowledgeBase>
public void write(KnowledgeBase kb,
java.io.Writer w)
throws inf.compilers.ExpressivenessException,
java.io.IOException
write in interface inf.compilers.SyntaxAdaptor<KnowledgeBase>inf.compilers.ExpressivenessException
java.io.IOException
public void prettyPrint(int indent,
KnowledgeBase kb,
java.io.Writer w)
throws inf.compilers.ExpressivenessException,
java.io.IOException
prettyPrint in interface inf.compilers.SyntaxAdaptor<KnowledgeBase>inf.compilers.ExpressivenessException
java.io.IOException
public KnowledgeBase read(java.io.Reader r)
throws inf.compilers.ExpressivenessException,
java.text.ParseException,
java.io.IOException
read in interface inf.compilers.SyntaxAdaptor<KnowledgeBase>inf.compilers.ExpressivenessException
java.text.ParseException
java.io.IOExceptionpublic java.lang.String getProperty(java.lang.String key)
This function gets the property that is associated with the given key. Not e that the key should not be null.
getProperty in interface inf.compilers.SyntaxAdaptor<KnowledgeBase>
public void setProperty(java.lang.String key,
java.lang.String value)
This function sets the property associated with the given key to the given value. The given key must not be null, but the value may be.
setProperty in interface inf.compilers.SyntaxAdaptor<KnowledgeBase>key - the key with which the value is associatedvalue - the associated value
public static void writeKnowledgeBase(KnowledgeBase kb,
java.io.Writer w,
java.util.Properties props)
throws inf.compilers.ExpressivenessException,
java.io.IOException
stmt - a Sentence in the internal representationw - the Writer to which the syntactical translation is written
inf.compilers.ExpressivenessException - if the syntactical language cannot
represent the given statement
java.io.IOException - if writing to the given Writer fails
public static void prettyPrintKnowledgeBase(int indent,
KnowledgeBase kb,
java.io.Writer w,
java.util.Properties props)
throws inf.compilers.ExpressivenessException,
java.io.IOException
stmt - a Sentence in the internal representationw - the Writer to which the syntactical translation is written
inf.compilers.ExpressivenessException - if the syntactical language cannot
represent the given statement
java.io.IOException - if writing to the given Writer fails
public static KnowledgeBase parseKnowledgeBase(inf.compilers.LexicalAnalyzer scanner,
java.util.Properties props)
throws inf.compilers.ExpressivenessException,
java.text.ParseException,
java.io.IOException
inf.compilers.ExpressivenessException
java.text.ParseException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||