本文整理匯總了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);
}
示例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);
}
}
}
示例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;
}