• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ResourceType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
@Override
public List<ResourceReference> getResourceDependencies(TransMeta transMeta, StepMeta stepInfo) {
   List<ResourceReference> references = new ArrayList<ResourceReference>(5);
   String realFilename = transMeta.environmentSubstitute(fileName);
   String realTransname = transMeta.environmentSubstitute(transName);
   ResourceReference reference = new ResourceReference(stepInfo);
   references.add(reference);
   
   if (!Const.isEmpty(realFilename)) {
     // Add the filename to the references, including a reference to this step meta data.
     //
     reference.getEntries().add( new ResourceEntry(realFilename, ResourceType.ACTIONFILE));
   } else if (!Const.isEmpty(realTransname)) {
     // Add the filename to the references, including a reference to this step meta data.
     //
     reference.getEntries().add( new ResourceEntry(realTransname, ResourceType.ACTIONFILE));
     references.add(reference);
   }
   return references;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:21,代码来源:MappingMeta.java


示例2: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
@Override
public List<ResourceReference> getResourceDependencies(TransMeta transMeta, StepMeta stepInfo) {
   List<ResourceReference> references = new ArrayList<ResourceReference>(5);
   ResourceReference reference = new ResourceReference(stepInfo);
   references.add(reference);

   //
   // Get the file path list from the FileInputList
   //
   String required[] = new String[fileName.length];
   boolean subdirs[] = new boolean[fileName.length]; // boolean arrays are defaulted to false.
   for (int i=0;i<required.length; required[i]="N", i++); //$NON-NLS-1$
   String[] textFiles = FileInputList.createFilePathList(transMeta, fileName, fileMask, required, subdirs);
   
   if ( textFiles!=null ) {
     for (int i=0; i<textFiles.length; i++) {
       reference.getEntries().add( new ResourceEntry(textFiles[i], ResourceType.FILE));
     }
   }
   return references;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:22,代码来源:XMLInputMeta.java


示例3: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
@Override
public List<ResourceReference> getResourceDependencies(TransMeta transMeta, StepMeta stepInfo) {
  List<ResourceReference> references = new ArrayList<ResourceReference>(5);
  String realFilename = transMeta.environmentSubstitute(fileName);
  String realTransname = transMeta.environmentSubstitute(transName);
  ResourceReference reference = new ResourceReference(stepInfo);
  references.add(reference);

  if (!Const.isEmpty(realFilename)) {
    // Add the filename to the references, including a reference to this step
    // meta data.
    //
    reference.getEntries().add(new ResourceEntry(realFilename, ResourceType.ACTIONFILE));
  } else if (!Const.isEmpty(realTransname)) {
    // Add the filename to the references, including a reference to this step
    // meta data.
    //
    reference.getEntries().add(new ResourceEntry(realTransname, ResourceType.ACTIONFILE));
    references.add(reference);
  }
  return references;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:23,代码来源:MappingMeta.java


示例4: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
@Override
public List<ResourceReference> getResourceDependencies(TransMeta transMeta, StepMeta stepInfo) {
   List<ResourceReference> references = new ArrayList<ResourceReference>(5);
   ResourceReference reference = new ResourceReference(stepInfo);
   references.add(reference);

   //
   // Get the file path list from the FileInputList
   //
   String required[] = new String[fileName.length];
   boolean subdirs[] = new boolean[fileName.length]; // boolean arrays are defaulted to false.
   for (int i=0;i<required.length; required[i]="N", i++); //$NON-NLS-1$
   String[] textFiles = FileInputList.createFilePathList(transMeta, fileName, fileMask, new String[] { null }, required, subdirs);
   
   if ( textFiles!=null ) {
     for (int i=0; i<textFiles.length; i++) {
       reference.getEntries().add( new ResourceEntry(textFiles[i], ResourceType.FILE));
     }
   }
   return references;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:XMLInputMeta.java


示例5: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
@Override
public List<ResourceReference> getResourceDependencies( TransMeta transMeta, StepMeta stepInfo ) {
  List<ResourceReference> references = new ArrayList<ResourceReference>( 5 );
  ResourceReference reference = new ResourceReference( stepInfo );
  references.add( reference );

  //
  // Get the file path list from the FileInputList
  //
  String[] required = new String[fileName.length];
  boolean[] subdirs = new boolean[fileName.length]; // boolean arrays are defaulted to false.
  for ( int i = 0; i < required.length; i++ ) {
    required[i] = "N";
  }
  String[] textFiles =
    FileInputList.createFilePathList( transMeta, fileName, fileMask, new String[] { null }, required, subdirs );

  if ( textFiles != null ) {
    for ( int i = 0; i < textFiles.length; i++ ) {
      reference.getEntries().add( new ResourceEntry( textFiles[i], ResourceType.FILE ) );
    }
  }
  return references;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:25,代码来源:XMLInputMeta.java


示例6: testTransformationDependencyList

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
public void testTransformationDependencyList() throws Exception {
  KettleEnvironment.init();
      
  TransMeta transMeta = new TransMeta("test/org/pentaho/di/resource/trans/General - Change log processing.ktr"); //$NON-NLS-1$
  List<ResourceReference> resourceReferences = transMeta.getResourceDependencies();
  // printResourceReferences(resourceReferences);    
  assertEquals(2, resourceReferences.size());
  ResourceReference genRef = null;
  for (ResourceReference look : resourceReferences) {
  	if (look.getReferenceHolder().getTypeId().equals("TextFileInput")) {
  		genRef = look;
  	}
  }
  assertNotNull(genRef);
  // System.out.println(genRef.toXml());
  
  ResourceHolderInterface refHolder = genRef.getReferenceHolder();
  assertEquals("TextFileInput", refHolder.getTypeId()); //$NON-NLS-1$
  
  List<ResourceEntry> entries = genRef.getEntries();
  assertEquals(1, entries.size());
  ResourceEntry theEntry = entries.get(0);
  assertEquals(ResourceType.FILE, theEntry.getResourcetype());
  assertTrue(theEntry.getResource().endsWith("changelog.txt")); //$NON-NLS-1$
  
}
 
开发者ID:bsspirit,项目名称:kettle-4.4.0-stable,代码行数:27,代码来源:ResourceDependencyTest.java


示例7: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
@Override
public List<ResourceReference> getResourceDependencies( TransMeta transMeta, StepMeta stepInfo ) {
  List<ResourceReference> references = new ArrayList<ResourceReference>( 5 );
  String realFilename = transMeta.environmentSubstitute( fileName );
  String realTransname = transMeta.environmentSubstitute( transName );
  ResourceReference reference = new ResourceReference( stepInfo );
  references.add( reference );

  if ( !Utils.isEmpty( realFilename ) ) {
    // Add the filename to the references, including a reference to this step
    // meta data.
    //
    reference.getEntries().add( new ResourceEntry( realFilename, ResourceType.ACTIONFILE ) );
  } else if ( !Utils.isEmpty( realTransname ) ) {
    // Add the filename to the references, including a reference to this step
    // meta data.
    //
    reference.getEntries().add( new ResourceEntry( realTransname, ResourceType.ACTIONFILE ) );
    references.add( reference );
  }
  return references;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:TransExecutorMeta.java


示例8: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
@Override
public List<ResourceReference> getResourceDependencies(TransMeta transMeta, StepMeta stepInfo) {
  List<ResourceReference> references = new ArrayList<ResourceReference>(5);
  String realFilename = transMeta.environmentSubstitute(fileName);
  String realTransname = transMeta.environmentSubstitute(jobName);
  ResourceReference reference = new ResourceReference(stepInfo);
  references.add(reference);

  if (!Const.isEmpty(realFilename)) {
    // Add the filename to the references, including a reference to this step
    // meta data.
    //
    reference.getEntries().add(new ResourceEntry(realFilename, ResourceType.ACTIONFILE));
  } else if (!Const.isEmpty(realTransname)) {
    // Add the filename to the references, including a reference to this step
    // meta data.
    //
    reference.getEntries().add(new ResourceEntry(realTransname, ResourceType.ACTIONFILE));
    references.add(reference);
  }
  return references;
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:23,代码来源:JobExecutorMeta.java


示例9: testTransformationDependencyList

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
@Test
public void testTransformationDependencyList() throws Exception {
  TransMeta transMeta = new TransMeta( "test/org/pentaho/di/resource/trans/General - Change log processing.ktr" );
  List<ResourceReference> resourceReferences = transMeta.getResourceDependencies();
  assertEquals( 2, resourceReferences.size() );
  ResourceReference genRef = null;
  for ( ResourceReference look : resourceReferences ) {
    if ( look.getReferenceHolder().getTypeId().equals( "TextFileInput" ) ) {
      genRef = look;
    }
  }
  assertNotNull( genRef );

  ResourceHolderInterface refHolder = genRef.getReferenceHolder();
  assertEquals( "TextFileInput", refHolder.getTypeId() );

  List<ResourceEntry> entries = genRef.getEntries();
  assertEquals( 1, entries.size() );
  ResourceEntry theEntry = entries.get( 0 );
  assertEquals( ResourceType.FILE, theEntry.getResourcetype() );
  assertTrue( theEntry.getResource().endsWith( "changelog.txt" ) );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:23,代码来源:ResourceDependencyIT.java


示例10: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
@Override
public List<ResourceReference> getResourceDependencies(TransMeta transMeta, StepMeta stepInfo) {
  List<ResourceReference> references = new ArrayList<ResourceReference>(5);

  ResourceReference reference = new ResourceReference(stepInfo);
  references.add(reference);
  if (!Const.isEmpty(filename)) {
    // Add the filename to the references, including a reference to this
    // step meta data.
    //
    reference.getEntries()
        .add(new ResourceEntry(transMeta.environmentSubstitute(filename), ResourceType.FILE));
  }
  return references;
}
 
开发者ID:carbondata,项目名称:carbondata,代码行数:16,代码来源:CsvInputMeta.java


示例11: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
  List<ResourceReference> references = super.getResourceDependencies(jobMeta);
  if (!Const.isEmpty(serverName)) {
    String realServerName = jobMeta.environmentSubstitute(serverName);
    ResourceReference reference = new ResourceReference(this);
    reference.getEntries().add( new ResourceEntry(realServerName, ResourceType.SERVER));
    references.add(reference);
  }
  return references;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:11,代码来源:JobEntrySFTPPUT.java


示例12: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
  List<ResourceReference> references = super.getResourceDependencies(jobMeta);
  if (connection != null) {
    ResourceReference reference = new ResourceReference(this);
    reference.getEntries().add( new ResourceEntry(connection.getHostname(), ResourceType.SERVER));
    reference.getEntries().add( new ResourceEntry(connection.getDatabaseName(), ResourceType.DATABASENAME));
    references.add(reference);
  }
  return references;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:11,代码来源:JobEntryWaitForSQL.java


示例13: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
  List<ResourceReference> references = super.getResourceDependencies(jobMeta);
  if ( (!Const.isEmpty(xslfilename)) && (!Const.isEmpty(xmlfilename)) ) {
    String realXmlFileName = jobMeta.environmentSubstitute(xmlfilename);
    String realXslFileName = jobMeta.environmentSubstitute(xslfilename);
    ResourceReference reference = new ResourceReference(this);
    reference.getEntries().add( new ResourceEntry(realXmlFileName, ResourceType.FILE));
    reference.getEntries().add( new ResourceEntry(realXslFileName, ResourceType.FILE));
    references.add(reference);
  }
  return references;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:13,代码来源:JobEntryXSLT.java


示例14: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta)
{
  List<ResourceReference> references = super.getResourceDependencies(jobMeta);
  if (!Const.isEmpty(servername)) 
  {
    String realServername = jobMeta.environmentSubstitute(servername);
    ResourceReference reference = new ResourceReference(this);
    reference.getEntries().add(new ResourceEntry(realServername, ResourceType.SERVER));
    references.add(reference);
  }
  return references;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:13,代码来源:JobEntryGetPOP.java


示例15: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
  List<ResourceReference> references = super.getResourceDependencies(jobMeta);
  if ((!Const.isEmpty(filename1)) && (!Const.isEmpty(filename2)) ) {
    String realFilename1 = jobMeta.environmentSubstitute(filename1);
    String realFilename2 = jobMeta.environmentSubstitute(filename2);
    ResourceReference reference = new ResourceReference(this);
    reference.getEntries().add( new ResourceEntry(realFilename1, ResourceType.FILE));
    reference.getEntries().add( new ResourceEntry(realFilename2, ResourceType.FILE));
    references.add(reference);
  }
  return references;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:13,代码来源:JobEntryFileCompare.java


示例16: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
  List<ResourceReference> references = super.getResourceDependencies(jobMeta);
  if (!Const.isEmpty(filename)) {
    String realFileName = jobMeta.environmentSubstitute(filename);
    ResourceReference reference = new ResourceReference(this);
    reference.getEntries().add( new ResourceEntry(realFileName, ResourceType.ACTIONFILE));
    references.add(reference);
  }
  return references;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:11,代码来源:JobEntryJob.java


示例17: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta)
{
  List<ResourceReference> references = super.getResourceDependencies(jobMeta);
  if (!Const.isEmpty(serverName)) 
  {
    String realServername = jobMeta.environmentSubstitute(serverName);
    ResourceReference reference = new ResourceReference(this);
    reference.getEntries().add(new ResourceEntry(realServername, ResourceType.SERVER));
    references.add(reference);
  }
  return references;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:13,代码来源:JobEntryFTP.java


示例18: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta)
{
  List<ResourceReference> references = super.getResourceDependencies(jobMeta);
  String realServername = jobMeta.environmentSubstitute(server);
  ResourceReference reference = new ResourceReference(this);
  reference.getEntries().add(new ResourceEntry(realServername, ResourceType.SERVER));
  references.add(reference);
  return references;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:10,代码来源:JobEntryMail.java


示例19: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
  List<ResourceReference> references = super.getResourceDependencies(jobMeta);
  if (!Const.isEmpty(hostname)) {
    String realServername = jobMeta.environmentSubstitute(hostname);
    ResourceReference reference = new ResourceReference(this);
    reference.getEntries().add( new ResourceEntry(realServername, ResourceType.SERVER));
    references.add(reference);
  }
  return references;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:11,代码来源:JobEntryPing.java


示例20: getResourceDependencies

import org.pentaho.di.resource.ResourceEntry.ResourceType; //导入依赖的package包/类
public List<ResourceReference> getResourceDependencies(JobMeta jobMeta) {
  List<ResourceReference> references = super.getResourceDependencies(jobMeta);
  if ( (!Const.isEmpty(xsdfilename)) && (!Const.isEmpty(xmlfilename)) ) {
    String realXmlFileName = jobMeta.environmentSubstitute(xmlfilename);
    String realXsdFileName = jobMeta.environmentSubstitute(xsdfilename);
    ResourceReference reference = new ResourceReference(this);
    reference.getEntries().add( new ResourceEntry(realXmlFileName, ResourceType.FILE));
    reference.getEntries().add( new ResourceEntry(realXsdFileName, ResourceType.FILE));
    references.add(reference);
  }
  return references;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:13,代码来源:JobEntryXSDValidator.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ItemAppleGold类代码示例发布时间:2022-05-22
下一篇:
Java Type类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap