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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addHitProperty(Object key, Object value)
TheaddHitProperty
method adds a key/value pair containing some property of a particular hit.void
addSearchProperty(Object key, Object value)
TheaddSearchProperty
method adds a key/value pair containing some property of the overall search result.void
addSubHitProperty(Object key, Object value)
TheaddSubHitProperty
method adds a key/value pair containing some property of a particular subhit.void
endHeader()
TheendHeader
method indicates the end of a formatted header.void
endHit()
TheendHit
method indicates the end of a formatted hit.void
endSearch()
TheendSearch
method indicates the end of useful search information.void
endSubHit()
TheendSubHit
method indicates the end of a formatted subhit.boolean
getMoreSearches()
getMoreSearches
returns the state of theSearchContentHandler
with respect to further searches from its data source.void
setDatabaseID(String databaseID)
setDatabaseID
identifies the database searched by a name, ID or URN.void
setMoreSearches(boolean value)
setMoreSearches
sets the state of theSearchContentHandler
's expectation of receiving more results.void
setQueryID(String queryID)
setQueryID
identifies the query sequence by a name, ID or URN.void
startHeader()
ThestartHeader
method indicates the start of a formatted header.void
startHit()
ThestartHit
method indicates the start of a formatted hit.void
startSearch()
ThestartSearch
method indicates the start of useful search information.void
startSubHit()
ThestartSubHit
method indicates the start of a formatted subhit.
-
-
-
Method Detail
-
getMoreSearches
boolean getMoreSearches()
getMoreSearches
returns the state of theSearchContentHandler
with respect to further searches from its data source. Used for handling streams of search results.- Returns:
- a
boolean
value.
-
setMoreSearches
void setMoreSearches(boolean value)
setMoreSearches
sets the state of theSearchContentHandler
's expectation of receiving more results. Used for handling streams of search results.- Parameters:
value
- aboolean
value.
-
startSearch
void startSearch()
ThestartSearch
method indicates the start of useful search information.
-
endSearch
void endSearch()
TheendSearch
method indicates the end of useful search information.
-
startHeader
void startHeader()
ThestartHeader
method indicates the start of a formatted header. This usually contains information relevant to the search as a whole.
-
endHeader
void endHeader()
TheendHeader
method indicates the end of a formatted header.
-
startHit
void startHit()
ThestartHit
method indicates the start of a formatted hit. This could be a single line, or a block of lines.
-
endHit
void endHit()
TheendHit
method indicates the end of a formatted hit.
-
startSubHit
void startSubHit()
ThestartSubHit
method indicates the start of a formatted subhit. There may be zero or more of these per hit.
-
endSubHit
void endSubHit()
TheendSubHit
method indicates the end of a formatted subhit.
-
addSearchProperty
void addSearchProperty(Object key, Object value)
TheaddSearchProperty
method 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)
TheaddHitProperty
method adds a key/value pair containing some property of a particular hit.- Parameters:
key
- anObject
.value
- anObject
.
-
addSubHitProperty
void addSubHitProperty(Object key, Object value)
TheaddSubHitProperty
method adds a key/value pair containing some property of a particular subhit.- Parameters:
key
- anObject
.value
- anObject
.
-
setQueryID
void setQueryID(String queryID)
setQueryID
identifies the query sequence by a name, ID or URN.- Parameters:
queryID
- aString
which should be an unique identifer for the sequence.
-
setDatabaseID
void setDatabaseID(String databaseID)
setDatabaseID
identifies the database searched by a name, ID or URN.- Parameters:
databaseID
- aString
which should be an unique identifier for the database searched.
-
-