Class FFOIFileFormatter

java.lang.Object
com.nt.udc.ndk.node.OIFileFormatter
com.nt.udc.oi.node.flatfile.FFOIFileFormatter

public class FFOIFileFormatter extends OIFileFormatter
This class is responsible for properly formatting the output files of the FlatFile OI node. For each output file created, the initial entry into the file will be a header line detailing the fields contained in the following lines.
  • Constructor Details

    • FFOIFileFormatter

      public FFOIFileFormatter(LoggerIfc logr, OIFileWriter oiFileWriter, boolean bAddHeader)
      Construct a new FFOIFileFormatter. The OIFileWriter() object will create the output files.
      Parameters:
      logr - LoggerIfc() object providing access to the node's log file
      oiFileWriter - OIFileWriter() object responsible for file output and managing the output files.
      bAddHeader - Boolean flag to determine if adding header in the output files.
  • Method Details

    • writeToFile

      public void writeToFile(DCFieldContainer record) throws IOException
      This method will write the appropriately formatted data contained within the DCFieldContainer to the output file. When necessary, a file header line will also be written.
      Specified by:
      writeToFile in class OIFileFormatter
      Throws:
      IOException
    • fileOpening

      public void fileOpening(DCFieldContainer record) throws IOException
      Overrides OIFileFormatter.fileOpening(). This method will create the file header from the list of output field tags set by the node.
      Overrides:
      fileOpening in class OIFileFormatter
      Throws:
      IOException
    • setFieldContainer

      public void setFieldContainer(String container)
      Set the value used to 'wrap' the field values in the output file.
    • setFieldDelimiter

      public void setFieldDelimiter(String delimiter)
      Set the value used to separate the field values in the output file
    • setOutputFields

      public void setOutputFields(ArrayList aList)
      Set the String[] used to define the fields in the FFOIRecord.