Customizing 275ToolsDemo

TIBCO Foresight® Translator Attachment Adapter consists of a customizable set of Java tools and a set of demos (275ToolsDemo and BW5Demo) that provide examples of how the tools can be used.

Modify 275ToolsDemo Scripts

The easiest way to run your own files through the Translator Attachment Adapter is to modify the Demo scripts provided with the Adapter.

  1. Copy and rename the folder 275ToolsDemo. DO NOT modify the files in the original 275ToolsDemo folder.

    For example copy 275ToolsDemo to My275Tools.

  2. Open the .sh or .bat file with a simple editing tool such as Notepad or vi. This example shows the Create275_5010.bat file.

  3. Edit the lines highlighted in blue to point to your own files. Parameters are listed in the table that follows.
    For example:
    • Creation example: java -jar 275ToolsDemo.jar -a "c:\Attachments\xray.jpg" -c "c:\InboundFiles\CDAOut.cda" -d "Test5010_275.xml" -e "275Out.edi"
    • Extraction example: java -jar 275ToolsDemo.jar -e "275Out.edi" -t "c:\ExtractedFiles" -x
  4. Save and close the file.
  5. Run the file as explained in the section Running the Demo found in Running the 275ToolsDemo on Windows or Running the 275ToolsDemo on AIX or Linux, as appropriate.
Note: If you have omitted a required parameter, you can see the following error: One or more required parameters are missing.

Command Parameters

This table lists the parameters for the creation .bat files found in 275ToolsDemo.

Parameter Description Example
-a "<filename>" Name of the file to be attached to the 275 BIN02 or BDS03. -a "c:\Attachments\xray.jpg"
-c "<filename>" Name of the CDA file to be attached to the 275 BIN02 or BDS03. -c "\Inbound275\CDAHeader.xml"
-d "<filename>" Name of the DDE file containing the information needed to build the 275. -d "Test5010_275.xml"
-e "<filename>" Name of the EDI file either created, or the name of the file used for BIN02 or BDS03 extraction. -e "275Out.edi"
-m "<filename>" Name of the translation map to be used when creating the 275. -m "275_Payload_XE.xml"
-sg "<filename>" Source guideline to be used when creating the 275. -sg "275_Payload.xsd"
-tg "<filename>" Target guideline to be used when creating the 275. -tg 275_Payload.std

This table lists the parameters for the extraction .bat files found in 275ToolsDemo.

Parameter Description Example
-b Base64 tag location for binary extraction. -b FileContents
-e "<filename>" Name of the EDI file either created, or the name of the file used for BIN02 or BDS03 extraction. -e "275Out.edi"
-m "<filename>" Name of the translation map to be used when creating the 275. -m "275_Payload_XE.xml"
-sg "<filename>" Source guideline to be used when creating the 275. -sg "275_Payload.xsd"
-t "<directory>" Target directory to be used when extracting the attachment from a 275. -t "c:\ExtractedFiles"
-tg "<filename>" Target guideline to be used when creating the 275. -tg 275_Payload.std
-x Directs 275Tools Demo to do BIN02 or BDS03 extraction, rather than 275 creation (default). java -jar 275ToolsDemo.jar -e "275Out.edi" -t "c:\ExtractedFiles" -x

Create your own Java Application using 275Tools Jar Files

Users with Java development experience may wish to create a custom Java application.

Note: If you plan to change the sample code, copy the project to a different directory. Sample files get reinstalled with each release.

Location Contents
275Tools_dist/275Tools.jar Java Jar file containing the various classes needed for the Translator Attachment Adapter. See the Javadoc files for details.
275Tools_dist/javadoc Directory containing HTML files needed for Javadoc.

The files in 275Tools_dist/javadoc contain descriptions of the Translator Attachment Adapter classes.

Java Class Description
CBWWrapper Offers high-level methods for creating 275 EDI files and extracting payloads from 275 EDI files.
CCDAHeader Sets up variable portions of an HL7 V3 CDA header.
CMimeAttachment MIME utilities for FS275Tools.
CTranslatorAPI Translator API methods for FS275Tools.
CXMLUtilities XML utility functions used for getting and setting values.