|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectthings.data.processing.PhraseMatcher
rendsite.tools.Filter
public class Filter
Filter system.
Matches declared from a series of open brace '{' separated fields. The first field will define the type with the remaining fields as parameters. After the parameters are depleted, it will assume the next field is new type. It will continue until all fields are depleted. CR and LF are not significant within this series, but may be to the original source. Each field will be trimmed once parsed out of the delimiter. In this first version, the open brace '{' is NOT escapable; it will always break fields.
TYPES:
URL{Phrase text{www.goatmonkey.com/smort/loobie.html?bork=ZONK
2APR10 - EPG - Add filters.
| Field Summary | |
|---|---|
static java.lang.String |
FIELD_BREAK
|
static java.lang.String |
TYPE_URL
The match type URL. |
| Fields inherited from class things.data.processing.PhraseMatcher |
|---|
MAX_PHRASE_SIZE_IN_BYTES, phraseBuffer, phraseBufferLength |
| Constructor Summary | |
|---|---|
Filter(java.lang.String declaration)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
declarations()
All declarations should be put here, so they are done with any initialization. |
protected void |
match(int id,
char[] phrase,
int len,
java.io.Writer out)
This method will be called when a phrase is matched. |
protected void |
start(java.lang.String docId)
Start on a specific document. |
| Methods inherited from class things.data.processing.PhraseMatcher |
|---|
declare, init, process |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FIELD_BREAK
public static final java.lang.String TYPE_URL
It expects two parameters: 1- Phrase text. 2- URL to apply to the phrase.
| Constructor Detail |
|---|
public Filter(java.lang.String declaration)
throws java.lang.Throwable
declaration - the declarations.
java.lang.Throwable| Method Detail |
|---|
protected void declarations()
throws java.lang.Throwable
declarations in class things.data.processing.PhraseMatcherjava.lang.Throwable
protected void start(java.lang.String docId)
throws java.lang.Throwable
start in class things.data.processing.PhraseMatcherdocId - The id for the document, data, or whatever. The implementation may choose to ignore it.
java.lang.Throwable
protected void match(int id,
char[] phrase,
int len,
java.io.Writer out)
throws java.lang.Throwable
match in class things.data.processing.PhraseMatcherid - The defined id.phrase - The phrase data as it exactly appears in the stream.len - The number of valid characters in the phraseBuffer. The offset is always 0.out - Writer to write the processed data. If null, then the caller asked not to write anything, but it is up to the implementation.
java.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||