public class GraphIterator extends Object implements Iterator
Modifier and Type | Class and Description |
---|---|
protected static class |
GraphIterator.GraphIteratorResources
A specialized iterator to iterate only over instances of
Resource
. |
static class |
GraphIterator.ObjectEqualsResource
A class that links to a resource but overrides the equals-method to
return true iff the objects are equal (instead of the URI as it is
defined for
Resource ). |
protected static class |
GraphIterator.StackElement
Element to be stored in the stack.
|
Modifier and Type | Field and Description |
---|---|
protected GraphIterator.ObjectEqualsResource |
idxdummy
A dummy object for performance that is only used to call the
contains-method of
visitedResources . |
protected GraphIteratorElement |
nextElement
The next element as being returned by
next() . |
protected GraphIterator.StackElement |
se
The current information at a certain depth.
|
protected Stack<GraphIterator.StackElement> |
stack
The stack contains information for previous depth.
|
protected Set<GraphIterator.ObjectEqualsResource> |
visitedResources
The set of resources that have been visited before.
|
Modifier | Constructor and Description |
---|---|
protected |
GraphIterator(Resource root) |
Modifier and Type | Method and Description |
---|---|
protected void |
createNext() |
protected void |
createResult() |
static Iterator<GraphIteratorElement> |
getIterator(Resource root)
Create a new Iterator that iterates over all triples of the graph.
|
protected Enumeration |
getPropertyEnumeration(Resource r) |
static Iterator<Resource> |
getResourceIterator(Resource root)
Create a new Iterator that iterates over all Resources of the graph.
|
boolean |
hasNext() |
Object |
next() |
void |
remove() |
protected void |
stepDeeper(Resource root) |
protected boolean |
stepHigher() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
protected Set<GraphIterator.ObjectEqualsResource> visitedResources
protected GraphIterator.ObjectEqualsResource idxdummy
visitedResources
.protected GraphIterator.StackElement se
protected Stack<GraphIterator.StackElement> stack
protected GraphIteratorElement nextElement
protected GraphIterator(Resource root)
public static Iterator<GraphIteratorElement> getIterator(Resource root)
public static Iterator<Resource> getResourceIterator(Resource root)
protected Enumeration getPropertyEnumeration(Resource r)
protected final void stepDeeper(Resource root)
protected final boolean stepHigher()
protected final void createResult()
protected void createNext()
public boolean hasNext()
hasNext
in interface Iterator
Iterator.hasNext()
public Object next()
next
in interface Iterator
Iterator.next()
public final void remove()
remove
in interface Iterator
Iterator.remove()
Copyright © 2018 universAAL Consortium. All rights reserved.