Package org.biojava.bio.search
Class FilteringContentHandler
- java.lang.Object
-
- org.biojava.bio.search.SearchContentAdapter
-
- org.biojava.bio.search.FilteringContentHandler
-
- All Implemented Interfaces:
BlastLikeSearchFilter.Node,SearchContentHandler
public class FilteringContentHandler extends SearchContentAdapter implements BlastLikeSearchFilter.Node
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classFilteringContentHandler.FilterVisitorVisitor class that parses the filter tree
-
Constructor Summary
Constructors Constructor Description FilteringContentHandler(BlastLikeSearchFilter filter)FilteringContentHandler(BlastLikeSearchFilter filter, SearchContentHandler delegate)
-
Method Summary
All Methods Instance Methods Concrete 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.ObjectgetHitProperty(Object key)ObjectgetSearchProperty(Object key)ObjectgetSubHitProperty(Object key)voidsetDatabaseID(String id)setDatabaseIDidentifies the database searched by a name, ID or URN.voidsetQueryID(String queryID)setQueryIDidentifies the query sequence by a name, ID or URN.voidsetSearchContentHandler(SearchContentHandler delegate)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.-
Methods inherited from class org.biojava.bio.search.SearchContentAdapter
getMoreSearches, setMoreSearches
-
-
-
-
Constructor Detail
-
FilteringContentHandler
public FilteringContentHandler(BlastLikeSearchFilter filter, SearchContentHandler delegate) throws BioException
- Throws:
BioException
-
FilteringContentHandler
public FilteringContentHandler(BlastLikeSearchFilter filter) throws BioException
- Throws:
BioException
-
-
Method Detail
-
getSearchProperty
public Object getSearchProperty(Object key)
- Specified by:
getSearchPropertyin interfaceBlastLikeSearchFilter.Node
-
getHitProperty
public Object getHitProperty(Object key)
- Specified by:
getHitPropertyin interfaceBlastLikeSearchFilter.Node
-
getSubHitProperty
public Object getSubHitProperty(Object key)
- Specified by:
getSubHitPropertyin interfaceBlastLikeSearchFilter.Node
-
setSearchContentHandler
public void setSearchContentHandler(SearchContentHandler delegate)
-
startHeader
public void 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- Overrides:
startHeaderin classSearchContentAdapter
-
setDatabaseID
public void setDatabaseID(String id)
Description copied from interface:SearchContentHandlersetDatabaseIDidentifies the database searched by a name, ID or URN.- Specified by:
setDatabaseIDin interfaceSearchContentHandler- Overrides:
setDatabaseIDin classSearchContentAdapter- Parameters:
id- aStringwhich should be an unique identifier for the database searched.
-
endHeader
public void endHeader()
Description copied from interface:SearchContentHandlerTheendHeadermethod indicates the end of a formatted header.- Specified by:
endHeaderin interfaceSearchContentHandler- Overrides:
endHeaderin classSearchContentAdapter
-
startSearch
public void startSearch()
Description copied from interface:SearchContentHandlerThestartSearchmethod indicates the start of useful search information.- Specified by:
startSearchin interfaceSearchContentHandler- Overrides:
startSearchin classSearchContentAdapter
-
setQueryID
public void setQueryID(String queryID)
Description copied from interface:SearchContentHandlersetQueryIDidentifies the query sequence by a name, ID or URN.- Specified by:
setQueryIDin interfaceSearchContentHandler- Overrides:
setQueryIDin classSearchContentAdapter- Parameters:
queryID- aStringwhich should be an unique identifer for the sequence.
-
addSearchProperty
public void addSearchProperty(Object key, Object value)
Description copied from interface:SearchContentHandlerTheaddSearchPropertymethod adds a key/value pair containing some property of the overall search result.- Specified by:
addSearchPropertyin interfaceSearchContentHandler- Overrides:
addSearchPropertyin classSearchContentAdapter- Parameters:
key- anObject.value- anObject.
-
startHit
public void 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- Overrides:
startHitin classSearchContentAdapter
-
addHitProperty
public void addHitProperty(Object key, Object value)
Description copied from interface:SearchContentHandlerTheaddHitPropertymethod adds a key/value pair containing some property of a particular hit.- Specified by:
addHitPropertyin interfaceSearchContentHandler- Overrides:
addHitPropertyin classSearchContentAdapter- Parameters:
key- anObject.value- anObject.
-
startSubHit
public void 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- Overrides:
startSubHitin classSearchContentAdapter
-
addSubHitProperty
public void addSubHitProperty(Object key, Object value)
Description copied from interface:SearchContentHandlerTheaddSubHitPropertymethod adds a key/value pair containing some property of a particular subhit.- Specified by:
addSubHitPropertyin interfaceSearchContentHandler- Overrides:
addSubHitPropertyin classSearchContentAdapter- Parameters:
key- anObject.value- anObject.
-
endSubHit
public void endSubHit()
Description copied from interface:SearchContentHandlerTheendSubHitmethod indicates the end of a formatted subhit.- Specified by:
endSubHitin interfaceSearchContentHandler- Overrides:
endSubHitin classSearchContentAdapter
-
endHit
public void endHit()
Description copied from interface:SearchContentHandlerTheendHitmethod indicates the end of a formatted hit.- Specified by:
endHitin interfaceSearchContentHandler- Overrides:
endHitin classSearchContentAdapter
-
endSearch
public void endSearch()
Description copied from interface:SearchContentHandlerTheendSearchmethod indicates the end of useful search information.- Specified by:
endSearchin interfaceSearchContentHandler- Overrides:
endSearchin classSearchContentAdapter
-
-