The Java interface is centered around the class
which represents a connection (or session) to a Prolog
PrologSession contains static methods for looking up
PrologSession instances using JNDI (Java Naming and
Directory Interface) as well as methods for querying the Prolog server.
Other important classes are:
QueryAnswer, which contains the
answer for a query sent to the Prolog server;
represents a Prolog term; and
Bindings, which supports stuffing
of variable values used in queries.
General information about Java, Servlets and JNDI is available at the Java Technology site: http://java.sun.com/
A brief description of the provided Java classes are presented below. More information about the Java APIs is available in the JavaDoc files on the page http://sicstus.sics.se/documentation.html.
PrologSession object is the connection to the Prolog
server. The constructor
PrologSession with the default settings
host = localhost, port = 8066.
QueryAnswer contains the answer (new bindings) for a query
(or the error that occurred during the query process).
PBTerm object is for representing parsed Prolog terms.
Bindings is used for binding variables to values
in a query sent to the Prolog. The values will be automatically
stuffed before they are sent to the Prolog server.