quoggles
Class QRunQuery

java.lang.Object
  |
  +--quoggles.QRunQuery
All Implemented Interfaces:
RunQuery

public class QRunQuery
extends java.lang.Object
implements RunQuery


Field Summary
private  org.graffiti.graph.Graph graph
          The graph to work on
static int minOrderNr
           
private  QMain qMain
          Used to communicate between the individual parts of the system
private  QResultDialog qResultDialog
          Dialog that shows the result table
private  java.util.List queryResult
          The result of the query
 
Constructor Summary
QRunQuery(QMain q)
          Constructor taking the main component as parameter.
 
Method Summary
private  void executeInputBox(Input_Box iBox)
          Sets the input of the given InputBox and executes it.
 java.util.List getQueryResult()
          Returns the result of the query.
 void reset()
           
 java.util.List runQuery(org.graffiti.graph.Graph qGraph, java.util.Collection sourceNodes, boolean internalUseOnly, java.util.List result, java.util.Stack nodesTodo)
          Executes the query given by the queryGraph and returns the result in a table (list of lists).
 void runQueryInFollowMode(java.awt.Point mousePnt)
          Called by mouseMoved when in QModes.followMode.
 void setGraph(org.graffiti.graph.Graph g)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queryResult

private java.util.List queryResult
The result of the query


graph

private org.graffiti.graph.Graph graph
The graph to work on


qMain

private QMain qMain
Used to communicate between the individual parts of the system


qResultDialog

private QResultDialog qResultDialog
Dialog that shows the result table


minOrderNr

public static int minOrderNr
Constructor Detail

QRunQuery

public QRunQuery(QMain q)
Constructor taking the main component as parameter.

Parameters:
q - main component used for communication
Method Detail

setGraph

public void setGraph(org.graffiti.graph.Graph g)

reset

public void reset()

getQueryResult

public java.util.List getQueryResult()
Returns the result of the query. For this to be valid, runQuery must have been executed. It is a list of rows, i.e. a list of lists. Even if a row consists only of one entry, it is packed into a list (of size one).

Returns:
the result of the query (list of rows)

executeInputBox

private void executeInputBox(Input_Box iBox)
                      throws QueryExecutionException
Sets the input of the given InputBox and executes it.

Parameters:
iBox -
Throws:
QueryExecutionException

runQuery

public java.util.List runQuery(org.graffiti.graph.Graph qGraph,
                               java.util.Collection sourceNodes,
                               boolean internalUseOnly,
                               java.util.List result,
                               java.util.Stack nodesTodo)
                        throws QueryExecutionException
Description copied from interface: RunQuery
Executes the query given by the queryGraph and returns the result in a table (list of lists).

Specified by:
runQuery in interface RunQuery
Parameters:
qGraph - the query graph to be executed
sourceNodes - the nodes where to start the query
internalUseOnly - true if there should be no side effects to the graphical system etc.
result - the result table to which the new query results will be added
nodesTodo - the stack of nodes that still have to be processed
Returns:
the result of the query; it is a table i.e. an ArrayList of rows that are Collections themselves.
QueryExecutionException
See Also:
RunQuery.runQuery(org.graffiti.graph.Graph, java.util.Collection, boolean, java.util.List, java.util.Stack)

runQueryInFollowMode

public void runQueryInFollowMode(java.awt.Point mousePnt)
Called by mouseMoved when in QModes.followMode. Executes query till the box nearest to the given point.

Parameters:
mousePnt -