Package org.biojava.bio.search
Class SearchContentHandlerDebugger
java.lang.Object
org.biojava.bio.search.SearchContentHandlerDebugger
- All Implemented Interfaces:
SearchContentHandler
This class prints to a PrintStream
calls to the SearchContentHandler interface
in human readable form. Use to debug parser/adaptor
classes that output to the SearchContentHandler interface.
- Author:
- David Huen
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an instance that dumps to System.out.SearchContentHandlerDebugger(PrintStream pStream) -
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.
-
Constructor Details
-
SearchContentHandlerDebugger
public SearchContentHandlerDebugger()Create an instance that dumps to System.out. -
SearchContentHandlerDebugger
- Parameters:
pStream- Stream to dump output to.
-
-
Method Details
-
addHitProperty
Description copied from interface:SearchContentHandlerTheaddHitPropertymethod adds a key/value pair containing some property of a particular hit.- Specified by:
addHitPropertyin interfaceSearchContentHandler- Parameters:
key- anObject.value- anObject.
-
addSubHitProperty
Description copied from interface:SearchContentHandlerTheaddSubHitPropertymethod adds a key/value pair containing some property of a particular subhit.- Specified by:
addSubHitPropertyin interfaceSearchContentHandler- Parameters:
key- anObject.value- anObject.
-
addSearchProperty
Description copied from interface:SearchContentHandlerTheaddSearchPropertymethod adds a key/value pair containing some property of the overall search result.- Specified by:
addSearchPropertyin interfaceSearchContentHandler- Parameters:
key- anObject.value- anObject.
-
setMoreSearches
Description copied from interface:SearchContentHandlersetMoreSearchessets the state of theSearchContentHandler's expectation of receiving more results. Used for handling streams of search results.- Specified by:
setMoreSearchesin interfaceSearchContentHandler- Parameters:
value- abooleanvalue.
-
getMoreSearches
Description copied from interface:SearchContentHandlergetMoreSearchesreturns the state of theSearchContentHandlerwith respect to further searches from its data source. Used for handling streams of search results.- Specified by:
getMoreSearchesin interfaceSearchContentHandler- Returns:
- a
booleanvalue.
-
endHeader
Description copied from interface:SearchContentHandlerTheendHeadermethod indicates the end of a formatted header.- Specified by:
endHeaderin interfaceSearchContentHandler
-
endHit
Description copied from interface:SearchContentHandlerTheendHitmethod indicates the end of a formatted hit.- Specified by:
endHitin interfaceSearchContentHandler
-
endSearch
Description copied from interface:SearchContentHandlerTheendSearchmethod indicates the end of useful search information.- Specified by:
endSearchin interfaceSearchContentHandler
-
endSubHit
Description copied from interface:SearchContentHandlerTheendSubHitmethod indicates the end of a formatted subhit.- Specified by:
endSubHitin interfaceSearchContentHandler
-
setDatabaseID
Description copied from interface:SearchContentHandlersetDatabaseIDidentifies the database searched by a name, ID or URN.- Specified by:
setDatabaseIDin interfaceSearchContentHandler- Parameters:
databaseID- aStringwhich should be an unique identifier for the database searched.
-
setQueryID
Description copied from interface:SearchContentHandlersetQueryIDidentifies the query sequence by a name, ID or URN.- Specified by:
setQueryIDin interfaceSearchContentHandler- Parameters:
queryID- aStringwhich should be an unique identifer for the sequence.
-
startHeader
Description copied from interface:SearchContentHandlerThestartHeadermethod indicates the start of a formatted header. This usually contains information relevant to the search as a whole.- Specified by:
startHeaderin interfaceSearchContentHandler
-
startHit
Description copied from interface:SearchContentHandlerThestartHitmethod indicates the start of a formatted hit. This could be a single line, or a block of lines.- Specified by:
startHitin interfaceSearchContentHandler
-
startSearch
Description copied from interface:SearchContentHandlerThestartSearchmethod indicates the start of useful search information.- Specified by:
startSearchin interfaceSearchContentHandler
-
startSubHit
Description copied from interface:SearchContentHandlerThestartSubHitmethod indicates the start of a formatted subhit. There may be zero or more of these per hit.- Specified by:
startSubHitin interfaceSearchContentHandler
-