public class GenbankFormat extends java.lang.Object implements SequenceFormat, java.io.Serializable, ParseErrorListener, ParseErrorSource
EmblLikeFormat
.Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ACCESSION_TAG
Deprecated.
|
protected static java.lang.String |
AUTHORS_TAG
Deprecated.
|
protected static java.lang.String |
BASE_COUNT_TAG
Deprecated.
|
protected static java.lang.String |
CIRCULAR_TAG
Deprecated.
|
protected static java.lang.String |
COMMENT_TAG
Deprecated.
|
protected static java.lang.String |
COORDINATE_TAG
Deprecated.
|
protected static java.lang.String |
DATE_TAG
Deprecated.
|
static java.lang.String |
DEFAULT
Deprecated.
|
protected static java.lang.String |
DEFINITION_TAG
Deprecated.
|
protected static java.lang.String |
DIVISION_TAG
Deprecated.
|
protected static java.lang.String |
END_SEQUENCE_TAG
Deprecated.
|
protected static java.lang.String |
FEATURE_FLAG
Deprecated.
|
protected static java.lang.String |
FEATURE_LINE_PREFIX
Deprecated.
|
protected static java.lang.String |
FEATURE_TAG
Deprecated.
|
protected static java.lang.String |
GI_TAG
Deprecated.
|
protected static java.lang.String |
JOURNAL_TAG
Deprecated.
|
protected static java.lang.String |
KEYWORDS_TAG
Deprecated.
|
protected static java.lang.String |
LOCUS_TAG
Deprecated.
|
protected static java.lang.String |
MEDLINE_TAG
Deprecated.
|
protected static java.lang.String |
ORGANISM_TAG
Deprecated.
|
protected static java.lang.String |
PUBMED_TAG
Deprecated.
|
protected static java.lang.String |
REF_ACCESSION_TAG
Deprecated.
|
protected static java.lang.String |
REFERENCE_TAG
Deprecated.
|
protected static java.lang.String |
SIZE_TAG
Deprecated.
|
protected static java.lang.String |
SOURCE_TAG
Deprecated.
|
protected static java.lang.String |
START_SEQUENCE_TAG
Deprecated.
|
protected static java.lang.String |
STRAND_NUMBER_TAG
Deprecated.
|
protected static java.lang.String |
TITLE_TAG
Deprecated.
|
protected static java.lang.String |
TYPE_TAG
Deprecated.
|
protected static java.lang.String |
VERSION_TAG
Deprecated.
|
Constructor and Description |
---|
GenbankFormat()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addParseErrorListener(ParseErrorListener theListener)
Deprecated.
Adds a parse error listener to the list of listeners if it isn't already
included.
|
void |
BadLineParsed(ParseErrorEvent theEvent)
Deprecated.
This method determines the behaviour when a bad line is processed.
|
java.lang.String |
getDefaultFormat()
Deprecated.
|
boolean |
getElideSymbols()
Deprecated.
|
protected void |
notifyParseErrorEvent(ParseErrorEvent theEvent)
Deprecated.
Passes the event on to all the listeners registered for ParseErrorEvents.
|
boolean |
readSequence(java.io.BufferedReader reader,
SymbolTokenization symParser,
SeqIOListener listener)
Deprecated.
Reads a sequence from the specified reader using the Symbol
parser and Sequence Factory provided.
|
void |
removeParseErrorListener(ParseErrorListener theListener)
Deprecated.
Removes a parse error listener from the list of listeners if it is
included.
|
void |
setElideSymbols(boolean elideSymbols)
Deprecated.
Use this method to toggle reading of sequence data.
|
void |
writeSequence(Sequence seq,
java.io.PrintStream os)
Deprecated.
writeSequence writes a sequence to the specified
PrintStream, using the default format. |
void |
writeSequence(Sequence seq,
java.lang.String format,
java.io.PrintStream os)
Deprecated.
use writeSequence(Sequence seq, PrintStream os)
|
public static final java.lang.String DEFAULT
protected static final java.lang.String LOCUS_TAG
protected static final java.lang.String SIZE_TAG
protected static final java.lang.String STRAND_NUMBER_TAG
protected static final java.lang.String TYPE_TAG
protected static final java.lang.String CIRCULAR_TAG
protected static final java.lang.String DIVISION_TAG
protected static final java.lang.String DATE_TAG
protected static final java.lang.String ACCESSION_TAG
protected static final java.lang.String VERSION_TAG
protected static final java.lang.String GI_TAG
protected static final java.lang.String KEYWORDS_TAG
protected static final java.lang.String DEFINITION_TAG
protected static final java.lang.String SOURCE_TAG
protected static final java.lang.String ORGANISM_TAG
protected static final java.lang.String REFERENCE_TAG
protected static final java.lang.String COORDINATE_TAG
protected static final java.lang.String REF_ACCESSION_TAG
protected static final java.lang.String AUTHORS_TAG
protected static final java.lang.String TITLE_TAG
protected static final java.lang.String JOURNAL_TAG
protected static final java.lang.String PUBMED_TAG
protected static final java.lang.String MEDLINE_TAG
protected static final java.lang.String COMMENT_TAG
protected static final java.lang.String FEATURE_TAG
protected static final java.lang.String BASE_COUNT_TAG
protected static final java.lang.String FEATURE_FLAG
protected static final java.lang.String START_SEQUENCE_TAG
protected static final java.lang.String END_SEQUENCE_TAG
protected static final java.lang.String FEATURE_LINE_PREFIX
public boolean readSequence(java.io.BufferedReader reader, SymbolTokenization symParser, SeqIOListener listener) throws IllegalSymbolException, java.io.IOException, ParseException
readSequence
in interface SequenceFormat
reader
- The stream of data to parse.symParser
- A SymbolParser defining a mapping from
character data to Symbols.listener
- A listener to notify when data is extracted
from the stream.IllegalSymbolException
- if it is not possible to
translate character data from the stream into valid BioJava
symbols.java.io.IOException
- if an error occurs while reading from the
stream.ParseException
public void writeSequence(Sequence seq, java.io.PrintStream os) throws java.io.IOException
SequenceFormat
writeSequence
writes a sequence to the specified
PrintStream, using the default format.writeSequence
in interface SequenceFormat
seq
- the sequence to write out.os
- the printstream to write to.java.io.IOException
public void writeSequence(Sequence seq, java.lang.String format, java.io.PrintStream os) throws java.io.IOException
writeSequence
writes a sequence to the specified
PrintStream
, using the specified format.writeSequence
in interface SequenceFormat
seq
- a Sequence
to write out.format
- a String
indicating which sub-format
of those available from a particular
SequenceFormat
implemention to use when
writing.os
- a PrintStream
object.java.io.IOException
- if an error occurs.public java.lang.String getDefaultFormat()
getDefaultFormat
returns the String identifier for
the default format.getDefaultFormat
in interface SequenceFormat
String
.public void addParseErrorListener(ParseErrorListener theListener)
addParseErrorListener
in interface ParseErrorSource
theListener
- Listener to be added.public void removeParseErrorListener(ParseErrorListener theListener)
removeParseErrorListener
in interface ParseErrorSource
theListener
- Listener to be removed.public void BadLineParsed(ParseErrorEvent theEvent)
This method should be overwritten when different behavior is desired.
BadLineParsed
in interface ParseErrorListener
theEvent
- The event that contains the bad line and token.protected void notifyParseErrorEvent(ParseErrorEvent theEvent)
theEvent
- The event to be handed to the listeners.public boolean getElideSymbols()
public void setElideSymbols(boolean elideSymbols)
elideSymbols
- set to true if you don't want the sequence data.