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.


Variable Index

 o 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.
 o P_INSTANCE
A binary predicate that states the second argument is explicitly a member of the category in the first argument.
 o P_ISA
A binary predicate that states the first argument is a subcategory of the second argument.
 o 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.

Constructor Index

 o KBInterface()

Method Index

 o closeConnection()
Closes the current connection.
 o closeKB()
Closes the current knowledge base.
 o createClass(String)
Creates a new class with the specified name.
 o createKB(String)
Creates a new KB with the name supplied by the user.
 o createPredicate(String, int)
Creates a new predicate with given name and arity.
 o createPredicate(String, String[])
Creates a new predicate with given name and types for arguments.
 o deleteClaims(String)
Deletes all claims made by the source.
 o establishConnection(String, int)
Establish a connection to the given host and port number.
 o openKB(String)
Opens an existing knowledge base using the default location.
 o openKB(String, String, int)
Opens an existing knowledge base that is avaiable through the given host and port number.
 o queryKB(Query)
Issues an arbitrary query to the KB.
 o queryKB(String, String, String)
Issues a query to the KB where the two given arguments are applied to the given predicate.
 o queryKB(String, String[])
Issues a query to the KB where the given arguments are applied to the given predicate.
 o storeAxiom(Axiom)
Asserts a new axiom to the KB.
 o storeClaim(String, String, String, String)
Stores a claims for a binary predicate and attributes it to the given source.
 o storeClaim(String, String, String[])
Stores a claim consisting of the predicate and array of arguments and attributes it to the given source.

Variables

 o P_ISA
 public static final String P_ISA
A binary predicate that states the first argument is a subcategory of the second argument.

 o 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.

 o 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.

 o 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.

Constructors

 o KBInterface
 public KBInterface()

Methods

 o establishConnection
 public abstract void establishConnection(String host,
                                          int port) throws KBException
Establish a connection to the given host and port number.

 o createKB
 public abstract void createKB(String kbName) throws KBException
Creates a new KB with the name supplied by the user.

 o 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.

 o openKB
 public abstract void openKB(String kbName) throws KBException
Opens an existing knowledge base using the default location.

 o closeKB
 public abstract void closeKB()
Closes the current knowledge base.

 o closeConnection
 public abstract void closeConnection()
Closes the current connection. Any open KBs will be closed as well.

 o 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.

 o 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.

 o deleteClaims
 public abstract void deleteClaims(String source)
Deletes all claims made by the source.

 o createClass
 public abstract void createClass(String className)
Creates a new class with the specified name.

 o createPredicate
 public abstract void createPredicate(String predicate,
                                      int arity)
Creates a new predicate with given name and arity.

 o createPredicate
 public abstract void createPredicate(String predicate,
                                      String argTypes[])
Creates a new predicate with given name and types for arguments.

 o storeAxiom
 public abstract void storeAxiom(Axiom anAxiom)
Asserts a new axiom to the KB.

 o 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.

 o 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.

 o 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