com.raritantechnologies.HTML
Class AbstractPostProcessor

java.lang.Object
  extended bycom.raritantechnologies.HTML.AbstractPostProcessor
All Implemented Interfaces:
IConfigurable, IHTMLScraperProcessor
Direct Known Subclasses:
PostProcessorStub

public abstract class AbstractPostProcessor
extends java.lang.Object
implements IHTMLScraperProcessor

Base class for IHTMLScraperPostProcessors.

Abstract base class which implements standard IHTMLScraperProcessor processes: specifically XML output.


Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Constructor Summary
AbstractPostProcessor()
           
AbstractPostProcessor(IHTMLScraperProcessor childProcessor)
           
 
Method Summary
protected abstract  org.w3c.dom.Document doGetOutputDoc()
           
protected abstract  void doProcess(org.w3c.dom.Document doc)
           
 org.w3c.dom.Document getOutputDoc()
          Implements the getOutputDoc( ) method to provide standard processor chaining:
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void outputXML(java.io.Writer writer)
          Implements outputXML methods by delegating to abstract getOutputDoc.
 void outputXML(java.io.Writer writer, javax.xml.transform.Transformer transformer)
           
 void process(org.w3c.dom.Document doc)
          Implements the process method to cache the cookies (needed for post processing) passes to the subclass through the protected abstract doProcess( ) method.
 void setPostProcessor(IHTMLScraperProcessor postProcessor)
          Method allows post processors to be chained.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPostProcessor

public AbstractPostProcessor()

AbstractPostProcessor

public AbstractPostProcessor(IHTMLScraperProcessor childProcessor)
Method Detail

process

public void process(org.w3c.dom.Document doc)
Implements the process method to cache the cookies (needed for post processing) passes to the subclass through the protected abstract doProcess( ) method.

Specified by:
process in interface IHTMLScraperProcessor

getOutputDoc

public org.w3c.dom.Document getOutputDoc()
Implements the getOutputDoc( ) method to provide standard processor chaining:

Specified by:
getOutputDoc in interface IHTMLScraperProcessor

outputXML

public void outputXML(java.io.Writer writer)
Implements outputXML methods by delegating to abstract getOutputDoc.

Specified by:
outputXML in interface IHTMLScraperProcessor

outputXML

public void outputXML(java.io.Writer writer,
                      javax.xml.transform.Transformer transformer)
Specified by:
outputXML in interface IHTMLScraperProcessor

doProcess

protected abstract void doProcess(org.w3c.dom.Document doc)

doGetOutputDoc

protected abstract org.w3c.dom.Document doGetOutputDoc()

setPostProcessor

public void setPostProcessor(IHTMLScraperProcessor postProcessor)
Method allows post processors to be chained.

Specified by:
setPostProcessor in interface IHTMLScraperProcessor

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