be.re.repo
Interface InTransformerFactory


public interface InTransformerFactory

The interface for external transformers of non-XML streams. It is called when a document is read from the request stream and when the module is capable of doing a transformation between the requested MIME types. Such modules are declared in /configuration/maps.xml using the in-transformer element as in the following example:

 <in-transformer>
   <!-- Several path elements can come here. -->
   <from>
     <mime-type>text/plain</mime-type>
     <!-- Additional mime-type elements can come here. -->
   </from>
   <to>
     <mime-type>application/x-java-jnlp-file</mime-type>
     <!-- Additional mime-type elements can come here. -->
   </to>
   <sequence>
     <class>
       <name>be.re.repo.mod.CopyInTransformerFactory</name>
       <!-- Optional URL relative to maps.xml.
       <jar>modules/my_module.jar</jar>
     </class>
   </sequence>
 </in-transformer>
 
 

Author:
Werner Donné

Method Summary
 InputStream create(String vcr, String version, InputStream in, String fromMimeType, String toMimeType, Context context)
           
 

Method Detail

create

InputStream create(String vcr,
                   String version,
                   InputStream in,
                   String fromMimeType,
                   String toMimeType,
                   Context context)
                   throws IOException
Parameters:
vcr - the local path of the VCR.
version - the local path of the version.
in - the inputstream of the document.
fromMimeType - the MIME type of the request stream.
toMimeType - the MIME type of the document in the repository.
context - the repository context.
Returns:
The return value is an input stream which wraps in and performs the transformation.
Throws:
IOException