/*
 * <!-- LICENSE_TEXT_START -->
The contents of this file are subject to the caAdapter Software License (the "License"). You may obtain a copy of the License at the following location: 
[caAdapter Home Directory]\docs\caAdapter_license.txt, or at:
http://ncicb.nci.nih.gov/infrastructure/cacore_overview/caadapter/indexContent/docs/caAdapter_License
* <!-- LICENSE_TEXT_END -->
 */
 
package gov.nih.nci.caadapter.hl7.v2v3.test;

import gov.nih.nci.caadapter.hl7.transformation.TransformationService;
import gov.nih.nci.caadapter.hl7.transformation.data.XMLElement;

import java.util.List;

/**
 * This class defines ...
 *
 * @author OWNER: Kisung Um
 * @author LAST UPDATE $Author: phadkes $
 * @version Since caAdapter v3.3
 *          revision    $Revision: 1.3 $
 *          date        Mar 6, 2008
 *          Time:       12:39:01 PM $
 */
public class TestTransformationServiceCSV_V3
{

    /**
     * Logging constant used to identify source of log entry, that could be later used to create
     * logging mechanism to uniquely identify the logged class.
     */
    private static final String LOGID = ": TestTransformationServiceCSV_V3.java,v $";

    /**
     * String that identifies the class version and solves the serial version UID problem.
     * This String is for informational purposes only and MUST not be made final.
     *
     * @see <a href="http://www.visi.com/~gyles19/cgi-bin/fom.cgi?file=63">JBuilder vice javac serial version UID</a>
     */
    public static String RCSID = ": /share/content/cvsroot/hl7sdk/src/gov/nih/nci/hl7/common/standard/impl/TestTransformationServiceCSV_V3.java,v 1.00 Mar 6, 2008 12:39:01 PM umkis Exp $";

    public TestTransformationServiceCSV_V3(String csv, String map)
    {
        TransformationService ts = new TransformationService(csv, map);
        List<XMLElement> msgs = null;
        try
        {
            msgs = ts.process();
        }
        catch(Exception ee)
        {
            System.out.println("Exception : " + ee.getMessage());
            ee.printStackTrace();
            return;
        }
        int n = 0;
        for(XMLElement msg:msgs)
        {
            n++;
            System.out.println("#### MESSAGE " + n + " #####");
            System.out.println(msg.toXML().toString());
        }
        System.out.println("\n#### Validation Results #####");
        System.out.println(ts.getValidatorResults().toString());

    }

    public static void main(String[] args)
    {
        String csv = "C:\\projects\\caadapter\\workingspace\\CDA\\POCD_MT000030.csv";
        String map = "C:\\projects\\caadapter\\workingspace\\CDA\\POCD_MT000030.map";
        new TestTransformationServiceCSV_V3(map, csv);
    }
}

/**
 * HISTORY      : : TestTransformationServiceCSV_V3.java,v $
 */

@@ -584,16 +584,37 @@
 il.List;
+%0Aimport java.io.File;
 %0A%0A/**%0A *
@@ -704,15 +704,16 @@
 or: 
-phadkes
+altturbo
  $%0A 
@@ -781,17 +781,17 @@
 sion: 1.
-3
+4
  $%0A *   
@@ -1823,16 +1823,113 @@
 v, map);
+%0A%0A//&umkis        ts.setSchemaValidation(true);%0A        ts.setOutputFile(new File(%22output.zip%22));
 %0A       
@@ -2757,16 +2757,341 @@
 30.map%22;
+%0A%0A        String v1 = %22%22;%0A        String v2 = %22%22;%0A        String v3 = %22%22;%0A%0A        try%0A        %7B%0A            v1 = args%5B0%5D;%0A            v2 = args%5B1%5D;%0A        %7D%0A        catch(Exception ee)%0A        %7B%0A            System.out.println(%22Usage : %3Ccommand%3E %5BCSV File%5D %5BMAP File%5D%22);%0A            v1 = csv;%0A            v2 = map;%0A        %7D
 %0A       
@@ -3131,16 +3131,14 @@
 _V3(
-map, csv
+v2, v1
 );%0A 

Change test