All Packages Class Hierarchy This Package Previous Next Index
Class ShoeKb.Query
java.lang.Object
|
+----ShoeKb.Sentence
|
+----ShoeKb.Query
- public class Query
- extends Sentence
A query that can be issued to a knowledge base. A query can consist
of one or more atoms conjuncted together, where an atom is a predicate
with one or more arguments. An argument may be a literal or a variable,
where varaibles are indicated by preceding them with a question mark.
-
ALL_ANSWERS
- Constant for specifying that all answers should be returned.
-
Query()
- Construct a new Query without initializing it.
-
Query(String, String, String)
- Constructs a new Query which consists of a single predicate with
two arguments.
-
Query(String, String[])
- Construct a new Query which consists of a single predicate with
any number of arguments.
-
getNumAnswersRequested()
- Returns the maximum number of answers that should be returned by
the query.
-
setNumAnswersRequested(int)
- Sets the maximum number of answers that should be returned by
the query.
ALL_ANSWERS
public static final int ALL_ANSWERS
- Constant for specifying that all answers should be returned.
Query
public Query()
- Construct a new Query without initializing it.
Query
public Query(String predicate,
String args[])
- Construct a new Query which consists of a single predicate with
any number of arguments.
Query
public Query(String predicate,
String arg1,
String arg2)
- Constructs a new Query which consists of a single predicate with
two arguments.
getNumAnswersRequested
public int getNumAnswersRequested()
- Returns the maximum number of answers that should be returned by
the query.
setNumAnswersRequested
public void setNumAnswersRequested(int numAnswersRequested)
- Sets the maximum number of answers that should be returned by
the query. Some KBs may choose to ignore this value.
All Packages Class Hierarchy This Package Previous Next Index