org.ujac.print
Class DocumentTransformHelper

java.lang.Object
  extended by org.ujac.print.DocumentPrinter
      extended by org.ujac.print.DocumentTransformHelper

public class DocumentTransformHelper
extends DocumentPrinter

Name: DocumentTransformHelper
Description: A class which enables more efficient XML transform result processing.

Author:
lauerc

Constructor Summary
DocumentTransformHelper()
          Constructs a DocumentTransformHelper instance with specific attributes.
DocumentTransformHelper(DocumentTagFactory tagFactory)
          Constructs a DocumentTransformHelper instance with specific attributes.
DocumentTransformHelper(Map properties, DocumentTagFactory tagFactory)
          Constructs a DocumentTransformHelper instance with specific arguments.
 
Method Summary
 void finish()
          Finishes the document processing.
 Result prepare(OutputStream outputStream, boolean supportToc)
          Prepares for XSLT transformation using SAXResult.
 
Methods inherited from class org.ujac.print.DocumentPrinter
addDefaultProperties, clearProperties, createDocumentHandler, createXmlReader, getContentFilter, getExpectedNumberOfPages, getFormatHelper, getMetaData, getModules, getProperties, getResourceLoader, getTagFactory, getTagInterceptor, getTemplateInterpreter, getXmlReaderClass, isCacheImages, isEvaluateExpressions, isPageNumberingStartsAfterHead, isParseDynamicContent, isStrictlyCheckDocumentStructure, isTranslateEscapeSequences, loadModule, loadProperties, main, printDocument, printDocument, printDocument, removeInternalDocumentProperties, setCacheImages, setContentFilter, setDataAccessor, setEvaluateExpressions, setExpectedNumberOfPages, setFormatHelper, setMetaData, setPageNumberingStartsAfterHead, setParseDynamicContent, setProperties, setResourceLoader, setStrictlyCheckDocumentStructure, setTagFactory, setTagInterceptor, setTemplateInterpreter, setTemplateSource, setTemplateSource, setTranslateEscapeSequences, setXmlReaderClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentTransformHelper

public DocumentTransformHelper()
Constructs a DocumentTransformHelper instance with specific attributes. In case the system propery 'org.xml.sax.driver' is defined, overwrites the attribute xmlReaderClassName with that value. Switches off all dynamic content processing features, because these are not necessary for generated XML contents.


DocumentTransformHelper

public DocumentTransformHelper(DocumentTagFactory tagFactory)
Constructs a DocumentTransformHelper instance with specific attributes. In case the system propery 'org.xml.sax.driver' is defined, overwrites the attribute xmlReaderClassName with that value. Switches off all dynamic content processing features, because these are not necessary for generated XML contents.

Parameters:
tagFactory - The document tag factory.

DocumentTransformHelper

public DocumentTransformHelper(Map properties,
                               DocumentTagFactory tagFactory)
Constructs a DocumentTransformHelper instance with specific arguments. Switches off all dynamic content processing features, because these are not necessary for generated XML contents.

Parameters:
properties - The document's properties.
tagFactory - The document tag factory.
Method Detail

prepare

public Result prepare(OutputStream outputStream,
                      boolean supportToc)
               throws DocumentHandlerException,
                      IOException
Prepares for XSLT transformation using SAXResult.

Parameters:
outputStream - The output stream to which to write the document.
supportToc - Tells whether or not to support the output of a leading table of contents. Notice: if you use this option, the main document will be completely generated in memory, this may lead to problems if you process huge documents.
Returns:
Reference of the document handler, used for the document processing.
Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.

finish

public void finish()
            throws DocumentHandlerException,
                   IOException
Finishes the document processing. This is necessary in case TOC support has been switched on. Otherwise this method will do nothing.

Throws:
DocumentHandlerException - If something went wrong at document handling.
IOException - In case something went wrong during output.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.