de.fuberlin.wiwiss.d2rq.find
Class SQLResultSet

java.lang.Object
  extended byde.fuberlin.wiwiss.d2rq.find.SQLResultSet
Direct Known Subclasses:
CombinedTripleResultSet, TripleResultSet

public class SQLResultSet
extends java.lang.Object

Contains the result set from one SQL query and transforms it into triples. A triple is produced for TripleMaker in TripleMaker and each row in the result set.

History:
06-06-2004: Initial version of this class.
08-03-2004: Almost complete rewrite to make logic more explicit.

Version:
V0.2
Author:
Chris Bizer chris@bizer.de, Richard Cyganiak

Field Summary
protected  java.util.Map columnNameNumberMap
          The name used for the default graph.
protected  java.lang.String[] currentRow
          Array with the data from the current row of the resordset.
protected  Database database
           
static Logger logger
           
protected  int numCols
           
static java.util.Collection protocol
           
protected  boolean queryHasBeenExecuted
          Flag that the record set has already been created.
private  java.sql.ResultSet resultSet
           
static Logger separatorLogger
           
static boolean simulationMode
           
protected  java.lang.String sql
           
 
Constructor Summary
SQLResultSet(java.lang.String SQL, java.util.Map columnNameNumberMap, Database db)
           
 
Method Summary
 void close()
           
protected  void executeSQLQuery()
           
protected  java.lang.String[] nextRow()
          Gets the current row from the result set in an array which is passed to the triple makers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

columnNameNumberMap

protected java.util.Map columnNameNumberMap
The name used for the default graph.


queryHasBeenExecuted

protected boolean queryHasBeenExecuted
Flag that the record set has already been created.


currentRow

protected java.lang.String[] currentRow
Array with the data from the current row of the resordset.


database

protected Database database

resultSet

private java.sql.ResultSet resultSet

sql

protected java.lang.String sql

numCols

protected int numCols

logger

public static Logger logger

separatorLogger

public static Logger separatorLogger

simulationMode

public static boolean simulationMode

protocol

public static java.util.Collection protocol
Constructor Detail

SQLResultSet

public SQLResultSet(java.lang.String SQL,
                    java.util.Map columnNameNumberMap,
                    Database db)
Method Detail

executeSQLQuery

protected void executeSQLQuery()

close

public void close()

nextRow

protected java.lang.String[] nextRow()
Gets the current row from the result set in an array which is passed to the triple makers