當前位置: 首頁>>代碼示例>>Java>>正文


Java TransMeta.getSteps方法代碼示例

本文整理匯總了Java中org.pentaho.di.trans.TransMeta.getSteps方法的典型用法代碼示例。如果您正苦於以下問題:Java TransMeta.getSteps方法的具體用法?Java TransMeta.getSteps怎麽用?Java TransMeta.getSteps使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.pentaho.di.trans.TransMeta的用法示例。


在下文中一共展示了TransMeta.getSteps方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: transCopy

import org.pentaho.di.trans.TransMeta; //導入方法依賴的package包/類
/**
* 將指定轉換複製到KettleUtils中的資源庫 <br/>
* @author jingma
* @param jobName 轉換名稱
* @param jobPath 轉換路徑
   * @param fromRepository 來源資源庫
   * @param toRepository 目標資源庫
* @throws KettleException
*/
public static void transCopy(String transName,String transPath,Repository fromRepository,
           Repository toRepository) throws KettleException {
	TransMeta tm = KettleUtils.loadTrans(transName, transPath, fromRepository);
	for(StepMeta sm:tm.getSteps()){
		if(sm.isJobExecutor()){
			JobExecutorMeta jem = (JobExecutorMeta)sm.getStepMetaInterface();
			jobCopy(jem.getJobName(),jem.getDirectoryPath(),fromRepository,toRepository);
		}
		else if(sm.getStepMetaInterface() instanceof TransExecutorMeta){
			TransExecutorMeta te = (TransExecutorMeta)sm.getStepMetaInterface();
			transCopy(te.getTransName(), te.getDirectoryPath(),fromRepository,toRepository);
		}
	}
	if(!isDirectoryExist(toRepository,transPath)){
		//所在目錄不存在則創建
	    toRepository.createRepositoryDirectory(toRepository.findDirectory("/"), transPath);
	}
	tm.setRepository(toRepository);
	tm.setMetaStore(toRepository.getMetaStore());
	KettleUtils.saveTrans(toRepository,tm);
}
 
開發者ID:majinju,項目名稱:KettleEasyExpand,代碼行數:31,代碼來源:KettleUtils.java

示例2: clearStepDataSetIndicators

import org.pentaho.di.trans.TransMeta; //導入方法依賴的package包/類
public static final void clearStepDataSetIndicators(TransMeta transMeta) {
  for (StepMeta stepMeta : transMeta.getSteps()) {
    Map<String, String> attributes = stepMeta.getAttributes( DataSetConst.ATTR_GROUP_DATASET );
    if (attributes!=null) {
      attributes.remove( DataSetConst.ATTR_STEP_DATASET_INPUT );
      attributes.remove( DataSetConst.ATTR_STEP_DATASET_GOLDEN);
      attributes.remove( DataSetConst.ATTR_STEP_TWEAK);
    }
  }
}
 
開發者ID:mattcasters,項目名稱:pentaho-pdi-dataset,代碼行數:11,代碼來源:DataSetConst.java

示例3: createGraph

import org.pentaho.di.trans.TransMeta; //導入方法依賴的package包/類
public static Graph createGraph( EngineMetaInterface meta ) {
  if ( meta == null ) {
    return null;
  }
  Graph g = new TinkerGraph();
  if ( meta instanceof TransMeta ) {
    TransMeta transMeta = (TransMeta) meta;

    // Add nodes
    List<StepMeta> steps = transMeta.getSteps();
    if ( steps != null ) {
      for ( StepMeta step : steps ) {
        Vertex v = g.addVertex( step.getName() );
        v.setProperty( PROPERTY_NAME, step.getName() );
        v.setProperty( PROPERTY_PLUGINID, step.getStepID() );
        Point location = step.getLocation();
        v.setProperty( PROPERTY_X, location.x );
        v.setProperty( PROPERTY_Y, location.y );
        v.setProperty( PROPERTY_REF, step );
      }
    }
    int numHops = transMeta.nrTransHops();
    for ( int i = 0; i < numHops; i++ ) {
      TransHopMeta hop = transMeta.getTransHop( i );
      StepMeta fromStep = hop.getFromStep();
      StepMeta toStep = hop.getToStep();
      Vertex fromV = g.getVertex( fromStep.getName() );
      Vertex toV = g.getVertex( toStep.getName() );
      g.addEdge( null, fromV, toV, EDGE_HOPSTO );
    }
  }
  return g;
}
 
開發者ID:mattyb149,項目名稱:pdi-layout,代碼行數:34,代碼來源:GraphUtils.java


注:本文中的org.pentaho.di.trans.TransMeta.getSteps方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。