public class FlatFileMethods extends Object
Constructor and Description |
---|
FlatFileMethods() |
Modifier and Type | Method and Description |
---|---|
static io.toro.gloop.object.cursor.GloopCursor |
getDelimitedFileInputCursor(InputStream flatFileData,
String encoding,
char delimiter,
Character quoteCharacter,
Character commentCharacter,
Character escapeCharacter,
int firstRow,
boolean ignoreSurroundingSpaces,
boolean allowMissingColumnNames,
boolean ignoreEmptyLines,
String nullString,
String modelReferenceName,
io.toro.gloop.object.property.GloopModel modelTemplate,
String[] fieldNames,
String recordSeparator,
io.toro.gloop.engine.GloopExecutionContext context)
Returns a gloop cursor that's used to read in a delimited flat file
|
static io.toro.gloop.object.cursor.GloopCursor |
getDelimitedFileOutputCursor(OutputStream flatFileData,
String encoding,
char delimiter,
Character quoteCharacter,
String quoteMode,
Character escapeCharacter,
String nullString,
String modelReferenceName,
io.toro.gloop.object.property.GloopModel modelTemplate,
String[] fieldNames,
String recordSeparator,
boolean writeHeaderRecord,
io.toro.gloop.engine.GloopExecutionContext context)
Returns a GloopCursor that's used to write to a delimited flat file.
|
static io.toro.gloop.object.cursor.GloopCursor |
getExcelFileInputCursor(InputStream flatFileData,
int sheetNumber,
int firstDataRow,
String modelReferenceName,
io.toro.gloop.object.property.GloopModel modelTemplate,
String[] fieldNames,
io.toro.gloop.engine.GloopExecutionContext context) |
static io.toro.gloop.object.cursor.GloopCursor |
getExcelFileOutputCursor(OutputStream flatFileData,
String modelReferenceName,
io.toro.gloop.object.property.GloopModel modelTemplate,
String[] fieldNames,
boolean writeHeaderRecord,
io.toro.gloop.engine.GloopExecutionContext context)
Returns a gloop cursor that's used to read in a fixed width flat file
|
static io.toro.gloop.object.cursor.GloopCursor |
getFixedWidthFileInputCursor(InputStream flatFileData,
String encoding,
String recordSeparator,
char paddingCharacter,
boolean leftJustified,
int[] widths,
int firstDataRow,
String modelReferenceName,
io.toro.gloop.object.property.GloopModel modelTemplate,
String[] fieldNames,
io.toro.gloop.engine.GloopExecutionContext context)
Returns a gloop cursor that's used to read in a fixed width flat file
|
static io.toro.gloop.object.cursor.GloopCursor |
getFixedWidthOutputCursor(OutputStream flatFileData,
String encoding,
int[] widths,
String recordSeparator,
char paddingCharacter,
String modelReferenceName,
io.toro.gloop.object.property.GloopModel modelTemplate,
String[] fieldNames,
boolean leftJustified,
boolean writeHeaderRecord,
io.toro.gloop.engine.GloopExecutionContext context)
Returns a gloop cursor that's used to read in a fixed width flat file
|
static io.toro.gloop.object.cursor.GloopCursor |
getFlatFileInputCursor(InputStream flatFileData,
io.toro.gloop.flatfile.FlatFileDescriptor flatFileDescriptor,
io.toro.gloop.engine.GloopExecutionContext context) |
static io.toro.gloop.object.cursor.GloopCursor |
getFlatFileInputCursor(InputStream flatFileData,
String flatFileDescriptorName,
io.toro.gloop.engine.GloopExecutionContext context)
Returns a GloopCursor that's used to read in a flat file.
|
static io.toro.gloop.object.cursor.GloopCursor |
getFlatFileOutputCursor(OutputStream flatFileData,
String flatFileDescriptorName,
io.toro.gloop.engine.GloopExecutionContext context)
Returns a GloopCursor that's used to write to a flat file.
|
public static io.toro.gloop.object.cursor.GloopCursor getFlatFileInputCursor(InputStream flatFileData, String flatFileDescriptorName, io.toro.gloop.engine.GloopExecutionContext context) throws io.toro.gloop.exception.GloopException
flatFileData
- The flat file data that will be readflatFileDescriptorName
- The namespace of the flat file descriptorcontext
- The Gloop Execution Context, Gloop maps this automaticallyio.toro.gloop.exception.GloopException
public static io.toro.gloop.object.cursor.GloopCursor getFlatFileInputCursor(InputStream flatFileData, io.toro.gloop.flatfile.FlatFileDescriptor flatFileDescriptor, io.toro.gloop.engine.GloopExecutionContext context)
public static io.toro.gloop.object.cursor.GloopCursor getDelimitedFileInputCursor(InputStream flatFileData, @GloopParameter(defaultValue="UTF-8") String encoding, @GloopParameter(defaultValue=",") char delimiter, Character quoteCharacter, Character commentCharacter, Character escapeCharacter, @GloopParameter(defaultValue="0") int firstRow, @GloopParameter(defaultValue="false") boolean ignoreSurroundingSpaces, @GloopParameter(defaultValue="false") boolean allowMissingColumnNames, @GloopParameter(defaultValue="false") boolean ignoreEmptyLines, String nullString, String modelReferenceName, io.toro.gloop.object.property.GloopModel modelTemplate, String[] fieldNames, @GloopParameter(defaultValue="\n") String recordSeparator, io.toro.gloop.engine.GloopExecutionContext context)
flatFileData
- The flat file data that will be readencoding
- The encoding to be used. Default value is UTF-8delimiter
- Column delimiter. Default value is ,quoteCharacter
- Quote CharactercommentCharacter
- Character used to signify the start of a comment. If null commenting is disabledescapeCharacter
- Character used to escape other charactersfirstRow
- The 0 based index that signifies the first data row of the inputignoreSurroundingSpaces
- Ignore spaces around column values. If true, column values will be trimmedallowMissingColumnNames
- Specified whether missing column names are allowed when parsing the header lineignoreEmptyLines
- If true, empty lines will be ignorednullString
- A string signifying what a null value ismodelReferenceName
- A namespace to a model that is used to determine what the model of the cursor
will look likemodelTemplate
- An existing model to use to determine waht the model of the cursor will look
like. It's important that the value of the model is not null. To do this, make
sure the model is not an array, and has at least one property that has a
non-null valuefieldNames
- A string array of the field names. This will be used to create a gloop model
with the given names as it's propertiesrecordSeparator
- The character signifying the end of a record. Default value is \ncontext
- The Gloop Execution Context, Gloop maps this automaticallypublic static io.toro.gloop.object.cursor.GloopCursor getFixedWidthFileInputCursor(InputStream flatFileData, @GloopParameter(defaultValue="UTF-8") String encoding, @GloopParameter(defaultValue="\n") String recordSeparator, @GloopParameter(defaultValue=" ") char paddingCharacter, @GloopParameter(defaultValue="true") boolean leftJustified, int[] widths, @GloopParameter(defaultValue="0") int firstDataRow, String modelReferenceName, io.toro.gloop.object.property.GloopModel modelTemplate, String[] fieldNames, io.toro.gloop.engine.GloopExecutionContext context)
flatFileData
- The flat file data that will be readencoding
- The encoding to be used. Default value is UTF-8recordSeparator
- The character signifying the end of a record. Default value is \npaddingCharacter
- The character that's used to pad the columns. Default value is space. Used to remove
the padding when parsing column valuesleftJustified
- Specifies whether the values are left justified or not. Default value is truewidths
- An array of column widths to usefirstDataRow
- The 0 based index that ignifies the first data row of the inputmodelReferenceName
- A namespace to a model that is used to determine what the model of the cursor
will look likemodelTemplate
- An existing model to use to determine waht the model of the cursor will look
like. It's important that the value of the model is not null. To do this, make
sure the model is not an array, and has at least one property that has a
non-null valuefieldNames
- A string array of the field names. This will be used to create a gloop model
with the given names as it's propertiescontext
- The Gloop Execution Context, Gloop maps this automaticallypublic static io.toro.gloop.object.cursor.GloopCursor getExcelFileInputCursor(@GloopParameter(value="Input Stream of data") InputStream flatFileData, @GloopParameter(value="First Sheet, default 0. -1 will process all sheets",defaultValue="0") int sheetNumber, @GloopParameter(value="First Data row, default 0",defaultValue="0") int firstDataRow, @GloopParameter(value="Model reference name to use") String modelReferenceName, @GloopParameter(value="Model template to use") io.toro.gloop.object.property.GloopModel modelTemplate, String[] fieldNames, io.toro.gloop.engine.GloopExecutionContext context)
public static io.toro.gloop.object.cursor.GloopCursor getFlatFileOutputCursor(OutputStream flatFileData, String flatFileDescriptorName, io.toro.gloop.engine.GloopExecutionContext context)
flatFileData
- The OutputStream that the data will be written toflatFileDescriptorName
- The namespace of the flat file descriptorcontext
- The Gloop Execution Context, Gloop maps this automaticallypublic static io.toro.gloop.object.cursor.GloopCursor getDelimitedFileOutputCursor(OutputStream flatFileData, @GloopParameter(defaultValue="UTF-8") String encoding, @GloopParameter(defaultValue=",") char delimiter, Character quoteCharacter, @GloopParameter(defaultValue="All",choices={"All","Minimal","Non Numeric","None"}) String quoteMode, Character escapeCharacter, String nullString, String modelReferenceName, io.toro.gloop.object.property.GloopModel modelTemplate, String[] fieldNames, @GloopParameter(defaultValue="\n") String recordSeparator, @GloopParameter(defaultValue="true") boolean writeHeaderRecord, io.toro.gloop.engine.GloopExecutionContext context)
flatFileData
- The OutputStream that the data will be written toencoding
- The encoding to be used. Default value is UTF-8delimiter
- Column delimiter. Default value is ,quoteCharacter
- Quote CharacterquoteMode
- Tells the cursor how to quote column values. Choices are All, Minimal, Non
Numeric, and None. escapeCharacter
- Character used to escape other charactersnullString
- A string signifying what a null value ismodelReferenceName
- A namespace to a model that is used to determine what the model of the cursor
will look likemodelTemplate
- An existing model to use to determine waht the model of the cursor will look
like. It's important that the value of the model is not null. To do this, make
sure the model is not an array, and has at least one property that has a
non-null valuefieldNames
- A string array of the field names. This will be used to create a gloop model
with the given names as it's propertiesrecordSeparator
- The character signifying the end of a record. Default value is \nwriteHeaderRecord
- If true, a header record containing the column names will be writtencontext
- The Gloop Execution Context, Gloop maps this automaticallypublic static io.toro.gloop.object.cursor.GloopCursor getFixedWidthOutputCursor(OutputStream flatFileData, @GloopParameter(defaultValue="UTF-8") String encoding, int[] widths, @GloopParameter(defaultValue="\n") String recordSeparator, @GloopParameter(defaultValue=" ") char paddingCharacter, String modelReferenceName, io.toro.gloop.object.property.GloopModel modelTemplate, String[] fieldNames, @GloopParameter(defaultValue="true") boolean leftJustified, @GloopParameter(defaultValue="true") boolean writeHeaderRecord, io.toro.gloop.engine.GloopExecutionContext context)
flatFileData
- The OutputStream that the data will be written toencoding
- The encoding to be used. Default value is UTF-8widths
- An array of column widths to userecordSeparator
- The character signifying the end of a record. Default value is \npaddingCharacter
- The character that's used to pad the columns. Default value is space. Used to remove
the padding when parsing column valuesmodelReferenceName
- A namespace to a model that is used to determine what the model of the cursor
will look likemodelTemplate
- An existing model to use to determine waht the model of the cursor will look
like. It's important that the value of the model is not null. To do this, make
sure the model is not an array, and has at least one property that has a
non-null valuefieldNames
- A string array of the field names. This will be used to create a gloop model
with the given names as it's propertiesleftJustified
- Specifies whether the values are left justified or not. Default value is truewriteHeaderRecord
- If true, a header record containing the column names will be writtencontext
- The Gloop Execution Context, Gloop maps this automaticallypublic static io.toro.gloop.object.cursor.GloopCursor getExcelFileOutputCursor(OutputStream flatFileData, @GloopParameter(defaultValue="UTF-8") String modelReferenceName, io.toro.gloop.object.property.GloopModel modelTemplate, String[] fieldNames, @GloopParameter(defaultValue="true") boolean writeHeaderRecord, io.toro.gloop.engine.GloopExecutionContext context)
flatFileData
- The OutputStream that the data will be written tomodelReferenceName
- A namespace to a model that is used to determine what the model of the cursor
will look likemodelTemplate
- An existing model to use to determine waht the model of the cursor will look
like. It's important that the value of the model is not null. To do this, make
sure the model is not an array, and has at least one property that has a
non-null valuefieldNames
- A string array of the field names. This will be used to create a gloop model
with the given names as it's propertieswriteHeaderRecord
- If true, a header record containing the column names will be writtencontext
- The Gloop Execution Context, Gloop maps this automaticallyCopyright © 2019. All rights reserved.