|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.middleware.util.GraphIterator
public class GraphIterator
Iterate over all Resources of an RDF graph.
Nested Class Summary | |
---|---|
protected static class |
GraphIterator.GraphIteratorResources
A specialized iterator to iterate only over instances of Resource
. |
protected class |
GraphIterator.StackElement
Element to be stored in the stack. |
Field Summary | |
---|---|
protected GraphIteratorElement |
nextElement
The next element as being returned by next() . |
protected GraphIterator.StackElement |
se
The current information at a certain depth. |
protected Stack |
stack
The stack contains information for previous depth. |
protected Set |
visitedResources
The set of resources that have been visited before. |
Constructor Summary | |
---|---|
protected |
GraphIterator(Resource root)
|
Method Summary | |
---|---|
protected void |
createNext()
|
protected void |
createResult()
|
static Iterator |
getIterator(Resource root)
Create a new Iterator that iterates over all triples. |
protected Enumeration |
getPropertyEnumeration(Resource r)
|
static Iterator |
getResourceIterator(Resource root)
Create a new Iterator that iterates over all Resources. |
boolean |
hasNext()
|
Object |
next()
|
void |
remove()
|
protected void |
stepDeeper(Resource root)
|
protected boolean |
stepHigher()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Set visitedResources
protected GraphIterator.StackElement se
protected Stack stack
protected GraphIteratorElement nextElement
next()
. It can be
calculated by next()
and by hasNext()
.
Constructor Detail |
---|
protected GraphIterator(Resource root)
Method Detail |
---|
public static Iterator getIterator(Resource root)
next()
is of type GraphIteratorElement
.
root
- the Resource
that is the root of the graph.
Iterator
to iterate over elements of the graph.public static Iterator getResourceIterator(Resource root)
next()
is of type Resource
.
root
- the Resource
that is the root of the graph.
Iterator
to iterate over elements of the graph.protected Enumeration getPropertyEnumeration(Resource r)
protected void stepDeeper(Resource root)
protected boolean stepHigher()
protected void createResult()
protected void createNext()
public boolean hasNext()
hasNext
in interface Iterator
Iterator.hasNext()
public Object next()
next
in interface Iterator
Iterator.next()
public void remove()
remove
in interface Iterator
Iterator.remove()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |