All Packages Class Hierarchy This Package Previous Next Index
Class ShoeKb.KBInterface
java.lang.Object
|
+----ShoeKb.KBInterface
- public abstract class KBInterface
- extends Object
An abstract class that specifies methods necessary for communicating
with a knowledge base that stores SHOE data.
-
P_EVERY_INSTANCE
- A binary predicate that states the second argument is a member of
the category in the first argument either explictly or by the
transitivity of category membership.
-
P_INSTANCE
- A binary predicate that states the second argument is explicitly
a member of the category in the first argument.
-
P_ISA
- A binary predicate that states the first argument is a subcategory of
the second argument.
-
P_STRING_MATCH
- A binary predicate that is true if the the first argument matches
the second argument when percent signs ('%') in the second argument
are interpreted as wildcard characters.
-
KBInterface()
-
-
closeConnection()
- Closes the current connection.
-
closeKB()
- Closes the current knowledge base.
-
createClass(String)
- Creates a new class with the specified name.
-
createKB(String)
- Creates a new KB with the name supplied by the user.
-
createPredicate(String, int)
- Creates a new predicate with given name and arity.
-
createPredicate(String, String[])
- Creates a new predicate with given name and types for
arguments.
-
deleteClaims(String)
- Deletes all claims made by the source.
-
establishConnection(String, int)
- Establish a connection to the given host and port number.
-
openKB(String)
- Opens an existing knowledge base using the default location.
-
openKB(String, String, int)
- Opens an existing knowledge base that is avaiable through the
given host and port number.
-
queryKB(Query)
- Issues an arbitrary query to the KB.
-
queryKB(String, String, String)
- Issues a query to the KB where the two given arguments are applied
to the given predicate.
-
queryKB(String, String[])
- Issues a query to the KB where the given arguments are applied
to the given predicate.
-
storeAxiom(Axiom)
- Asserts a new axiom to the KB.
-
storeClaim(String, String, String, String)
- Stores a claims for a binary predicate and attributes it to the
given source.
-
storeClaim(String, String, String[])
- Stores a claim consisting of the predicate and array of arguments
and attributes it to the given source.
P_ISA
public static final String P_ISA
- A binary predicate that states the first argument is a subcategory of
the second argument.
P_INSTANCE
public static final String P_INSTANCE
- A binary predicate that states the second argument is explicitly
a member of the category in the first argument.
P_EVERY_INSTANCE
public static final String P_EVERY_INSTANCE
- A binary predicate that states the second argument is a member of
the category in the first argument either explictly or by the
transitivity of category membership. This predicate should only
be used in queries.
P_STRING_MATCH
public static final String P_STRING_MATCH
- A binary predicate that is true if the the first argument matches
the second argument when percent signs ('%') in the second argument
are interpreted as wildcard characters.
KBInterface
public KBInterface()
establishConnection
public abstract void establishConnection(String host,
int port) throws KBException
- Establish a connection to the given host and port number.
createKB
public abstract void createKB(String kbName) throws KBException
- Creates a new KB with the name supplied by the user.
openKB
public abstract void openKB(String kbName,
String host,
int port) throws KBException
- Opens an existing knowledge base that is avaiable through the
given host and port number.
openKB
public abstract void openKB(String kbName) throws KBException
- Opens an existing knowledge base using the default location.
closeKB
public abstract void closeKB()
- Closes the current knowledge base.
closeConnection
public abstract void closeConnection()
- Closes the current connection. Any open KBs will be closed as well.
queryKB
public abstract ResultSet queryKB(Query query)
- Issues an arbitrary query to the KB. Variable arguments are
preceded by question marks. The answers are returned in a matrix.
storeClaim
public abstract void storeClaim(String source,
String predicate,
String args[])
- Stores a claim consisting of the predicate and array of arguments
and attributes it to the given source.
deleteClaims
public abstract void deleteClaims(String source)
- Deletes all claims made by the source.
createClass
public abstract void createClass(String className)
- Creates a new class with the specified name.
createPredicate
public abstract void createPredicate(String predicate,
int arity)
- Creates a new predicate with given name and arity.
createPredicate
public abstract void createPredicate(String predicate,
String argTypes[])
- Creates a new predicate with given name and types for
arguments.
storeAxiom
public abstract void storeAxiom(Axiom anAxiom)
- Asserts a new axiom to the KB.
queryKB
public ResultSet queryKB(String predicate,
String args[])
- Issues a query to the KB where the given arguments are applied
to the given predicate. A variable argument must be preceded by a
question mark.
queryKB
public ResultSet queryKB(String predicate,
String arg1,
String arg2)
- Issues a query to the KB where the two given arguments are applied
to the given predicate. A variable argument must be preceded by a
question mark.
storeClaim
public void storeClaim(String source,
String predicate,
String arg1,
String arg2)
- Stores a claims for a binary predicate and attributes it to the
given source.
All Packages Class Hierarchy This Package Previous Next Index