Package org.projog.api
package org.projog.api
Provides a programming interface for Java applications to interact with Projog.
As well as interacting with Projog using the console application it is also possible to embed Projog in your Java applications. The steps required for applications to interact with Projog are as follows:
- Create a new
Projoginstance. - Load in clauses and facts using
Projog.consultFile(File)orProjog.consultReader(Reader). - Create a
QueryStatementby usingProjog.createStatement(String). - Create a
QueryResultby usingQueryStatement.executeQuery(). - Iterate through all possible solutions to the query by using
QueryResult.next(). - For each solution get the
Terminstantiated to aVariablein the query by callingQueryResult.getTerm(String).
-
ClassesClassDescriptionProvides an entry point for other Java code to interact with Projog.An element in a stack trace, as returned by
Projog.getStackTrace(Throwable).Represents a plan for executing a Prolog query.Represents an executing query.Represents a query.