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

## rendsite.tools
Class Filter

    java.lang.Object
      things.data.processing.PhraseMatcher
          rendsite.tools.Filter

    public class Filter

extends things.data.processing.PhraseMatcher

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

Author:
  erich Version History

       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

### FIELD_BREAK

    public static final java.lang.String FIELD_BREAK

See Also:
  Constant Field Values

### TYPE_URL

    public static final java.lang.String TYPE_URL

  The match type URL.

       It expects two parameters:
       1- Phrase text.
       2- URL to apply to the phrase.

  See Also:
    Constant Field Values

Constructor Detail

### Filter

    public Filter(java.lang.String declaration)
           throws java.lang.Throwable

  Constructor.

  Parameters:
    `declaration` - the declarations.
  Throws:
    `java.lang.Throwable`

Method Detail

### declarations

    protected void declarations()
                         throws java.lang.Throwable

  All declarations should be put here, so they are done with any initialization.

  Specified by:
    `declarations` in class `things.data.processing.PhraseMatcher`
  Throws:
    `java.lang.Throwable`

### start

    protected void start(java.lang.String docId)
                  throws java.lang.Throwable

  Start on a specific document. This gives the implementation a chance to initialize.

  Specified by:
    `start` in class `things.data.processing.PhraseMatcher`
  Parameters:
    `docId` - The id for the document, data, or whatever. The implementation may choose to ignore it.
  Throws:
    `java.lang.Throwable`

### match

    protected void match(int id,
                         char[] phrase,
                         int len,
                         java.io.Writer out)
                  throws java.lang.Throwable

  This method will be called when a phrase is matched. Be sure to write to outs if you want anything preserved! The read() method will supply the read of the header line.

  Specified by:
    `match` in class `things.data.processing.PhraseMatcher`
  Parameters:
    `id` - 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.
  Throws:
    `java.lang.Throwable`

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

rendsite.