com.raritantechnologies.HTML.filter
Class AddHeaderFilter

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

public class AddHeaderFilter
extends java.lang.Object
implements HTMLEventProcessor

EventProcessor element of an HTMLFilter. Inserts a header element before the </head> html tag.

XML Configuration Template:
  <EventProcessor class="com.raritantechnologies.HTML.filter.AddHeaderFilter" >
    <![CData[ The Header data ]]>
  </EventProcessor>
 

As an example, the following adds a "base" tag to a document so that relative urls can be resolved:

  <EventProcessor class="com.raritantechnologies.HTML.filter.AddHeaderFilter" >
     <![CData[<base href="http://www.somewhere.com">]]>
  </EventProcessor>
 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Constructor Summary
AddHeaderFilter()
           
AddHeaderFilter(java.lang.String header)
           
 
Method Summary
 java.lang.String getConfigurationXML()
           
 java.lang.String getHeader()
           
 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.
 void setHeader(java.lang.String header)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddHeaderFilter

public AddHeaderFilter()

AddHeaderFilter

public AddHeaderFilter(java.lang.String header)
Method Detail

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

setHeader

public void setHeader(java.lang.String header)

getHeader

public java.lang.String getHeader()

getConfigurationXML

public java.lang.String getConfigurationXML()