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


Java RepositoryElementMetaInterface.getModifiedDate方法代码示例

本文整理汇总了Java中org.pentaho.di.repository.RepositoryElementMetaInterface.getModifiedDate方法的典型用法代码示例。如果您正苦于以下问题:Java RepositoryElementMetaInterface.getModifiedDate方法的具体用法?Java RepositoryElementMetaInterface.getModifiedDate怎么用?Java RepositoryElementMetaInterface.getModifiedDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.repository.RepositoryElementMetaInterface的用法示例。


在下文中一共展示了RepositoryElementMetaInterface.getModifiedDate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addToTree

import org.pentaho.di.repository.RepositoryElementMetaInterface; //导入方法依赖的package包/类
private static void addToTree( TreeItem ti, String filterString, Pattern pattern,
    List<RepositoryElementMetaInterface> repositoryObjects ) {
  for ( int i = 0; i < repositoryObjects.size(); i++ ) {
    boolean add = false;
    RepositoryElementMetaInterface repositoryObject = repositoryObjects.get( i );

    if ( filterString == null && pattern == null ) {
      add = true;
    } else {
      add |= addItem( repositoryObject.getName(), filterString, pattern );
      add |= addItem( repositoryObject.getDescription(), filterString, pattern );
      add |= addItem( repositoryObject.getModifiedUser(), filterString, pattern );
      if ( !add && repositoryObject.getModifiedDate() != null ) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat( DATE_FORMAT );
        add = addItem( simpleDateFormat.format( repositoryObject.getModifiedDate() ), filterString, pattern );
      }
      if ( !add && repositoryObject.getObjectType() != null ) {
        add = addItem( repositoryObject.getObjectType().getTypeDescription(), filterString, pattern );
      }
    }

    if ( add ) {
      createTreeItem( ti, repositoryObject );
    }
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:27,代码来源:RepositoryDirectoryUI.java

示例2: processRow

import org.pentaho.di.repository.RepositoryElementMetaInterface; //导入方法依赖的package包/类
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
  if (first) {
    first = false;

    data.outputRowMeta = new RowMeta();
    meta.getFields(data.outputRowMeta, getStepname(), null, null, this);
  }
  
  if (data.filenr>=data.list.size()) {
    setOutputDone();
    return false;
  }
  
  // Get the next repository object from the list...
  //
  RepositoryElementMetaInterface repositoryObject = data.list.get(data.filenr++);
  
  Object[] outputRow = buildEmptyRow();
  int outputIndex = 0;
  
  String directory = repositoryObject.getRepositoryDirectory().getPath();
  String name = repositoryObject.getName();
  String path = directory.endsWith("/") ? directory+name : directory+"/"+name;

  outputRow[outputIndex++] = path;        // the directory and name of the object
  outputRow[outputIndex++] = directory;   // the directory
  outputRow[outputIndex++] = name     ;   // the name
  outputRow[outputIndex++] = repositoryObject.getObjectType().getTypeDescription();   // the object type
  outputRow[outputIndex++] = repositoryObject.getObjectId().toString();   // the object ID
  outputRow[outputIndex++] = repositoryObject.getModifiedUser();   // modified user
  outputRow[outputIndex++] = repositoryObject.getModifiedDate();   // modified date
  outputRow[outputIndex++] = repositoryObject.getDescription(); // description
  
  if (meta.isIncludeRowNumber()) {
    outputRow[outputIndex++] = Long.valueOf(data.rownr++);
  }

  // Finally, let's give this row of data to the next steps...
  //
  putRow(data.outputRowMeta, outputRow);
  if (checkFeedback(getLinesInput())) {
    if (log.isBasic())
      logBasic(BaseMessages.getString(PKG, "GetRepositoryNames.Log.NrLine", "" + getLinesInput()));
  }

  return true;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:48,代码来源:GetRepositoryNames.java

示例3: processRow

import org.pentaho.di.repository.RepositoryElementMetaInterface; //导入方法依赖的package包/类
@Override
public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {
  if ( first ) {
    first = false;

    data.outputRowMeta = new RowMeta();
    meta.getFields( data.outputRowMeta, getStepname(), null, null, this, repository, metaStore );
  }

  if ( data.filenr >= data.list.size() ) {
    setOutputDone();
    return false;
  }

  // Get the next repository object from the list...
  //
  RepositoryElementMetaInterface repositoryObject = data.list.get( data.filenr++ );

  Object[] outputRow = buildEmptyRow();
  int outputIndex = 0;

  String directory = repositoryObject.getRepositoryDirectory().getPath();
  String name = repositoryObject.getName();
  String path = directory.endsWith( "/" ) ? directory + name : directory + "/" + name;

  outputRow[outputIndex++] = path; // the directory and name of the object
  outputRow[outputIndex++] = directory; // the directory
  outputRow[outputIndex++] = name; // the name
  outputRow[outputIndex++] = repositoryObject.getObjectType().getTypeDescription(); // the object type
  outputRow[outputIndex++] = repositoryObject.getObjectId().toString(); // the object ID
  outputRow[outputIndex++] = repositoryObject.getModifiedUser(); // modified user
  outputRow[outputIndex++] = repositoryObject.getModifiedDate(); // modified date
  outputRow[outputIndex++] = repositoryObject.getDescription(); // description

  if ( meta.isIncludeRowNumber() ) {
    outputRow[outputIndex++] = Long.valueOf( data.rownr++ );
  }

  // Finally, let's give this row of data to the next steps...
  //
  putRow( data.outputRowMeta, outputRow );
  if ( checkFeedback( getLinesInput() ) ) {
    if ( log.isBasic() ) {
      logBasic( BaseMessages.getString( PKG, "GetRepositoryNames.Log.NrLine", "" + getLinesInput() ) );
    }
  }

  return true;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:50,代码来源:GetRepositoryNames.java


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