本文整理汇总了Java中org.apache.chemistry.opencmis.client.api.Tree.getChildren方法的典型用法代码示例。如果您正苦于以下问题:Java Tree.getChildren方法的具体用法?Java Tree.getChildren怎么用?Java Tree.getChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.chemistry.opencmis.client.api.Tree
的用法示例。
在下文中一共展示了Tree.getChildren方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addChildren
import org.apache.chemistry.opencmis.client.api.Tree; //导入方法依赖的package包/类
public void addChildren(FolderNode f, Tree<FileableCmisObject> t)
{
FileableCmisObject fco = t.getItem();
CMISNode child = CMISNode.createNode(fco);
if(child instanceof FolderNode)
{
f.addFolder((FolderNode)child);
for(Tree<FileableCmisObject> c : t.getChildren())
{
addChildren((FolderNode)child, c);
}
}
else
{
f.addNode(child);
}
}
示例2: doGetFolderTreeSize
import org.apache.chemistry.opencmis.client.api.Tree; //导入方法依赖的package包/类
private static long doGetFolderTreeSize(Tree<FileableCmisObject> pTree) {
long lLngSize = 0;
FileableCmisObject lCurCmisObject = pTree.getItem();
if (lCurCmisObject instanceof Document) {
long lLngCurSize = ((Document) lCurCmisObject).getContentStreamLength();
if (lLngCurSize > -1) {
lLngSize += lLngCurSize;
}
mLog.debug("---------- Dimensione di " + lCurCmisObject.getName() + ": " + lLngCurSize);
} else {
for (Tree<FileableCmisObject> tree : pTree.getChildren()) {
lLngSize += doGetFolderTreeSize(tree);
}
mLog.debug("------ Dimensione totale contenuto di " + lCurCmisObject.getName() + ": " + lLngSize);
}
return lLngSize;
}
示例3: addChildren
import org.apache.chemistry.opencmis.client.api.Tree; //导入方法依赖的package包/类
public void addChildren(FolderNode f, Tree<FileableCmisObject> t)
{
FileableCmisObject fco = t.getItem();
CMISNode child = CMISNode.createNode(fco);
if(child instanceof FolderNode)
{
f.addFolder((FolderNode)child);
for(Tree<FileableCmisObject> c : t.getChildren())
{
addChildren((FolderNode)child, c);
}
}
else
{
f.addNode(child);
}
}
示例4: doGetTypesTreeLeaves
import org.apache.chemistry.opencmis.client.api.Tree; //导入方法依赖的package包/类
private static void doGetTypesTreeLeaves(List<Tree<ObjectType>> pTypesTree, List<ObjectType> pLeaves) {
for (Tree<ObjectType> tree : pTypesTree) {
List<Tree<ObjectType>> lChildren = tree.getChildren();
if (lChildren.isEmpty()) {
pLeaves.add(tree.getItem());
} else {
doGetTypesTreeLeaves(lChildren, pLeaves);
}
}
}
示例5: fillWith
import org.apache.chemistry.opencmis.client.api.Tree; //导入方法依赖的package包/类
private TreeNodeDTO<EditorType> fillWith(Tree<ObjectType> tree) {
TreeNodeDTO<EditorType> treeNodeDTO = new TreeNodeDTO<>(new EditorType(tree.getItem()));
List<TreeNodeDTO<EditorType>> children = new ArrayList<>();
for (Tree<ObjectType> t : tree.getChildren()) {
children.add(fillWith(t));
}
treeNodeDTO.setChildren(children);
return treeNodeDTO;
}