org.biopax.paxtools.controller
Class AbstractTraverser
java.lang.Object
org.biopax.paxtools.controller.Traverser
org.biopax.paxtools.controller.AbstractTraverser
- All Implemented Interfaces:
- Visitor
- Direct Known Subclasses:
- Fetcher, PropertyReasoner
public abstract class AbstractTraverser
- extends Traverser
- implements Visitor
This is a convenience all-in-one Traverser/Visitor that
keeps track in the model and prevents infinite loops.
Like it's for the Traverser, there is no any
particular order in which it processes properties.
- Author:
- rodch
- See Also:
Fetcher,
Traverser,
Visitor
|
Method Summary |
protected java.util.Stack<BioPAXElement> |
getVisited()
|
void |
visit(BioPAXElement domain,
java.lang.Object range,
Model model,
PropertyEditor editor)
Saves/restores the current "path" of the value in the model and
calls the protected abstract method visitValue that is to be
implemented in subclasses of this abstract class. |
protected abstract void |
visit(java.lang.Object range,
BioPAXElement domain,
Model model,
PropertyEditor editor)
This is to implement a real action here:
do something, return or continue (traverse)
into properties. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTraverser
public AbstractTraverser(EditorMap editorMap,
Filter<PropertyEditor>... filters)
getVisited
protected java.util.Stack<BioPAXElement> getVisited()
visit
protected abstract void visit(java.lang.Object range,
BioPAXElement domain,
Model model,
PropertyEditor editor)
- This is to implement a real action here:
do something, return or continue (traverse)
into properties.
- Parameters:
range - is property valuedomain - is parent BioPAX elementeditor - is the property editor
visit
public void visit(BioPAXElement domain,
java.lang.Object range,
Model model,
PropertyEditor editor)
- Saves/restores the current "path" of the value in the model and
calls the protected abstract method visitValue that is to be
implemented in subclasses of this abstract class.
- Specified by:
visit in interface Visitor
- Parameters:
domain - BioPAX Elementrange - property value (can be BioPAX element, primitive, enum, string)model - editor - parent's property PropertyEditor
Copyright © 2011 BioPAX. All Rights Reserved.