|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.bio.seq.io.SequenceBuilderBase
public abstract class SequenceBuilderBase
Basic SequenceBuilder implementation which accumulates all
notified information. Subclass this to implement specific
Sequence implementations.
More functionality is offered by the
SimpleRichSequenceBuilder.
| Field Summary | |
|---|---|
protected Annotation |
annotation
|
static Object |
ERROR_FEATURES_PROPERTY
|
protected String |
name
|
protected Sequence |
seq
|
protected String |
uri
|
| Constructor Summary | |
|---|---|
SequenceBuilderBase()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Object ERROR_FEATURES_PROPERTY
protected String name
protected String uri
protected Annotation annotation
protected Sequence seq
| Constructor Detail |
|---|
public SequenceBuilderBase()
| Method Detail |
|---|
public void startSequence()
SeqIOListener
startSequence in interface SeqIOListenerpublic void endSequence()
SeqIOListener
endSequence in interface SeqIOListenerpublic void setName(String name)
SeqIOListener
setName in interface SeqIOListenername - 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 SeqIOListeneralpha - 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 array
IllegalAlphabetException - if we can't cope with this
alphabet.
public void addSequenceProperty(Object key,
Object value)
addSequenceProperty in interface SeqIOListenerpublic void startFeature(Feature.Template templ)
SeqIOListener
startFeature in interface SeqIOListener
public void addFeatureProperty(Object key,
Object value)
throws ParseException
addFeatureProperty in interface SeqIOListenerParseExceptionpublic void endFeature()
SeqIOListener
endFeature in interface SeqIOListener
public Sequence makeSequence()
throws BioException
SequenceBuilder
makeSequence in interface SequenceBuilderBioException
protected void addProperty(Annotation ann,
Object key,
Object value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||