org.openanzo.common.rdb.query
Class Glitter2ResultSetAdaptor

java.lang.Object
  extended by org.openanzo.common.rdb.query.Glitter2ResultSetAdaptor
All Implemented Interfaces:
info.aduna.iteration.CloseableIteration<org.openrdf.query.BindingSet,org.openrdf.query.QueryEvaluationException>, info.aduna.iteration.Iteration<org.openrdf.query.BindingSet,org.openrdf.query.QueryEvaluationException>, java.util.Iterator<org.openrdf.query.BindingSet>, org.openrdf.query.QueryResult<org.openrdf.query.BindingSet>, org.openrdf.query.TupleQueryResult

public class Glitter2ResultSetAdaptor
extends java.lang.Object
implements org.openrdf.query.TupleQueryResult, java.util.Iterator<org.openrdf.query.BindingSet>

In-line convert Glitter QueryResult object to a TupleQueryResult

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
Glitter2ResultSetAdaptor(QueryResults glitterResults, CompositeNodeLayout nodeLayout)
          Create a new Glitter2ResultSetAdaptor for the given Glitter results, with data in the given nodeLayout
 
Method Summary
 void close()
           
 java.util.List<java.lang.String> getBindingNames()
           
 int getRowNumber()
          Get the row number of the current solution
 boolean hasNext()
           
 boolean isDistinct()
           
 boolean isEmpty()
          Determine if there are no solutions
 boolean isOrdered()
           
 java.util.Iterator<org.openrdf.query.BindingSet> iterator()
          Get this object in order to satisfy Iterable interface
 Glitter2SolutionAdaptor next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Glitter2ResultSetAdaptor

public Glitter2ResultSetAdaptor(QueryResults glitterResults,
                                CompositeNodeLayout nodeLayout)
Create a new Glitter2ResultSetAdaptor for the given Glitter results, with data in the given nodeLayout

Parameters:
glitterResults - Results for Glitter query
nodeLayout - Source of node db data
Method Detail

getBindingNames

public java.util.List<java.lang.String> getBindingNames()
Specified by:
getBindingNames in interface org.openrdf.query.TupleQueryResult

getRowNumber

public int getRowNumber()
Get the row number of the current solution

Returns:
the row number of the current solution

hasNext

public boolean hasNext()
Specified by:
hasNext in interface info.aduna.iteration.Iteration<org.openrdf.query.BindingSet,org.openrdf.query.QueryEvaluationException>
Specified by:
hasNext in interface java.util.Iterator<org.openrdf.query.BindingSet>

isDistinct

public boolean isDistinct()
Specified by:
isDistinct in interface org.openrdf.query.TupleQueryResult

isOrdered

public boolean isOrdered()
Specified by:
isOrdered in interface org.openrdf.query.TupleQueryResult

next

public Glitter2SolutionAdaptor next()
Specified by:
next in interface info.aduna.iteration.Iteration<org.openrdf.query.BindingSet,org.openrdf.query.QueryEvaluationException>
Specified by:
next in interface java.util.Iterator<org.openrdf.query.BindingSet>

remove

public void remove()
Specified by:
remove in interface info.aduna.iteration.Iteration<org.openrdf.query.BindingSet,org.openrdf.query.QueryEvaluationException>
Specified by:
remove in interface java.util.Iterator<org.openrdf.query.BindingSet>

close

public void close()
Specified by:
close in interface info.aduna.iteration.CloseableIteration<org.openrdf.query.BindingSet,org.openrdf.query.QueryEvaluationException>

isEmpty

public boolean isEmpty()
Determine if there are no solutions

Returns:
true if there are no solutions

iterator

public java.util.Iterator<org.openrdf.query.BindingSet> iterator()
Get this object in order to satisfy Iterable interface

Returns:
this object in order to satisfy Iterable interface


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.