如何从FileNet数据库中提取文档

时间:2015-07-15 23:02:43

标签: filenet-p8 filenet filenet-content-engine

我正在开发一个需要从FileNet系统中提取文档的项目。我需要提取由Object_ID标识的文档并将它们存储在文件中。该系统在Windows下运行,并且正在使用Oracle 11G数据库。 问题是:有没有办法使用直接数据库访问和SQL检索文档内容?我可以编写一个SQL查询,通过将其Object_ID作为参数传递来检索文档的二进制内容。 感谢

4 个答案:

答案 0 :(得分:5)

内容不必存储在数据库中。它可以是BLOB,但也可以存储在FileStore,文件或固定内容区域中。如果它们存储在数据库中,从技术上讲,您应该能够通过GUID查询来检索它们。

但我建议将Java API用于retrieve content。这将让您管理所有情况(各种内容区域,多内容元素......)。我不知道您打算导出多少文档,但可以使用API​​(批量,多线程......)对其进行大幅优化。

答案 1 :(得分:1)

如果你愿意,我可以帮助你完成这项任务,

通常,FileNet的内容存储在Windows或Linux甚至AIX中名为/ cestore的目录中。

由于对目录中文件数量的某些限制,特别是在基于Unix的系统中,它们将文件存储在长树中,如fn01 / fn03 / fn04

所以你要做的是

通常文件名的格式为{DocumentId}

您将扫描/ cestore下的所有文件,例如Apache IO commons或更好的python脚本将它们存储在Map Contains中,然后您将能够获取所有文档的任何文档路径

答案 2 :(得分:1)

回答一个老问题。但是以为它可以为某人提供快速帮助。对于此处给出的情况,恕我直言,FileNet查询是最佳解决方案。这是您的操作方式:

        Domain domain = Factory.Domain.fetchInstance(conn, null, null);
        ObjectStore objStore = Factory.ObjectStore.fetchInstance(domain, osName, null);
        SearchScope search = new SearchScope(objStore);

        // your doc-class and identifier (index) goes here
        String sql1 = "Select * from DocClassName where someIndex=abc456";
        SearchSQL searchSQL = new SearchSQL(sql1);
        DocumentSet documents = (DocumentSet) search.fetchObjects(searchSQL, Integer.valueOf("20"), null, Boolean.valueOf(true));

        // go nuts on doc
        Document doc;

答案 3 :(得分:0)

maybe this will help you: There is a tool: FileNet Enterprise Manager or just FEM if you prefer, where you can export documents (binaries) and the metadata. From this tool you can make a SQL search, or build a search with the tool, in you object store. Then you can select the results and export them to a local directory. As a result from these tasks you will have a directory with binaries and some XML files. These XML files will host all the metadata from your database, like ID's and stuff. Hope this help you somehow.