com.hp.hpl.jena.graph
Class GraphUtil

java.lang.Object
  extended bycom.hp.hpl.jena.graph.GraphUtil

public class GraphUtil
extends java.lang.Object

Author:
kers

Method Summary
static ExtendedIterator findAll(Graph g)
          Answer an iterator covering all the triples in the specified graph.
static java.util.List iteratorToList(java.util.Iterator it)
          Answer the elements of the given iterator as a list, in the order that they arrived from the iterator.
static java.util.Set iteratorToSet(java.util.Iterator i)
          Answer the elements of the given iterator as a set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findAll

public static ExtendedIterator findAll(Graph g)
Answer an iterator covering all the triples in the specified graph.

Parameters:
g - the graph from which to extract triples
Returns:
an iterator over all the graph's triples

iteratorToSet

public static java.util.Set iteratorToSet(java.util.Iterator i)
Answer the elements of the given iterator as a set. The iterator is consumed by the operation. (Hence, if it is closable, it will be closed.)

Parameters:
i - the iterator to convert
Returns:
A set of the members of i

iteratorToList

public static java.util.List iteratorToList(java.util.Iterator it)
Answer the elements of the given iterator as a list, in the order that they arrived from the iterator. The iterator is consumed by this operation.

Parameters:
it - the iterator to convert
Returns:
a list of the elements of it, in order


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