|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RichSeqIOListener
An interface for classes that listen to BioEntry or RichSequence I/O streams. The listener works as a call back interface. The callback methods would be generated by an object that is, for example, reading a sequence flat file. Guidelines on how many times the listener can expect each callback to occur are given below. Exactly what the Listener does with each call back is totally at the discretion of the implementor. The listener may aggregate events and build objects. The listener may selectively filter events and parse on others to another listener. The listener may choose to modify events. The options are endless. Although the name of the class and the name of some of the events suggest a sequence centric design the class could be used to listen to a parser of a bioentry style record that doesn't actually contain any sequence. In this case no addSymbols() methods would be called. The listener may be an implementation that only builds BioEntry objects and ignores sequence information completely.
Method Summary | |
---|---|
RichFeature |
getCurrentFeature()
Gets the feature currently being created. |
void |
setAccession(java.lang.String accession)
Call back method so the event emitter can tell the listener the accession of the record being read. |
void |
setCircular(boolean circular)
Defined this sequence being parser as circular. |
void |
setComment(java.lang.String comment)
Call back method so the event emitter can tell the listener about a comment in the record being read. |
void |
setDescription(java.lang.String description)
Call back method so the event emitter can tell the listener the description of the record being read. |
void |
setDivision(java.lang.String division)
Call back method so the event emitter can tell the listener the division of the record being read. |
void |
setIdentifier(java.lang.String identifier)
Call back method so the event emitter can tell the listener the identifier of the record being read. |
void |
setNamespace(Namespace namespace)
Call back method so the event emitter can tell the listener the namespace of the record being read. |
void |
setRankedCrossRef(RankedCrossRef crossRef)
Call back method so the event emitter can tell the listener about a cross reference. |
void |
setRankedDocRef(RankedDocRef ref)
Call back method so the event emitter can tell the listener about a literature reference in the record being read. |
void |
setRelationship(BioEntryRelationship relationship)
Call back method so the event emitter can tell the listener about a relationship between the bioentry or sequence in the record being read and another bioentry. |
void |
setSeqVersion(java.lang.String version)
Call back method so the event emitter can tell the listener the version of the sequence of the record being read. |
void |
setTaxon(NCBITaxon taxon)
Call back method so the event emitter can tell the listener the Taxon of the record being read. |
void |
setURI(java.lang.String uri)
Deprecated. There is no clear mapping between URI and BioSQL. This method is no longer used or supported in biojavax. Don't use it. Calling it may result in exceptions. Use instead setName(String name), setAccession(String accession), setVersion(int version) etc as appropriate. |
void |
setVersion(int version)
Call back method so the event emitter can tell the listener the version of the record being read. |
Methods inherited from interface org.biojava.bio.seq.io.SeqIOListener |
---|
addFeatureProperty, addSequenceProperty, addSymbols, endFeature, endSequence, setName, startFeature, startSequence |
Method Detail |
---|
void setAccession(java.lang.String accession) throws ParseException
accession
- The accession of the record
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.SeqIOListener.setName(String name)
,
setURI(String uri)
,
setIdentifier(String identifier)
void setIdentifier(java.lang.String identifier) throws ParseException
identifier
- The identifier of the Bioentry.
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.SeqIOListener.setName(String name)
,
setAccession(String accession)
,
setURI(String uri)
void setDivision(java.lang.String division) throws ParseException
division
- The division the entry belongs too.
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.void setDescription(java.lang.String description) throws ParseException
description
- The description of the record
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.void setVersion(int version) throws ParseException
version
- the version of the record
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.void setSeqVersion(java.lang.String version) throws ParseException
version
- the version of the record
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.void setComment(java.lang.String comment) throws ParseException
comment
- The comment
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.void setRankedDocRef(RankedDocRef ref) throws ParseException
ref
- A literature reference contained in the entry.
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.void setTaxon(NCBITaxon taxon) throws ParseException
taxon
- The taxon information relevant to this entry.
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.void setNamespace(Namespace namespace) throws ParseException
The namespace is a concept from the BioSQL schema that enables Bioentries to be disambiguated. It is possible in BioSQL and should be possible in other collections of BioEntries to have records that have the same name, accession and version but different namespaces. This method would be expected to be called if you are reading a sequence from a biosql database or if you are implementing a listener that knows how to write to a biosql database. If you give a sequence a namespace and it is persited to biosql at somepoint in it's life you could expect it to be persisted to that namespace (if possible).
namespace
- The namespace of the entry.
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.void setRelationship(BioEntryRelationship relationship) throws ParseException
relationship
- The relationship
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.void setRankedCrossRef(RankedCrossRef crossRef) throws ParseException
crossRef
- the cross reference
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.void setURI(java.lang.String uri) throws ParseException
setURI
in interface SeqIOListener
ParseException
RichFeature getCurrentFeature() throws ParseException
ParseException
- if a feature is not currently being created.void setCircular(boolean circular) throws ParseException
circular
- set this to true if you want it to be circular.
ParseException
- If the Listener cannot understand the event, is unable
to deal with the event or is not expecting the event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |