eu.larkc.core.query
Class VariableBindingBase

java.lang.Object
  extended by eu.larkc.core.query.VariableBindingBase
All Implemented Interfaces:
InformationSet, VariableBinding, java.io.Serializable
Direct Known Subclasses:
ORDIVariableBinding, SelectXMLVariableBinding

public class VariableBindingBase
extends java.lang.Object
implements VariableBinding

VariableBindingBase is an abstract class to implement asynchronous streaming of RDF variable bindings. All implementing classes must: 1. Invoke super.notifyAll() after setting bindNames 2. Put next the next binding results with results.put(X).

Author:
vassil
See Also:
Serialized Form

Nested Class Summary
 class VariableBindingBase.BindingIterator
          This class iterates an asynchronous blocking and returns back the results on demand.
 class VariableBindingBase.FinalBindingSet
          Helper class to denote the end of the streamed solutions.
 class VariableBindingBase.WrappedBinding
          Helper class to transform a Sesame to LarKC binding.
 
Nested classes/interfaces inherited from interface eu.larkc.core.data.VariableBinding
VariableBinding.Binding
 
Field Summary
static org.openrdf.model.BNode vbbBNode
           
static org.openrdf.model.URI vbbPredicate
           
 
Constructor Summary
VariableBindingBase()
           
 
Method Summary
 java.util.List<java.lang.String> getVariables()
          Gets the list of variables in the projection.
 CloseableIterator<VariableBinding.Binding> iterator()
          Gets an iterator of the solutions.
 SetOfStatements toRDF()
          Return an RDF representation of this object TODO:This should be fixed to really use RDF and not the CheatingInMemoryObjectStore
 SetOfStatements toRDF(SetOfStatements data)
          Serializes this object to SetOfStatements.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vbbPredicate

public static final org.openrdf.model.URI vbbPredicate

vbbBNode

public static final org.openrdf.model.BNode vbbBNode
Constructor Detail

VariableBindingBase

public VariableBindingBase()
Method Detail

getVariables

public java.util.List<java.lang.String> getVariables()
Description copied from interface: VariableBinding
Gets the list of variables in the projection.

Specified by:
getVariables in interface VariableBinding
Returns:
a list of variables

iterator

public CloseableIterator<VariableBinding.Binding> iterator()
Description copied from interface: VariableBinding
Gets an iterator of the solutions.

Specified by:
iterator in interface VariableBinding
Returns:
iterator to the data

toRDF

public SetOfStatements toRDF()
Return an RDF representation of this object TODO:This should be fixed to really use RDF and not the CheatingInMemoryObjectStore

Returns:

toRDF

public SetOfStatements toRDF(SetOfStatements data)
Description copied from interface: InformationSet
Serializes this object to SetOfStatements.

Specified by:
toRDF in interface InformationSet
Parameters:
data - is stream to serialize this object to.
Returns:
reference to the set of statements that contains the serialized data.