本文整理汇总了Java中org.apache.chemistry.opencmis.client.api.Tree.getItem方法的典型用法代码示例。如果您正苦于以下问题:Java Tree.getItem方法的具体用法?Java Tree.getItem怎么用?Java Tree.getItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.chemistry.opencmis.client.api.Tree
的用法示例。
在下文中一共展示了Tree.getItem方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: findTree
import org.apache.chemistry.opencmis.client.api.Tree; //导入方法依赖的package包/类
private Tree<FileableCmisObject> findTree(String nodeId, List<Tree<FileableCmisObject>> nodes)
{
Tree<FileableCmisObject> ret = null;
for(Tree<FileableCmisObject> tree : nodes)
{
FileableCmisObject item = tree.getItem();
// compare only the "bare" object id i.e. without the version suffix
if(getBareObjectId(nodeId).equals(getBareObjectId(item.getId())))
{
ret = tree;
break;
}
}
return ret;
}
示例3: 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;
}
示例4: 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);
}
}
示例5: addType
import org.apache.chemistry.opencmis.client.api.Tree; //导入方法依赖的package包/类
/**
* Helper for {@link #getCreatableTypes(Session, String)}.
*/
private static void addType(List<Tree<ObjectType>> types,
List<ObjectType> resultList) {
for (Tree<ObjectType> tt : types) {
if (tt.getItem() != null) {
boolean isCreatable = (tt.getItem().isCreatable() == null ? true
: tt.getItem().isCreatable().booleanValue());
if (isCreatable) {
resultList.add(tt.getItem());
}
addType(tt.getChildren(), resultList);
}
}
}
示例6: 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;
}