how to fill format (a_content_type) while creating a document in DFS?

我怕爱的太早我们不能终老 提交于 2019-12-24 05:29:12

问题


I am developing a DFS application (оn С#) that imports a document into Documentum as dm_document. A document may be in any format – DOC, DOC, PDF, whatever. Thus, when I create a document, I have to specify corresponding format (it will be put into a_content_type): “gif”, “msw8” etc.

How can I solve this task? I have looked through DFS_66_reference.pdf and DFS-SDK Help – do not see simple solution yet. Can you give me an advice?


回答1:


I usually do what David suggests for common formats that I am expecting to encounter. This has the added benefit of giving you a reference to look at while debugging your application. For other formats, you can make the following query.

DQL:

SELECT name from dm_format WHERE dos_extension = lower('<extension>')

Note that this is not always reliable, because it could return multiple results for an extension (XLS is a good example), so you should decide how to handle multiple results. You may have to ask the user in that case.

I would recommend caching the responses in your application so you are not making this query needlessly. As David said above, these values do not change unless you change them.




回答2:


Are you asking how to match the dos extension to Documentum format ?

If yes, the simplest is to simply hardcode the mapping directly in your application.

In Webtop file wdk/app.xml there is the mapping it uses.

Here is what I have in mine :

              <format extension="txt" name="crtext"/>
              <format extension="xls" name="excel8book"/>
              <format extension="doc" name="msw8"/>
              <format extension="ppt" name="ppt8"/>
              <format extension="vsd" name="vsd"/>
              <format extension="zip" name="zip"/>
              <format extension="wpd" name="wp8"/>
              <format extension="psd" name="photoshop6"/>
              <format extension="au" name="audio"/>
              <format extension="jpeg" name="jpeg"/>
              <format extension="jpg" name="jpeg"/>
              <format extension="html" name="html"/>
              <format extension="htm" name="html"/>
              <format extension="ai" name="illustrator10"/>


来源:https://stackoverflow.com/questions/5535446/how-to-fill-format-a-content-type-while-creating-a-document-in-dfs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!