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
SearchContentHandleris 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddHitProperty(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.voidendHeader()TheendHeadermethod indicates the end of a formatted header.voidendHit()TheendHitmethod indicates the end of a formatted hit.voidendSearch()TheendSearchmethod indicates the end of useful search information.voidendSubHit()TheendSubHitmethod indicates the end of a formatted subhit.booleangetMoreSearches()getMoreSearchesreturns 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.voidstartHeader()ThestartHeadermethod indicates the start of a formatted header.voidstartHit()ThestartHitmethod indicates the start of a formatted hit.voidstartSearch()ThestartSearchmethod indicates the start of useful search information.voidstartSubHit()ThestartSubHitmethod indicates the start of a formatted subhit.
-
-
-
Method Detail
-
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
void setMoreSearches(boolean value)
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
void addSearchProperty(Object key, Object value)
TheaddSearchPropertymethod adds a key/value pair containing some property of the overall search result.- Parameters:
key- anObject.value- anObject.
-
addHitProperty
void addHitProperty(Object key, Object value)
TheaddHitPropertymethod adds a key/value pair containing some property of a particular hit.- Parameters:
key- anObject.value- anObject.
-
addSubHitProperty
void addSubHitProperty(Object key, Object value)
TheaddSubHitPropertymethod adds a key/value pair containing some property of a particular subhit.- Parameters:
key- anObject.value- anObject.
-
setQueryID
void setQueryID(String queryID)
setQueryIDidentifies the query sequence by a name, ID or URN.- Parameters:
queryID- aStringwhich should be an unique identifer for the sequence.
-
setDatabaseID
void setDatabaseID(String databaseID)
setDatabaseIDidentifies the database searched by a name, ID or URN.- Parameters:
databaseID- aStringwhich should be an unique identifier for the database searched.
-
-