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


Java StepIOMetaInterface.getInfoStreams方法代码示例

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


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

示例1: init

import org.pentaho.di.trans.step.StepIOMetaInterface; //导入方法依赖的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

示例2: drawLine

import org.pentaho.di.trans.step.StepIOMetaInterface; //导入方法依赖的package包/类
private void drawLine(StepMeta fs, StepMeta ts, TransHopMeta hi, boolean is_candidate) {
    int line[] = getLine(fs, ts);

    EColor col;
    ELineStyle linestyle=ELineStyle.SOLID;
    int activeLinewidth = linewidth; 
    
    if (is_candidate)
    {
        col = EColor.BLUE;
    }
    else
    {
        if (hi.isEnabled())
        {
            if (fs.isSendingErrorRowsToStep(ts))
            {
                col = EColor.RED;
                linestyle = ELineStyle.DOT;
                activeLinewidth = linewidth+1;
            }
            else
            {
            	col = EColor.BLACK;
            }
        }
        else
        {
            col = EColor.GRAY;
        }
    }
    if (hi.split) activeLinewidth = linewidth+2;

    // Check to see if the source step is an info step for the target step.
    //
    StepIOMetaInterface ioMeta = ts.getStepMetaInterface().getStepIOMeta();
    List<StreamInterface> infoStreams = ioMeta.getInfoStreams();
    if (!infoStreams.isEmpty()) {
    	// Check this situation, the source step can't run in multiple copies!
    	//
    	for (StreamInterface stream : infoStreams) {
    		if (fs.getName().equalsIgnoreCase(stream.getStepname())) {
    			// This is the info step over this hop!
    			//
    			if (fs.getCopies()>1) {
    				// This is not a desirable situation, it will always end in error.
    				// As such, it's better not to give feedback on it.
    				// We do this by drawing an error icon over the hop...
    				//
    				col=EColor.RED;
    			}
    		}
    	}
    }
    
    gc.setForeground(col);
    gc.setLineStyle(linestyle);
    gc.setLineWidth(activeLinewidth);
    
    drawArrow(line, fs, ts);
    
    if (hi.split) gc.setLineWidth(linewidth);

    gc.setForeground(EColor.BLACK);
    gc.setBackground(EColor.BACKGROUND);
    gc.setLineStyle(ELineStyle.SOLID);
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:68,代码来源:TransPainter.java

示例3: drawLine

import org.pentaho.di.trans.step.StepIOMetaInterface; //导入方法依赖的package包/类
private void drawLine( StepMeta fs, StepMeta ts, TransHopMeta hi, boolean is_candidate ) {
  int[] line = getLine( fs, ts );

  EColor col;
  ELineStyle linestyle = ELineStyle.SOLID;
  int activeLinewidth = linewidth;

  EImage arrow;
  if ( is_candidate ) {
    col = EColor.BLUE;
    arrow = EImage.ARROW_CANDIDATE;
  } else {
    if ( hi.isEnabled() ) {
      if ( fs.isSendingErrorRowsToStep( ts ) ) {
        col = EColor.RED;
        linestyle = ELineStyle.DASH;
        activeLinewidth = linewidth + 1;
        arrow = EImage.ARROW_ERROR;
      } else {
        col = EColor.HOP_DEFAULT;
        arrow = EImage.ARROW_DEFAULT;
      }
    } else {
      col = EColor.GRAY;
      arrow = EImage.ARROW_DISABLED;
    }
  }
  if ( hi.split ) {
    activeLinewidth = linewidth + 2;
  }

  // Check to see if the source step is an info step for the target step.
  //
  StepIOMetaInterface ioMeta = ts.getStepMetaInterface().getStepIOMeta();
  List<StreamInterface> infoStreams = ioMeta.getInfoStreams();
  if ( !infoStreams.isEmpty() ) {
    // Check this situation, the source step can't run in multiple copies!
    //
    for ( StreamInterface stream : infoStreams ) {
      if ( fs.getName().equalsIgnoreCase( stream.getStepname() ) ) {
        // This is the info step over this hop!
        //
        if ( fs.getCopies() > 1 ) {
          // This is not a desirable situation, it will always end in error.
          // As such, it's better not to give feedback on it.
          // We do this by drawing an error icon over the hop...
          //
          col = EColor.RED;
          arrow = EImage.ARROW_ERROR;
        }
      }
    }
  }

  gc.setForeground( col );
  gc.setLineStyle( linestyle );
  gc.setLineWidth( activeLinewidth );

  drawArrow( arrow, line, hi, fs, ts );

  if ( hi.split ) {
    gc.setLineWidth( linewidth );
  }

  gc.setForeground( EColor.BLACK );
  gc.setBackground( EColor.BACKGROUND );
  gc.setLineStyle( ELineStyle.SOLID );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:69,代码来源:TransPainter.java


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