public class TextFileInputDialog extends BaseStepDialog implements StepDialogInterface, GetFieldsCapableStepDialog<TextFileInputMeta>, CsvInputAwareStepDialog
BaseStepDialog.FieldsChoiceDialogProvider
Modifier and Type | Field and Description |
---|---|
static int[] |
dateLengths |
protected boolean |
firstClickOnDateLocale |
backupChanged, baseStepMeta, BUTTON_ALIGNMENT_CENTER, BUTTON_ALIGNMENT_LEFT, BUTTON_ALIGNMENT_RIGHT, buttonAlignment, changed, databaseDialog, fdCancel, fdCreate, fdGet, fdlStepname, fdOK, fdPreview, fdSQL, fdStepname, log, loggingObject, lsCancel, lsCreate, lsDef, lsGet, lsOK, lsPreview, lsResize, lsSQL, metaStore, props, repository, shell, stepMeta, stepname, transMeta, variables, wCancel, wCreate, wGet, wlStepname, wOK, wPreview, wSQL, wStepname
logger
Constructor and Description |
---|
TextFileInputDialog(org.eclipse.swt.widgets.Shell parent,
Object in,
TransMeta transMeta,
String sname) |
Modifier and Type | Method and Description |
---|---|
CsvInputAwareImportProgressDialog |
getCsvImportProgressDialog(CsvInputAwareMeta meta,
int samples,
InputStreamReader reader) |
void |
getData(TextFileInputMeta meta)
Read the data from the TextFileInputMeta object and show it in this dialog.
|
void |
getData(TextFileInputMeta meta,
boolean copyStepname,
boolean reloadAllFields,
Set<String> newFieldNames) |
String[] |
getFieldNames(TextFileInputMeta meta)
Returns an array of incoming field names, or an empty array, if fields cannot be fetched, for some reason.
|
TableView |
getFieldsTable() |
InputStream |
getInputStream(CsvInputAwareMeta meta)
Returns the
InputStream corresponding to the csv file, or null if the file cannot be read. |
LogChannel |
getLogChannel() |
TextFileInputMeta |
getNewMetaInstance() |
org.eclipse.swt.widgets.Shell |
getShell()
Returns the
Shell of this dialog. |
TransMeta |
getTransMeta() |
static int |
guessIntLength(double d) |
static int |
guessPrecision(double d) |
String |
loadFieldsImpl(TextFileInputMeta meta,
int samples) |
String |
massageFieldName(String fieldName)
Custom handling of each field can be implemented here.
|
String |
open() |
void |
populateMeta(TextFileInputMeta inputMeta) |
void |
setFlags() |
protected void |
setLocales() |
void |
setMinimalWidth()
Sets the input width to minimal width...
|
void |
setMinimalWidth(TableView wFields)
Overloading setMinimalWidth() in order to test trim functionality
|
addConnectionLine, addConnectionLine, addConnectionLine, addConnectionLine, addDatabases, addDatabases, centerButtons, createHelpButton, dispose, generateFieldMapping, getButtonAlignment, getDatabaseDialog, getFieldsFromPrevious, getFieldsFromPrevious, getFieldsFromPrevious, getFieldsFromPrevious, getFieldsFromPrevious, getMetaStore, getModifyListenerTooltipText, getPathOf, getRepository, isBasic, isDebug, isDetailed, isRowLevel, leftAlignButtons, logBasic, logBasic, logDebug, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logMinimal, logRowlevel, logRowlevel, positionBottomButtons, positionBottomButtons, positionBottomRightButtons, rightAlignButtons, selectDatabase, setButtonPositions, setMetaStore, setMinimalShellHeight, setRepository, setShellImage, setSize, setSize, setSize, setSize, setTraverseOrder, storeScreenSize, toString
checkSubclass, getParent, getStyle, getText, setText
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setMetaStore, setRepository
findTableItem, getFields, getFields, getFieldValues, getNewFieldNames, getParent, getPopulatedMeta, getTableItem, loadFields, loadRemainingFields, openGetFieldsSampleDataDialog, repopulateFields
getFieldNames, getFieldNamesImpl, getReader, loadFieldsImpl, logError, logError
public static final int[] dateLengths
protected boolean firstClickOnDateLocale
public String open()
open
in interface StepDialogInterface
protected void setLocales()
public void setFlags()
public void getData(TextFileInputMeta meta)
meta
- The TextFileInputMeta object to obtain the data from.public void getData(TextFileInputMeta meta, boolean copyStepname, boolean reloadAllFields, Set<String> newFieldNames)
getData
in interface GetFieldsCapableStepDialog<TextFileInputMeta>
public String loadFieldsImpl(TextFileInputMeta meta, int samples)
loadFieldsImpl
in interface GetFieldsCapableStepDialog<TextFileInputMeta>
public String massageFieldName(String fieldName)
CsvInputAwareStepDialog
massageFieldName
in interface CsvInputAwareStepDialog
public String[] getFieldNames(TextFileInputMeta meta)
GetFieldsCapableStepDialog
getFieldNames
in interface GetFieldsCapableStepDialog<TextFileInputMeta>
meta
- the StepMetaType
public static int guessPrecision(double d)
public static int guessIntLength(double d)
public void setMinimalWidth()
public void setMinimalWidth(TableView wFields)
wFields
- mocked TableView to avoid wFields.nrNonEmpty() from throwing NullPointerExceptionpublic TableView getFieldsTable()
getFieldsTable
in interface GetFieldsCapableStepDialog<TextFileInputMeta>
TableView
containing step fieldspublic org.eclipse.swt.widgets.Shell getShell()
GetFieldsCapableStepDialog
Shell
of this dialog.getShell
in interface GetFieldsCapableStepDialog<TextFileInputMeta>
Shell
of this dialogpublic TextFileInputMeta getNewMetaInstance()
getNewMetaInstance
in interface GetFieldsCapableStepDialog<TextFileInputMeta>
public void populateMeta(TextFileInputMeta inputMeta)
populateMeta
in interface GetFieldsCapableStepDialog<TextFileInputMeta>
public CsvInputAwareImportProgressDialog getCsvImportProgressDialog(CsvInputAwareMeta meta, int samples, InputStreamReader reader)
getCsvImportProgressDialog
in interface CsvInputAwareStepDialog
public LogChannel getLogChannel()
getLogChannel
in interface CsvInputAwareStepDialog
public TransMeta getTransMeta()
getTransMeta
in interface CsvInputAwareStepDialog
getTransMeta
in interface GetFieldsCapableStepDialog<TextFileInputMeta>
public InputStream getInputStream(CsvInputAwareMeta meta)
CsvInputAwareStepDialog
InputStream
corresponding to the csv file, or null if the file cannot be read.getInputStream
in interface CsvInputAwareStepDialog
InputStream
corresponding to the csv file, or null if the file cannot be readCopyright © 2019 Hitachi Vantara. All rights reserved.