IBM Enterprise Records, Version 5.1.+            

Browsing the file plan hierarchy

You can use the RM Java™ API framework to browse the file plan and to view its various constituents, such as classification schemes, record categories, record folders, volumes, and records. Before you begin browsing for file plan objects, you must obtain an instance of an RMObjectStore object. For detailed information about instantiating an RMObjectStore object, refer to RMObjectStore.

Browsing the classification schemes available in an object store

To browse the classification schemes available in an object store, call the getClassificationSchemes method on an RMObjectStore object, which returns a collection of ClassificationScheme objects available in an object store. You can also retrieve the available classification schemes as an XML string by calling one of the getClassificationSchemesXML methods on an RMObjectStore object.

Browsing RM container objects

You can retrieve the child entities of all RM container objects--such as ClassificationScheme, RecordCategory, RecordFolder, and Volume--by calling the getContainees method on the container object. For example, the following code snippet retrieves all the record categories, record folders, and records stored under a record category:
RMObjects loObjects = 
   (RMObjects)loRecordCategory.getContainees(new int[]{RMType.RM_TYPE_RECORDCATEGORY,    
   RMType.RM_TYPE_RECORDFOLDER, RMType.RM_TYPE_RECORD}, new String[]{"Creator"}, false);
Attention: A record category can directly contain a record for only BASE or DoD installations of IBM® Enterprise Records.
You can also retrieve child entities of all RM container objects as a string in XML format using the getContaineesXML method. You can call this method on any RM container object--such as ClassificationScheme, RecordCategory, RecordFolder, and Volume--as shown in the following line of code:
String lsContaineesXML = 
   loObj.getContaineesXML(new int[]{RMType.RM_TYPE_RECORDCATEGORY, 
   RMType.RM_TYPE_RECORDFOLDER, RMType.RM_TYPE_RECORD}, null, false);
The following is an example of the output returned in XML format:
<response xmlns="http://filenet.com/namespaces/wcm/apps/1.0" 
xmlns:wcm="http://filenet.com/namespaces/wcm/apps/1.0">
   <objectset>
      <folder>
         <id>{6FE8E8E8-BA60-4CFC-AC55-20409E0E3944}</id>
         <objectstore> 
            <id>{C8F7AD25-ACE1-42F9-8866-E86D94B37A5A}</id> 
            <name>DOD06042004</name>
         </objectstore> 
         <classdesc> 
            <id>{B42CC67A-6E4C-472E-A2D4-1EAC4B70B962}</id> 
            <name>ElectronicRecordFolder</name></classdesc> 
            <properties> 
               <property>
                  <name>OIID</name>               
                  <symname>OIID</symname> 
                  <value>dma:///9bb79d30-7208-11d1-8a25-008048e14c74/
                     c8f7ad25-ace1-42f9-8866-e86d94b37a5a/
                     Lb42cc67a-6e4c-472e-a2d4-1eac4b70b962;
                     guid=6fe8e8e8-ba60-4cfc-ac55-20409e0e3944</value> 
                  <datatype>8</datatype>
               </property> 
               <property> 
                  <name>Creator</name> 
                  <symname>Creator</symname> 
                  <value>Administrator</value> 
                  <datatype>8</datatype>
               </property>
            </properties>
         </classdesc>
      </folder>
   </objectset>
</response>
The getContainees and getContaineesXML methods retrieve all the entities that are stored in an RM container object. To determine the type of entity that has been retrieved, call the getRMEntityType method on an RMObjectStore object, passing the entity's GUID as the parameter, as shown in the following line of code:
 int liType = loRMOS.getRMEntityType(loRMObject.getId());


Feedback

Last updated: August 2011


© Copyright IBM Corporation 2011.
This information center is powered by Eclipse technology. (http://www.eclipse.org)