如何使用 Open CMIS 从 alfresco 存储库中检索所有文档内容并分离文档类型

编程入门 行业动态 更新时间:2024-10-08 02:22:06
本文介绍了如何使用 Open CMIS 从 alfresco 存储库中检索所有文档内容并分离文档类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想从 alfresco 存储库中检索所有文档内容.那么任何人都可以帮助我如何使用 CMIS 遍历存储库.在遍历时,我还想根据其类型将文档分开.

I Want to retrieve All document content from alfresco repository. So can anyone help me that how can i traverse the repository using CMIS. And while traversing i also want to separate the documents based on its type.

此时我可以通过指定路径来获取任何一个文档.但现在我的要求是遍历整个存储库并获取所有文档.

At this moment i am able to get any one document by specifying the path. but now my requirement is to traverse whole repository and get all the documents.

谁能帮我解决这个问题.还建议我遍历所有文件夹,然后按特定类型分隔"将是好方法或使用 CMIS 搜索特定类型的文档查询"将是很好的方法.

So can any one help me with this. Also suggest me that "Traversal of all folders and later separate by specific type" will be the good approach OR "Search specific type of document using CMIS query" will be the good approach.

提前致谢.

推荐答案

Yagami 的回答是一个好的开始,但还有一些需要补充的内容.

Yagami's answer is a good start, but there are a few things to add.

首先,除非您确实需要存储库拥有的每个属性,否则不要执行select *".这是一个潜在的性能问题.只要求你需要的东西.

First, do not do "select *" unless you actually need every single property the repository has. That is a potential performance problem. Only ask for what you need.

其次,您的评论之一谈到了按类型对结果进行细分.在 CMIS 中,类型有点像 SQL 表.因此,在您的情况下,您将使用三种自定义类型中的每一种作为 from 子句中的不同类型来执行三种不同的查询:

Second, one of your comments talks about segmenting results by type. In CMIS, a type is kind of like a SQL table. So in your case, you would do three different queries using each of your three custom types as a different type in the from clause:

select * from test:mainContract; select * from test:subContract; select * from test:royaltyStatement;

最后,除非您的存储库中只有少量文档,否则您几乎肯定会想要使用分页结果集.否则,您将只能返回服务器配置为返回的最大结果数.这可能不足以获得整个集合.

Finally, unless you have just a handful of documents in your repository, you are almost certainly going to want to use a paged result set. Otherwise, you will only get back the maximum number of results the server is configured to return. That may not be large enough to get the entire set.

有关显示分页结果集的示例,请参阅 Apache CMIS:分页查询结果

For an example showing paging the result set, see Apache CMIS: Paging query result

更多推荐

如何使用 Open CMIS 从 alfresco 存储库中检索所有文档内容并分离文档类型

本文发布于:2023-11-28 11:22:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642199.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文档   如何使用   库中   类型   内容

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!