net.sf.flatpack.util
Class FixedWidthParserUtils

java.lang.Object
  extended by net.sf.flatpack.util.FixedWidthParserUtils

public final class FixedWidthParserUtils
extends java.lang.Object

Collection of parser utilities related to the parsing of fixed width files.

 

Method Summary
static java.lang.String getCMDKey(java.util.Map columnMD, java.lang.String line)
          Deprecated. use the PZMetaData
static java.lang.String getCMDKey(MetaData columnMD, java.lang.String line)
          Returns the key to the list of ColumnMetaData objects.
static java.util.List splitFixedText(java.util.List columnMetaData, java.lang.String lineToParse)
          Splits up a fixed width line of text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

splitFixedText

public static java.util.List splitFixedText(java.util.List columnMetaData,
                                            java.lang.String lineToParse)
Splits up a fixed width line of text

Parameters:
columnMetaData - Collection of ColumnMetaData to parse the line
lineToParse - Line of text to be parsed against the ColumnMetaData
Returns:
List Collection of Strings. Each element representing a column

getCMDKey

public static java.lang.String getCMDKey(java.util.Map columnMD,
                                         java.lang.String line)
Deprecated. use the PZMetaData

Returns the key to the list of ColumnMetaData objects. Returns the correct MetaData per the mapping file and the data contained on the line

Parameters:
columnMD -
line -
Returns:
List - ColumMetaData

getCMDKey

public static java.lang.String getCMDKey(MetaData columnMD,
                                         java.lang.String line)
Returns the key to the list of ColumnMetaData objects. Returns the correct MetaData per the mapping file and the data contained on the line

Parameters:
columnMD -
line -
Returns:
List - ColumMetaData