apollo.dataadapter.otter.parser
Class OtterXMLRenderingVisitor
java.lang.Object
apollo.dataadapter.otter.parser.OtterXMLRenderingVisitor
- All Implemented Interfaces:
- Visitor
public class OtterXMLRenderingVisitor
- extends java.lang.Object
- implements Visitor
I visit elements of the Apollo datamodel, converting each them into XML with my
visit() methods. I am typically invoked with a call like:
GenericAnnotationSet set = ...
OtterXMLRenderingVisitor visitor = new OtterXMLRenderingVisitor();
set.visit(visitor); //will create XML for all features in the set
String xml = visitor.getReturnBuffer().toString();
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OtterXMLRenderingVisitor
public OtterXMLRenderingVisitor()
getReturnBuffer
public java.lang.StringBuffer getReturnBuffer()
visit
public void visit(SeqFeature feature)
- Specified by:
visit in interface Visitor
visit
public void visit(AssemblyFeature feature)
- Specified by:
visit in interface Visitor
visit
public void visit(FeatureSet feature)
- We may encounter "lesser" (non-stranded) feature sets along the way, which we
will ignore - ie we'll just run visit on their child features, but not create
any extra xml structure for the sets themselves. At time of writing I am doing
this to accomodate the fact that the annotations contain genes, and extra feature
sets containing the assembly features.
- Specified by:
visit in interface Visitor
visit
public void visit(StrandedFeatureSet feature)
- The stranded feature set should be the root of the tree, so we open/close
the root tags
- Specified by:
visit in interface Visitor
visit
public void visit(CurationSet feature)
- Specified by:
visit in interface Visitor
visit
public void visit(AnnotatedFeature feature)
- Specified by:
visit in interface Visitor
visit
public void visit(Transcript feature)
- Specified by:
visit in interface Visitor
visit
public void visit(Exon feature)
- Specified by:
visit in interface Visitor
visit
public void visit(Evidence evidence)
- Specified by:
visit in interface Visitor