With the growing demand in integrating content like photos, music, videos and office documents into business and web applications, we need a content management system that is rich in features, flexible and easy to learn. The Java Community Process developed a solution to this trend – the JSR-170 and JSR-283, also known as the Java Content Repository (JCR) API.
The JCR specification provides a unified interface that different vendors can implement to meet the needs of a content management system. Application developers, on the other hand, are saved from learning different propriety APIs, thus, reducing time-to-market. They just need to learn one API that is compatible with any JSR-170/283 compliant repository. This framework is not only vendor neutral. It is also not tied to any particular underlying architecture. The back-end data storage could be a file system, a WEBDAV repository, an XML-backed system or an SQL-based database. In addition to flexibility, the Java Content Repository has a lot more features to offer.
A content repository is like a fusion of a database and a file system. Among the valuable features of this integration are:
- support for both structured and unstructured content
- hierarchical design
- SQL and/or XPath query
- access control
- full-text search
Everything stored in the repository is managed as NODES and PROPERTIES. For example, in blog repository, we could say that each node of blog entry must have properties like title, author, text article, and file attachments (photo/video). The JCR API has several pre-defined node types like “nt:folder”, “nt:file”, and “nt:unstructured” but developers can also define their custom node types.
A lot of JCR-compliant repositories are already available in the market. Among them are Day CRX, IBM CM, Oracle XML DB, Alfresco ECM, and Apache Jackrabbit. Let’s explore what Apache Jackrabbit has to offer.
Apache Jackrabbit is a fully conforming implementation of the Java Content Repository. It complies with level 1 and 2 of JCR and adds more advanced features. Shown below are the features supported by each level:
To start developing applications with Apache Jackrabbit, you may download the Jackrabbit web application module from the Apache Downloads, get the JCR specification and javax.jcr package, study the JCR API and use the following model for your repository application:
Need a partner to deliver a business application? If so, don’t hesitate to contact us today.
Send us a message
For more information, you may visit the Apache Jackrabbit site at https://jackrabbit.apache.org/