com.jmw.tzap.filters
Class XSLTFilter

java.lang.Object
  extended by com.jmw.tzap.AbstractFilter
      extended by com.jmw.tzap.IteratingFilter
          extended by com.jmw.tzap.filters.XSLTFilter

public class XSLTFilter
extends IteratingFilter

Runs an XSL Transforation on a buffer


Field Summary
protected  java.lang.String xslfile
           
 
Fields inherited from class com.jmw.tzap.AbstractFilter
encoding, MSG_DEBUG, MSG_ERR, MSG_INFO, MSG_VERBOSE, MSG_WARN, task
 
Constructor Summary
XSLTFilter()
           
 
Method Summary
 void addParam(Param param)
           
 java.lang.StringBuffer doFilter(java.lang.StringBuffer sb, java.lang.String fileName)
          Converts the buffer to a Byte stream and feeds it to the xsl transformer
 void load()
          Assembles the xsl stylesheet
 void setStyleSheet(java.lang.String s)
           
 void unload()
          Does any clean up after the filter has been finished.
 void validateParameters()
          Validates any parameters needed by the child filters.
 
Methods inherited from class com.jmw.tzap.IteratingFilter
execute
 
Methods inherited from class com.jmw.tzap.AbstractFilter
getName, log, log, setEncoding, setTask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xslfile

protected java.lang.String xslfile
Constructor Detail

XSLTFilter

public XSLTFilter()
Method Detail

load

public void load()
Assembles the xsl stylesheet

Overrides:
load in class IteratingFilter

unload

public void unload()
Description copied from class: AbstractFilter
Does any clean up after the filter has been finished. Note; Only called once, when all files have been filtered.

Overrides:
unload in class IteratingFilter

doFilter

public java.lang.StringBuffer doFilter(java.lang.StringBuffer sb,
                                       java.lang.String fileName)
Converts the buffer to a Byte stream and feeds it to the xsl transformer

Specified by:
doFilter in class IteratingFilter
Parameters:
sb - the file to be filtered as a StringBuffer
fileName - the name that this file is called on disk
Returns:
the filtered file as a StringBuffer

validateParameters

public void validateParameters()
                        throws java.lang.Exception
Description copied from class: AbstractFilter
Validates any parameters needed by the child filters.

Specified by:
validateParameters in class AbstractFilter
Throws:
java.lang.Exception

setStyleSheet

public void setStyleSheet(java.lang.String s)

addParam

public void addParam(Param param)