如何使用Open CMIS从露天仓库中检索所有文档内容并分离文档类型

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

我想从露天仓库中检索所有文档内容。所以任何人都可以帮助我,如何使用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.

首先,不要做选择*,除非您实际上需要存储库具有的每个属性。那是一个潜在的性能问题。

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从露天仓库中检索所有文档内容并分离文档类型

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

发布评论

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

>www.elefans.com

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