Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.seq.io.agave
Class AgaveWriter

    java.lang.Object
      org.biojava.bio.seq.io.agave.AgaveWriter

    public class AgaveWriter

extends Object

Writes Sequence into AGAVE XML document. The AGAVE format is defined in agave.dtd which can be downloaded from http://www.agavexml.org.

Author:
  Hanning Ni, Brian King

Nested Class Summary
`protected class` | `AgaveWriter.Indent` Implements indenting for elements.

Field Summary
`static String` | `INDENT` use a two space indent
`protected AGAVEAnnotFilter` | `mAnnotFilter` The AnnotationMap to use for getting AGAVE XML attributes from a Sequence Annotation.
`protected org.biojava.bio.seq.io.agave.PCDATAFilterWriter` | `mFilter` writes PCDATA replacing XML characters with escape entities
`protected AgaveWriter.Indent` | `mIndent` indent
`protected PrintWriter` | `mOut` Write to XML document
`protected boolean` | `mWriteDocType` write DOCTYPE if true

Constructor Summary
`AgaveWriter()` Default constructor uses generic annotation to attribute mapping.
`AgaveWriter(AGAVEAnnotFilter filter)` Construct with data source specific annotation to attribute mapping.

Method Summary
`void` | `setWriteDocType(boolean writeDocType)` Set flag that determines if XML DOCTYPE is written or not.
`protected void` | `write(Sequence seq)` Writing Sequence.
`protected void` | `writeAnnotations(FeatureHolder f)`
`protected void` | `writeAssembly(Annotatable seq)`
`protected void` | `writeBioSequence(Annotatable seq)`
`protected void` | `writeClassification(Annotatable seq)`
`protected void` | `writeCompResult(Annotatable f)`
`protected void` | `writeContig(Annotatable seq)`
`protected void` | `writeFooter()` Write </sciobj>
`protected void` | `writeGene(Annotatable f)`
`protected void` | `writeHeader()` Write <sciobj>
`protected void` | `writeSeqFeature(Annotatable f)` Write SeqFeature XML
`void` | `writeSequence(Sequence seq, PrintStream os)` Write sequence into AGAVE XML format.
`protected void` | `writeSequenceMap(Annotatable seq)` group sequence_map by getSource()
`protected void` | `writeSequenceMap2(Annotatable f)` Write SequenceMap XML
`protected void` | `writeTranscript(Annotatable f)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### INDENT

    public static final String INDENT

  use a two space indent

  See Also:
    Constant Field Values

### mOut

    protected PrintWriter mOut

  Write to XML document

### mIndent

    protected AgaveWriter.Indent mIndent

  indent

### mFilter

    protected org.biojava.bio.seq.io.agave.PCDATAFilterWriter mFilter

  writes PCDATA replacing XML characters with escape entities

### mAnnotFilter

    protected AGAVEAnnotFilter mAnnotFilter

  The AnnotationMap to use for getting AGAVE XML attributes from a Sequence Annotation.

### mWriteDocType

    protected boolean mWriteDocType

  write DOCTYPE if true

Constructor Detail

### AgaveWriter

    public AgaveWriter()

  Default constructor uses generic annotation to attribute mapping.

### AgaveWriter

    public AgaveWriter(AGAVEAnnotFilter filter)

  Construct with data source specific annotation to attribute mapping.

Method Detail

### setWriteDocType

    public void setWriteDocType(boolean writeDocType)

  Set flag that determines if XML DOCTYPE is written or not. Default is true.

### writeSequence

    public void writeSequence(Sequence seq,
                              PrintStream os)
                       throws IOException

  Write sequence into AGAVE XML format.

  Parameters:
    `seq` - maybe the or simple sequence

         if annotation of seq has chromosome information , generate  tag
         if seq is SimpleAssembly, generate  tag
         otherwise, generate  tag
         currently  each top-level sequence is wrapped into seperated sciobj xml file

  Throws:
    `IOException`

### writeHeader

    protected void writeHeader()

  Write <sciobj>

### writeFooter

    protected void writeFooter()

  Write </sciobj>

### write

    protected void write(Sequence seq)
                  throws IOException

  Writing Sequence.

  Parameters:
    `seq` - is simple sequence or simple assembly
  Throws:
    `IOException`

### writeContig

    protected void writeContig(Annotatable seq)
                        throws IOException

  Throws:
    `IOException`

### writeAssembly

    protected void writeAssembly(Annotatable seq)
                          throws IOException

  Throws:
    `IOException`

### writeBioSequence

    protected void writeBioSequence(Annotatable seq)
                             throws IOException

  Throws:
    `IOException`

### writeSequenceMap

    protected void writeSequenceMap(Annotatable seq)
                             throws IOException

  group sequence_map by getSource()

  Throws:
    `IOException`

### writeClassification

    protected void writeClassification(Annotatable seq)
                                throws IOException

  Throws:
    `IOException`

### writeSequenceMap2

    protected void writeSequenceMap2(Annotatable f)
                              throws IOException

  Write SequenceMap XML

  Throws:
    `IOException`

### writeAnnotations

    protected void writeAnnotations(FeatureHolder f)
                             throws IOException

  Throws:
    `IOException`

### writeGene

    protected void writeGene(Annotatable f)
                      throws IOException

  Throws:
    `IOException`

### writeTranscript

    protected void writeTranscript(Annotatable f)
                            throws IOException

  Throws:
    `IOException`

### writeSeqFeature

    protected void writeSeqFeature(Annotatable f)
                            throws IOException

  Write SeqFeature XML

  Throws:
    `IOException`

### writeCompResult

    protected void writeCompResult(Annotatable f)
                            throws IOException

  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD