org.xfp.filters.xml
Class FOProcessor

java.lang.Object
  extended byorg.xfp.AttributeContainer
      extended byorg.xfp.Filter
          extended byorg.xfp.filters.xml.FOProcessor

public class FOProcessor
extends Filter

Performs an XSL-FO trasformation using Apache FOP.

Version:
$Id: FOProcessor.java,v 1.1 2004/03/19 15:56:44 flaviotordini Exp $
Author:
Flavio Tordini
JAR Dependency:
Apache FOP

Nested Class Summary
 
Nested classes inherited from class org.xfp.Filter
Filter.OnErrorEnum, Filter.OnLoopErrorEnum
 
Field Summary
 
Fields inherited from class org.xfp.AttributeContainer
name, parentContainer
 
Constructor Summary
FOProcessor()
           
 
Method Summary
 byte[] execute(org.xml.sax.InputSource in)
          Executes this filter.
 byte[] execute(java.io.InputStream is)
          Executes this filter.
 byte[] execute(java.io.Reader reader)
          Executes this filter.
 byte[] execute(java.lang.String xml)
          Executes this filter.
 void reset()
          Resets filter status after execution.
 void setFormat(java.lang.String format)
          Sets the MIME type of the format to generate ex.
 void setOption(java.lang.String key, java.lang.String value)
          Sets a configuration option.
 void setPDFOption(java.lang.String key, java.lang.String value)
          Sets a configuration option.
 
Methods inherited from class org.xfp.Filter
getOnError, initialize, log, newInstance, perform, toString
 
Methods inherited from class org.xfp.AttributeContainer
configureAttributes, disposeAttributes, getAttributes, getFullName, getName, initializeAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FOProcessor

public FOProcessor()
Method Detail

execute

public byte[] execute(java.lang.String xml)
               throws java.lang.Exception
Executes this filter.

Parameters:
xml - A String containing XSL-FO
Returns:
A byte array containing ouput data.
Throws:
java.lang.Exception

execute

public byte[] execute(java.io.InputStream is)
               throws java.lang.Exception
Executes this filter.

Parameters:
is - An InputStream containing XSL-FO
Returns:
A byte array containing ouput data.
Throws:
java.lang.Exception

execute

public byte[] execute(java.io.Reader reader)
               throws java.lang.Exception
Executes this filter.

Parameters:
reader - A Reader containing XSL-FO
Returns:
A byte array containing ouput data.
Throws:
java.lang.Exception

execute

public byte[] execute(org.xml.sax.InputSource in)
               throws java.lang.Exception
Executes this filter.

Parameters:
in - Any InputSource containing XSL-FO
Returns:
A byte array containing ouput data.
Throws:
java.lang.Exception

reset

public void reset()
Description copied from class: Filter
Resets filter status after execution. This method is called after execute(), even in case of exceptions. Since a Filter instance may be reused (and actually is), you must use this method to reset all your class members to their default value.

Specified by:
reset in class Filter
See Also:
Filter.reset()

setFormat

public void setFormat(java.lang.String format)
Sets the MIME type of the format to generate ex. "application/pdf". Supported formats:

Parameters:
format - The format to set

setOption

public void setOption(java.lang.String key,
                      java.lang.String value)
Sets a configuration option.


setPDFOption

public void setPDFOption(java.lang.String key,
                         java.lang.String value)
Sets a configuration option.



Copyright © 2003-2004 XFP Team. All Rights Reserved.