org.biojava.bio.seq.io
Class SequenceDBSequenceBuilder

java.lang.Object
  extended by org.biojava.bio.seq.io.SequenceBuilderBase
      extended by org.biojava.bio.seq.io.SequenceDBSequenceBuilder
All Implemented Interfaces:
SeqIOListener, SequenceBuilder

public class SequenceDBSequenceBuilder
extends SequenceBuilderBase

This SequenceBuilder has a variety of modes of operation. It can take a sequence from an existing SequenceDB and apply annotations to it.

If the SequenceDB has persistence, then it can also create a sequence in the sequenceDB and apply the annotation to that. However, performance under those circumstances can vary depending on how well the persistent SequenceDB handles this.

Following the introduction of biojavax persistence is handled by Hibernate refer to BioSQLRichObjectBuilder

Author:
David Huen

Field Summary
static int ANNOTATE_EXISTING
           
static int CREATE_DUMMYSEQ
           
static int CREATE_REALSEQ
           
 
Fields inherited from class org.biojava.bio.seq.io.SequenceBuilderBase
annotation, ERROR_FEATURES_PROPERTY, name, seq, uri
 
Constructor Summary
SequenceDBSequenceBuilder(SequenceDB db, int mode)
          constructor
 
Method Summary
 void addSymbols(Alphabet alpha, Symbol[] syms, int pos, int len)
          does nothing for now.
 Sequence makeSequence()
          create the sequence
 
Methods inherited from class org.biojava.bio.seq.io.SequenceBuilderBase
addFeatureProperty, addProperty, addSequenceProperty, endFeature, endSequence, setName, setURI, startFeature, startSequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANNOTATE_EXISTING

public static final int ANNOTATE_EXISTING
See Also:
Constant Field Values

CREATE_DUMMYSEQ

public static final int CREATE_DUMMYSEQ
See Also:
Constant Field Values

CREATE_REALSEQ

public static final int CREATE_REALSEQ
See Also:
Constant Field Values
Constructor Detail

SequenceDBSequenceBuilder

public SequenceDBSequenceBuilder(SequenceDB db,
                                 int mode)
constructor

Method Detail

addSymbols

public void addSymbols(Alphabet alpha,
                       Symbol[] syms,
                       int pos,
                       int len)
does nothing for now.

Specified by:
addSymbols in interface SeqIOListener
Specified by:
addSymbols in class SequenceBuilderBase
Parameters:
alpha - The alphabet of the symbol data
syms - An array containing symbols
pos - The start offset of valid data within the array
len - The number of valid symbols in the array

makeSequence

public Sequence makeSequence()
                      throws BioException
create the sequence

Specified by:
makeSequence in interface SequenceBuilder
Overrides:
makeSequence in class SequenceBuilderBase
Throws:
BioException