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


Java StreamInterface.getStepMeta方法代码示例

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


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

示例1: getData

import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入方法依赖的package包/类
/**
 * Copy information from the meta-data input to the dialog fields.
 */ 
public void getData()
{
	if (input.getSQL() != null) wSQL.setText(input.getSQL());
	if (input.getDatabaseMeta() != null) wConnection.setText(input.getDatabaseMeta().getName());
	wLimit.setText(Const.NVL(input.getRowLimit(), "")); //$NON-NLS-1$
	
    StreamInterface infoStream = input.getStepIOMeta().getInfoStreams().get(0);
    if (infoStream.getStepMeta()!=null)
       {
           wDatefrom.setText(infoStream.getStepname());
           wEachRow.setSelection(input.isExecuteEachInputRow());
       }
       else
       {
           wEachRow.setEnabled(false);
           wlEachRow.setEnabled(false);
       }
       
       wVariables.setSelection(input.isVariableReplacementActive());
       wLazyConversion.setSelection(input.isLazyConversionActive());
              
	wStepname.selectAll();
       setSQLToolTip();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:28,代码来源:TableInputDialog.java

示例2: getData

import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入方法依赖的package包/类
/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
  if (input.getSQL() != null)
    wSQL.setText(input.getSQL());
  if (input.getDatabaseMeta() != null)
    wConnection.setText(input.getDatabaseMeta().getName());
  wLimit.setText(Const.NVL(input.getRowLimit(), "")); //$NON-NLS-1$

  StreamInterface infoStream = input.getStepIOMeta().getInfoStreams().get(0);
  if (infoStream.getStepMeta() != null) {
    wDatefrom.setText(infoStream.getStepname());
    wEachRow.setSelection(input.isExecuteEachInputRow());
  } else {
    wEachRow.setEnabled(false);
    wlEachRow.setEnabled(false);
  }

  wVariables.setSelection(input.isVariableReplacementActive());
  wLazyConversion.setSelection(input.isLazyConversionActive());

  wStepname.selectAll();
  setSQLToolTip();
  setFlags();
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:27,代码来源:TableInputDialog.java

示例3: init

import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入方法依赖的package包/类
/**
 * @see StepInterface#init(org.pentaho.di.trans.step.StepMetaInterface , org.pentaho.di.trans.step.StepDataInterface)
 */
public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
  meta = (MultiMergeJoinMeta) smi;
  data = (MultiMergeJoinData) sdi;

  if ( super.init( smi, sdi ) ) {
    StepIOMetaInterface stepIOMeta = meta.getStepIOMeta();
    String[] inputStepNames = meta.getInputSteps();
    String inputStepName;
    List<StreamInterface> infoStreams = stepIOMeta.getInfoStreams();
    StreamInterface stream;
    for ( int i = 0; i < infoStreams.size(); i++ ) {
      inputStepName = inputStepNames[i];
      stream = infoStreams.get( i );
      if ( stream.getStepMeta() == null ) {
        logError( BaseMessages.getString( PKG, "MultiMergeJoin.Log.UnableToFindReferenceStream", inputStepName ) );
        return false;
      }
    }
    String joinType = meta.getJoinType();
    for ( int i = 0; i < MultiMergeJoinMeta.join_types.length; ++i ) {
      if ( joinType.equalsIgnoreCase( MultiMergeJoinMeta.join_types[i] ) ) {
        data.optional = MultiMergeJoinMeta.optionals[i];
        return true;
      }
    }
    logError( BaseMessages.getString( PKG, "MultiMergeJoin.Log.InvalidJoinType", meta.getJoinType() ) );
    return false;
  }
  return true;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:34,代码来源:MultiMergeJoin.java

示例4: getData

import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入方法依赖的package包/类
/**
 * Copy information from the meta-data input to the dialog fields.
 */
public void getData() {
  if ( input.getSQL() != null ) {
    wSQL.setText( input.getSQL() );
  }
  if ( input.getDatabaseMeta() != null ) {
    wConnection.setText( input.getDatabaseMeta().getName() );
  }
  wLimit.setText( Const.NVL( input.getRowLimit(), "" ) );

  StreamInterface infoStream = input.getStepIOMeta().getInfoStreams().get( 0 );
  if ( infoStream.getStepMeta() != null ) {
    wDatefrom.setText( infoStream.getStepname() );
    wEachRow.setSelection( input.isExecuteEachInputRow() );
  } else {
    wEachRow.setEnabled( false );
    wlEachRow.setEnabled( false );
  }

  wVariables.setSelection( input.isVariableReplacementActive() );
  wLazyConversion.setSelection( input.isLazyConversionActive() );

  setSQLToolTip();
  setFlags();

  wStepname.selectAll();
  wStepname.setFocus();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:31,代码来源:TableInputDialog.java

示例5: ok

import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入方法依赖的package包/类
private void ok()
{
	if (Const.isEmpty(wStepname.getText())) return;

	input.setMainStreamField(wMainStreamField.getText());
	input.setLookupField(wLookupField.getText());
	
	input.setAlgorithmType(FuzzyMatchMeta.getAlgorithmTypeByDesc(wAlgorithm.getText()));
	input.setCaseSensitive(wcaseSensitive.getSelection());
	input.setGetCloserValue(wgetCloserValue.getSelection());
	input.setMaximalValue(wmaxValue.getText());
	input.setMinimalValue(wminValue.getText());
	
	input.setOutputMatchField(wmatchField.getText());
	input.setOutputValueField(wvalueField.getText());
	input.setSeparator(wseparator.getText());
	
	
	int nrvalues           = wReturn.nrNonEmpty();
	input.allocate(nrvalues);
	if(isDebug()) logDebug(BaseMessages.getString(PKG, "FuzzyMatchDialog.Log.FoundFields",nrvalues+"")); //$NON-NLS-1$ //$NON-NLS-2$
	for (int i=0;i<nrvalues;i++)
	{
		TableItem item        = wReturn.getNonEmpty(i);
		input.getValue()[i]        = item.getText(1);
		input.getValueName()[i]    = item.getText(2);
		if (input.getValueName()[i]==null || input.getValueName()[i].length()==0)
			input.getValueName()[i] = input.getValue()[i];
	}
	
	StreamInterface infoStream = input.getStepIOMeta().getInfoStreams().get(0);
	infoStream.setStepMeta( transMeta.findStep( wStep.getText() ) );
	if (infoStream.getStepMeta()==null)
	{
		MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );
		if(Const.isEmpty(wStep.getText()))
			mb.setMessage(BaseMessages.getString(PKG, "FuzzyMatchDialog.NotStepSpecified.DialogMessage",wStep.getText())); 
		else
			mb.setMessage(BaseMessages.getString(PKG, "FuzzyMatchDialog.StepCanNotFound.DialogMessage",wStep.getText())); //$NON-NLS-1$ //$NON-NLS-2$
			
		mb.setText(BaseMessages.getString(PKG, "FuzzyMatchDialog.StepCanNotFound.DialogTitle")); //$NON-NLS-1$
		mb.open(); 
	}
	
	stepname = wStepname.getText(); // return value
	
	dispose();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:49,代码来源:FuzzyMatchDialog.java

示例6: ok

import org.pentaho.di.trans.step.errorhandling.StreamInterface; //导入方法依赖的package包/类
private void ok() {
  if ( Utils.isEmpty( wStepname.getText() ) ) {
    return;
  }

  input.setMainStreamField( wMainStreamField.getText() );
  input.setLookupField( wLookupField.getText() );

  input.setAlgorithmType( FuzzyMatchMeta.getAlgorithmTypeByDesc( wAlgorithm.getText() ) );
  input.setCaseSensitive( wcaseSensitive.getSelection() );
  input.setGetCloserValue( wgetCloserValue.getSelection() );
  input.setMaximalValue( wmaxValue.getText() );
  input.setMinimalValue( wminValue.getText() );

  input.setOutputMatchField( wmatchField.getText() );
  input.setOutputValueField( wvalueField.getText() );
  input.setSeparator( wseparator.getText() );

  int nrvalues = wReturn.nrNonEmpty();
  input.allocate( nrvalues );
  if ( isDebug() ) {
    logDebug( BaseMessages.getString( PKG, "FuzzyMatchDialog.Log.FoundFields", nrvalues + "" ) );
  }
  //CHECKSTYLE:Indentation:OFF
  for ( int i = 0; i < nrvalues; i++ ) {
    TableItem item = wReturn.getNonEmpty( i );
    input.getValue()[i] = item.getText( 1 );
    input.getValueName()[i] = item.getText( 2 );
    if ( input.getValueName()[i] == null || input.getValueName()[i].length() == 0 ) {
      input.getValueName()[i] = input.getValue()[i];
    }
  }

  StreamInterface infoStream = input.getStepIOMeta().getInfoStreams().get( 0 );
  infoStream.setStepMeta( transMeta.findStep( wStep.getText() ) );
  if ( infoStream.getStepMeta() == null ) {
    MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR );
    if ( Utils.isEmpty( wStep.getText() ) ) {
      mb.setMessage( BaseMessages.getString( PKG, "FuzzyMatchDialog.NotStepSpecified.DialogMessage", wStep
        .getText() ) );
    } else {
      mb.setMessage( BaseMessages.getString( PKG, "FuzzyMatchDialog.StepCanNotFound.DialogMessage", wStep
        .getText() ) );
    }

    mb.setText( BaseMessages.getString( PKG, "FuzzyMatchDialog.StepCanNotFound.DialogTitle" ) );
    mb.open();
  }

  stepname = wStepname.getText(); // return value

  dispose();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:54,代码来源:FuzzyMatchDialog.java


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