Documentum: Software to Download Documents and Metadata

I have written a software in Java using DFC. This software performs the following tasks:

  1. Performs export or import of documentum data
  2. Download all documents given a folder/cabinet in Documentum
  3. Download all document metadata, including custom metadata without having to specify the specific fields
  4. All the metadata is saved in an xml file
  5. The field metadata, such as the attribute data type, attribute name and value are all saved in the xml to make importing into any other content management system easy.
  6. All the permissions levels for each document are saved to the xml
  7. The complete folder hierarchy under the given root hierarchy is exported
  8. Any custom folder metadata is also saved in the xml

DQL: Listing documents with their Folderpaths

Here’s a DQL to get a listing of Documents along with their folderpaths in the repository:

select fld.r_folder_path, 
doc.r_object_id, 
doc.object_name, doc.r_content_size, doc.acl_name, doc.r_creation_date, doc.r_modify_date, doc.r_creator_name, doc.title, doc.subject, doc.keywords 
from dm_document doc, dm_folder fld
where 
folder('/<CABINET_NAME>', descend) and 
fld.r_object_id = doc.i_folder_id 
and any r_folder_path is not nullstring 
enable (ROW_BASED)

DQL: Total Document Content Size By Cabinet

Here is a DQL statement to find the total document size by cabinet. You may be aware that dm_document has two different attributes for content size:

  • r_content_size,
  • r_full_content_size

The first one, r_content_size, can only store sizes upto 2 GB. r_full_content_size stores the correct size if the content is larger than 2 GB. Weird. I know.

select cab.object_name, sum(doc.r_full_content_size) 
from dm_document doc, dm_cabinet cab
where doc.i_cabinet_id = cab.r_object_id
group by cab.object_name