Skip navigation links


com.fatwire.transformer.common
Interface DocumentTransformer


public interface DocumentTransformer

This represent the Document to be transformed. It can have various implementation based on the output of the document file type (TEXT/HTML/XML/PDF).


Method Summary
 java.io.InputStream getBytesAsStream(java.lang.String filename, TransformerFormat outputformat)
          Deprecated. -Don't use this.
 java.lang.String getOutputDocument(java.lang.String filename, java.lang.String inputFileExt, TransformerFormat outputformat)
          This returns path for the transformed document.
 java.lang.String getOutputDocument(java.lang.String filename, TransformerFormat outputformat)
          This returns path for the transformed document.
 void release()
          This should be called after the document being transformed to release any resource associated with it.
 void setConfiguration(Configuration configuration)
          This method allows to set the transformer level properties.

 

Method Detail

setConfiguration

void setConfiguration(Configuration configuration)
This method allows to set the transformer level properties.
Parameters:
configuration - -- specify supported transformerformat and transformer level properties

getBytesAsStream

java.io.InputStream getBytesAsStream(java.lang.String filename,
                                     TransformerFormat outputformat)
Deprecated. -Don't use this.
Read the document file and return back the InputStream of document.
Parameters:
filename - - Path of document file to be read ..
outputformat - - Output format of the document passed.
Returns:
InputStream of the output document

getOutputDocument

java.lang.String getOutputDocument(java.lang.String filename,
                                   TransformerFormat outputformat)
This returns path for the transformed document. Which can be further processed.
Parameters:
filename - - path of the document to be transformed
outputformat- - Output format of the document transformed
Returns:
path of the document converted in the specified format password

getOutputDocument

java.lang.String getOutputDocument(java.lang.String filename,
                                   java.lang.String inputFileExt,
                                   TransformerFormat outputformat)
This returns path for the transformed document. Which can be further processed.
Parameters:
filename - - path of the document to be transformed
inputFileExt - -- extension of the input file type. There can be used when input file itself is not capable of specifying the format
outputformat- - Output format of the document transformed
Returns:
path of the document converted in the specified format password

release

void release()
This should be called after the document being transformed to release any resource associated with it.

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.