214 IBM Content Manager OnDemand Guide
9.2.6  Advanced implementation: Custom Java interface
By using the advanced implementation of the Generic Transform Interface, client developers 
can write a Java interface to ODWEK that can handle the transform requests in a 
programmatic way, offering the most application flexibility. Developers can create a class and 
implement the transformData() method to accept document data and details from Content 
Manager OnDemand and transform the data in any way they choose.
Example 9-3 shows a sample of the ODTransform.xml files that can be used in this 
implementation.
Example 9-3   Sample ODTransform.xml file
<Transforms>
    <transform>
    <TransformName>MYTXFRM</TransformName>
    <TransformDescription>GENERIC Transform Engine.</TransformDescription>
    <ClientClass>com.companyA.corp.TransformClient</ClientClass>
    <OutputMimeType>application/pdf</OutputMimeType>
    <OutputExtension>pdf</OutputExtension>
    <CmdParms>
      <AG_NAME>agName</AG_NAME>
      <APPL_NAME>applName</APPL_NAME>
      <RECORDFORMAT>recfmt</RECORDFORMAT>
      <RECORDLENGTH>LineLength</RECORDLENGTH>
      <CARRIAGECONTROL>CC</CARRIAGECONTROL>
      <CODEPAGE>CodePage</CODEPAGE>
    </CmdParms>
    </transform>
</Transforms>
Similar to the basic implementation, the developer uses this XML stanza to set up the 
required details for document transformation and how those details are passed to the Java 
transform interface. Example 9-4 shows an example of how the Java interface can be used 
with the XML stanza to create a document transform request. The example is a code snippet 
of how the Client Class that is defined in Example 9-3 might be written to transform data.
Example 9-4   Client Class code snippet for transform data
//*******************************************************************
// Testcase:  CustomTransform
//
// This class tests the ODWEK Generic Transform's Custom
// Java Interface by implementing the required transformData method.
//
// transformData is called by ODWEK when its corresponding custom
// viewer is called via ODHit.retrieve.
//*******************************************************************
import java.util.*;
Note: Inheritance is not supported. If an <ApplicationGroup> node is matched, only those 
options within that node are used for the transform; no parameters that are identified for a 
parent transform node are used. Similarly, if an <Application> node is matched within an 
<ApplicationGroup> node, only those options are used for the transform; nothing from the 
<ApplicationGroup> node is used.