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

Java ResourceNamingInterface类代码示例

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

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



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

示例1: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		// 

		// From : ${Internal.Transformation.Filename.Directory}/../foo/bar.txt
		// To   : /home/matt/test/files/foo/bar.txt
		//
		FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(filename));
		
		// If the file doesn't exist, forget about this effort too!
		//
		if (fileObject.exists()) {
			// Convert to an absolute path...
			// 
			filename = fileObject.getName().getPath();
			
			return filename;
		}
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:33,代码来源:FixedInputMeta.java


示例2: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		//
		// From : ${Internal.Transformation.Filename.Directory}/../foo/bar.data
		// To   : /home/matt/test/files/foo/bar.data
		//
		FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fileName));
			
		// If the file doesn't exist, forget about this effort too!
		//
		if (fileObject.exists()) {
			// Convert to an absolute path...
			// 
			fileName = resourceNamingInterface.nameResource(fileObject.getName().getBaseName(), fileObject.getParent().getName().getPath(), space.toString(), FileNamingType.DATA_FILE);
			
			return fileName;
		}
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:32,代码来源:SQLFileOutputMeta.java


示例3: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		//
		// From : ${Internal.Transformation.Filename.Directory}/../foo/bar.data
		// To   : /home/matt/test/files/foo/bar.data
		//
		FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fileName));
			
		// If the file doesn't exist, forget about this effort too!
		//
		if (fileObject.exists()) {
			// Convert to an absolute path...
			// 
			fileName = resourceNamingInterface.nameResource(fileObject.getName().getBaseName(), fileObject.getParent().getName().getPath(), space.toString(), FileNamingType.DATA_FILE);
			return fileName;
		}
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:31,代码来源:PropertyOutputMeta.java


示例4: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of the base path into an absolute path.
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		// 
		if (!Const.isEmpty(fileName)) {
			FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fileName));
			fileName = resourceNamingInterface.nameResource(fileObject.getName().getBaseName(), fileObject.getParent().getName().getPath(), space.toString(), FileNamingType.DATA_FILE);
		}
		
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:20,代码来源:XMLOutputMeta.java


示例5: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		// In case the name of the file comes from previous steps, forget about this!
		//
		
		// From : ${Internal.Transformation.Filename.Directory}/../foo/bar.xsd
		// To   : /home/matt/test/files/foo/bar.xsd
		//
		if (!Const.isEmpty(xsdFilename)) {
			FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(xsdFilename));
			xsdFilename = resourceNamingInterface.nameResource(fileObject.getName().getBaseName(), fileObject.getParent().getName().getPath(), space.toString(), FileNamingType.DATA_FILE);
			
			return xsdFilename;
		}
	
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:30,代码来源:XsdValidatorMeta.java


示例6: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of the base path into an absolute path.
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		// In case the name of the file comes from previous steps, forget about this!
		// 
		if (!fileNameInField) {
			
			if (!Const.isEmpty(fileName)) {
				FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fileName));
				fileName = resourceNamingInterface.nameResource(fileObject.getName().getBaseName(), fileObject.getParent().getName().getPath(), space.toString(), FileNamingType.DATA_FILE);
			}
		}
		
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:24,代码来源:TextFileOutputMeta.java


示例7: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of the base path into an absolute path.
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		// 
		if (!Const.isEmpty(filename)) {
			FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(filename));
			filename = resourceNamingInterface.nameResource(fileObject.getName().getBaseName(), fileObject.getParent().getName().getPath(), space.toString(), FileNamingType.DATA_FILE);
		}
		
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:20,代码来源:AccessOutputMeta.java


示例8: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		//
		// From : ${Internal.Transformation.Filename.Directory}/../foo/bar.data
		// To   : /home/matt/test/files/foo/bar.data
		//
		FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(filename));
			
		// If the file doesn't exist, forget about this effort too!
		//
		if (fileObject.exists()) {
			// Convert to an absolute path...
			// 
			filename = resourceNamingInterface.nameResource(fileObject.getName().getBaseName(), fileObject.getParent().getName().getPath(), space.toString(), FileNamingType.DATA_FILE);
			
			return filename;
		}
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:32,代码来源:CubeInputMeta.java


示例9: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		// In case the name of the file comes from previous steps, forget about this!
		//
		if (!isFoldernameDynamic) {
            for (int i=0;i<folderName.length;i++) {
              FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(folderName[i]), space);
              folderName[i] = resourceNamingInterface.nameResource(fileObject, space, true);
            }
		}
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:25,代码来源:GetSubFoldersMeta.java


示例10: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		// 
		// From : ${Internal.Transformation.Filename.Directory}/../foo/bar.txt
		// To   : /home/matt/test/files/foo/bar.txt
		//
		FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(filename), space);
		
           // If the file doesn't exist, forget about this effort too!
           //
           if (fileObject.exists()) {
               // Convert to an absolute path...
               // 
               filename = resourceNamingInterface.nameResource(fileObject, space, true);
               
               return filename;
           }
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:32,代码来源:FixedInputMeta.java


示例11: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		// In case the name of the file comes from previous steps, forget about this!
		// 
		if (!filefield) {
             
             // Replace the filename ONLY (folder or filename)
             // 
             for (int i=0;i<fileName.length;i++) {
               FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fileName[i]), space);
               fileName[i] = resourceNamingInterface.nameResource(fileObject, space, Const.isEmpty(fileMask[i]));
             }
           }
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:28,代码来源:GetFileNamesMeta.java


示例12: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		//
		// From : ${Internal.Transformation.Filename.Directory}/../foo/bar.data
		// To   : /home/matt/test/files/foo/bar.data
		//
		FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fileName), space);
			
		// If the file doesn't exist, forget about this effort too!
		//
		if (fileObject.exists()) {
			// Convert to an absolute path...
			// 
			fileName = resourceNamingInterface.nameResource(fileObject, space, true);
			
			return fileName;
		}
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:32,代码来源:SQLFileOutputMeta.java


示例13: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		//
           // Replace the filename ONLY (folder or filename)
           // 
           for (int i=0;i<fileName.length;i++) {
             FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fileName[i]), space);
             fileName[i] = resourceNamingInterface.nameResource(fileObject, space, Const.isEmpty(fileMask[i]));
           }
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:AccessInputMeta.java


示例14: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
@Override
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
     try {
       // The object that we're modifying here is a copy of the original!
       // So let's change the filename from relative to absolute by grabbing the file object...
       //
       if (!fileinfield) {
           for (int i=0;i<fileName.length;i++) {
             FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fileName[i]), space);
             fileName[i] = resourceNamingInterface.nameResource(fileObject, space, Const.isEmpty(fileMask[i]));
           }
       }
       return null;
     } catch (Exception e) {
         throw new KettleException(e); //$NON-NLS-1$
     }
   }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:18,代码来源:LoadFileInputMeta.java


示例15: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of the base path into an absolute path.
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions,
    ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
  try {
    // The object that we're modifying here is a copy of the original!
    // So let's change the filename from relative to absolute by grabbing the file object...
    // 
    if (!Const.isEmpty(fileName)) {
      FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fileName), space);
      fileName = resourceNamingInterface.nameResource(fileObject, space, true);
    }

    return null;
  } catch (Exception e) {
    throw new KettleException(e); //$NON-NLS-1$
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:21,代码来源:XMLOutputMeta.java


示例16: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		// In case the name of the file comes from previous steps, forget about this!
		//
		
		// From : ${Internal.Transformation.Filename.Directory}/../foo/bar.xsd
		// To   : /home/matt/test/files/foo/bar.xsd
		//
		if (!Const.isEmpty(xsdFilename)) {
			FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(xsdFilename), space);
			xsdFilename = resourceNamingInterface.nameResource(fileObject, space, true);
			return xsdFilename;
		}
	
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:29,代码来源:XsdValidatorMeta.java


示例17: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		// In case the name of the file comes from previous steps, forget about this!
		//
		if (!filefield) {
            for (int i=0;i<fileName.length;i++) {
              FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fileName[i]), space);
                 fileName[i] = resourceNamingInterface.nameResource(fileObject, space, Const.isEmpty(fileMask[i]));
            }
		}
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:25,代码来源:PropertyInputMeta.java


示例18: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of files into absolute paths OR it simply includes the resource in the ZIP file.
 * For now, we'll simply turn it into an absolute path and pray that the file is on a shared drive or something like that.

 * TODO: create options to configure this behavior 
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		//
		if (!filefield) {
            for (int i=0;i<fileName.length;i++) {
              FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fileName[i]), space);
              fileName[i] = resourceNamingInterface.nameResource(fileObject, space, Const.isEmpty(fileMask[i]));
            }
		}
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:LDIFInputMeta.java


示例19: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of the base path into an absolute path.
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		// In case the name of the file comes from previous steps, forget about this!
		// 
		if (!fileNameInField) {
			
			if (!Const.isEmpty(fileName)) {
				FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(fileName), space);
				fileName = resourceNamingInterface.nameResource(fileObject, space, true);
			}
		}
		
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:24,代码来源:TextFileOutputMeta.java


示例20: exportResources

import org.pentaho.di.resource.ResourceNamingInterface; //导入依赖的package包/类
/**
 * Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
 * So what this does is turn the name of the base path into an absolute path.
 */
public String exportResources(VariableSpace space, Map<String, ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository) throws KettleException {
	try {
		// The object that we're modifying here is a copy of the original!
		// So let's change the filename from relative to absolute by grabbing the file object...
		// 
		if (!Const.isEmpty(filename)) {
			FileObject fileObject = KettleVFS.getFileObject(space.environmentSubstitute(filename), space);
			filename = resourceNamingInterface.nameResource(fileObject, space, true) ;
		}
		
		return null;
	} catch (Exception e) {
		throw new KettleException(e); //$NON-NLS-1$
	}
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:20,代码来源:AccessOutputMeta.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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