|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Searcher
Project: sstringsearch
File: Searcher.java
Class: Searcher
Created: 6. mai. 2008
Description:
For performing stringsearch.
Method Summary | |
---|---|
void |
addSearchTerm(String term,
SearchingHitListener listener)
Adds a new searchterm with a HitListener. |
long |
getNumberOfSearchTerms()
Get the number of defined searchterms. |
void |
removeSearchTerm(String term)
Removes a searchterm. |
void |
save(OutputStream outputStream)
Serialize the finite state automata to an outputstream. |
void |
save(String filename)
Convience-method to save a finite state automata to file. |
State |
search(Reader reader,
Object... callbackArguments)
Searches through character data provided by the reader. |
State |
search(Reader input,
State state,
Object... callbackArguments)
Searches through character data provided by the reader. |
Method Detail |
---|
void addSearchTerm(String term, SearchingHitListener listener) throws IllegalArgumentException
term
- The searchterm to add.listener
- The HitListener called when this searchterm is encountered.
IllegalArgumentException
HitListener
State search(Reader reader, Object... callbackArguments) throws IOException, IllegalArgumentException, IllegalStateException
reader
- A reader that provides the data to search through.callbackArguments
- Arguments that may be included when calling the listener.
IOException
- If there is a problem reading the data.
IllegalArgumentException
- If any of the arguments are invalid.
IllegalStateException
- If the FSA is not ready to perform search, e.g. if no searchterms are defined.State search(Reader input, State state, Object... callbackArguments) throws IOException, IllegalArgumentException, IllegalStateException
reader
- A reader that provides the data to search through.state
- The state to start from.callbackArguments
- Arguments that may be included when calling the listener.
IOException
- If there is a problem reading the data.
IllegalArgumentException
- If any of the arguments are invalid.
IllegalStateException
- If the FSA is not ready to perform search, e.g. if no searchterms are defined.void removeSearchTerm(String term)
term
- The searchterm to remove.void save(OutputStream outputStream) throws IOException
outputStream
- The outputstream to write finite state automata to.
IOException
- If something goes wrong while serializing the class.void save(String filename) throws IOException
filename
- The file to write finite state automata to.
IOException
- If something goes wrong while serializing the class.long getNumberOfSearchTerms()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |