com.hp.hpl.jena.rdql
Class ResultBinding

java.lang.Object
  extended bycom.hp.hpl.jena.rdql.ResultBinding
Direct Known Subclasses:
Environment

public class ResultBinding
extends java.lang.Object

A mapping from variable name to a value.

Version:
$Id: ResultBinding.java,v 1.8 2003/06/13 17:06:56 andy_seaborne Exp $
Author:
Andy Seaborne

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

Constructor Detail

ResultBinding

public ResultBinding(ResultBinding parent)

ResultBinding

public ResultBinding()
Method Detail

add

public int add(java.lang.String varName,
               Value value)
Set the parent ResultBinding. This is only needed for testing of parts of the query engine

Parameters:
varName - String name of the variable to bind
value - The value to set
Returns:
The index of the added value

add

public int add(java.lang.String varName,
               RDFNode node)

setQuery

public void setQuery(Query q)

addTriple

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


getTriples

public java.util.Set getTriples()
Get the set of statements that caused this ResultBinding. 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.


mergeTriples

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

Returns:
The model passed in

iterator

public ResultBinding.ResultBindingIterator iterator()

get

public java.lang.Object get(java.lang.String varName)

getValue

public Value getValue(java.lang.String varName)

size

public int size()

check

public void check()

toString

public java.lang.String toString()


Copyright © 2001-2003 Hewlett-Packard. All Rights Reserved.