Package org.biojava.bio.seq.io
Class SeqIOAdapter
- java.lang.Object
- 
- org.biojava.bio.seq.io.SeqIOAdapter
 
- 
- All Implemented Interfaces:
- SeqIOListener
 
 public class SeqIOAdapter extends Object implements SeqIOListener Adapter class for SeqIOListener that has empty methods.- Since:
- 1.1
- Author:
- Matthew Pocock
- See Also:
- RichSeqIOAdapter
 
- 
- 
Constructor SummaryConstructors Constructor Description SeqIOAdapter()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFeatureProperty(Object key, Object value)Notify the listener of a feature property.voidaddSequenceProperty(Object key, Object value)Notify the listener of a sequence-wide property.voidaddSymbols(Alphabet alpha, Symbol[] syms, int start, int length)Notify the listener of symbol data.voidendFeature()Mark the end of data associated with one specific feature.voidendSequence()Notify the listener that processing of the sequence is complete.voidsetName(String name)Notify the listener that the current sequence is generally known by a particular name.voidsetURI(String uri)Notify the listener of a URI identifying the current sequence.voidstartFeature(Feature.Template templ)Notify the listener that a new feature object is starting.voidstartSequence()Start the processing of a sequence.
 
- 
- 
- 
Constructor Detail- 
SeqIOAdapterpublic SeqIOAdapter() 
 
- 
 - 
Method Detail- 
startSequencepublic void startSequence() throws ParseException Description copied from interface:SeqIOListenerStart the processing of a sequence. This method exists primarily to enforce the life-cycles of SeqIOListener objects.- Specified by:
- startSequencein interface- SeqIOListener
- Throws:
- ParseException
 
 - 
endSequencepublic void endSequence() throws ParseException Description copied from interface:SeqIOListenerNotify the listener that processing of the sequence is complete.- Specified by:
- endSequencein interface- SeqIOListener
- Throws:
- ParseException
 
 - 
setNamepublic void setName(String name) throws ParseException Description copied from interface:SeqIOListenerNotify the listener that the current sequence is generally known by a particular name.- Specified by:
- setNamein interface- SeqIOListener
- Parameters:
- name- the String that should be returned by getName for the sequence being parsed
- Throws:
- ParseException
 
 - 
setURIpublic void setURI(String uri) throws ParseException Description copied from interface:SeqIOListenerNotify the listener of a URI identifying the current sequence.- Specified by:
- setURIin interface- SeqIOListener
- Throws:
- ParseException
 
 - 
addSymbolspublic void addSymbols(Alphabet alpha, Symbol[] syms, int start, int length) throws IllegalAlphabetException Description copied from interface:SeqIOListenerNotify the listener of symbol data. All symbols passed to this method are guarenteed to be contained within the specified alphabet. Generally all calls to a given Listener should have the same alphabet -- if not, the listener implementation is likely to throw an exception- Specified by:
- addSymbolsin interface- SeqIOListener
- Parameters:
- alpha- The alphabet of the symbol data
- syms- An array containing symbols
- start- The start offset of valid data within the array
- length- The number of valid symbols in the array
- Throws:
- IllegalAlphabetException- if we can't cope with this alphabet.
 
 - 
addSequencePropertypublic void addSequenceProperty(Object key, Object value) throws ParseException Description copied from interface:SeqIOListenerNotify the listener of a sequence-wide property. This might be stored as an entry in the sequence's annotation bundle.- Specified by:
- addSequencePropertyin interface- SeqIOListener
- Throws:
- ParseException
 
 - 
startFeaturepublic void startFeature(Feature.Template templ) throws ParseException Description copied from interface:SeqIOListenerNotify the listener that a new feature object is starting. Every call to startFeature should have a corresponding call to endFeature. If the listener is concerned with a hierarchy of features, it should maintain a stack of `open' features.- Specified by:
- startFeaturein interface- SeqIOListener
- Throws:
- ParseException
 
 - 
endFeaturepublic void endFeature() throws ParseException Description copied from interface:SeqIOListenerMark the end of data associated with one specific feature.- Specified by:
- endFeaturein interface- SeqIOListener
- Throws:
- ParseException
 
 - 
addFeaturePropertypublic void addFeatureProperty(Object key, Object value) throws ParseException Description copied from interface:SeqIOListenerNotify the listener of a feature property.- Specified by:
- addFeaturePropertyin interface- SeqIOListener
- Throws:
- ParseException
 
 
- 
 
-