|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.kif.CycBulkAssertions | +--org.opencyc.kif.KifFileLoader
Provides the behavior and attributes of OpenCyc KifFileLoader.
Assertions are read from a file load(File file) or added in via addOrder() The assertions may then be added to a OpenCyc server in the given setdefaultMt Most of the routines are based on StreamTokenizer with settings: commentChar(';'); quoteChar('"'); eolIsSignificant(false); Unless the public boolean load(StreamTokenizer st) is dirrectly called
Field Summary | |
protected java.util.ArrayList |
cycAssertionsDefintional
|
protected CycAssertionsFactory |
CycAssertionsFactory
Cyc api support. |
protected java.util.ArrayList |
cycAssertionsOfRest
|
protected java.util.ArrayList |
cycAssertionsPredicateDefs
|
protected java.util.ArrayList |
cycAssertionsSecondaryConstantDefs
|
protected java.util.ArrayList |
cycAssertionsSpecialCollectionDefs
|
protected java.util.ArrayList |
cycKifFileLoaderDefs
|
protected java.util.ArrayList |
cycUnOrderedAssertions
|
protected boolean |
isAssertedDuringLoad
|
boolean |
isOrderedLoad
|
boolean |
isSuoKif
|
protected java.util.ArrayList |
kifToCycLMap
|
static int |
verbosity
Verbosity indicator 0 indicates quiet on a range of 0 ... |
Fields inherited from class org.opencyc.kif.CycBulkAssertions |
cycAccess, cycAssertionsForBaseKB, cycOrderedAssertions, defaultCyclist, defaultMt, defaultProject, isTestedClean |
Constructor Summary | |
KifFileLoader(CycAssertionsFactory ca)
Constructs a new KifFileLoader. |
Method Summary | |
void |
addCollection(CycConstant collection)
|
void |
addFile(java.io.Writer feedbackMl,
java.io.File file)
Adds the File to KB in defaultMt. |
void |
addFile(java.io.Writer feedbackMl,
java.io.File file,
CycFort mt)
Adds the File to KB into Mt. |
void |
addFile(java.io.Writer feedbackMl,
java.io.File file,
java.lang.String mt)
Adds the File to KB into Mt. |
void |
addFileEachLine(java.io.Writer feedbackMl,
java.io.File file,
java.lang.String mt)
Adds the File to KB into Mt. |
void |
addIsa(CycConstant term,
java.lang.String type)
|
void |
addKifCycLMap(java.lang.String kif,
java.lang.String cycl)
|
boolean |
addOrder(CycList sentence)
Adds the sentence (CycList) to this AssertionCollection. |
boolean |
addOrderComment(CycList sentence)
Adds the comment based sentence (CycList) to this AssertionCollection. |
boolean |
addOrderGenlMt(CycList sentence)
Adds the MetaRelation based sentence (CycList) to this AssertionCollection. |
boolean |
addOrderGenls(CycList sentence)
Adds the genls based sentence (CycList) to this AssertionCollection. |
boolean |
addOrderGround(CycList sentence)
Adds the gaf based sentence (CycList) to this AssertionCollection. |
boolean |
addOrderIsa(CycList sentence)
Adds the isa based sentence (CycList) to this AssertionCollection. |
boolean |
addOrderMetaRelation(java.lang.String cycPredicate,
CycList sentence)
Adds the MetaRelation based sentence (CycList) to this AssertionCollection. |
boolean |
addOrderNonFortPred(CycList sentence)
Adds the gaf based sentence (CycList) to this AssertionCollection. |
boolean |
addOrderNonGround(CycList sentence)
Adds the non gaf based sentence (CycList) to this AssertionCollection. |
void |
addPredicate(CycConstant predicate)
|
boolean |
addSentence(java.lang.String sentence)
Adds the sentence (String) to this AssertionCollection. |
void |
clearKifCycLMap()
|
static void |
concatArrayList(java.util.ArrayList holder,
java.util.ArrayList list)
|
void |
doLine(CycList sentence)
|
boolean |
getGlobalFlag(java.lang.String flag)
|
java.util.ArrayList |
getKifCycLMap()
|
void |
load(java.io.File file)
Adds the File to this AssertionCollection. |
void |
load(java.io.InputStream is)
Adds the contents of the InputStream to this AssertionCollection. |
void |
load(java.io.Reader r)
Adds the contents of the Reader to this AssertionCollection. |
void |
load(java.io.StreamTokenizer st)
Adds the contents of the StreamTokenizer to this AssertionCollection. |
void |
makeStdSUOKIFMap()
|
void |
orderAssertions()
Adds the AssertionCollection to Mt |
void |
setGlobalFlag(java.lang.String flag)
|
void |
setKifCycLMap(java.util.ArrayList kifmap)
|
void |
unsetGlobalFlag(java.lang.String flag)
|
Methods inherited from class org.opencyc.kif.CycBulkAssertions |
addSentence, commitAssertions, commitAssertions, cyclify, equals, getDefaultCyclist, getDefaultMt, getDefaultProject, resetAll, setDefaultCyclist, setDefaultCyclist, setDefaultMt, setDefaultMt, setDefaultProject, setDefaultProject, testAssertions, testAssertionsHtml, toString, writeAssertions, writeAssertions, writeAssertionsCycL, writeAssertionsCycL |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static int verbosity
protected CycAssertionsFactory CycAssertionsFactory
protected java.util.ArrayList cycAssertionsDefintional
protected java.util.ArrayList cycAssertionsPredicateDefs
protected java.util.ArrayList cycKifFileLoaderDefs
protected java.util.ArrayList cycAssertionsSpecialCollectionDefs
protected java.util.ArrayList cycAssertionsSecondaryConstantDefs
protected java.util.ArrayList cycAssertionsOfRest
protected java.util.ArrayList kifToCycLMap
protected java.util.ArrayList cycUnOrderedAssertions
public boolean isSuoKif
public boolean isOrderedLoad
protected boolean isAssertedDuringLoad
Constructor Detail |
public KifFileLoader(CycAssertionsFactory ca) throws java.lang.Exception
ca
- the CycAssertionsFactory for this KifFileLoaderMethod Detail |
public void addFile(java.io.Writer feedbackMl, java.io.File file) throws java.lang.Exception
file
- for sentences for this KifFileLoaderpublic void addFile(java.io.Writer feedbackMl, java.io.File file, java.lang.String mt) throws java.lang.Exception
file
- for sentencesmt
- for sentencespublic void addFile(java.io.Writer feedbackMl, java.io.File file, CycFort mt) throws java.lang.Exception
file
- for sentencesmt
- for sentencespublic void addFileEachLine(java.io.Writer feedbackMl, java.io.File file, java.lang.String mt) throws java.io.FileNotFoundException, java.io.IOException
file
- for sentencesmt
- for sentencespublic void doLine(CycList sentence) throws java.lang.Exception
public void setGlobalFlag(java.lang.String flag)
public void unsetGlobalFlag(java.lang.String flag)
public boolean getGlobalFlag(java.lang.String flag)
public void load(java.io.File file) throws java.lang.Exception
file
- to load sentences for this KifFileLoaderpublic void load(java.io.InputStream is) throws java.lang.Exception
is
- for InputStream of sentences for this KifFileLoaderpublic void load(java.io.Reader r) throws java.lang.Exception
r
- for Reader of sentences for this KifFileLoaderpublic void load(java.io.StreamTokenizer st) throws java.lang.Exception
st
- for sentences for this KifFileLoaderpublic java.util.ArrayList getKifCycLMap()
public void setKifCycLMap(java.util.ArrayList kifmap)
public void clearKifCycLMap()
public void addKifCycLMap(java.lang.String kif, java.lang.String cycl)
public void makeStdSUOKIFMap()
public boolean addSentence(java.lang.String sentence) throws java.lang.Exception
String
- of the sentence for this KifFileLoaderpublic void orderAssertions()
mt
- for sentences for this KifFileLoader
[08:09] public boolean addOrder(CycList sentence) throws java.lang.Exception
(CycList)
- of the sentence for this KifFileLoaderpublic boolean addOrderGenlMt(CycList sentence)
sentence
- (CycList) to be added to this KifFileLoaderpublic boolean addOrderMetaRelation(java.lang.String cycPredicate, CycList sentence) throws java.lang.Exception
sentence
- (CycList) to be added to this KifFileLoaderpublic boolean addOrderNonFortPred(CycList sentence)
sentence
- (CycList) to be added to this KifFileLoaderpublic boolean addOrderGround(CycList sentence) throws java.lang.Exception
sentence
- (CycList) to be added to this KifFileLoaderpublic boolean addOrderNonGround(CycList sentence) throws java.lang.Exception
sentence
- (CycList) to be added to this KifFileLoaderpublic boolean addOrderComment(CycList sentence) throws java.lang.Exception
sentence
- (CycList) to be added to this KifFileLoaderpublic boolean addOrderGenls(CycList sentence) throws java.lang.Exception
sentence
- (CycList) to be added to this KifFileLoaderpublic void addCollection(CycConstant collection) throws java.lang.Exception
public void addPredicate(CycConstant predicate) throws java.lang.Exception
public void addIsa(CycConstant term, java.lang.String type) throws java.lang.Exception
public boolean addOrderIsa(CycList sentence) throws java.lang.Exception
(CycList)
- of the sentence for this KifFileLoaderpublic static void concatArrayList(java.util.ArrayList holder, java.util.ArrayList list)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |