CMIS元数据:类型与属性详解
1. 引言
在CMIS(内容管理互操作性服务)开发中,理解类型集合、属性定义以及相关约束至关重要。本文将详细介绍如何遍历类型层次结构、查看属性定义、了解属性定义的约束,以及CMIS 1.1的元数据新特性。
2. 遍历类型层次结构
2.1 操作步骤
首先,我们要了解如何通过编程方式发现存储库中关于元数据的信息。以下是使用Groovy控制台实现遍历类型层次结构的代码示例:
import org.apache.chemistry.opencmis.client.api.*
import org.apache.chemistry.opencmis.commons.enums.*
boolean includePropertyDefinitions = true;
for (t in session.getTypeDescendants(
null,
// start at the top of the tree
-1,
// infinite depth recursion
includePropertyDefinitions
// include prop defs
)) {
printTypes(t, "");
}
static void printTypes(Tree<ObjectType> tree, String tab) {
ObjectType objType = tree.getItem();
println(tab + "TYPE:" + obj
超级会员免费看
订阅专栏 解锁全文
54

被折叠的 条评论
为什么被折叠?



