Content repository API for Java

Last updated

Content Repository API for Java (JCR) is a specification for a Java platform application programming interface (API) to access content repositories in a uniform manner. [1] [ failed verification ] The content repositories are used in content management systems to keep the content data and also the metadata used in content management systems (CMS) such as versioning metadata. The specification was developed under the Java Community Process as JSR-170 (Version 1), [2] [3] and as JSR-283 (version 2). [4] The main Java package is javax.jcr.

Contents

Overview

A JCR is a type of object database 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 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.

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.

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 for queries and a query object model QOM. JSR 283 deprecates the XPath query language defined in JSR 170. The Apache Jackrabbit 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 Adobe Systems (formerly of Day Software). Day had both a commercial JCR implementation called Content Repository Extreme (CRX) and was involved in the open source Apache Jackrabbit JCR, [5] [6] which had its 2.0 release in January 2010. ModeShape [7] is another open source JCR implementation that supports JSR-283. Jahia, Hippo CMS and Magnolia 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's enterprise collaboration software. The eXo JCR by eXo Platform is an open source repository with paid commercial support and documentation. Many other commercial vendors are working on JCR compatibility and products. Alfresco is an open source content management system which provides a JCR API onto their repository. GX released the new community version of its Web enterprise content management (ECM) platform based natively on Apache Jackrabbit and JSR.

PHP adaptions have been started by TYPO3, translating the Java API to PHP. [8] [9] The PHPCR interfaces are also implemented by Jackalope, [10] a PHP frontend talking to the Jackrabbit backend through the WebDAV interface, and Midgard, [11] a cross-language content repository.

See also

Related Research Articles

<span class="mw-page-title-main">Document Object Model</span> Convention for representing and interacting with objects in HTML, XHTML, and XML documents

The Document Object Model (DOM) is a cross-platform and language-independent interface that treats an HTML or XML document as a tree structure wherein each node is an object representing a part of the document. The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree; with them one can change the structure, style or content of a document. Nodes can have event handlers attached to them. Once an event is triggered, the event handlers get executed.

Jakarta Enterprise Beans is one of several Java APIs for modular construction of enterprise software. EJB is a server-side software component that encapsulates business logic of an application. An EJB web container provides a runtime environment for web related software components, including computer security, Java servlet lifecycle management, transaction processing, and other web services. The EJB specification is a subset of the Java EE specification.

In computing, the Java API for XML Processing, or JAXP, one of the Java XML Application programming interfaces, provides the capability of validating and parsing XML documents. It has three basic parsing interfaces:

Java Data Objects (JDO) is a specification of Java object persistence. One of its features is a transparency of the persistence services to the domain model. JDO persistent objects are ordinary Java programming language classes (POJOs); there is no requirement for them to implement certain interfaces or extend from special classes. JDO 1.0 was developed under the Java Community Process as JSR 12. JDO 2.0 was developed under JSR 243 and was released on May 10, 2006. JDO 2.1 was completed in Feb 2008, developed by the Apache JDO project. JDO 2.2 was released in October 2008. JDO 3.0 was released in April 2010.

Jakarta XML Registries defines a standard API for Jakarta EE applications to access and programmatically interact with various kinds of metadata registries. JAXR is one of the Java XML programming APIs. The JAXR API was developed under the Java Community Process as JSR 93.

Jakarta Slide is an open-source content management system from the Jakarta project. It is written in Java and implements the WebDAV protocol. Slide is a set of APIs to implement the WebDAV client. Thanks to that, Slide can also be seen as a Content Management Framework. The use of WebDAV, which is a superset of HTTP, makes Slide an ideal candidate for web-based content management. Among the applications of Slide are its use as a file server, in intranet applications, and as an excellent repository for XML both as properties and versioned files for persistence of JavaBeans. It also has an extensible storage mechanism that can be used for Integration and adaptation.

Given that metadata is a set of descriptive, structural and administrative data about a group of computer data, Java Metadata Interface is a platform-neutral specification that defines the creation, storage, access, lookup and exchange of metadata in the Java programming language.

Java Management Extensions (JMX) is a Java technology that supplies tools for managing and monitoring applications, system objects, devices and service-oriented networks. Those resources are represented by objects called MBeans. In the API, classes can be dynamically loaded and instantiated. Managing and monitoring applications can be designed and developed using the Java Dynamic Management Kit.

Hibernate ORM is an object–relational mapping tool for the Java programming language. It provides a framework for mapping an object-oriented domain model to a relational database. Hibernate handles object–relational impedance mismatch problems by replacing direct, persistent database accesses with high-level object handling functions.

The Jakarta Standard Tag Library is a component of the Java EE Web application development platform. It extends the JSP specification by adding a tag library of JSP tags for common tasks, such as XML data processing, conditional execution, database access, loops and internationalization.

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 (JCR). Jackrabbit was also used as the reference implementation of JSR-170, specified within the Java Community Process. The project graduated from the Apache Incubator on March 15, 2006, and is now a Top Level Project of the Apache Software Foundation.

Jakarta Persistence is a Jakarta EE application programming interface specification that describes the management of relational data in enterprise Java applications.

<span class="mw-page-title-main">Apache Sling</span> Java web framework

Apache Sling is an open source Web framework for the Java platform designed to create content-centric applications on top of a JSR-170-compliant content repository such as Apache Jackrabbit. Apache Sling allows developers to deploy their application components as OSGi bundles or as scripts and templates in the content repository. Supported scripting languages are JSP, server-side JavaScript, Ruby, Velocity. The goal of Apache Sling is to expose content in the content repository as HTTP resources, fostering a RESTful style of application architecture.

Jakarta RESTful Web Services, is a Jakarta EE API specification that provides support in creating web services according to the Representational State Transfer (REST) architectural pattern. JAX-RS uses annotations, introduced in Java SE 5, to simplify the development and deployment of web service clients and endpoints.

DataNucleus is an open source project which provides software products around data management in Java. The DataNucleus project started in 2008.

<span class="mw-page-title-main">XQuery API for Java</span> Application programming interface

XQuery API for Java (XQJ) refers to the common Java API for the W3C XQuery 1.0 specification.

The Sensor Observation Service (SOS) is a web service to query real-time sensor data and sensor data time series and is part of the Sensor Web. The offered sensor data consists of data directly from the sensors, which are encoded in the Sensor Model Language (SensorML), and the measured values in the Observations and Measurements encoding format. The web service as well as both file formats are open standards and specifications of the same name defined by the Open Geospatial Consortium (OGC).

JCROM is an acronym that stands for Java Content Repository (JCR) Object Mapper. It is a simple and lightweight annotation-based framework for mapping Plain Old Java Objects (POJOs) to/from nodes in a JCR. This is commonly called Object Content Mapping.

Magnolia is an open-source content management system (CMS). It is developed by Magnolia International Ltd., based in Basel, Switzerland. It is based on Content repository API for Java (JSR-283).

References

  1. Java API for XML Registries - Another Java API for Registries and Repositories
  2. JSR-170
  3. "JSR-170 (HTML version of the specification)". Archived from the original on 2009-06-08. Retrieved 2009-02-17.
  4. JSR-283
  5. Apache Jackrabbit home page
  6. JCR links to articles and applications based on JCR.
  7. http://modeshape.org
  8. phpCR
  9. phpcr on github
  10. "Jackalope: JCR for PHP". Archived from the original on 2013-01-27. Retrieved 2017-09-19.
  11. Bergius, Henri (2011-12-23). "Midgard2 PHPCR provider hits 1.0".