Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Due to node type definitions, the JCR browser cannot perform all operations on every node. If you try to create an improper child node or property, the JCR browser will return an error. Additonally, you can perform queries on the JCR tree. With queries you can search for specific content. The JCR browser supports the XPath and SQL syntaxes. 

Info

See also Xpath JCR Sample Queries.



Warning

Some of the actions you can perform in the JCR Browser, such as deleting nodes and/or their attributes or properties could have an adverse affect on your website. Be especially careful when performing such actions.

...

 



In This Topic

Table of Contents
maxLevel2
 


...

Introduction to JCR

 

Expand
titleClick here for an introduction to the Content Repository API for Java (JCR)

A Java Content Repository (JCR) is a database with a standardized Java Application Programming Interface (API). A JCR allows different applications to access one centralized database. Other technologies that are comparable to JCR are JDBC, Hibernate and WebDAV. Unlike relational databases, a JCR has a hierarchical tree structure. The tree consists of nodes and properties. The properties are the leaves of the tree and represent the actual pieces of database content. A property is of one of the following types: string, binary, date, a number type, boolean, name, path or reference.

 

 



 

In addition, a node contains attributes that are related to the node itself, for example the name of the node, its path in the tree, its depth in the tree and its type. Therefore, a node has attributes and it contains properties. The organization of the repository into a tree structure is done by the JCR Browser: Internally the content may be stored in a relational database.

Node Types

Every node has one primary node type. The primary node type defines the properties and child nodes that it is allowed or required to have. Every node has a special property called jcr:primaryType that records the name of its primary node type. In addition to its primary node type, a node may also have one or more mixin types. A mixin node type can mandate more child nodes and properties in addition to those enforced by its primary node type.

Multi-value Properties

In some cases, a property may have more than one value. A property that may have more than one value is referred to as a multi-value property. The property definition determines whether a particular property is a multi-value property.

Standardized by JCP

JCR has been standardized by the Java Community Process (JCP) in JSR 170 (API version 1.0) and JSR 283 (API version 2.0). Depending on the API version and compliance level, a JCR may support the following:

  • Read-only or read/write access
  • Different types of nodes and properties
  • Simple or full versioning and multiple languages
  • Query languages like XPath, SQL, SQL2, AQM, JQOM
  • Locking
  • Observation of content changes
  • Export and import of content via XML files
  • JTA (XA transactions)

 

See also: http://jcp.org

 

...

Using the XperienCentral JCR Browser

...

If a property is a reference in the JCR tree, its value is shown as a link. Click on the link to navigate to the referenced node in the JCR tree. For example:

 


Back to top

 


...

Operations with Nodes

Creating a Node

...

  1. Select the node to be deleted.
  2. Click [Delete] in the "Actions" section. You are prompted to confirm the action.
  3. Click [OK]. The node, including its properties and subtrees, are deleted.



Back to top 


...

Operations with Node Properties

...

  1. Select the "Delete" checkbox next to the property to be deleted.
  2. Click [Delete]. You are prompted to confirm.
  3. Click [OK]. The property is deleted.



Back to top

 


...

Executing JCR Queries

By way of example, the JCR browser is provided with a list of pre-programmed XPath and SQL queries. To this list, you can add your own queries. Your queries are saved and you can edit them at a later time. To execute a query, you just select one from the list, modify it and then execute it.

...

  1. Select the JCR Browser tab.
  2. Click [More]. The "Query execution" section appears.
  3. Select the query, for instance "MyNodeTypes XPath", from the drop-down list.
  4. Modify the query to your needs.
  5. Click [Execute query]. The results appear on the Query results tab.



Back to top