story.dbcore.parameters
Class QueryResult

java.lang.Object
  extended by story.dbcore.parameters.QueryResult

public class QueryResult
extends java.lang.Object

A QueryResult is a small collection of objects that represents the system's answer to a query of some kind (i.e., all satisfactions of ParameterSet over a certain tree, or a compilation of all nodes related to some particular node as calculated by RelatedNodes.


Constructor Summary
QueryResult(SymbolTable references)
          Constructor with no elements.
QueryResult(SymbolTable references, java.lang.Object element0)
          Constructor with one element.
QueryResult(SymbolTable references, java.lang.Object element0, java.lang.Object element1)
          Constructor with two elements.
QueryResult(SymbolTable references, java.lang.Object element0, java.lang.Object element1, java.lang.Object element2)
          Constructor with three elements.
QueryResult(SymbolTable references, java.lang.Object element0, java.lang.Object element1, java.lang.Object element2, java.lang.Object element3)
          Constructor with four elements.
QueryResult(SymbolTable references, QueryResult core, java.lang.Object newElement)
          Constructor with a core QueryResult and a new element.
QueryResult(SymbolTable references, QueryResult lower, QueryResult upper)
          Constructor that concatentates two other QueryResults.
 
Method Summary
 java.lang.Object getElement(int index)
          Get a single element.
 java.util.Enumeration getElements()
          Get all the elements.
 SymbolTable getReferences()
          Get the refernces.
 int numElements()
           
 java.lang.StringBuffer render()
          Render the QueryResult to a StringBuffer without the reference table.
 java.lang.StringBuffer render(boolean references)
          Render the QueryResult to a StringBuffer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryResult

public QueryResult(SymbolTable references)
Constructor with no elements.


QueryResult

public QueryResult(SymbolTable references,
                   java.lang.Object element0)
Constructor with one element.


QueryResult

public QueryResult(SymbolTable references,
                   java.lang.Object element0,
                   java.lang.Object element1)
Constructor with two elements.


QueryResult

public QueryResult(SymbolTable references,
                   java.lang.Object element0,
                   java.lang.Object element1,
                   java.lang.Object element2)
Constructor with three elements.


QueryResult

public QueryResult(SymbolTable references,
                   java.lang.Object element0,
                   java.lang.Object element1,
                   java.lang.Object element2,
                   java.lang.Object element3)
Constructor with four elements.


QueryResult

public QueryResult(SymbolTable references,
                   QueryResult lower,
                   QueryResult upper)
Constructor that concatentates two other QueryResults. Used by dotProduct routine in QueryResultSet.


QueryResult

public QueryResult(SymbolTable references,
                   QueryResult core,
                   java.lang.Object newElement)
Constructor with a core QueryResult and a new element. Use if you want to augment a QueryResult with a new element.

Method Detail

getElements

public java.util.Enumeration getElements()
Get all the elements.


getElement

public java.lang.Object getElement(int index)
                            throws Scheherexception
Get a single element. Index is enumerated from 0.

Throws:
Scheherexception

getReferences

public SymbolTable getReferences()
Get the refernces.


render

public java.lang.StringBuffer render()
                              throws Scheherexception
Render the QueryResult to a StringBuffer without the reference table.

Throws:
Scheherexception

render

public java.lang.StringBuffer render(boolean references)
                              throws Scheherexception
Render the QueryResult to a StringBuffer.

Parameters:
references - Include reference table.
Throws:
Scheherexception

numElements

public int numElements()


Copyright © 2011 David K. Elson. All Rights Reserved.