| java.lang.Object org.mandarax.kernel.LObject org.mandarax.kernel.Result
All known Subclasses: org.mandarax.util.resultsetfilters.ResultImpl,
Result | public class Result extends LObject (Code) | | Represents the result of a query. Comprises information about the derivation (proof)
and the replacements. There are some changes in version 3.0: replacements are now organised
in a hash table (for better performance) and there are new constructors building results
from result sets (using the current cursor position) in order to support the implementation of result filters.
author: Jens Dietrich version: 3.4 <7 March 05> since: 1.0 |
Method Summary | |
public Derivation | getProof() Get the derivation. | public Replacement[] | getReplacements() Get an array of replacements of the input (query) variables. | public Object | getResult(Class type, String name) Get the object that replaces the variable with the
given name and type. | public Object | getResult(String name) Get the object that replaces the variable with the name.
If there is no such object, return null.
Warning: This method is convinient and works well
under most circumstances, but could lead to mislead�ng results
if there are many variables of different types sharing the same
name in a query. | public Object | getResult(VariableTerm term) Get the object that replaces the variable. | public Map | getResults() Get the results as map containing term -> term associations. | protected void | setProof(Derivation proof) Set the derivation. | protected void | setReplacements(Replacement[] replacements) Set the replacements. | public String | toString() Convert the object to a string. |
Result | public Result(Derivation d, Replacement[] r)(Code) | | Constructor.
Parameters: d - the derivation proving this result Parameters: r - the variable replacements |
Result | public Result(Replacement[] r)(Code) | | Constructor.
Parameters: r - the variable replacements |
Result | public Result(Replacement r)(Code) | | Constructor.
Parameters: r - a variable replacement |
Result | public Result(Term term1, Term term2)(Code) | | Constructor.
Parameters: term1 - a term Parameters: term2 - a term |
getProof | public Derivation getProof()(Code) | | Get the derivation.
the proof (derivation) |
getReplacements | public Replacement[] getReplacements()(Code) | | Get an array of replacements of the input (query) variables.
an array of replacements |
getResult | public Object getResult(Class type, String name)(Code) | | Get the object that replaces the variable with the
given name and type.
If there is no such object, return null.
the object that replaced the variable Parameters: type - the type of the variable Parameters: name - the name of the variable |
getResult | public Object getResult(String name)(Code) | | Get the object that replaces the variable with the name.
If there is no such object, return null.
Warning: This method is convinient and works well
under most circumstances, but could lead to mislead�ng results
if there are many variables of different types sharing the same
name in a query. In this case, better use getResult(Class,String) .
the object that replaced the variable Parameters: name - the name of the variable |
getResult | public Object getResult(VariableTerm term)(Code) | | Get the object that replaces the variable.
If there is no such object, return null.
the object that replaced the variable Parameters: term - the variable term that is (perhaps) replaced |
setProof | protected void setProof(Derivation proof)(Code) | | Set the derivation.
Parameters: proof - |
setReplacements | protected void setReplacements(Replacement[] replacements)(Code) | | Set the replacements.
Parameters: replacements - |
toString | public String toString()(Code) | | Convert the object to a string.
the string representation of this object |
|
|