org.biopax.paxtools.controller
Class Fetcher
java.lang.Object
org.biopax.paxtools.controller.Traverser
org.biopax.paxtools.controller.AbstractTraverser
org.biopax.paxtools.controller.Fetcher
- All Implemented Interfaces:
- Visitor
public class Fetcher
- extends AbstractTraverser
This class is used to fetch an element (traverse it to obtain
its dependent elements) and to add this element into a model
using the visitor and traverse functions.
FIXME may fail (StackOverFlow) when there is a cycle (see AbstractTraverser; use s.util.Filter)
- See Also:
Visitor,
Traverser
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Fetcher
public Fetcher(EditorMap editorMap,
Filter<PropertyEditor>... filters)
visit
protected void visit(java.lang.Object range,
BioPAXElement domain,
Model model,
PropertyEditor editor)
- Adds the BioPAX element into the model and traverses the element
for its dependent elements.
- Specified by:
visit in class AbstractTraverser
- Parameters:
range - is property valuedomain - is parent BioPAX elementeditor - is the property editor
fetch
public void fetch(BioPAXElement element,
Model model)
- Adds the element and all its children to the model.
This method fails if there are different child objects
with the same ID, because normally a good (self-consistent)
model does not contain duplicate BioPAX elements. Consider
using
fetch(BioPAXElement) method instead if you
want to get all the child elements anyway.
- Parameters:
element - the BioPAX element to be added into the modelmodel - model into which elements will be added
fetch
public java.util.Set<BioPAXElement> fetch(BioPAXElement element)
- Returns the element and all its children set.
(This method can return different objects
with the same ID!)
- Parameters:
element - model -
Copyright © 2011 BioPAX. All Rights Reserved.