org.pandora.knowledge
Class AbstractVertexIterator

java.lang.Object
  extended by org.pandora.knowledge.AbstractVertexIterator
All Implemented Interfaces:
VertexIterator

public abstract class AbstractVertexIterator
extends java.lang.Object
implements VertexIterator

Allow iteration over all related vertices and all descendants.


Constructor Summary
AbstractVertexIterator()
           
 
Method Summary
 void addBreadth(Vertex vertex)
          Add the vertex to the breadth set for traversal.
 int decrementDepth()
          Decrement the current depth of traversal.
 java.util.Map<Vertex,Vertex> getBreadthSet()
          Return the set of vertices for the next breadth first traversal level.
 int getDepth()
          Return the current depth of traversal.
 boolean getIgnorePrimitives()
          Return if should iterate on or over primitives.
 int getMaxDepth()
          Return the max depth of relationships to traverse, -1 means all.
 int getMaxIterations()
          Maximum number of vertices to iterator over.
 Path getPath()
          Traversal path.
 void getPath(Path path)
          Set the traversal path.
 java.util.Map<Vertex,Vertex> getTraversed()
          Return the set of already traversed vertices.
 int incrementDepth()
          Increment the current depth of traversal.
 boolean isMaxDepth()
          Return if the iterator is at the max depth.
 boolean isMaxIterations()
          Return if the iterator has iterated the max iterations.
 void setBreadthSet(java.util.Map<Vertex,Vertex> breadthSet)
          Set of vertices for the next breadth first traversal level.
 void setDepth(int depth)
          Set the current depth of traversal.
 void setIgnorePrimitives(boolean ignorePrimitives)
          Set if should iterate on or over primitives.
 void setMaxIterations(int maxIterations)
          Set the maximum number of vertices to iterator over.
 void setMxDepth(int maxDepth)
          Set the max depth of relationships to traverse, -1 means all.
 void setTraversed(java.util.Map<Vertex,Vertex> traversed)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pandora.api.knowledge.VertexIterator
iterate
 

Constructor Detail

AbstractVertexIterator

public AbstractVertexIterator()
Method Detail

getIgnorePrimitives

public boolean getIgnorePrimitives()
Return if should iterate on or over primitives.

Specified by:
getIgnorePrimitives in interface VertexIterator

getMaxIterations

public int getMaxIterations()
Maximum number of vertices to iterator over.

Specified by:
getMaxIterations in interface VertexIterator

isMaxDepth

public boolean isMaxDepth()
Return if the iterator is at the max depth.

Specified by:
isMaxDepth in interface VertexIterator

isMaxIterations

public boolean isMaxIterations()
Return if the iterator has iterated the max iterations.

Specified by:
isMaxIterations in interface VertexIterator

incrementDepth

public int incrementDepth()
Increment the current depth of traversal.

Specified by:
incrementDepth in interface VertexIterator

decrementDepth

public int decrementDepth()
Decrement the current depth of traversal.

Specified by:
decrementDepth in interface VertexIterator

getDepth

public int getDepth()
Return the current depth of traversal.

Specified by:
getDepth in interface VertexIterator

getMaxDepth

public int getMaxDepth()
Return the max depth of relationships to traverse, -1 means all.

Specified by:
getMaxDepth in interface VertexIterator

setIgnorePrimitives

public void setIgnorePrimitives(boolean ignorePrimitives)
Set if should iterate on or over primitives.


setMaxIterations

public void setMaxIterations(int maxIterations)
Set the maximum number of vertices to iterator over.


setDepth

public void setDepth(int depth)
Set the current depth of traversal.

Specified by:
setDepth in interface VertexIterator

setMxDepth

public void setMxDepth(int maxDepth)
Set the max depth of relationships to traverse, -1 means all.


getPath

public Path getPath()
Traversal path.

Specified by:
getPath in interface VertexIterator

getPath

public void getPath(Path path)
Set the traversal path.


getTraversed

public java.util.Map<Vertex,Vertex> getTraversed()
Description copied from interface: VertexIterator
Return the set of already traversed vertices.

Specified by:
getTraversed in interface VertexIterator

setTraversed

public void setTraversed(java.util.Map<Vertex,Vertex> traversed)

getBreadthSet

public java.util.Map<Vertex,Vertex> getBreadthSet()
Description copied from interface: VertexIterator
Return the set of vertices for the next breadth first traversal level.

Specified by:
getBreadthSet in interface VertexIterator

setBreadthSet

public void setBreadthSet(java.util.Map<Vertex,Vertex> breadthSet)
Description copied from interface: VertexIterator
Set of vertices for the next breadth first traversal level.

Specified by:
setBreadthSet in interface VertexIterator

addBreadth

public void addBreadth(Vertex vertex)
Add the vertex to the breadth set for traversal.

Specified by:
addBreadth in interface VertexIterator