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, wStepnamelogger| 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, toStringcheckSubclass, getParent, getStyle, getText, setTextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetMetaStore, setRepositoryfindTableItem, getFields, getFields, getFieldValues, getNewFieldNames, getParent, getPopulatedMeta, getTableItem, loadFields, loadRemainingFields, openGetFieldsSampleDataDialog, repopulateFieldsgetFieldNames, getFieldNamesImpl, getReader, loadFieldsImpl, logError, logErrorpublic static final int[] dateLengths
protected boolean firstClickOnDateLocale
public String open()
open in interface StepDialogInterfaceprotected 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)
CsvInputAwareStepDialogmassageFieldName in interface CsvInputAwareStepDialogpublic String[] getFieldNames(TextFileInputMeta meta)
GetFieldsCapableStepDialoggetFieldNames in interface GetFieldsCapableStepDialog<TextFileInputMeta>meta - the StepMetaTypepublic 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()
GetFieldsCapableStepDialogShell 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 CsvInputAwareStepDialogpublic LogChannel getLogChannel()
getLogChannel in interface CsvInputAwareStepDialogpublic TransMeta getTransMeta()
getTransMeta in interface CsvInputAwareStepDialoggetTransMeta in interface GetFieldsCapableStepDialog<TextFileInputMeta>public InputStream getInputStream(CsvInputAwareMeta meta)
CsvInputAwareStepDialogInputStream corresponding to the csv file, or null if the file cannot be read.getInputStream in interface CsvInputAwareStepDialogInputStream corresponding to the csv file, or null if the file cannot be readCopyright © 2019 Hitachi Vantara. All rights reserved.