public abstract class SequenceBuilderBase extends Object implements SequenceBuilder
SimpleRichSequenceBuilder
.Modifier and Type | Field and Description |
---|---|
protected Annotation |
annotation |
static Object |
ERROR_FEATURES_PROPERTY |
protected String |
name |
protected Sequence |
seq |
protected String |
uri |
Constructor and Description |
---|
SequenceBuilderBase() |
Modifier and Type | Method and Description |
---|---|
void |
addFeatureProperty(Object key,
Object value)
Add an annotation-bundle entry to the feature.
|
protected void |
addProperty(Annotation ann,
Object key,
Object value) |
void |
addSequenceProperty(Object key,
Object value)
Add an annotation-bundle entry to the sequence.
|
abstract void |
addSymbols(Alphabet alpha,
Symbol[] syms,
int pos,
int len)
Notify the listener of symbol data.
|
void |
endFeature()
Mark the end of data associated with one specific feature.
|
void |
endSequence()
Notify the listener that processing of the sequence is complete.
|
Sequence |
makeSequence()
Return the Sequence object which has been constructed
by this builder.
|
void |
setName(String name)
Notify the listener that the current sequence is generally known
by a particular name.
|
void |
setURI(String uri)
Notify the listener of a URI identifying the current sequence.
|
void |
startFeature(Feature.Template templ)
Notify the listener that a new feature object is starting.
|
void |
startSequence()
Start the processing of a sequence.
|
public static Object ERROR_FEATURES_PROPERTY
protected Annotation annotation
public SequenceBuilderBase()
public void startSequence()
SeqIOListener
startSequence
in interface SeqIOListener
public void endSequence()
SeqIOListener
endSequence
in interface SeqIOListener
public void setName(String name)
SeqIOListener
setName
in interface SeqIOListener
name
- the String that should be returned by getName for the sequence
being parsedpublic void setURI(String uri)
SeqIOListener
setURI
in interface SeqIOListener
public abstract void addSymbols(Alphabet alpha, Symbol[] syms, int pos, int len) throws IllegalAlphabetException
SeqIOListener
addSymbols
in interface SeqIOListener
alpha
- The alphabet of the symbol datasyms
- An array containing symbolspos
- The start offset of valid data within the arraylen
- The number of valid symbols in the arrayIllegalAlphabetException
- if we can't cope with this
alphabet.public void addSequenceProperty(Object key, Object value)
addSequenceProperty
in interface SeqIOListener
public void startFeature(Feature.Template templ)
SeqIOListener
startFeature
in interface SeqIOListener
public void addFeatureProperty(Object key, Object value) throws ParseException
addFeatureProperty
in interface SeqIOListener
ParseException
public void endFeature()
SeqIOListener
endFeature
in interface SeqIOListener
public Sequence makeSequence() throws BioException
SequenceBuilder
makeSequence
in interface SequenceBuilder
BioException
protected void addProperty(Annotation ann, Object key, Object value)
Copyright © 2014 BioJava. All rights reserved.