org.openanzo.jastor
Class CachedPropertyIterator<E>

java.lang.Object
  extended by org.openanzo.jastor.CachedPropertyIterator<E>
Type Parameters:
E - The Jastor Type for the values that this iterator of properties represents
All Implemented Interfaces:
info.aduna.collections.iterators.CloseableIterator<E>, java.io.Closeable, java.util.Iterator<E>

public class CachedPropertyIterator<E>
extends java.lang.Object
implements info.aduna.collections.iterators.CloseableIterator<E>

Iterator that iterates over the set of object values for a given property on a given subject. Based on doing a find within the NamedGraph for the given subject and property

Author:
Ben Szekely (bhszekel@us.ibm.com)

Constructor Summary
CachedPropertyIterator(java.util.Collection<E> cache, INamedGraph graph, org.openrdf.model.Resource resource, org.openrdf.model.URI property, java.lang.String rangeUri, boolean objectProperty)
          Create iterator of object values for a given property on a given subject.
 
Method Summary
 void close()
           
 boolean hasNext()
           
 E next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedPropertyIterator

public CachedPropertyIterator(java.util.Collection<E> cache,
                              INamedGraph graph,
                              org.openrdf.model.Resource resource,
                              org.openrdf.model.URI property,
                              java.lang.String rangeUri,
                              boolean objectProperty)
Create iterator of object values for a given property on a given subject. Uses a cached collection of values and not a find operation

Parameters:
cache - Cache of values for property
graph - INamedGraph that contains data to search
resource - Subject of statements to find
property - Property of statements to find
rangeUri - URI of this properties range
objectProperty - Flag specifying if property is ObjectProperty or DatatypeProperty
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<E>

next

public E next()
Specified by:
next in interface java.util.Iterator<E>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<E>

close

public void close()
Specified by:
close in interface info.aduna.collections.iterators.CloseableIterator<E>
Specified by:
close in interface java.io.Closeable


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.