SearchListener.Wrapper (BioJava-1.5-beta API)
Keywords: org.biojava.bio.program.ssaha.SearchListener.Wrapper class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.program.ssaha
Class SearchListener.Wrapper

    java.lang.Object
      org.biojava.bio.program.ssaha.SearchListener.Wrapper

All Implemented Interfaces:
  SearchListener

Direct Known Subclasses:
  SearchListener.FilterByLength

Enclosing interface:
  SearchListener

    public abstract static class SearchListener.Wrapper

extends Object
implements SearchListener

A simple wrapper implementation.

Extend this and over-ride any of the interface methods to implement SearchListeners that filter hits before passing them on to an underlying listener.

Since:
  1.4
Author:
  Matthew Pocock
For advanced users:
  You can modify the search events the delegate sees by over-riding any of the SearchListener methods, modify the arguments and then call the method on super with the new arguments.
  You can drop hits by just not passing them onto the delegate using super.hits().
  Note: Be sure to maintain the nesting of start/stop search and hit, or you will confuse the delegate.

Nested Class Summary

Nested classes/interfaces inherited from interface org.biojava.bio.program.ssaha.SearchListener
`SearchListener.Echo, SearchListener.FilterByLength, SearchListener.Tee, SearchListener.Wrapper`

Constructor Summary
`SearchListener.Wrapper(SearchListener delegate)`

Method Summary
`void` | `endSearch(String seqID)` Indicates that a sequence has been searched against a DataStore.
`void` | `hit(int hitID, int queryOffset, int hitOffset, int hitLength)` There has been a hit between the query sequence and a database sequence.
`void` | `startSearch(String seqID)` Indicates that a sequence is about to be searched against a DataStore.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SearchListener.Wrapper

    public SearchListener.Wrapper(SearchListener delegate)

Method Detail

### startSearch

    public void startSearch(String seqID)

  Description copied from interface: `SearchListener`
  Indicates that a sequence is about to be searched against a DataStore.

  Specified by:
    `startSearch` in interface `SearchListener`
  Parameters:
    `seqID` - the id of the sequence to be searched

### endSearch

    public void endSearch(String seqID)

  Description copied from interface: `SearchListener`
  Indicates that a sequence has been searched against a DataStore.

  Specified by:
    `endSearch` in interface `SearchListener`
  Parameters:
    `seqID` - the id of the sequence to be searched

### hit

    public void hit(int hitID,
                    int queryOffset,
                    int hitOffset,
                    int hitLength)

  Description copied from interface: `SearchListener`
  There has been a hit between the query sequence and a database sequence.

  Specified by:
    `hit` in interface `SearchListener`
  Parameters:
    `hitID` - the number of the sequence hit; resolvable by String id = DataStore.seqNameForID(hitID)
    `queryOffset` - the offset into the query sequence
    `hitOffset` - the offset into the sequence hit in the database
    `hitLength` - the number of symbols hit

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD