Content repository API for Java

From Wikipedia, the free encyclopedia

Content Repository API for Java (JCR) is a specification for a Java platform API for accessing content repositories in a uniform manner. The content repositories are used in content management systems to keep the content data and also the meta-data used in CMS such as versioning meta-data. The specification was developed under the Java Community Process as JSR-170. The main Java package is javax.jcr.

Contents

[edit] Overview

A JCR is a type of Object Database tailored to the storage, searching, and retrieval of hierarchical data. The JCR API grew out of the needs of web content management systems, which require storage of documents and other binary objects with associated metadata. However the API is applicable to many types of applications. In addition to object storage the JCR provides APIs for versioning of data, transactions, observation of changes in data, and import or export of data to XML in a standard way.

[edit] Data Structure

The data in a JCR consists of a tree of Nodes with associated Properties. Data is stored in the Properties, which may hold simple values such as numbers and strings or binary data of arbitrary length. Nodes may optionally have one or more types associated with them which dictate the kinds of properties, number and type of child nodes, and certain behavioral characteristics of the nodes. Nodes may point to other nodes via a special reference type property. In this way nodes in a JCR offer both referential integrity and object oriented concept of inheritance. Additional node types include the referenceable node type which allows the user to reference said node through use of a universally unique identifier. Another popular type is the versionable type. This makes the repository track a document's history and store copies of each version of the document.

[edit] Queries

A JCR can be queried with XPath, can export portions of its tree to XML in two standard formats and can import hierarchies directly from XML. A JCR may optionally support a standardized form of SQL for queries. The apache jackrabbit implementation of JCR also supports the integration of the apache Lucene search engine to give full text searches of data in the repository.

[edit] Available Implementations

The JSR is led by David Nuescheler of Day software. Day has both a commercial JCR implementation called CRX and is involved in the open source Apache Jackrabbit JCR, which had its 1.0 release in April 2006. Magnolia is an Enterprise Content Management system built on the JCR API, using JackRabbit as its repository by default, but allowing to plug in any other JSR-170 certified repository implementation. The eXoplatform by ObjectWeb is an open source repository with paid commercial support and documentation. Many other commercial vendors are working on JCR compatibility and products. Alfresco and Jeceira are open source content management systems which each support their own implementations of the JCR API.


.

[edit] See also