com.hp.hpl.jena.rdf.query
Class QueryResultsMem

java.lang.Object
  |
  +--com.hp.hpl.jena.rdf.query.QueryResultsMem
All Implemented Interfaces:
java.util.Iterator, QueryResults

public class QueryResultsMem
extends java.lang.Object
implements QueryResults

Version:
$Id: QueryResultsMem.java,v 1.2 2002/08/02 14:36:51 andy_seaborne Exp $
Author:
Andy Seaborne

Constructor Summary
QueryResultsMem(QueryResults qr)
          Create an in-memory result set from any QueryResults object.
QueryResultsMem(QueryResultsMem imrs2)
           
QueryResultsMem(QueryResultsMem imrs2, boolean takeCopy)
           
QueryResultsMem(java.io.Reader reader)
           
QueryResultsMem(java.lang.String urlStr)
           
 
Method Summary
 void close()
          Close the results set.
static boolean equivalent(QueryResultsMem irs1, QueryResultsMem irs2)
           
 java.util.List getAll()
          Deprecated. Old QueryResults operation
 java.util.List getResultVars()
          Get the variable names for the projection
 int getRowNumber()
          Return the "row" number for the current iterator item
 boolean hasNext()
          Is there another possibility?
 void list(java.io.PrintWriter pw)
          Print out the result set in dump format.
 java.lang.Object next()
          Moves onto the next result possibility.
 void remove()
           
 void reset()
           
 int size()
          Return the number of rows
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryResultsMem

public QueryResultsMem(QueryResultsMem imrs2)

QueryResultsMem

public QueryResultsMem(QueryResultsMem imrs2,
                       boolean takeCopy)

QueryResultsMem

public QueryResultsMem(QueryResults qr)
Create an in-memory result set from any QueryResults object. If the QueryResults is an in-memory one already, then no copying is done - the necessary internal datastructures are shared.


QueryResultsMem

public QueryResultsMem(java.io.Reader reader)

QueryResultsMem

public QueryResultsMem(java.lang.String urlStr)
                throws java.io.FileNotFoundException
Method Detail

remove

public void remove()
            throws java.lang.UnsupportedOperationException
Specified by:
remove in interface QueryResults
Throws:
java.lang.UnsupportedOperationException - Always thrown.

hasNext

public boolean hasNext()
Is there another possibility?

Specified by:
hasNext in interface QueryResults

next

public java.lang.Object next()
Moves onto the next result possibility. The returned object should be of class ResultBinding

Specified by:
next in interface QueryResults

close

public void close()
Close the results set. Should be called on all QueryResults objects

Specified by:
close in interface QueryResults

reset

public void reset()

getRowNumber

public int getRowNumber()
Return the "row" number for the current iterator item

Specified by:
getRowNumber in interface QueryResults

size

public int size()
Return the number of rows


getResultVars

public java.util.List getResultVars()
Get the variable names for the projection

Specified by:
getResultVars in interface QueryResults

getAll

public java.util.List getAll()
Deprecated. Old QueryResults operation

Convenience function to consume a query. Returns a list of ResultBindings.

Specified by:
getAll in interface QueryResults
Returns:
List

equivalent

public static boolean equivalent(QueryResultsMem irs1,
                                 QueryResultsMem irs2)

list

public void list(java.io.PrintWriter pw)
Print out the result set in dump format.



Copyright © 2001 Hewlett-Packard. All Rights Reserved.