com.raritantechnologies.HTML.filter
Class RemoveTagFilter

java.lang.Object
  extended bycom.raritantechnologies.HTML.filter.RemoveTagFilter
All Implemented Interfaces:
HTMLEventProcessor, IConfigurable

public class RemoveTagFilter
extends java.lang.Object
implements HTMLEventProcessor

EventProcessor element of an HTMLFilter. Removes HTML Simple Start Tag and End tags given a name or set of names. Alternatively, a configurable comparator of type IComparator can be used to select the tags for removal.

XML Configuration Template:
  <EventProcessor class="com.raritantechnologies.HTML.filter.RemoveTagFilter"
                     tagNames="[comma separated list of tag names]"
                     removeInnerData="[ true|false(default) - if true remove data internal to tag ]" >

    <!-- Alternate IComparator to select tags to remove -->
    <Comparator class="[ class of com.raritantechnologies.utils.comparators.IComparator ]" >
       <!-- Configuration parameters of IComparator class -->
    </Comparator>

  </EventProcessor>
 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Constructor Summary
RemoveTagFilter()
           
RemoveTagFilter(javax.swing.text.html.HTML.Tag theTag)
           
RemoveTagFilter(java.lang.String tagName)
           
RemoveTagFilter(java.lang.String[] tagNames)
           
 
Method Summary
 void addTag(javax.swing.text.html.HTML.Tag theTag)
           
 void addTag(java.lang.String tagName)
           
 void addTags(java.lang.String[] tagNames)
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 java.util.ArrayList processEvents(java.util.ArrayList events)
          Process a list of HTMLEvents return a modified list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoveTagFilter

public RemoveTagFilter()

RemoveTagFilter

public RemoveTagFilter(java.lang.String tagName)

RemoveTagFilter

public RemoveTagFilter(javax.swing.text.html.HTML.Tag theTag)

RemoveTagFilter

public RemoveTagFilter(java.lang.String[] tagNames)
Method Detail

addTags

public void addTags(java.lang.String[] tagNames)

addTag

public void addTag(javax.swing.text.html.HTML.Tag theTag)

addTag

public void addTag(java.lang.String tagName)

processEvents

public java.util.ArrayList processEvents(java.util.ArrayList events)
Description copied from interface: HTMLEventProcessor
Process a list of HTMLEvents return a modified list.

Specified by:
processEvents in interface HTMLEventProcessor
Returns:
Modified list of HTMLEvent objects.

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable