All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ShoeKb.OKBCInterface

java.lang.Object
   |
   +----ShoeKb.KBInterface
           |
           +----ShoeKb.OKBCInterface

public class OKBCInterface
extends KBInterface
An interface that specifies methods necessary for communicating with a knowledge base that stores SHOE data.


Constructor Index

 o OKBCInterface()
Construct a new OKBC Interface.

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 getOrCreateClassFrame(String)
Given a class name, returns the matching frame, if any, otherwise, it creates the frame.
 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[])
Issues a query to the KB where the given arguments are applied to the given predicate.
 o storeClaim(String, String, String[])
Stores a claim consisting of the predicate and array of arguments and attributes it to the given source.

Constructors

 o OKBCInterface
 public OKBCInterface()
Construct a new OKBC Interface.

Methods

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

Overrides:
establishConnection in class KBInterface
 o createKB
 public void createKB(String kbName) throws KBException
Creates a new KB with the name supplied by the user.

Overrides:
createKB in class KBInterface
 o openKB
 public 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.

Overrides:
openKB in class KBInterface
 o openKB
 public void openKB(String kbName) throws KBException
Opens an existing knowledge base using the default location.

Overrides:
openKB in class KBInterface
 o closeKB
 public void closeKB()
Closes the current knowledge base.

Overrides:
closeKB in class KBInterface
 o closeConnection
 public void closeConnection()
Closes the current connection. Any open KBs will be closed as well.

Overrides:
closeConnection in class KBInterface
 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.

Overrides:
queryKB in class KBInterface
 o queryKB
 public 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.

Overrides:
queryKB in class KBInterface
 o storeClaim
 public 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.

Overrides:
storeClaim in class KBInterface
 o deleteClaims
 public void deleteClaims(String source)
Deletes all claims made by the source.

Overrides:
deleteClaims in class KBInterface
 o createClass
 public void createClass(String className)
Creates a new class with the specified name.

Overrides:
createClass in class KBInterface
 o createPredicate
 public void createPredicate(String predicate,
                             int arity)
Creates a new predicate with given name and arity.

Overrides:
createPredicate in class KBInterface
 o createPredicate
 public void createPredicate(String predicate,
                             String argTypes[])
Creates a new predicate with given name and types for arguments.

Overrides:
createPredicate in class KBInterface
 o getOrCreateClassFrame
 public Node getOrCreateClassFrame(String className)
Given a class name, returns the matching frame, if any, otherwise, it creates the frame.


All Packages  Class Hierarchy  This Package  Previous  Next  Index