• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java YamlInputField类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.pentaho.di.trans.steps.yamlinput.YamlInputField的典型用法代码示例。如果您正苦于以下问题:Java YamlInputField类的具体用法?Java YamlInputField怎么用?Java YamlInputField使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

YamlInputField类属于org.pentaho.di.trans.steps.yamlinput包,在下文中一共展示了YamlInputField类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getInfo

点赞 2

import org.pentaho.di.trans.steps.yamlinput.YamlInputField; //导入依赖的package包/类
private void getInfo(YamlInputMeta in) throws KettleException
{
	stepname = wStepname.getText(); // return value

	// copy info to TextFileInputMeta class (input)
	in.setRowLimit( Const.toLong(wLimit.getText(), 0L) );
	in.setFilenameField( wInclFilenameField.getText() );
	in.setRowNumberField( wInclRownumField.getText() );
	in.setAddResultFile( wAddResult.getSelection() );	
	in.setIncludeFilename( wInclFilename.getSelection() );
	in.setIncludeRowNumber( wInclRownum.getSelection() );
	in.setIgnoreEmptyFile(wIgnoreEmptyFile.getSelection() );
	in.setdoNotFailIfNoFile(wdoNotFailIfNoFile.getSelection());
	
	in.setInFields(wYAMLStreamField.getSelection());
	in.setIsAFile(wYAMLIsAFile.getSelection());
	in.setYamlField(wYAMLLField.getText());
	
	int nrFiles     = wFilenameList.getItemCount();
	int nrFields    = wFields.nrNonEmpty();
       
	in.allocate(nrFiles, nrFields);
	in.setFileName( wFilenameList.getItems(0) );
	in.setFileMask( wFilenameList.getItems(1) );
	in.setFileRequired(wFilenameList.getItems(2));
	in.setIncludeSubFolders(wFilenameList.getItems(3));

	for (int i=0;i<nrFields;i++)
	{
	    YamlInputField field = new YamlInputField();
	    
		TableItem item  = wFields.getNonEmpty(i);
           
		field.setName( item.getText(1) );
		field.setPath( item.getText(2) );
		field.setType( ValueMeta.getType(item.getText(3)) );
		field.setFormat( item.getText(4) );
		field.setLength( Const.toInt(item.getText(5), -1) );
		field.setPrecision( Const.toInt(item.getText(6), -1) );
		field.setCurrencySymbol( item.getText(7) );
		field.setDecimalSymbol( item.getText(8) );
		field.setGroupSymbol( item.getText(9) );
		field.setTrimType( YamlInputField.getTrimTypeByDesc(item.getText(10)) );

		in.getInputFields()[i] = field;
	}		
}
 

开发者ID:yintaoxue,
项目名称:read-open-source-code,
代码行数:48,
代码来源:YamlInputDialog.java

示例2: getInfo

点赞 2

import org.pentaho.di.trans.steps.yamlinput.YamlInputField; //导入依赖的package包/类
private void getInfo( YamlInputMeta in ) throws KettleException {
  stepname = wStepname.getText(); // return value

  // copy info to TextFileInputMeta class (input)
  in.setRowLimit( Const.toLong( wLimit.getText(), 0L ) );
  in.setFilenameField( wInclFilenameField.getText() );
  in.setRowNumberField( wInclRownumField.getText() );
  in.setAddResultFile( wAddResult.getSelection() );
  in.setIncludeFilename( wInclFilename.getSelection() );
  in.setIncludeRowNumber( wInclRownum.getSelection() );
  in.setIgnoreEmptyFile( wIgnoreEmptyFile.getSelection() );
  in.setdoNotFailIfNoFile( wdoNotFailIfNoFile.getSelection() );

  in.setInFields( wYAMLStreamField.getSelection() );
  in.setIsAFile( wYAMLIsAFile.getSelection() );
  in.setYamlField( wYAMLLField.getText() );

  int nrFiles = wFilenameList.getItemCount();
  int nrFields = wFields.nrNonEmpty();

  in.allocate( nrFiles, nrFields );
  in.setFileName( wFilenameList.getItems( 0 ) );
  in.setFileMask( wFilenameList.getItems( 1 ) );
  in.setFileRequired( wFilenameList.getItems( 2 ) );
  in.setIncludeSubFolders( wFilenameList.getItems( 3 ) );

  for ( int i = 0; i < nrFields; i++ ) {
    YamlInputField field = new YamlInputField();

    TableItem item = wFields.getNonEmpty( i );

    field.setName( item.getText( 1 ) );
    field.setPath( item.getText( 2 ) );
    field.setType( ValueMetaFactory.getIdForValueMeta( item.getText( 3 ) ) );
    field.setFormat( item.getText( 4 ) );
    field.setLength( Const.toInt( item.getText( 5 ), -1 ) );
    field.setPrecision( Const.toInt( item.getText( 6 ), -1 ) );
    field.setCurrencySymbol( item.getText( 7 ) );
    field.setDecimalSymbol( item.getText( 8 ) );
    field.setGroupSymbol( item.getText( 9 ) );
    field.setTrimType( YamlInputField.getTrimTypeByDesc( item.getText( 10 ) ) );

    //CHECKSTYLE:Indentation:OFF
    in.getInputFields()[i] = field;
  }
}
 

开发者ID:pentaho,
项目名称:pentaho-kettle,
代码行数:47,
代码来源:YamlInputDialog.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)