apollo.dataadapter.otter.parser
Class OtterXMLRenderingVisitor

java.lang.Object
  extended by 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();


Constructor Summary
OtterXMLRenderingVisitor()
           
 
Method Summary
 java.lang.StringBuffer getReturnBuffer()
           
 void visit(AnnotatedFeature feature)
           
 void visit(AssemblyFeature feature)
           
 void visit(CurationSet feature)
           
 void visit(Evidence evidence)
           
 void visit(Exon feature)
           
 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.
 void visit(SeqFeature feature)
           
 void visit(StrandedFeatureSet feature)
          The stranded feature set should be the root of the tree, so we open/close the root tags
 void visit(Transcript feature)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OtterXMLRenderingVisitor

public OtterXMLRenderingVisitor()
Method Detail

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