|
Algernon Software | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
org.algernon.kb.AlgernonKBSet
AlgernonKBSet is a class that contains a list of KBs and implements methods to be performed on them.
Nested Class Summary |
Nested classes inherited from class java.util.AbstractList |
|
Field Summary | |
static String |
DEFAULT_IMPORTANT_SUPERSET_SLOTNAME
|
protected Algernon |
m_algernon
|
protected String |
m_name
|
static String |
UNNAMED
|
Fields inherited from class java.util.ArrayList |
|
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
AlgernonKBSet(AlgernonKB kb,
Algernon algernon)
|
|
AlgernonKBSet(String name,
Algernon algernon)
|
Method Summary | |
void |
addKB(AlgernonKB kb)
Adds a KB to this KBSet. |
boolean |
containsClause(Clause queryClause)
Returns true if the KBSet contains the given clause. |
boolean |
containsClause(Clause queryClause,
int state)
Returns true if the KBSet contains the given clause. |
AlgernonClass |
createClass(AlgernonKB kb,
LispValue name,
AlgernonClass superclass)
Creates a new class in the given KB. |
AlgernonClass |
createClass(LispValue name,
AlgernonClass superclass)
Creates a new class in the given KB. |
boolean |
generalIsa(String child,
String parent)
Returns true if the first argument is an instance or subclass of the second argument. |
boolean |
generalNotIsa(String child,
String parent)
Returns true if the first argument is not an instance or subclass of the second argument. |
String |
getImportantSupersetSlotName()
Returns the name of the slot that represents the relation between a class and a superclass for inheritance purposes. |
AlgernonKB |
getKB()
Returns the first KB in the list. |
AlgernonKB |
getKB(String name)
returns a KB by its name. |
String |
getName()
|
boolean |
isClassToInstanceRelation(String relationName)
Returns true if the given string is the name of the relation/slot linking a class to its instance in any KB of this AlgernonKBSet. |
boolean |
isDisjointRelation(String relationName)
Returns true if the given string is the name of a relation specifying that two classes are disjoint |
boolean |
isFrame(String frameName)
Returns true if the given string is the name of a frame in any KB of this AlgernonKBSet. |
boolean |
isInstanceToClassRelation(String relationName)
Returns true if the given string is the name of the relation/slot linking an instance to its class in any KB of this AlgernonKBSet. |
boolean |
isNameRelation(String relationName)
Returns true if the given string is the name of the name relation (or attribute) in any KB of this AlgernonKBSet. |
boolean |
isRelation(String relationName)
Returns true if the given string is the name of a relation in any KB in the given AlgernonKBSet. |
boolean |
isSubclassToSuperclassRelation(String relationName)
Returns true if the given string is the name of the relation/slot linking a frame to its name in any KB in the given AlgernonKBSet. |
boolean |
isSuperclassToSubclassRelation(String relationName)
Returns true if the given string is the name of the relation/slot linking a frame to its name in any KB in the given AlgernonKBSet. |
AlgernonClass |
lookupClass(String name)
Returns a class with the given name if it can find one in any of the KBs in this KBSet. |
AlgernonFacet |
lookupFacet(String name)
Returns a facet with the given name if it can find one in any of the KBs in this KBSet. |
AlgernonFrame |
lookupFrame(String name)
Returns a frame with the given name if it can find one in any of the KBs in this KBSet. |
AlgernonInstance |
lookupInstance(String name)
|
AlgernonRelation |
lookupRelation(String name)
Returns a relation with the given name if it can find one in the given KB. |
AlgernonRelation |
lookupRelation(String name,
Set classes)
Returns a relation with the given name if it can find one in the given KB. |
void |
printProfileStatistics()
|
LispValue |
query(Clause clause)
Queries KBs until one of the queries is successful. |
void |
resetProfiler()
|
void |
setName(String newName)
|
void |
setProfilerEnabled(boolean state)
|
LispValue |
store(Clause clause)
Stores the clause in the first KB that accepts it. |
boolean |
supportsNegatedClauses()
Returns true if any of the KBs in the set support negated clauses. |
LispValue |
verify(Clause clause)
Verifies against all of the KBs in the KBSet. |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
Field Detail |
public static final String UNNAMED
protected String m_name
public static String DEFAULT_IMPORTANT_SUPERSET_SLOTNAME
protected Algernon m_algernon
Constructor Detail |
public AlgernonKBSet(String name, Algernon algernon)
public AlgernonKBSet(AlgernonKB kb, Algernon algernon)
Method Detail |
public LispValue query(Clause clause) throws AlgernonException
AlgernonException
public LispValue verify(Clause clause) throws AlgernonStorageException, AlgernonDataException
AlgernonStorageException
AlgernonDataException
public LispValue store(Clause clause) throws AlgernonStorageException, AlgernonDataException
AlgernonStorageException
AlgernonDataException
public String getImportantSupersetSlotName()
public AlgernonKB getKB(String name)
public AlgernonKB getKB()
public void resetProfiler()
public void setProfilerEnabled(boolean state)
public void printProfileStatistics()
public String getName()
public void setName(String newName)
public boolean isFrame(String frameName) throws AlgernonDataException
AlgernonDataException
public boolean isRelation(String relationName) throws AlgernonDataException
AlgernonDataException
public boolean isDisjointRelation(String relationName)
public boolean isNameRelation(String relationName) throws AlgernonDataException
AlgernonDataException
public boolean isInstanceToClassRelation(String relationName)
public boolean isClassToInstanceRelation(String relationName)
public boolean isSubclassToSuperclassRelation(String relationName)
public boolean isSuperclassToSubclassRelation(String relationName)
public boolean generalIsa(String child, String parent) throws AlgernonDataException
AlgernonDataException
public boolean generalNotIsa(String child, String parent) throws AlgernonDataException
AlgernonDataException
public void addKB(AlgernonKB kb)
public AlgernonClass createClass(LispValue name, AlgernonClass superclass) throws AlgernonRuntimeException
AlgernonRuntimeException
public AlgernonClass createClass(AlgernonKB kb, LispValue name, AlgernonClass superclass) throws AlgernonRuntimeException
AlgernonRuntimeException
public AlgernonClass lookupClass(String name) throws AlgernonDataException
AlgernonDataException
public AlgernonFrame lookupFrame(String name) throws AlgernonDataException
AlgernonDataException
public AlgernonFacet lookupFacet(String name) throws AlgernonDataException
AlgernonDataException
public AlgernonRelation lookupRelation(String name) throws AlgernonDataException
AlgernonDataException
public AlgernonRelation lookupRelation(String name, Set classes) throws AlgernonDataException
name
- The name of the relation.classes
- A list of classes where the program will look for a relation,
before just finding the relation as defined for the whole KB.
AlgernonDataException
public AlgernonInstance lookupInstance(String name) throws AlgernonDataException
AlgernonDataException
public boolean containsClause(Clause queryClause) throws AlgernonDataException
queryClause
-
AlgernonDataException
public boolean containsClause(Clause queryClause, int state) throws AlgernonDataException
queryClause
-
AlgernonDataException
public boolean supportsNegatedClauses()
|
Algernon Software | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |