本文整理汇总了Java中org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta类的典型用法代码示例。如果您正苦于以下问题:Java GetFileNamesMeta类的具体用法?Java GetFileNamesMeta怎么用?Java GetFileNamesMeta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GetFileNamesMeta类属于org.pentaho.di.trans.steps.getfilenames包,在下文中一共展示了GetFileNamesMeta类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getInfo
import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; //导入依赖的package包/类
private void getInfo(GetFileNamesMeta in)
{
stepname = wStepname.getText(); // return value
int nrfiles = wFilenameList.getItemCount();
in.allocate(nrfiles);
in.setFileName(wFilenameList.getItems(0));
in.setFileMask(wFilenameList.getItems(1));
in.setFileRequired(wFilenameList.getItems(2));
in.setFilterFileType(wFilterFileType.getSelectionIndex());
in.setIncludeRowNumber( wInclRownum.getSelection() );
in.setAddResultFile( wAddResult.getSelection() );
in.setDynamicFilenameField( wFilenameField.getText() );
in.setDynamicWildcardField( wWildcardField.getText() );
in.setFileField(wFileField.getSelection() );
in.setRowNumberField( wInclRownumField.getText() );
in.setRowLimit( Const.toLong(wLimit.getText(), 0L) );
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:22,代码来源:GetFileNamesDialog.java
示例2: getInfo
import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; //导入依赖的package包/类
private void getInfo(GetFileNamesMeta in)
{
stepname = wStepname.getText(); // return value
int nrfiles = wFilenameList.getItemCount();
in.allocate(nrfiles);
in.setFileName(wFilenameList.getItems(0));
in.setFileMask(wFilenameList.getItems(1));
in.setExcludeFileMask(wFilenameList.getItems(2));
in.setFileRequired(wFilenameList.getItems(3));
in.setIncludeSubFolders(wFilenameList.getItems(4));
in.setFilterFileType(wFilterFileType.getSelectionIndex());
in.setIncludeRowNumber( wInclRownum.getSelection() );
in.setAddResultFile( wAddResult.getSelection() );
in.setDynamicFilenameField( wFilenameField.getText() );
in.setDynamicWildcardField( wWildcardField.getText() );
in.setFileField(wFileField.getSelection() );
in.setRowNumberField( wInclRownumField.getText() );
in.setRowLimit( Const.toLong(wLimit.getText(), 0L) );
in.setDynamicIncludeSubFolders(wIncludeSubFolder.getSelection());
in.setdoNotFailIfNoFile(wdoNotFailIfNoFile.getSelection());
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:25,代码来源:GetFileNamesDialog.java
示例3: getInfo
import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; //导入依赖的package包/类
private void getInfo( GetFileNamesMeta in ) {
stepname = wStepname.getText(); // return value
int nrfiles = wFilenameList.getItemCount();
in.allocate( nrfiles );
in.setFileName( wFilenameList.getItems( 0 ) );
in.setFileMask( wFilenameList.getItems( 1 ) );
in.setExcludeFileMask( wFilenameList.getItems( 2 ) );
in.setFileRequired( wFilenameList.getItems( 3 ) );
in.setIncludeSubFolders( wFilenameList.getItems( 4 ) );
in.setFilterFileType( FileInputList.FileTypeFilter.getByOrdinal( wFilterFileType.getSelectionIndex() ) );
in.setIncludeRowNumber( wInclRownum.getSelection() );
in.setAddResultFile( wAddResult.getSelection() );
in.setDynamicFilenameField( wFilenameField.getText() );
in.setDynamicWildcardField( wWildcardField.getText() );
in.setDynamicExcludeWildcardField( wExcludeWildcardField.getText() );
in.setFileField( wFileField.getSelection() );
in.setRowNumberField( wInclRownumField.getText() );
in.setRowLimit( Const.toLong( wLimit.getText(), 0L ) );
in.setDynamicIncludeSubFolders( wIncludeSubFolder.getSelection() );
in.setdoNotFailIfNoFile( wdoNotFailIfNoFile.getSelection() );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:25,代码来源:GetFileNamesDialog.java
示例4: getData
import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; //导入依赖的package包/类
/**
* Read the data from the TextFileInputMeta object and show it in this
* dialog.
*
* @param meta
* The TextFileInputMeta object to obtain the data from.
*/
public void getData(GetFileNamesMeta meta)
{
final GetFileNamesMeta in = meta;
if (in.getFileName() != null)
{
wFilenameList.removeAll();
for (int i = 0; i < in.getFileName().length; i++)
{
wFilenameList.add(new String[] { in.getFileName()[i], in.getFileMask()[i],
in.getFileRequired()[i] });
}
wFilenameList.removeEmptyRows();
wFilenameList.setRowNums();
wFilenameList.optWidth(true);
if (in.getFileTypeFilter() != null)
{
wFilterFileType.select(in.getFileTypeFilter().ordinal());
} else
{
wFilterFileType.select(0);
}
wInclRownum.setSelection(in.includeRowNumber());
wAddResult.setSelection(in.isAddResultFile());
wFileField.setSelection(in.isFileField());
if (in.getRowNumberField()!=null) wInclRownumField.setText(in.getRowNumberField());
if (in.getDynamicFilenameField()!=null) wFilenameField.setText(in.getDynamicFilenameField());
if (in.getDynamicWildcardField()!=null) wWildcardField.setText(in.getDynamicWildcardField());
wLimit.setText(""+in.getRowLimit());
}
wStepname.selectAll();
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:44,代码来源:GetFileNamesDialog.java
示例5: preview
import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; //导入依赖的package包/类
private void preview()
{
// Create the XML input step
GetFileNamesMeta oneMeta = new GetFileNamesMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname
.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), Messages.getString("GetFileNamesDialog.PreviewSize.DialogTitle"), Messages.getString("GetFileNamesDialog.PreviewSize.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize > 0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta,
new String[] { wStepname.getText() }, new int[] { previewSize });
progressDialog.open();
if (!progressDialog.isCancelled())
{
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (trans.getResult() != null && trans.getResult().getNrErrors() > 0)
{
EnterTextDialog etd = new EnterTextDialog(shell, Messages.getString("System.Dialog.Error.Title"), Messages.getString("GetFileNamesDialog.ErrorInPreview.DialogMessage"), loggingText, true);
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),progressDialog.getPreviewRowsMeta(wStepname.getText()),
progressDialog.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:37,代码来源:GetFileNamesDialog.java
示例6: preview
import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; //导入依赖的package包/类
private void preview()
{
// Create the XML input step
GetFileNamesMeta oneMeta = new GetFileNamesMeta();
getInfo(oneMeta);
TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname
.getText());
EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "GetFileNamesDialog.PreviewSize.DialogTitle"), BaseMessages.getString(PKG, "GetFileNamesDialog.PreviewSize.DialogMessage"));
int previewSize = numberDialog.open();
if (previewSize > 0)
{
TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta,
new String[] { wStepname.getText() }, new int[] { previewSize });
progressDialog.open();
if (!progressDialog.isCancelled())
{
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if (trans.getResult() != null && trans.getResult().getNrErrors() > 0)
{
EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.Error.Title"), BaseMessages.getString(PKG, "GetFileNamesDialog.ErrorInPreview.DialogMessage"), loggingText, true);
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd = new PreviewRowsDialog(shell, transMeta, SWT.NONE, wStepname.getText(),progressDialog.getPreviewRowsMeta(wStepname.getText()),
progressDialog.getPreviewRows(wStepname.getText()), loggingText);
prd.open();
}
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:37,代码来源:GetFileNamesDialog.java
示例7: preview
import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; //导入依赖的package包/类
private void preview() {
// Create the XML input step
GetFileNamesMeta oneMeta = new GetFileNamesMeta();
getInfo( oneMeta );
TransMeta previewMeta =
TransPreviewFactory.generatePreviewTransformation( transMeta, oneMeta, wStepname.getText() );
EnterNumberDialog numberDialog =
new EnterNumberDialog( shell, props.getDefaultPreviewSize(),
BaseMessages.getString( PKG, "GetFileNamesDialog.PreviewSize.DialogTitle" ),
BaseMessages.getString( PKG, "GetFileNamesDialog.PreviewSize.DialogMessage" ) );
int previewSize = numberDialog.open();
if ( previewSize > 0 ) {
TransPreviewProgressDialog progressDialog =
new TransPreviewProgressDialog(
shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
progressDialog.open();
if ( !progressDialog.isCancelled() ) {
Trans trans = progressDialog.getTrans();
String loggingText = progressDialog.getLoggingText();
if ( trans.getResult() != null && trans.getResult().getNrErrors() > 0 ) {
EnterTextDialog etd =
new EnterTextDialog( shell, BaseMessages.getString( PKG, "System.Dialog.Error.Title" ), BaseMessages
.getString( PKG, "GetFileNamesDialog.ErrorInPreview.DialogMessage" ), loggingText, true );
etd.setReadOnly();
etd.open();
}
PreviewRowsDialog prd =
new PreviewRowsDialog(
shell, transMeta, SWT.NONE, wStepname.getText(), progressDialog.getPreviewRowsMeta( wStepname
.getText() ), progressDialog.getPreviewRows( wStepname.getText() ), loggingText );
prd.open();
}
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:40,代码来源:GetFileNamesDialog.java
示例8: processGetFileNamesMeta
import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; //导入依赖的package包/类
/**
* @param stepsMeta
* @throws IOException
*/
private void processGetFileNamesMeta(List<StepMeta> stepsMeta) throws IOException {
for (StepMeta step : stepsMeta) {
if (step.getStepMetaInterface() instanceof GetFileNamesMeta) {
GetFileNamesMeta stepMetaInterface = (GetFileNamesMeta) step.getStepMetaInterface();
if (null != model.getCsvFilePath()) {
boolean checkIsFolder = GraphExecutionUtil.checkIsFolder(model.getCsvFilePath());
if (checkIsFolder) {
stepMetaInterface.setFileName(new String[] { model.getCsvFilePath() });
stepMetaInterface.setFileMask(new String[] { ".*\\.csv$|.*\\.inprogress" });
stepMetaInterface.setExcludeFileMask(new String[] { "1" });
} else {
//If absolute file path is provided for the data load and stopped in between then csv
// file will be
// changed to inprogress, and when next time server start then we need to check the
// file name extension.
// can contain .csv.inprogress file.
FileType fileType = FileFactory.getFileType(model.getCsvFilePath());
boolean exists = FileFactory.isFileExist(model.getCsvFilePath(), fileType);
if (exists) {
stepMetaInterface.setFileName(new String[] { model.getCsvFilePath() });
stepMetaInterface.setExcludeFileMask(new String[] { null });
} else {
stepMetaInterface.setFileName(new String[] {
model.getCsvFilePath() + CarbonCommonConstants.FILE_INPROGRESS_STATUS });
stepMetaInterface.setExcludeFileMask(new String[] { null });
}
}
} else if (model.isDirectLoad()) {
String[] files = new String[model.getFilesToProcess().size()];
int i = 0;
for (String file : model.getFilesToProcess()) {
files[i++] = file;
}
stepMetaInterface.setFileName(files);
}
break;
}
}
}
开发者ID:carbondata,项目名称:carbondata,代码行数:47,代码来源:DataGraphExecuter.java
示例9: GetFileNamesDialog
import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; //导入依赖的package包/类
public GetFileNamesDialog(Shell parent, Object in, TransMeta transMeta, String sname)
{
super(parent, (BaseStepMeta) in, transMeta, sname);
input = (GetFileNamesMeta) in;
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:6,代码来源:GetFileNamesDialog.java
示例10: getData
import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; //导入依赖的package包/类
/**
* Read the data from the TextFileInputMeta object and show it in this
* dialog.
*
* @param meta
* The TextFileInputMeta object to obtain the data from.
*/
public void getData(GetFileNamesMeta meta)
{
final GetFileNamesMeta in = meta;
if (in.getFileName() != null)
{
wFilenameList.removeAll();
for (int i=0;i<meta.getFileName().length;i++)
{
wFilenameList.add(new String[] { in.getFileName()[i], in.getFileMask()[i] ,
in.getExludeFileMask()[i],
in.getRequiredFilesDesc(in.getFileRequired()[i]),
in.getRequiredFilesDesc(in.getIncludeSubFolders()[i])} );
}
wdoNotFailIfNoFile.setSelection(in.isdoNotFailIfNoFile());
wFilenameList.removeEmptyRows();
wFilenameList.setRowNums();
wFilenameList.optWidth(true);
if (in.getFileTypeFilter() != null)
{
wFilterFileType.select(in.getFileTypeFilter().ordinal());
} else
{
wFilterFileType.select(0);
}
wInclRownum.setSelection(in.includeRowNumber());
wAddResult.setSelection(in.isAddResultFile());
wFileField.setSelection(in.isFileField());
if (in.getRowNumberField()!=null) wInclRownumField.setText(in.getRowNumberField());
if (in.getDynamicFilenameField()!=null) wFilenameField.setText(in.getDynamicFilenameField());
if (in.getDynamicWildcardField()!=null) wWildcardField.setText(in.getDynamicWildcardField());
wLimit.setText(""+in.getRowLimit());
wIncludeSubFolder.setSelection(in.isDynamicIncludeSubFolders());
}
wStepname.selectAll();
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:49,代码来源:GetFileNamesDialog.java
示例11: GetFileNamesDialog
import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; //导入依赖的package包/类
public GetFileNamesDialog( Shell parent, Object in, TransMeta transMeta, String sname ) {
super( parent, (BaseStepMeta) in, transMeta, sname );
input = (GetFileNamesMeta) in;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:5,代码来源:GetFileNamesDialog.java
示例12: getData
import org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta; //导入依赖的package包/类
/**
* Read the data from the GetFileNamesMeta object and show it in this dialog.
*
* @param meta
* The TextFileInputMeta object to obtain the data from.
*/
public void getData( GetFileNamesMeta meta ) {
final GetFileNamesMeta in = meta;
if ( in.getFileName() != null ) {
wFilenameList.removeAll();
for ( int i = 0; i < meta.getFileName().length; i++ ) {
wFilenameList.add( new String[] {
in.getFileName()[i], in.getFileMask()[i], in.getExludeFileMask()[i],
in.getRequiredFilesDesc( in.getFileRequired()[i] ),
in.getRequiredFilesDesc( in.getIncludeSubFolders()[i] ) } );
}
wdoNotFailIfNoFile.setSelection( in.isdoNotFailIfNoFile() );
wFilenameList.removeEmptyRows();
wFilenameList.setRowNums();
wFilenameList.optWidth( true );
if ( in.getFileTypeFilter() != null ) {
wFilterFileType.select( in.getFileTypeFilter().ordinal() );
} else {
wFilterFileType.select( 0 );
}
wInclRownum.setSelection( in.includeRowNumber() );
wAddResult.setSelection( in.isAddResultFile() );
wFileField.setSelection( in.isFileField() );
if ( in.getRowNumberField() != null ) {
wInclRownumField.setText( in.getRowNumberField() );
}
if ( in.getDynamicFilenameField() != null ) {
wFilenameField.setText( in.getDynamicFilenameField() );
}
if ( in.getDynamicWildcardField() != null ) {
wWildcardField.setText( in.getDynamicWildcardField() );
}
if ( in.getDynamicExcludeWildcardField() != null ) {
wExcludeWildcardField.setText( in.getDynamicExcludeWildcardField() );
}
wLimit.setText( "" + in.getRowLimit() );
wIncludeSubFolder.setSelection( in.isDynamicIncludeSubFolders() );
}
wStepname.selectAll();
wStepname.setFocus();
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:54,代码来源:GetFileNamesDialog.java
注:本文中的org.pentaho.di.trans.steps.getfilenames.GetFileNamesMeta类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论