当前位置: 首页>>代码示例>>Java>>正文


Java ResultFile.setComment方法代码示例

本文整理汇总了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);
 	}
 }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:CubeOutput.java

示例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 );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:CubeOutput.java

示例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);
	}
}
 
开发者ID:etdube,项目名称:pdi-fastjsoninput-plugin,代码行数:12,代码来源:FastJsonInput.java

示例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);
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:11,代码来源:GetXMLData.java

示例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);
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:37,代码来源:XBaseInput.java

示例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;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:39,代码来源:AccessOutput.java

示例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);
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:11,代码来源:LoadFileInput.java

示例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);
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:9,代码来源:YamlInput.java

示例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);
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:9,代码来源:JsonInput.java

示例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);
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:11,代码来源:GetXMLData.java

示例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);
    }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:37,代码来源:XBaseInput.java

示例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;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:39,代码来源:AccessOutput.java

示例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);
  }
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:13,代码来源:ExcelOutput.java

示例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 );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:YamlInput.java

示例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 );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:JsonInput.java


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