本文整理汇总了Java中org.pentaho.di.repository.RepositoryDirectoryInterface.getSubdirectory方法的典型用法代码示例。如果您正苦于以下问题:Java RepositoryDirectoryInterface.getSubdirectory方法的具体用法?Java RepositoryDirectoryInterface.getSubdirectory怎么用?Java RepositoryDirectoryInterface.getSubdirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.repository.RepositoryDirectoryInterface
的用法示例。
在下文中一共展示了RepositoryDirectoryInterface.getSubdirectory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDirectory
import org.pentaho.di.repository.RepositoryDirectoryInterface; //导入方法依赖的package包/类
/**
* 获取资源库所有目录信息
*
* @param rdi
* @param list
*/
private List<?> getDirectory(RepositoryDirectoryInterface rdi,
List<KettleTree> list) {
try {
RepositoryDirectoryInterface tree = repo
.loadRepositoryDirectoryTree().findDirectory(
rdi.getObjectId());
for (int i = 0; i < rdi.getNrSubdirectories(); i++) {
RepositoryDirectory subTree = tree.getSubdirectory(i);
KettleTree d = new KettleTree();
d.setId(subTree.getObjectId().toString());
d.setpId(rdi.getObjectId().toString());
d.setName(subTree.getName());
d.setDir(subTree.getPath());
d.setaId(subTree.getObjectId().toString());
d.setClick("false");
d.setOpen("false");
d.setIsParent("true");
d.setType("dir");
list.add(d);
}
} catch (Exception e) {
}
return list;
}
示例2: getDirectoryTree
import org.pentaho.di.repository.RepositoryDirectoryInterface; //导入方法依赖的package包/类
/**
* Gets a directory tree on a TreeItem to work with.
* @param ti The TreeItem to set the directory tree on
* @param dircolor The color of the directory tree item.
*/
public static void getDirectoryTree(TreeItem ti, Color dircolor, RepositoryDirectoryInterface dir)
{
ti.setText(dir.getName());
ti.setForeground(dircolor);
// First, we draw the directories
for (int i=0;i<dir.getNrSubdirectories();i++)
{
RepositoryDirectory subdir = dir.getSubdirectory(i);
TreeItem subti = new TreeItem(ti, SWT.NONE);
subti.setImage(GUIResource.getInstance().getImageArrow());
getDirectoryTree(subti, dircolor, subdir);
}
}