org.openanzo.model.impl.query
Class Glitter2BasicResultSetAdaptor

java.lang.Object
  extended by org.openanzo.model.impl.query.Glitter2BasicResultSetAdaptor
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 Glitter2BasicResultSetAdaptor
extends java.lang.Object
implements org.openrdf.query.TupleQueryResult, java.util.Iterator<org.openrdf.query.BindingSet>

Convert results from a Glitter query into TupleQueryResult data

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Constructor Summary
Glitter2BasicResultSetAdaptor(QueryResults glitterResults)
          Create a new Glitter2BasicResultSetAdaptor with glitterResults as source of results to convert
 
Method Summary
 void close()
           
 java.util.List<java.lang.String> getBindingNames()
           
 boolean hasNext()
           
 boolean isDistinct()
           
 boolean isEmpty()
          Determine if the results are empty
 boolean isOrdered()
           
 java.util.Iterator<org.openrdf.query.BindingSet> iterator()
          Iterator() method needed in order to implement Iterable
 Glitter2BasicSolutionAdaptor next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Glitter2BasicResultSetAdaptor

public Glitter2BasicResultSetAdaptor(QueryResults glitterResults)
Create a new Glitter2BasicResultSetAdaptor with glitterResults as source of results to convert

Parameters:
glitterResults - GlitterResults to convert
Method Detail

getBindingNames

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

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 Glitter2BasicSolutionAdaptor 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 the results are empty

Returns:
true if the results are empty

iterator

public java.util.Iterator<org.openrdf.query.BindingSet> iterator()
Iterator() method needed in order to implement Iterable

Returns:
this iterator


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