Skip navigation links

Oracle Beehive Java Content Repository Java API Reference
Release 1 (1.4)

E13801-01


Package oracle.ocs.jcr

This contains the packages of Java Content Repository for Level 1 and Level 2 operations.

See:
          Description

Interface Summary
OracleItem The OrcleItem is the base interface of OracleNode and OracleProperty.
OracleNamespaceRegistry OracleNamespaceRegistry represents the global persistent namespace registry of the JCR Repository.
OracleNode The OracleNode interface represents a node in the hierarchy that makes up the repository.
OracleNodeIterator Allows easy iteration through a list of Nodes with nextNode as well as a skip method inherited from RangeIterator.
OracleProperty A OracleProperty object represents the smallest granularity of content storage.
OraclePropertyIterator Allows easy iteration through a list of Propertys with nextProperty as well as a skip method.
OracleRangeIterator Extends Iterator with the skip, getSize and getPosition methods.
OracleRepository This interface is the entry point into the content repository.
OracleSession The OracleSession object provides read and (in level 2) write access to the content of a particular workspace in the repository.
OracleValue A generic holder for the value of a property.
OracleValueFactory The ValueFactory object provides methods for the creation Value objects that can then be used to set properties.
OracleWorkspace The OracleWorkspace object represents a "view" of an actual repository workspace entity as seen through the authorization settings of its associated OracleSession.

 

Class Summary
BeehiveRepositoryConfiguration BeehiveRepositoryConfigruation specifies the configuration of Beehive JCR Repository.
RepositoryFactory public class RepositoryFactory
The RepositoryFactory object provides method for creation of OracleRepository object that can be used for logging into Repository.

 

Package oracle.ocs.jcr Description

This contains the packages of Java Content Repository for Level 1 and Level 2 operations. Once Session is obtained, normal operation is to traverse the Repository, to obtain nodes, properties. Typical Traversal is given below in the code snippet. Here is an example code snippet:

                // Get the root node using the Session
                Node root = Session.getRootNode(); 
                // Traverse to the node you want, where path could be /entName/orgName/wspName
                Node myNode = root.getNode(java.lang.String path); 
                // Retrieve a property of myNode, where propertyName could be jcr:uuid
                Property myProperty = myNode.getProperty(java.lang.String propertyName); 
                // Get the value of the property
                Value myValue = myProperty.getValue(); 
                // Convert the value to the desired type 
                String jcrUuid = myValue.getString(); 
 

The most important direct access method is Item Session.getItem(String abspath) This method takes an absolute path and is used to jump directly to the indicated item (node or property):

                // Directly get the property  
                Property myProperty = (Property)Session.getItem(java.lang.String path); 
                // Directly convert to a String
                String jcrUuid = myValue.getString(); 

Writing to the Repository is explained in oracle.ocs.jcr.OracleNode


Skip navigation links

Oracle Beehive Java Content Repository Java API Reference
Release 1 (1.4)

E13801-01


Copyright © 2008, Oracle. All rights reserved.