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 class
FilteringContentHandler.FilterVisitor
Visitor 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 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.Object
getHitProperty(Object key)
Object
getSearchProperty(Object key)
Object
getSubHitProperty(Object key)
void
setDatabaseID(String id)
setDatabaseID
identifies the database searched by a name, ID or URN.void
setQueryID(String queryID)
setQueryID
identifies the query sequence by a name, ID or URN.void
setSearchContentHandler(SearchContentHandler delegate)
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.-
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:
getSearchProperty
in interfaceBlastLikeSearchFilter.Node
-
getHitProperty
public Object getHitProperty(Object key)
- Specified by:
getHitProperty
in interfaceBlastLikeSearchFilter.Node
-
getSubHitProperty
public Object getSubHitProperty(Object key)
- Specified by:
getSubHitProperty
in interfaceBlastLikeSearchFilter.Node
-
setSearchContentHandler
public void setSearchContentHandler(SearchContentHandler delegate)
-
startHeader
public void startHeader()
Description copied from interface:SearchContentHandler
ThestartHeader
method indicates the start of a formatted header. This usually contains information relevant to the search as a whole.- Specified by:
startHeader
in interfaceSearchContentHandler
- Overrides:
startHeader
in classSearchContentAdapter
-
setDatabaseID
public void setDatabaseID(String id)
Description copied from interface:SearchContentHandler
setDatabaseID
identifies the database searched by a name, ID or URN.- Specified by:
setDatabaseID
in interfaceSearchContentHandler
- Overrides:
setDatabaseID
in classSearchContentAdapter
- Parameters:
id
- aString
which should be an unique identifier for the database searched.
-
endHeader
public void endHeader()
Description copied from interface:SearchContentHandler
TheendHeader
method indicates the end of a formatted header.- Specified by:
endHeader
in interfaceSearchContentHandler
- Overrides:
endHeader
in classSearchContentAdapter
-
startSearch
public void startSearch()
Description copied from interface:SearchContentHandler
ThestartSearch
method indicates the start of useful search information.- Specified by:
startSearch
in interfaceSearchContentHandler
- Overrides:
startSearch
in classSearchContentAdapter
-
setQueryID
public void setQueryID(String queryID)
Description copied from interface:SearchContentHandler
setQueryID
identifies the query sequence by a name, ID or URN.- Specified by:
setQueryID
in interfaceSearchContentHandler
- Overrides:
setQueryID
in classSearchContentAdapter
- Parameters:
queryID
- aString
which should be an unique identifer for the sequence.
-
addSearchProperty
public void addSearchProperty(Object key, Object value)
Description copied from interface:SearchContentHandler
TheaddSearchProperty
method adds a key/value pair containing some property of the overall search result.- Specified by:
addSearchProperty
in interfaceSearchContentHandler
- Overrides:
addSearchProperty
in classSearchContentAdapter
- Parameters:
key
- anObject
.value
- anObject
.
-
startHit
public void startHit()
Description copied from interface:SearchContentHandler
ThestartHit
method indicates the start of a formatted hit. This could be a single line, or a block of lines.- Specified by:
startHit
in interfaceSearchContentHandler
- Overrides:
startHit
in classSearchContentAdapter
-
addHitProperty
public void addHitProperty(Object key, Object value)
Description copied from interface:SearchContentHandler
TheaddHitProperty
method adds a key/value pair containing some property of a particular hit.- Specified by:
addHitProperty
in interfaceSearchContentHandler
- Overrides:
addHitProperty
in classSearchContentAdapter
- Parameters:
key
- anObject
.value
- anObject
.
-
startSubHit
public void startSubHit()
Description copied from interface:SearchContentHandler
ThestartSubHit
method indicates the start of a formatted subhit. There may be zero or more of these per hit.- Specified by:
startSubHit
in interfaceSearchContentHandler
- Overrides:
startSubHit
in classSearchContentAdapter
-
addSubHitProperty
public void addSubHitProperty(Object key, Object value)
Description copied from interface:SearchContentHandler
TheaddSubHitProperty
method adds a key/value pair containing some property of a particular subhit.- Specified by:
addSubHitProperty
in interfaceSearchContentHandler
- Overrides:
addSubHitProperty
in classSearchContentAdapter
- Parameters:
key
- anObject
.value
- anObject
.
-
endSubHit
public void endSubHit()
Description copied from interface:SearchContentHandler
TheendSubHit
method indicates the end of a formatted subhit.- Specified by:
endSubHit
in interfaceSearchContentHandler
- Overrides:
endSubHit
in classSearchContentAdapter
-
endHit
public void endHit()
Description copied from interface:SearchContentHandler
TheendHit
method indicates the end of a formatted hit.- Specified by:
endHit
in interfaceSearchContentHandler
- Overrides:
endHit
in classSearchContentAdapter
-
endSearch
public void endSearch()
Description copied from interface:SearchContentHandler
TheendSearch
method indicates the end of useful search information.- Specified by:
endSearch
in interfaceSearchContentHandler
- Overrides:
endSearch
in classSearchContentAdapter
-
-