org.biojava.bio.search
Class FilteringContentHandler

java.lang.Object
  extended by org.biojava.bio.search.SearchContentAdapter
      extended by org.biojava.bio.search.FilteringContentHandler
All Implemented Interfaces:
BlastLikeSearchFilter.Node, SearchContentHandler

public class FilteringContentHandler
extends SearchContentAdapter
implements BlastLikeSearchFilter.Node


Nested Class Summary
 class FilteringContentHandler.FilterVisitor
          Visitor class that parses the filter tree
 
Constructor Summary
FilteringContentHandler(BlastLikeSearchFilter filter)
           
FilteringContentHandler(BlastLikeSearchFilter filter, SearchContentHandler delegate)
           
 
Method Summary
 void addHitProperty(java.lang.Object key, java.lang.Object value)
          The addHitProperty method adds a key/value pair containing some property of a particular hit.
 void addSearchProperty(java.lang.Object key, java.lang.Object value)
          The addSearchProperty method adds a key/value pair containing some property of the overall search result.
 void addSubHitProperty(java.lang.Object key, java.lang.Object value)
          The addSubHitProperty method adds a key/value pair containing some property of a particular subhit.
 void endHeader()
          The endHeader method indicates the end of a formatted header.
 void endHit()
          The endHit method indicates the end of a formatted hit.
 void endSearch()
          The endSearch method indicates the end of useful search information.
 void endSubHit()
          The endSubHit method indicates the end of a formatted subhit.
 java.lang.Object getHitProperty(java.lang.Object key)
           
 java.lang.Object getSearchProperty(java.lang.Object key)
           
 java.lang.Object getSubHitProperty(java.lang.Object key)
           
 void setDatabaseID(java.lang.String id)
          setDatabaseID identifies the database searched by a name, ID or URN.
 void setQueryID(java.lang.String queryID)
          setQueryID identifies the query sequence by a name, ID or URN.
 void setSearchContentHandler(SearchContentHandler delegate)
           
 void startHeader()
          The startHeader method indicates the start of a formatted header.
 void startHit()
          The startHit method indicates the start of a formatted hit.
 void startSearch()
          The startSearch method indicates the start of useful search information.
 void startSubHit()
          The startSubHit method indicates the start of a formatted subhit.
 
Methods inherited from class org.biojava.bio.search.SearchContentAdapter
getMoreSearches, setMoreSearches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 java.lang.Object getSearchProperty(java.lang.Object key)
Specified by:
getSearchProperty in interface BlastLikeSearchFilter.Node

getHitProperty

public java.lang.Object getHitProperty(java.lang.Object key)
Specified by:
getHitProperty in interface BlastLikeSearchFilter.Node

getSubHitProperty

public java.lang.Object getSubHitProperty(java.lang.Object key)
Specified by:
getSubHitProperty in interface BlastLikeSearchFilter.Node

setSearchContentHandler

public void setSearchContentHandler(SearchContentHandler delegate)

startHeader

public void startHeader()
Description copied from interface: SearchContentHandler
The startHeader method indicates the start of a formatted header. This usually contains information relevant to the search as a whole.

Specified by:
startHeader in interface SearchContentHandler
Overrides:
startHeader in class SearchContentAdapter

setDatabaseID

public void setDatabaseID(java.lang.String id)
Description copied from interface: SearchContentHandler
setDatabaseID identifies the database searched by a name, ID or URN.

Specified by:
setDatabaseID in interface SearchContentHandler
Overrides:
setDatabaseID in class SearchContentAdapter
Parameters:
id - a String which should be an unique identifier for the database searched.

endHeader

public void endHeader()
Description copied from interface: SearchContentHandler
The endHeader method indicates the end of a formatted header.

Specified by:
endHeader in interface SearchContentHandler
Overrides:
endHeader in class SearchContentAdapter

startSearch

public void startSearch()
Description copied from interface: SearchContentHandler
The startSearch method indicates the start of useful search information.

Specified by:
startSearch in interface SearchContentHandler
Overrides:
startSearch in class SearchContentAdapter

setQueryID

public void setQueryID(java.lang.String queryID)
Description copied from interface: SearchContentHandler
setQueryID identifies the query sequence by a name, ID or URN.

Specified by:
setQueryID in interface SearchContentHandler
Overrides:
setQueryID in class SearchContentAdapter
Parameters:
queryID - a String which should be an unique identifer for the sequence.

addSearchProperty

public void addSearchProperty(java.lang.Object key,
                              java.lang.Object value)
Description copied from interface: SearchContentHandler
The addSearchProperty method adds a key/value pair containing some property of the overall search result.

Specified by:
addSearchProperty in interface SearchContentHandler
Overrides:
addSearchProperty in class SearchContentAdapter
Parameters:
key - an Object.
value - an Object.

startHit

public void startHit()
Description copied from interface: SearchContentHandler
The startHit method indicates the start of a formatted hit. This could be a single line, or a block of lines.

Specified by:
startHit in interface SearchContentHandler
Overrides:
startHit in class SearchContentAdapter

addHitProperty

public void addHitProperty(java.lang.Object key,
                           java.lang.Object value)
Description copied from interface: SearchContentHandler
The addHitProperty method adds a key/value pair containing some property of a particular hit.

Specified by:
addHitProperty in interface SearchContentHandler
Overrides:
addHitProperty in class SearchContentAdapter
Parameters:
key - an Object.
value - an Object.

startSubHit

public void startSubHit()
Description copied from interface: SearchContentHandler
The startSubHit method indicates the start of a formatted subhit. There may be zero or more of these per hit.

Specified by:
startSubHit in interface SearchContentHandler
Overrides:
startSubHit in class SearchContentAdapter

addSubHitProperty

public void addSubHitProperty(java.lang.Object key,
                              java.lang.Object value)
Description copied from interface: SearchContentHandler
The addSubHitProperty method adds a key/value pair containing some property of a particular subhit.

Specified by:
addSubHitProperty in interface SearchContentHandler
Overrides:
addSubHitProperty in class SearchContentAdapter
Parameters:
key - an Object.
value - an Object.

endSubHit

public void endSubHit()
Description copied from interface: SearchContentHandler
The endSubHit method indicates the end of a formatted subhit.

Specified by:
endSubHit in interface SearchContentHandler
Overrides:
endSubHit in class SearchContentAdapter

endHit

public void endHit()
Description copied from interface: SearchContentHandler
The endHit method indicates the end of a formatted hit.

Specified by:
endHit in interface SearchContentHandler
Overrides:
endHit in class SearchContentAdapter

endSearch

public void endSearch()
Description copied from interface: SearchContentHandler
The endSearch method indicates the end of useful search information.

Specified by:
endSearch in interface SearchContentHandler
Overrides:
endSearch in class SearchContentAdapter