QueryResultProducer
Keywords: uk.ac.ic.doc.rodex.qproc.QueryResultProducer class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.ic.doc.rodex.qproc
Class QueryResultProducer

    java.lang.Object
      uk.ac.ic.doc.rodex.qproc.QueryResultProducer

    public class QueryResultProducer

extends java.lang.Object

Constructor Summary
`QueryResultProducer(java.util.List asgResults)` Creates a new instance of QueryResultProducer

Method Summary
`static java.util.List` | `getAllTuples(ASG asg)` Loop through the entire `ASG` list-type structure and covert its content into an `List` of rows, each row is a `List` object containing all tuple values .
`java.lang.String` | `getIQLString()` Convert the result set into IQL's string for display
`static java.lang.StringBuffer` | `getIQLString(java.util.List tuples)` Return a String representation of a list of ASG tuples
`java.util.List` | `join()` Perform the 'join' operation on the specified set of result objects.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### QueryResultProducer

    public QueryResultProducer(java.util.List asgResults)

  Creates a new instance of QueryResultProducer

Method Detail

### join

    public java.util.List join()
                        throws QueryResultException

  Perform the 'join' operation on the specified set of result objects.

  The steps for joining are:

  - Start with a result object, loop through its list of tuples
  - For each tuple, get all corresponding tuples in other result objects
  - Ignore the value (constant) at a specific tuple's column if is duplicated by other tuples
    If the value is otherwise distinct, add it to the tuple as a new column
  - After finished joining each tuple, re-organise its values so that they appear
    in the exact same order as specified by the query head variables
  - Continue with other tuples

  Returns:
    `List` tuples constructed from joining result objects' tuples
  Throws:
    `QueryResultException`

### getIQLString

    public java.lang.String getIQLString()

  Convert the result set into IQL's string for display

### getIQLString

    public static java.lang.StringBuffer getIQLString(java.util.List tuples)

  Return a String representation of a list of ASG tuples

### getAllTuples

    public static java.util.List getAllTuples(ASG asg)

  Loop through the entire `ASG` list-type structure and covert its content into an `List` of rows, each row is a `List` object containing all tuple values
  .

  Parameters:
    `asg` - the actual `ASG` object
  Returns:
    List the apply {@link List) of the start of the tuple

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD