本文整理汇总了Java中org.pentaho.di.core.ResultFile.setComment方法的典型用法代码示例。如果您正苦于以下问题:Java ResultFile.setComment方法的具体用法?Java ResultFile.setComment怎么用?Java ResultFile.setComment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.ResultFile
的用法示例。
在下文中一共展示了ResultFile.setComment方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prepareFile
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void prepareFile() throws KettleFileException
{
try {
String filename=environmentSubstitute(meta.getFilename());
if(meta.isAddToResultFiles())
{
// Add this to the result file names...
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, KettleVFS.getFileObject(filename, getTransMeta()), getTransMeta().getName(), getStepname());
resultFile.setComment("This file was created with a cube file output step");
addResultFile(resultFile);
}
data.fos=KettleVFS.getOutputStream(filename, getTransMeta(), false);
data.zip=new GZIPOutputStream(data.fos);
data.dos=new DataOutputStream(data.zip);
}
catch(Exception e) {
throw new KettleFileException(e);
}
}
示例2: prepareFile
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void prepareFile() throws KettleFileException {
try {
String filename = environmentSubstitute( meta.getFilename() );
if ( meta.isAddToResultFiles() ) {
// Add this to the result file names...
ResultFile resultFile =
new ResultFile(
ResultFile.FILE_TYPE_GENERAL, KettleVFS.getFileObject( filename, getTransMeta() ), getTransMeta()
.getName(), getStepname() );
resultFile.setComment( "This file was created with a cube file output step" );
addResultFile( resultFile );
}
data.fos = KettleVFS.getOutputStream( filename, getTransMeta(), false );
data.zip = new GZIPOutputStream( data.fos );
data.dos = new DataOutputStream( data.zip );
} catch ( Exception e ) {
throw new KettleFileException( e );
}
}
示例3: addFileToResultFilesname
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void addFileToResultFilesname(FileObject file) throws Exception {
if (meta.addResultFile()) {
// Add this to the result file names...
ResultFile resultFile = new ResultFile(
ResultFile.FILE_TYPE_GENERAL, file, getTransMeta()
.getName(), getStepname());
resultFile.setComment(BaseMessages.getString(PKG,
"FastJsonInput.Log.FileAddedResult"));
addResultFile(resultFile);
}
}
示例4: addFileToResultFilesname
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void addFileToResultFilesname(FileObject file) throws Exception
{
if(meta.addResultFile())
{
// Add this to the result file names...
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, file, getTransMeta().getName(), getStepname());
resultFile.setComment(Messages.getString("GetXMLData.Log.FileAddedResult"));
addResultFile(resultFile);
}
}
示例5: openNextFile
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void openNextFile() throws KettleException
{
// Close the last file before opening the next...
if (data.xbi!=null)
{
logBasic(Messages.getString("XBaseInput.Log.FinishedReadingRecords")); //$NON-NLS-1$
data.xbi.close();
}
// Replace possible environment variables...
data.file_dbf = data.files.getFile(data.fileNr);
data.fileNr++;
try
{
data.xbi=new XBase(KettleVFS.getInputStream(data.file_dbf));
data.xbi.setDbfFile(data.file_dbf.getName().getURI());
if (!Const.isEmpty(meta.getCharactersetName())) {
data.xbi.getReader().setCharactersetName(meta.getCharactersetName());
}
data.xbi.open();
logBasic(Messages.getString("XBaseInput.Log.OpenedXBaseFile")+" : ["+data.xbi+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
data.fields = data.xbi.getFields();
// Add this to the result file names...
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, data.file_dbf, getTransMeta().getName(), getStepname());
resultFile.setComment(Messages.getString("XBaseInput.ResultFile.Comment"));
addResultFile(resultFile);
}
catch(Exception e)
{
logError(Messages.getString("XBaseInput.Log.Error.CouldNotOpenXBaseFile1")+data.file_dbf+Messages.getString("XBaseInput.Log.Error.CouldNotOpenXBaseFile2")+e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
throw new KettleException(e);
}
}
示例6: OpenFile
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private boolean OpenFile() throws Exception
{
data.oneFileOpened=true;
String realFilename = environmentSubstitute(meta.getFilename());
if(log.isBasic())
logBasic(Messages.getString("AccessOutput.log.WritingToFile", realFilename));
FileObject fileObject = KettleVFS.getFileObject(realFilename);
File file = new File(KettleVFS.getFilename(fileObject));
// First open or create the access file
if (!file.exists())
{
if (meta.isFileCreated())
{
data.db = Database.create(file);
}
else
{
logError(Messages.getString("AccessOutput.InitError.FileDoesNotExist", realFilename));
return false;
}
}
else
{
data.db = Database.open(file);
}
// Add the filename to the result object...
//
if(meta.isAddToResultFiles())
{
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, fileObject, getTransMeta().getName(), toString());
resultFile.setComment("This file was created with an access output step");
addResultFile(resultFile);
}
return true;
}
示例7: addFileToResultFilesname
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void addFileToResultFilesname(FileObject file) throws Exception
{
if(meta.addResultFile())
{
// Add this to the result file names...
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, file, getTransMeta().getName(), getStepname());
resultFile.setComment("File was read by a LoadFileInput step");
addResultFile(resultFile);
}
}
示例8: addFileToResultFilesname
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void addFileToResultFilesname(FileObject file) throws Exception {
if(meta.addResultFile()) {
// Add this to the result file names...
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, file, getTransMeta().getName(), getStepname());
resultFile.setComment(BaseMessages.getString(PKG, "YamlInput.Log.FileAddedResult"));
addResultFile(resultFile);
}
}
示例9: addFileToResultFilesname
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void addFileToResultFilesname(FileObject file) throws Exception {
if(meta.addResultFile()) {
// Add this to the result file names...
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, file, getTransMeta().getName(), getStepname());
resultFile.setComment(BaseMessages.getString(PKG, "JsonInput.Log.FileAddedResult"));
addResultFile(resultFile);
}
}
示例10: addFileToResultFilesname
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void addFileToResultFilesname(FileObject file) throws Exception
{
if(meta.addResultFile())
{
// Add this to the result file names...
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, file, getTransMeta().getName(), getStepname());
resultFile.setComment(BaseMessages.getString(PKG, "GetXMLData.Log.FileAddedResult"));
addResultFile(resultFile);
}
}
示例11: openNextFile
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void openNextFile() throws KettleException
{
// Close the last file before opening the next...
if (data.xbi!=null)
{
logBasic(BaseMessages.getString(PKG, "XBaseInput.Log.FinishedReadingRecords")); //$NON-NLS-1$
data.xbi.close();
}
// Replace possible environment variables...
data.file_dbf = data.files.getFile(data.fileNr);
data.fileNr++;
try
{
data.xbi=new XBase(log, KettleVFS.getInputStream(data.file_dbf));
data.xbi.setDbfFile(data.file_dbf.getName().getURI());
data.xbi.open();
if (!Const.isEmpty(meta.getCharactersetName())) {
data.xbi.getReader().setCharactersetName(meta.getCharactersetName());
}
logBasic(BaseMessages.getString(PKG, "XBaseInput.Log.OpenedXBaseFile")+" : ["+data.xbi+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
data.fields = data.xbi.getFields();
// Add this to the result file names...
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, data.file_dbf, getTransMeta().getName(), getStepname());
resultFile.setComment(BaseMessages.getString(PKG, "XBaseInput.ResultFile.Comment"));
addResultFile(resultFile);
}
catch(Exception e)
{
logError(BaseMessages.getString(PKG, "XBaseInput.Log.Error.CouldNotOpenXBaseFile1")+data.file_dbf+BaseMessages.getString(PKG, "XBaseInput.Log.Error.CouldNotOpenXBaseFile2")+e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
throw new KettleException(e);
}
}
示例12: OpenFile
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private boolean OpenFile() throws Exception
{
data.oneFileOpened=true;
String realFilename = environmentSubstitute(meta.getFilename());
if(log.isBasic())
logBasic(BaseMessages.getString(PKG, "AccessOutput.log.WritingToFile", realFilename));
FileObject fileObject = KettleVFS.getFileObject(realFilename, getTransMeta());
File file = FileUtils.toFile(fileObject.getURL());
// First open or create the access file
if (!file.exists())
{
if (meta.isFileCreated())
{
data.db = Database.create(file);
}
else
{
logError(BaseMessages.getString(PKG, "AccessOutput.InitError.FileDoesNotExist", realFilename));
return false;
}
}
else
{
data.db = Database.open(file);
}
// Add the filename to the result object...
//
if(meta.isAddToResultFiles())
{
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, fileObject, getTransMeta().getName(), toString());
resultFile.setComment("This file was created with an access output step");
addResultFile(resultFile);
}
return true;
}
示例13: addFilenameToResult
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void addFilenameToResult() throws KettleException {
try {
if (meta.isAddToResultFiles()) {
// Add this to the result file names...
ResultFile resultFile = new ResultFile(ResultFile.FILE_TYPE_GENERAL, data.file, getTransMeta().getName(), getStepname());
resultFile.setComment("This file was created with an Excel output step by Pentaho Data Integration");
addResultFile(resultFile);
}
} catch (Exception e) {
throw new KettleException("Unable to add filename to the result", e);
}
}
示例14: addFileToResultFilesname
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void addFileToResultFilesname( FileObject file ) throws Exception {
if ( meta.addResultFile() ) {
// Add this to the result file names...
ResultFile resultFile =
new ResultFile( ResultFile.FILE_TYPE_GENERAL, file, getTransMeta().getName(), getStepname() );
resultFile.setComment( BaseMessages.getString( PKG, "YamlInput.Log.FileAddedResult" ) );
addResultFile( resultFile );
}
}
示例15: addFileToResultFilesname
import org.pentaho.di.core.ResultFile; //导入方法依赖的package包/类
private void addFileToResultFilesname( FileObject file ) {
if ( meta.addResultFile() ) {
// Add this to the result file names...
ResultFile resultFile =
new ResultFile( ResultFile.FILE_TYPE_GENERAL, file, getTransMeta().getName(), getStepname() );
resultFile.setComment( BaseMessages.getString( PKG, "JsonInput.Log.FileAddedResult" ) );
addResultFile( resultFile );
}
}