当前位置: 首页>>代码示例>>Java>>正文


Java XBaseInputMeta.isAcceptingFilenames方法代码示例

本文整理汇总了Java中org.pentaho.di.trans.steps.xbaseinput.XBaseInputMeta.isAcceptingFilenames方法的典型用法代码示例。如果您正苦于以下问题:Java XBaseInputMeta.isAcceptingFilenames方法的具体用法?Java XBaseInputMeta.isAcceptingFilenames怎么用?Java XBaseInputMeta.isAcceptingFilenames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.trans.steps.xbaseinput.XBaseInputMeta的用法示例。

在下文中一共展示了XBaseInputMeta.isAcceptingFilenames方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getInfo

import org.pentaho.di.trans.steps.xbaseinput.XBaseInputMeta; //导入方法依赖的package包/类
public void getInfo(XBaseInputMeta meta) throws KettleStepException
{
	// copy info to Meta class (input)
	meta.setDbfFileName( wFilename.getText() );
	meta.setRowLimit( Const.toInt(wLimit.getText(), 0 ) );
       meta.setRowNrAdded( wAddRownr.getSelection() );
	meta.setRowNrField( wFieldRownr.getText() );

       meta.setIncludeFilename( wInclFilename.getSelection() );
       meta.setFilenameField( wInclFilenameField.getText() );

       meta.setAcceptingFilenames( wAccFilenames.getSelection() );
       meta.setAcceptingField( wAccField.getText() );
       meta.setAcceptingStep( transMeta.findStep( wAccStep.getText() ) );

	if (Const.isEmpty(meta.getDbfFileName()) && !meta.isAcceptingFilenames())
	{
		throw new KettleStepException(Messages.getString("XBaseInputDialog.Exception.SpecifyAFileToUse")); //$NON-NLS-1$
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:21,代码来源:XBaseInputDialog.java


示例2: getInfo

import org.pentaho.di.trans.steps.xbaseinput.XBaseInputMeta; //导入方法依赖的package包/类
public void getInfo(XBaseInputMeta meta) throws KettleStepException
{
	// copy info to Meta class (input)
	meta.setDbfFileName( wFilename.getText() );
	meta.setRowLimit( Const.toInt(wLimit.getText(), 0 ) );
       meta.setRowNrAdded( wAddRownr.getSelection() );
	meta.setRowNrField( wFieldRownr.getText() );

       meta.setIncludeFilename( wInclFilename.getSelection() );
       meta.setFilenameField( wInclFilenameField.getText() );

       meta.setAcceptingFilenames( wAccFilenames.getSelection() );
       meta.setAcceptingField( wAccField.getText() );
       meta.setAcceptingStep( transMeta.findStep( wAccStep.getText() ) );
       meta.setCharactersetName( wCharactersetName.getText() );
       
	if (Const.isEmpty(meta.getDbfFileName()) && !meta.isAcceptingFilenames())
	{
		throw new KettleStepException(BaseMessages.getString(PKG, "XBaseInputDialog.Exception.SpecifyAFileToUse")); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:XBaseInputDialog.java


示例3: getInfo

import org.pentaho.di.trans.steps.xbaseinput.XBaseInputMeta; //导入方法依赖的package包/类
public void getInfo( XBaseInputMeta meta ) throws KettleStepException {
  // copy info to Meta class (input)
  meta.setDbfFileName( wFilename.getText() );
  meta.setRowLimit( Const.toInt( wLimit.getText(), 0 ) );
  meta.setRowNrAdded( wAddRownr.getSelection() );
  meta.setRowNrField( wFieldRownr.getText() );

  meta.setIncludeFilename( wInclFilename.getSelection() );
  meta.setFilenameField( wInclFilenameField.getText() );

  meta.setAcceptingFilenames( wAccFilenames.getSelection() );
  meta.setAcceptingField( wAccField.getText() );
  meta.setAcceptingStep( transMeta.findStep( wAccStep.getText() ) );
  meta.setCharactersetName( wCharactersetName.getText() );

  if ( Utils.isEmpty( meta.getDbfFileName() ) && !meta.isAcceptingFilenames() ) {
    throw new KettleStepException( BaseMessages.getString( PKG, "XBaseInputDialog.Exception.SpecifyAFileToUse" ) );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:XBaseInputDialog.java


示例4: preview

import org.pentaho.di.trans.steps.xbaseinput.XBaseInputMeta; //导入方法依赖的package包/类
private void preview()
{
    // Create the XML input step
	try
	{
     XBaseInputMeta oneMeta = new XBaseInputMeta();
     getInfo(oneMeta);
	
        if (oneMeta.isAcceptingFilenames())
        {
            MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_INFORMATION);
            mb.setMessage(Messages.getString("XBaseInputDialog.Dialog.SpecifyASampleFile.Message")); // Nothing found that matches your criteria
            mb.setText(Messages.getString("XBaseInputDialog.Dialog.SpecifyASampleFile.Title")); // Sorry!
            mb.open();
            return;
        }
        
     TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
     
     EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), Messages.getString("XBaseInputDialog.PreviewSize.DialogTitle"), Messages.getString("XBaseInputDialog.PreviewSize.DialogMessage")); //$NON-NLS-1$ //$NON-NLS-2$
     int previewSize = numberDialog.open();
     if (previewSize>0)
     {
         TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
         progressDialog.open();
	
         Trans trans = progressDialog.getTrans();
         String loggingText = progressDialog.getLoggingText();
	
         if (!progressDialog.isCancelled())
         {
             if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
             {
             	EnterTextDialog etd = new EnterTextDialog(shell, Messages.getString("System.Dialog.PreviewError.Title"),   //$NON-NLS-1$
             			Messages.getString("System.Dialog.PreviewError.Message"), loggingText, true ); //$NON-NLS-1$
             	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();
     }
	}
	catch(Exception e)
	{
		new ErrorDialog(shell, Messages.getString("System.Dialog.PreviewError.Title"),  //$NON-NLS-1$
				Messages.getString("System.Dialog.PreviewError.Message"), e); //$NON-NLS-1$
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:51,代码来源:XBaseInputDialog.java


示例5: preview

import org.pentaho.di.trans.steps.xbaseinput.XBaseInputMeta; //导入方法依赖的package包/类
private void preview()
{
    // Create the XML input step
	try
	{
     XBaseInputMeta oneMeta = new XBaseInputMeta();
     getInfo(oneMeta);
	
        if (oneMeta.isAcceptingFilenames())
        {
            MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_INFORMATION);
            mb.setMessage(BaseMessages.getString(PKG, "XBaseInputDialog.Dialog.SpecifyASampleFile.Message")); // Nothing found that matches your criteria
            mb.setText(BaseMessages.getString(PKG, "XBaseInputDialog.Dialog.SpecifyASampleFile.Title")); // Sorry!
            mb.open();
            return;
        }
        
     TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(transMeta, oneMeta, wStepname.getText());
     
     EnterNumberDialog numberDialog = new EnterNumberDialog(shell, props.getDefaultPreviewSize(), BaseMessages.getString(PKG, "XBaseInputDialog.PreviewSize.DialogTitle"), BaseMessages.getString(PKG, "XBaseInputDialog.PreviewSize.DialogMessage")); //$NON-NLS-1$ //$NON-NLS-2$
     int previewSize = numberDialog.open();
     if (previewSize>0)
     {
         TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(shell, previewMeta, new String[] { wStepname.getText() }, new int[] { previewSize } );
         progressDialog.open();
	
         Trans trans = progressDialog.getTrans();
         String loggingText = progressDialog.getLoggingText();
	
         if (!progressDialog.isCancelled())
         {
             if (trans.getResult()!=null && trans.getResult().getNrErrors()>0)
             {
             	EnterTextDialog etd = new EnterTextDialog(shell, BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),   //$NON-NLS-1$
             			BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), loggingText, true ); //$NON-NLS-1$
             	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();
     }
	}
	catch(Exception e)
	{
		new ErrorDialog(shell, BaseMessages.getString(PKG, "System.Dialog.PreviewError.Title"),  //$NON-NLS-1$
				BaseMessages.getString(PKG, "System.Dialog.PreviewError.Message"), e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:51,代码来源:XBaseInputDialog.java


示例6: preview

import org.pentaho.di.trans.steps.xbaseinput.XBaseInputMeta; //导入方法依赖的package包/类
private void preview() {
  // Create the XML input step
  try {
    XBaseInputMeta oneMeta = new XBaseInputMeta();
    getInfo( oneMeta );

    if ( oneMeta.isAcceptingFilenames() ) {
      MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
      mb.setMessage( BaseMessages.getString( PKG, "XBaseInputDialog.Dialog.SpecifyASampleFile.Message" ) );
      mb.setText( BaseMessages.getString( PKG, "XBaseInputDialog.Dialog.SpecifyASampleFile.Title" ) );
      mb.open();
      return;
    }

    TransMeta previewMeta = TransPreviewFactory.generatePreviewTransformation(
      transMeta,
      oneMeta,
      wStepname.getText() );

    EnterNumberDialog numberDialog = new EnterNumberDialog( shell, props.getDefaultPreviewSize(),
      BaseMessages.getString( PKG, "XBaseInputDialog.PreviewSize.DialogTitle" ),
      BaseMessages.getString( PKG, "XBaseInputDialog.PreviewSize.DialogMessage" ) );
    int previewSize = numberDialog.open();
    if ( previewSize > 0 ) {
      TransPreviewProgressDialog progressDialog = new TransPreviewProgressDialog(
        shell,
        previewMeta,
        new String[] { wStepname.getText() },
        new int[] { previewSize } );
      progressDialog.open();

      Trans trans = progressDialog.getTrans();
      String loggingText = progressDialog.getLoggingText();

      if ( !progressDialog.isCancelled() ) {
        if ( trans.getResult() != null && trans.getResult().getNrErrors() > 0 ) {
          EnterTextDialog etd =
            new EnterTextDialog(
              shell, BaseMessages.getString( PKG, "System.Dialog.PreviewError.Title" ), BaseMessages
                .getString( PKG, "System.Dialog.PreviewError.Message" ), 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();
    }
  } catch ( Exception e ) {
    new ErrorDialog( shell, BaseMessages.getString( PKG, "System.Dialog.PreviewError.Title" ), BaseMessages
      .getString( PKG, "System.Dialog.PreviewError.Message" ), e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:57,代码来源:XBaseInputDialog.java



注:本文中的org.pentaho.di.trans.steps.xbaseinput.XBaseInputMeta.isAcceptingFilenames方法示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。