Package com.nt.udc.oi.node.flatfile
Class FFOIFileFormatter
java.lang.Object
com.nt.udc.ndk.node.OIFileFormatter
com.nt.udc.oi.node.flatfile.FFOIFileFormatter
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.
-
Field Summary
Fields inherited from class com.nt.udc.ndk.node.OIFileFormatter
emptyFile, errMesg, logger, writer
-
Constructor Summary
ConstructorsConstructorDescriptionFFOIFileFormatter
(LoggerIfc logr, OIFileWriter oiFileWriter, boolean bAddHeader) Construct a newFFOIFileFormatter
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
fileOpening
(DCFieldContainer record) Overrides OIFileFormatter.fileOpening().void
setFieldContainer
(String container) Set the value used to 'wrap' the field values in the output file.void
setFieldDelimiter
(String delimiter) Set the value used to separate the field values in the output filevoid
setOutputFields
(ArrayList aList) Set the String[] used to define the fields in the FFOIRecord.void
writeToFile
(DCFieldContainer record) This method will write the appropriately formatted data contained within the DCFieldContainer to the output file.Methods inherited from class com.nt.udc.ndk.node.OIFileFormatter
fileClosing, getFileWriter, getFtpPusher, isHealthy, putToFile, readyToCycle, setFtpPusher, shutdown
-
Constructor Details
-
FFOIFileFormatter
Construct a newFFOIFileFormatter
. TheOIFileWriter()
object will create the output files.- Parameters:
logr
- LoggerIfc() object providing access to the node's log fileoiFileWriter
- 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
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 classOIFileFormatter
- Throws:
IOException
-
fileOpening
Overrides OIFileFormatter.fileOpening(). This method will create the file header from the list of output field tags set by the node.- Overrides:
fileOpening
in classOIFileFormatter
- Throws:
IOException
-
setFieldContainer
Set the value used to 'wrap' the field values in the output file. -
setFieldDelimiter
Set the value used to separate the field values in the output file -
setOutputFields
Set the String[] used to define the fields in the FFOIRecord.
-