public final 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)
Return 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)
Return a Gloop cursor 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)
Return a Gloop cursor that's used to read in an Excel file.
|
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)
Return a Gloop cursor that's used to write to an Excel 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)
Return 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)
Return a Gloop cursor that's used to write to 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)
Return a Gloop cursor 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)
Return a Gloop cursor 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 (automatically mapped by Gloop)io.toro.gloop.exception.GloopException
- when a cursor cannot be producedpublic 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 is UTF-8delimiter
- the column delimiter; default is ,quoteCharacter
- the the quote character to use to usecommentCharacter
- 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
- flag for ignoring spaces around column values;
if true
, column values will be trimmedallowMissingColumnNames
- whether or not 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 used to determine what the model of the cursor will look like.
The value of the model should not be null
.
To ensure the model is non-null, the model should not be an array,
and should have at least one property that has a non-null value.fieldNames
- a string array of the flat file's field names; used to create a Gloop model
with the given names as its propertiesrecordSeparator
- the character signifying the end of a record; default is \ncontext
- the Gloop execution context (automatically mapped by Gloop)public 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 is UTF-8recordSeparator
- a character signifying the end of a record; default is \npaddingCharacter
- a character that's used to pad columns; default value is spaceleftJustified
- specifies whether or not the values are left-justified; default is true
widths
- an array of column widths to usefirstDataRow
- the 0-based index that signifies 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 used to determine what the model of the cursor will look like.
The value of the model should not be null
.
To ensure the model is non-null, the model should not be an array,
and should have at least one property that has a non-null value.fieldNames
- a string array of the flat file's field names; used to create a Gloop model
with the given names as its propertiescontext
- the Gloop execution context (automatically mapped by Gloop)public static io.toro.gloop.object.cursor.GloopCursor getExcelFileInputCursor(InputStream flatFileData, @GloopParameter(defaultValue="0") int sheetNumber, @GloopParameter(defaultValue="0") int firstDataRow, String modelReferenceName, io.toro.gloop.object.property.GloopModel modelTemplate, String[] fieldNames, io.toro.gloop.engine.GloopExecutionContext context)
flatFileData
- the Excel file that will be readsheetNumber
- the sheet to process; default is 0; a value of -1 will process all sheetsfirstDataRow
- the 0-based index that signifies the first data row of the input; default is 0modelReferenceName
- a namespace to a model that is used to determine what the model of the cursor
will look likemodelTemplate
- An existing model used to determine what the model of the cursor will look like.
The value of the model should not be null
.
To ensure the model is non-null, the model should not be an array,
and should have at least one property that has a non-null value.fieldNames
- a string array of the flat file's field names; used to create a Gloop model
with the given names as its propertiescontext
- the Gloop execution context (automatically mapped by Gloop)public static io.toro.gloop.object.cursor.GloopCursor getFlatFileOutputCursor(OutputStream flatFileData, String flatFileDescriptorName, io.toro.gloop.engine.GloopExecutionContext context)
flatFileData
- the output stream where data will be written toflatFileDescriptorName
- the namespace of the flat file descriptorcontext
- the Gloop execution context (automatically mapped by Gloop)public 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 output stream where data will be written toencoding
- the encoding to be used; default is UTF-8delimiter
- the column delimiter; default is ,quoteCharacter
- the quote character to usequoteMode
- 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 used to determine what the model of the cursor will look like.
The value of the model should not be null
.
To ensure the model is non-null, the model should not be an array,
and should have at least one property that has a non-null value.fieldNames
- a string array of the flat file's field names; used to create a Gloop model
with the given names as its propertiesrecordSeparator
- a character signifying the end of a record; default is \nwriteHeaderRecord
- if true
, a header record containing the column names will be writtencontext
- the Gloop execution context (automatically mapped by Gloop)public 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 output stream where data will be written toencoding
- the encoding to be used; default is UTF-8widths
- an array of column widths to userecordSeparator
- a character signifying the end of a record; default is \npaddingCharacter
- a character that's used to pad columns; default value is spacemodelReferenceName
- a namespace to a model that is used to determine what the model of the cursor
will look likemodelTemplate
- An existing model used to determine what the model of the cursor will look like.
The value of the model should not be null
.
To ensure the model is non-null, the model should not be an array,
and should have at least one property that has a non-null value.fieldNames
- a string array of the flat file's field names; used to create a Gloop model
with the given names as its propertiesleftJustified
- specifies whether or not the values are left-justified; default is true
writeHeaderRecord
- if true
, a header record containing the column names will be writtencontext
- the Gloop execution context (automatically mapped by Gloop)public static io.toro.gloop.object.cursor.GloopCursor getExcelFileOutputCursor(OutputStream flatFileData, String modelReferenceName, io.toro.gloop.object.property.GloopModel modelTemplate, String[] fieldNames, @GloopParameter(defaultValue="true") boolean writeHeaderRecord, io.toro.gloop.engine.GloopExecutionContext context)
flatFileData
- the output stream where 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 used to determine what the model of the cursor will look like.
The value of the model should not be null
.
To ensure the model is non-null, the model should not be an array,
and should have at least one property that has a non-null value.fieldNames
- a string array of the flat file's field names; used to create a Gloop model
with the given names as its propertieswriteHeaderRecord
- if true
, a header record containing the column names will be writtencontext
- the Gloop execution context (automatically mapped by Gloop)Copyright © 2020. All rights reserved.