Package org.biojava.bio.search
Interface SearchContentHandler
- All Known Subinterfaces:
SearchBuilder
- All Known Implementing Classes:
BlastLikeHomologyBuilder,BlastLikeSearchBuilder,FastaSearchSAXParser,FilteringContentHandler,SearchContentAdapter,SearchContentFilter,SearchContentHandlerDebugger,SimilarityPairBuilder
public interface SearchContentHandler
SearchContentHandler is a notification interface for
objects which listen to search stream parsers. This is applicable
to all types of search results which are represented by flat files
created by external programs e.g. Fasta, (T)BlastN/PX, EMBOSS
programs. This is not limited to sequence similarity searches, but
includes any format consisting of a header followed by hits, each
of which may, or may not, have subhits.- Since:
- 1.1
- Author:
- Keith James
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddHitProperty(Object key, Object value) TheaddHitPropertymethod adds a key/value pair containing some property of a particular hit.voidaddSearchProperty(Object key, Object value) TheaddSearchPropertymethod adds a key/value pair containing some property of the overall search result.voidaddSubHitProperty(Object key, Object value) TheaddSubHitPropertymethod adds a key/value pair containing some property of a particular subhit.voidTheendHeadermethod indicates the end of a formatted header.voidendHit()TheendHitmethod indicates the end of a formatted hit.voidTheendSearchmethod indicates the end of useful search information.voidTheendSubHitmethod indicates the end of a formatted subhit.booleangetMoreSearchesreturns the state of theSearchContentHandlerwith respect to further searches from its data source.voidsetDatabaseID(String databaseID) setDatabaseIDidentifies the database searched by a name, ID or URN.voidsetMoreSearches(boolean value) setMoreSearchessets the state of theSearchContentHandler's expectation of receiving more results.voidsetQueryID(String queryID) setQueryIDidentifies the query sequence by a name, ID or URN.voidThestartHeadermethod indicates the start of a formatted header.voidstartHit()ThestartHitmethod indicates the start of a formatted hit.voidThestartSearchmethod indicates the start of useful search information.voidThestartSubHitmethod indicates the start of a formatted subhit.
-
Method Details
-
getMoreSearches
boolean getMoreSearches()getMoreSearchesreturns the state of theSearchContentHandlerwith respect to further searches from its data source. Used for handling streams of search results.- Returns:
- a
booleanvalue.
-
setMoreSearches
setMoreSearchessets the state of theSearchContentHandler's expectation of receiving more results. Used for handling streams of search results.- Parameters:
value- abooleanvalue.
-
startSearch
void startSearch()ThestartSearchmethod indicates the start of useful search information. -
endSearch
void endSearch()TheendSearchmethod indicates the end of useful search information. -
startHeader
void startHeader()ThestartHeadermethod indicates the start of a formatted header. This usually contains information relevant to the search as a whole. -
endHeader
void endHeader()TheendHeadermethod indicates the end of a formatted header. -
startHit
void startHit()ThestartHitmethod indicates the start of a formatted hit. This could be a single line, or a block of lines. -
endHit
void endHit()TheendHitmethod indicates the end of a formatted hit. -
startSubHit
void startSubHit()ThestartSubHitmethod indicates the start of a formatted subhit. There may be zero or more of these per hit. -
endSubHit
void endSubHit()TheendSubHitmethod indicates the end of a formatted subhit. -
addSearchProperty
TheaddSearchPropertymethod adds a key/value pair containing some property of the overall search result.- Parameters:
key- anObject.value- anObject.
-
addHitProperty
TheaddHitPropertymethod adds a key/value pair containing some property of a particular hit.- Parameters:
key- anObject.value- anObject.
-
addSubHitProperty
TheaddSubHitPropertymethod adds a key/value pair containing some property of a particular subhit.- Parameters:
key- anObject.value- anObject.
-
setQueryID
setQueryIDidentifies the query sequence by a name, ID or URN.- Parameters:
queryID- aStringwhich should be an unique identifer for the sequence.
-
setDatabaseID
setDatabaseIDidentifies the database searched by a name, ID or URN.- Parameters:
databaseID- aStringwhich should be an unique identifier for the database searched.
-