prupp.filter
Class Filter

java.lang.Object
  |
  +--prupp.filter.Filter
Direct Known Subclasses:
AdFilter, BackgroundFilter, BodyFilter

public abstract class Filter
extends java.lang.Object

How Filters work.


Constructor Summary
Filter()
           
 
Method Summary
abstract  java.lang.String filter(HTMLBlock block)
          Filter a block of text from a page.
static java.util.Properties getProperties()
          Called when you want to get the possible settings this filter support.
 boolean isString(java.lang.Object o)
          Filters work on a HTMLBlock that contains strings and tags This function answears the question if it is a string.
static void setup(java.util.Properties properties)
          Called when you want to setup how this filter should work.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Filter

public Filter()
Method Detail

filter

public abstract java.lang.String filter(HTMLBlock block)
Filter a block of text from a page.
Parameters:
block - the HTMLBlock were about to filter.
Returns:
the uncertain area of the block.

setup

public static void setup(java.util.Properties properties)
Called when you want to setup how this filter should work. Note this is an static method, but "override" it in subclasses as a static method and it will be called (through reflection).
Parameters:
properties - the properties to use.

getProperties

public static java.util.Properties getProperties()
Called when you want to get the possible settings this filter support.

isString

public boolean isString(java.lang.Object o)
Filters work on a HTMLBlock that contains strings and tags This function answears the question if it is a string.
Parameters:
o - the object to check.