Content repository API for Java
Encyclopedia
Content Repository API for Java (JCR) is a specification for a Java platform application programming interface
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 (API) to access content repositories
Content repository
A content repository is a store of digital content with an associated set of data management, search and access methods allowing application-independent access to the content, rather like a digital library, but with the ability to store and modify content in addition to searching and retrieving...

 in a uniform manner. The content repositories are used in content management systems to keep the content data and also the metadata
Metadata
The term metadata is an ambiguous term which is used for two fundamentally different concepts . Although the expression "data about data" is often used, it does not apply to both in the same way. Structural metadata, the design and specification of data structures, cannot be about data, because at...

 used in content management system
Content management system
A content management system is a system providing a collection of procedures used to manage work flow in a collaborative environment. These procedures can be manual or computer-based...

s (CMS) such as versioning metadata. The specification was developed under the Java Community Process
Java Community Process
The Java Community Process or JCP, established in 1998, is a formalized process that allows interested parties to get involved in the definition of future versions and features of the Java platform....

 as JSR-170 (Version 1). and as JSR-283 (version 2) The main Java package
Java package
A Java package is a mechanism for organizing Java classes into namespaces similar to the modules of Modula. Java packages can be stored in compressed files called JAR files, allowing classes to download faster as a group rather than one at a time...

 is javax.jcr.

Overview

A JCR is a type of object database
Object database
An object database is a database management system in which information is represented in the form of objects as used in object-oriented programming...

 tailored to storing, searching, and retrieving hierarchical data. The JCR API grew out of the needs of content management systems, which require storing documents and other binary objects with associated metadata; however, the API is applicable to many additional types of application. In addition to object storage, the JCR provides: APIs for versioning of data; transactions
Database transaction
A transaction comprises a unit of work performed within a database management system against a database, and treated in a coherent and reliable way independent of other transactions...

; observation of changes in data; and import or export of data to XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 in a standard way.

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
Referential integrity
Referential integrity is a property of data which, when satisfied, requires every value of one attribute of a relation to exist as a value of another attribute in a different relation ....

 and object-oriented concept of inheritance
Inheritance (computer science)
In object-oriented programming , inheritance is a way to reuse code of existing objects, establish a subtype from an existing object, or both, depending upon programming language support...

. 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.

Queries

A JCR can export portions of its tree to XML in two standard formats and can import hierarchies directly from XML. JSR 283 compliant implementations must support a standardized form of SQL
SQL
SQL is a programming language designed for managing data in relational database management systems ....

 for queries and a query object model QOM. JSR 283 deprecates the XPath
XPath
XPath is a language for selecting nodes from an XML document. In addition, XPath may be used to compute values from the content of an XML document...

 query language defined in JSR 170.
The Apache Jackrabbit
Apache Jackrabbit
Apache Jackrabbit is an open source content repository for the Java platform. The Jackrabbit project was started on August 28, 2004, when Day Software licensed an initial implementation of the Java Content Repository API . Jackrabbit was also used as the reference implementation of JSR-170,...

 reference implementation of JCR also supports the integration of the Apache Lucene search engine to give full text searches of data in the repository.

Available implementations

Both JSRs are led by David Nüscheler of Day Software
Day Software
Day Software was an enterprise content management software company headquartered in Basel, Switzerland and Boston, Massachusetts. Day Software was founded in 1993 in Basel, Switzerland....

. Day has both a commercial JCR implementation called Content Repository Extreme (CRX) and is involved in the open source Apache Jackrabbit
Apache Jackrabbit
Apache Jackrabbit is an open source content repository for the Java platform. The Jackrabbit project was started on August 28, 2004, when Day Software licensed an initial implementation of the Java Content Repository API . Jackrabbit was also used as the reference implementation of JSR-170,...

 JCR, which had its 2.0 release in January 2010. Hippo CMS
Hippo CMS
Hippo CMS is an open-source information centered Content Management System. The Hippo CMS project was initiated and is maintained by . It's targeted at medium to large organisations managing content for multi-channel distribution like web sites and intranets...

 and Magnolia
Magnolia (CMS)
Magnolia is an Open-Source content management system developed by Magnolia International Ltd., based in Basel, Switzerland. It is based on JSR-170.-History:...

  are Enterprise Content Management systems built on the JCR API, using Jackrabbit as its repository by default, but able to plug in any other JSR-170 certified repository implementation. JSR-170 is also supported by Oracle Beehive
Oracle Beehive
Oracle Beehive is collaboration platform software developed by Oracle Corporation that combines email, team collaboration, instant messaging, and conferencing in a single solution...

, Oracle's enterprise collaboration software offering. The eXo JCR 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
Alfresco (software)
Alfresco is a Free/Libre enterprise content management system for Microsoft Windows and Unix-like operating systems. Alfresco comes in two flavours. Alfresco Community Edition is free software, LGPL licensed open source and open standards. Alfresco Enterprise Edition is commercially & proprietary...

 is an open source content management system which provides a JCR API onto their repository. GX released the new community version
GX WebManager Community Edition
GX WebManager Community Edition is a proprietary content management system with which developers get access to a web content management system platform including a software development kit ....

 of its Web enterprise content management
Enterprise content management
Enterprise Content Management is a formalized means of organizing and storing an organization's documents, and other content, that relate to the organization's processes...

 (ECM) platform based natively on Apache Jackrabbit
Apache Jackrabbit
Apache Jackrabbit is an open source content repository for the Java platform. The Jackrabbit project was started on August 28, 2004, when Day Software licensed an initial implementation of the Java Content Repository API . Jackrabbit was also used as the reference implementation of JSR-170,...

 and JSR.

eXo Platform JCR implementation on the
company wiki. eXo Platform 2 article on TheServerSide.com.

ModeShape is a new open source JCR implementation that lets applications access existing information in external systems through the JCR API. ModeShape repositories can also federate content from multiple sources into one, unified repository.

JCRDev.com provides a common platform for JCR Developers. It is an online community built especially for people working on Java Content Repository.

PHP adaptions have been started by TYPO3
TYPO3
TYPO3 is a free and open source web content management framework. It is released under the GNU General Public License. It can run on several web servers, such as Apache or IIS, on top of many operating systems, among them Linux, Microsoft Windows, FreeBSD, Mac OS X and OS/2.-History:TYPO3 was...

, translating the Java API to PHP. The phpCR interfaces are also implemented by Jackalope, a PHP frontend talking to the Jackrabbit backend through the WebDAV interface.

See also

  • Content Management Interoperability Services
    Content Management Interoperability Services
    Content Management Interoperability Services is a specification for improving interoperability between Enterprise Content Management systems. OASIS, a web standards consortium, approved CMIS as an OASIS Specification on May 1, 2010....

    (CMIS), another content repository API
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK