com.hp.hpl.jena.rdql
Class ResultBindingImpl

java.lang.Object
  extended by com.hp.hpl.jena.rdql.ResultBindingImpl
All Implemented Interfaces:
ResultBinding
Direct Known Subclasses:
Environment

public class ResultBindingImpl
extends Object
implements ResultBinding

A mapping from variable name to a value.

Version:
$Id: ResultBindingImpl.java,v 1.3 2004/07/30 17:36:27 andy_seaborne Exp $
Author:
Andy Seaborne

Constructor Summary
ResultBindingImpl()
           
ResultBindingImpl(ResultBindingImpl parent)
           
 
Method Summary
 int add(String varName, RDFNode node)
           
 int add(String varName, Value value)
           
 void addTriple(Statement s)
          Add a triple to the ResultBindingImpl.
 void check()
           
 Object get(String varName)
          Return the value of the named variable in this binding.
 Set getTriples()
          Get the set of statements that caused this ResultBindingImpl.
 ResultBindingIterator iterator()
          Return an iterator of the items in this result binding.
 Model mergeTriples(Model model)
          Merge the triples that caused this result binding into a model.
 Iterator names()
          Iterator over the names in this binding
 void setQuery(Query q)
           
 int size()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResultBindingImpl

public ResultBindingImpl(ResultBindingImpl parent)

ResultBindingImpl

public ResultBindingImpl()
Method Detail

add

public int add(String varName,
               Value value)

add

public int add(String varName,
               RDFNode node)

setQuery

public void setQuery(Query q)

addTriple

public void addTriple(Statement s)
Add a triple to the ResultBindingImpl. Assumed to be related to the some binding of this result binding.


getTriples

public Set getTriples()
Get the set of statements that caused this ResultBindingImpl. Note: returns a set so there may be less statements in some result bindings than in others and there may be less than the number of triple patterns in the query.

Specified by:
getTriples in interface ResultBinding

mergeTriples

public Model mergeTriples(Model model)
Merge the triples that caused this result binding into a model.

Specified by:
mergeTriples in interface ResultBinding
Returns:
The model passed in

names

public Iterator names()
Description copied from interface: ResultBinding
Iterator over the names in this binding

Specified by:
names in interface ResultBinding

iterator

public ResultBindingIterator iterator()
Description copied from interface: ResultBinding
Return an iterator of the items in this result binding. This iterator has operations to access the current variable name and variable value.

Specified by:
iterator in interface ResultBinding
Returns:
ResultBindingIterator

get

public Object get(String varName)
Description copied from interface: ResultBinding
Return the value of the named variable in this binding. Object will be an RDFNode.

Specified by:
get in interface ResultBinding

size

public int size()

check

public void check()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2000, 2001, 2002, 2003, 2004 Hewlett-Packard Development Company, LP