it.uniroma2.art.owlart.navigation
Class RDFIteratorImpl<T>

java.lang.Object
  extended by it.uniroma2.art.owlart.navigation.RDFIteratorImpl<T>
Type Parameters:
T -
All Implemented Interfaces:
RDFIterator<T>, java.util.Iterator<T>
Direct Known Subclasses:
LiteralIteratorFilteringNodeIterator, OWLModelImpl.ARTLiteralIteratorImpl, OWLModelImpl.ARTResourceIteratorImpl, RDFIterators.DistinctRDFIterator, RDFIterators.RDFListIterator, ResourceIteratorFilteringNodeIterator, SKOSXLModelImpl.LanguageFilteredXLabelIterator, URIResourceIteratorFilteringNodeIterator

public abstract class RDFIteratorImpl<T>
extends java.lang.Object
implements RDFIterator<T>

This abstract implementation simply makes the hasNext() and next() methods of standard Iterator interface throw the specific runtime exception: ModelRuntimeException

Implementations of this abstract class should catch this Runtime Exception and then throw the standard Checked Exception ModelAccessException. This way, users will always use the specific methods of RDFIterator (streamOpen() and getNext()) and be properly notified with the Catched Exception ModelAccessException. At the same time, should a library suited for the Iterator interface be adopted, it will internally call the standard methods, possibly throw the Runtime exception, and then have this catched and rethrown as a Checked Exception. This assures both compliance with existing Iterator support libraries as well as Checked Extensions compile-time handling for his specific methods

Author:
Armando Stellato

Constructor Summary
RDFIteratorImpl()
           
 
Method Summary
 boolean hasNext()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.uniroma2.art.owlart.navigation.RDFIterator
close, getNext, streamOpen
 

Constructor Detail

RDFIteratorImpl

public RDFIteratorImpl()
Method Detail

hasNext

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

next

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

remove

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


Copyright © 2013 ART Group, University of Rome, Tor Vergata. All Rights Reserved.