jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1427110 [15/18] - in /jackrabbit/site/trunk/content/JCR: ./ a-simple-ocm-project-with-maven-eclipse.data/ concurrency-control.data/ deployment-models.data/ how-jackrabbit-works.data/ how-to-map-associations-between-objects.data/ index-read...
Date Mon, 31 Dec 2012 12:40:13 GMT
Added: jackrabbit/site/trunk/content/JCR/node-types.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/JCR/node-types.html?rev=1427110&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/JCR/node-types.html (added)
+++ jackrabbit/site/trunk/content/JCR/node-types.html Mon Dec 31 12:40:09 2012
@@ -0,0 +1,218 @@
+
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE- 2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License. 
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>Node Types</TITLE>
+    <LINK type="text/css" rel="stylesheet" href="http://jackrabbit.apache.org/style/site.css">
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY>
+    <DIV id="page">
+      <DIV id="header">
+        <P id="jcr"><A href="http://jackrabbit.apache.org/"><IMG src="http://jackrabbit.apache.org/style/jlogo.gif" alt="Apache Jackrabbit" height="100" width="336"></A></P>
+        <P id="asf"><A href="http://www.apache.org/"><IMG src="http://jackrabbit.apache.org/style/asf-logo.gif" alt="Apache Software Foundation" height="100" width="387"></A></P>
+      </DIV>
+      <DIV id="body">
+        <DIV id="navigation">
+  <UL>
+	<LI>Apache Jackrabbit
+	<UL>
+		<LI><A href="welcome-to-apache-jackrabbit.html" title="Welcome to Apache Jackrabbit">Welcome</A></LI>
+		<LI><A href="downloads.html" title="Downloads">Downloads</A></LI>
+		<LI><A href="frequently-asked-questions.html" title="Frequently Asked Questions">FAQ</A></LI>
+		<LI><A href="http://wiki.apache.org/jackrabbit/FrontPage" class="external-link">Jackrabbit Wiki</A></LI>
+		<LI><A href="jackrabbit-history.html" title="Jackrabbit History">Jackrabbit History</A></LI>
+	</UL>
+	</LI>
+	<LI>Documentation
+	<UL>
+		<LI><A href="getting-started-with-apache-jackrabbit.html" title="Getting Started with Apache Jackrabbit">Getting Started</A></LI>
+		<LI><A href="standalone-server.html" title="Standalone Server">Standalone Server</A></LI>
+		<LI><A href="jackrabbit-components.html" title="Jackrabbit Components">Jackrabbit Components</A></LI>
+		<LI><A href="first-hops.html" title="First Hops">First Hops</A></LI>
+		<LI><A href="jcr-api.html" title="JCR & API">JCR &amp; API</A></LI>
+		<LI><A href="jackrabbit-architecture.html" title="Jackrabbit Architecture">Jackrabbit Architecture</A></LI>
+		<LI><A href="deployment-models.html" title="Deployment Models">Deployment Models</A></LI>
+		<LI><A href="jackrabbit-configuration.html" title="Jackrabbit Configuration">Jackrabbit Configuration</A></LI>
+		<LI><A href="" title="Node Types">Node Types</A></LI>
+		<LI><A href="object-content-mapping.html" title="Object Content Mapping">Object Content Mapping</A></LI>
+	</UL>
+	</LI>
+	<LI>Development
+	<UL>
+		<LI><A href="jackrabbit-team.html" title="Jackrabbit Team">Jackrabbit Team</A></LI>
+		<LI><A href="jackrabbit-roadmap.html" title="Jackrabbit Roadmap">Jackrabbit Roadmap</A></LI>
+		<LI><A href="building-jackrabbit.html" title="Building Jackrabbit">Building Jackrabbit</A></LI>
+		<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
+		<LI><A href="issue-tracker.html" title="Issue Tracker">Issue Tracker</A></LI>
+		<LI><A href="source-repository.html" title="Source Repository">Source Repository</A></LI>
+		<LI><A href="continuous-integration.html" title="Continuous Integration">Continuous Integration</A></LI>
+		<LI><A href="website.html" title="Website">Website</A></LI>
+		<LI><A href="creating-releases.html" title="Creating Releases">Creating Releases</A></LI>
+		<LI><A href="supporting-software-attribution.html" title="Supporting software attribution">Attribution</A></LI>
+	</UL>
+	</LI>
+	<LI>Apache Software Foundation
+	<UL>
+		<LI><A href="http://www.apache.org/foundation/how-it-works.html" class="external-link">Introduction</A></LI>
+		<LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link">Sponsorship</A></LI>
+		<LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link">Current Sponsors</A></LI>
+	</UL>
+	</LI>
+</UL>
+        </DIV>
+        <DIV id="content">
+          <H1>Node Types</H1>
+  <P>Each node in a Jackrabbit workspace tree has a node type that defines the child nodes and properties it may (or must) have. Developers can use node types to define a custom content model for their application domain and have Jackrabbit enforce the constraints of that model at the repository level.</P>
+
+<H2><A name="NodeTypes-PrimaryvsMixin"></A>Primary vs Mixin</H2>
+
+<P>There are two categories of node types, <B>primary</B> and <B>mixin</B>. Every node has a primary node type assigned to it upon creation (see <TT>Node.addNode</TT> in the JCR API). In addition, a mixin node type may be added to a node later in its lifecycle (see <TT>Node.addMixin</TT>).</P>
+
+<P>The primary node type of a node usually defines node structure (i.e., allowed and required child nodes and properties) related to the problem domain being modeled. For example, a node used in storing content about business contacts might have the primary type <TT>myapp:Contact</TT> which defines properties such as <TT>myapp:givenName</TT>, <TT>myapp:familyName</TT> and so forth.</P>
+
+<P>Mixin node types usually specify additional properties or child nodes related to a capability being added to the node. These capabilities may include generic repository-level functions as in the case of the built-in mixins <TT>mix:versionable</TT> and <TT>mix:lockable</TT>, for example, or domain-level capabilities such as a (hypothetical) <TT>myapp:Emailable</TT> mixin type that adds the property <TT>myapp:emailAddress</TT> to a node.</P>
+
+<H2><A name="NodeTypes-Inheritance"></A>Inheritance</H2>
+
+<P>Primary node types are arranged in an inheritance hierarchy. Every primary node type must be the subtype of at least one existing node type. The built-in node type <TT>nt:base</TT> serves as the root of this hierarchy. Jackrabbit supports multiple inheritance of node types so node types can have more than one supertype.</P>
+
+<P>Mixin node types do not have to have supertypes.</P>
+
+<P>The JSR 170 specification and the current public review draft of the JSR 283 specification (section 4.7.7) leave it up to the implementation whether e.g. the orderable child nodes setting is inherited from supertypes. Inheritance semantics, especially with multiple inheritance, are non-trivial at best and up to a certain degree arbitrary. Jackrabbit therefore, in compliance with the spec, doesn't support inheritance of node type attributes such as orderable.</P>
+
+<H2><A name="NodeTypes-NodeTypeDefinition"></A>Node Type Definition</H2>
+
+<P>A node type definition has the following attributes:</P>
+
+<UL>
+	<LI><B>Name</B> Every node type registered with the repository has a unique name. The naming conventions for node                     types are the same as for items (i.e., they may have a colon delimited prefix).</LI>
+	<LI><B>Supertypes</B> A primary node type (with the exception of <TT>nt:base</TT>) must extend another node type (and may extend more than one node type). A mixin node type may extend another node type.</LI>
+	<LI><B>Mixin Status</B> A node type may be either primary or mixin.</LI>
+	<LI><B>Orderable Child Nodes Status</B> A primary node type may specify that child nodes are client-orderable. If this status is set to true, then <TT>Node.orderBefore</TT> can be used to set the order of child nodes. Only primary node types control a node's status in this regard. This setting on a mixin node type will not have                     any effect on the node.</LI>
+	<LI><B>Property Definitions</B> A node type contains a set of definitions specifying the properties that nodes of this node type are allowed (or required) to have and the characteristics of those properties (see below).</LI>
+	<LI><B>Child Node Definitions</B> A node type contains a set of definitions specifying the child nodes that nodes of this node type are allowed (or required) to have and the characteristics of those child nodes (including, in turn, their node types, see below).</LI>
+	<LI><B>Primary Item Name</B> A node type may specify one child item (property or node) by name as the primary item. This indicator is used by the method <TT>Node.getPrimaryItem()</TT>.</LI>
+</UL>
+
+
+<H2><A name="NodeTypes-PropertyDefinition"></A>Property Definition</H2>
+
+<P>A property definition (within a node type definition) contains the the following information:</P>
+
+<UL>
+	<LI><B>Name</B> The name of the property to which this definition applies, or &quot;<TT>*</TT>&quot; if this definition is                         a &quot;residual definition', meaning that it applies to any additional properties with any names apart from those otherwise defined in this node type.</LI>
+	<LI><B>Required Type</B> The required type of the property. One of
+	<UL>
+		<LI><TT>STRING</TT></LI>
+		<LI><TT>BINARY</TT></LI>
+		<LI><TT>LONG</TT></LI>
+		<LI><TT>DOUBLE</TT></LI>
+		<LI><TT>BOOLEAN</TT></LI>
+		<LI><TT>DATE</TT></LI>
+		<LI><TT>PATH</TT></LI>
+		<LI><TT>NAME</TT></LI>
+		<LI><TT>REFERENCE</TT></LI>
+		<LI><TT>UNDEFINED</TT> (the property can be of any type)</LI>
+	</UL>
+	</LI>
+	<LI><B>Value Constraints</B> The value constraints on the property define the range of values that may be assigned                         to this property.</LI>
+	<LI><B>Default Value</B> The value that the property will have if it is auto-created.</LI>
+	<LI><B>Auto-create Status</B> Whether this property will be auto-created when its parent node is created. Only properties with a default value can be auto-created.</LI>
+	<LI><B>Mandatory Status</B> A mandatory property is one that must exist. If a node of a type that specifies a                         mandatory property is created then any attempt to save that node without adding the mandatory property will fail. Since single-value properties either have a value or do not exist (there being no concept of the null value) this implies that a mandatory single-value property must have a value. A mandatory multi-value property on the other hand may have zero or more values.</LI>
+	<LI><B>On-Parent-Version Status</B> The <TT>onParentVersion</TT> status of specifies what happens to this property if a                         new version of its parent node is created (i.e. a checked-in is done on it).</LI>
+	<LI><B>Protected Status</B> A protected property is one which cannot be modified (i.e. have child nodes or properties added or removed) or removed from its parent through the JCR API.</LI>
+	<LI><B>Multiple Values Status</B> Whether this property can have multiple values, meaning that it stores an array of values, not just one. Note that this &quot;multiple values&quot; flag is special in that a given node type may have two property definitions that are identical in every respect except for the their &quot;multiple values&quot; status. For example, a node type can specify two string properties both called X, one of which is multi-valued and the other that is not. An example of such a node type is <TT>nt:unstructured</TT>.</LI>
+</UL>
+
+
+<H2><A name="NodeTypes-ChildNodeDefinition"></A>Child Node Definition</H2>
+
+<P>A child node definition (within a node type definition) contains the the following information:</P>
+
+<UL>
+	<LI><B>Name</B> The name of the child node to which this definition applies or &quot;<TT>*</TT>&quot; if this definition is                         a &quot;residual definition', meaning that it applies to any additional child nodes with any                         names apart from those otherwise defined in this node type.</LI>
+	<LI><B>Required Primary Types</B> If it specifies only a single node type N then the primary node type of this child node must be N or a subtype of N. If this attribute specifies multiple node types N1, N2,..., Nm then the primary node type of this child node must be a subtype of all the types N1, N2, ... Nm. Note that this                         is possible because Jackrabbit supports multiple inheritance among node types and that each node still has one and only one primary node type.</LI>
+	<LI><B>Default Primary Type</B> This is the primary node type automatically assigned if no node type information is specified when the node is created.</LI>
+	<LI><B>Auto-create Status</B> Governs whether this child node will be auto-created when its parent node is created.</LI>
+	<LI><B>Mandatory Status</B> Governs whether the child node is mandatory. A mandatory child node is one that must exist. If a mandatory child node is missing from a parent node then save on the parent node will fail.</LI>
+	<LI><B>On-Parent-Version Status</B> This specifies what to do with the child node if its parent node is versioned.</LI>
+	<LI><B>Protected Status</B> This governs whether the child node is protected. A protected node is one which cannot be modified (have child node or properties added to it or removed from it) or be removed from its                         parent through the JCR API.</LI>
+	<LI><B>Same-Name Siblings Status</B> This governs whether this child node can have same-name siblings, meaning that the parent node can have more than one child node of this name.</LI>
+</UL>
+
+
+<H2><A name="NodeTypes-RegisteringNodeTypes"></A>Registering Node Types</H2>
+
+<P>Each Jackrabbit instance has a <TT>NodeTypeRegistry</TT> which is created on start-up and populated with the set of built-in node types (these include both those required by the JCR specification and others required by the Jackrabbit implementation).</P>
+
+<P>First you define your node types in a text file using the &quot;Compact Namespace and Node Type Definition&quot; (CND) notation, then register them using the  <A href="http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/api/JackrabbitNodeTypeManager.html" class="external-link"><TT>JackrabbitNodeTypeManager</TT></A>. The following code gives an example:</P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+<SPAN class="code-keyword">import</SPAN> javax.jcr.Session;
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.api.JackrabbitNodeTypeManager;
+<SPAN class="code-keyword">import</SPAN> java.io.FileInputStream;
+
+<SPAN class="code-keyword">public</SPAN> class CustomNodeTypeExample {
+    <SPAN class="code-keyword">public</SPAN> <SPAN class="code-keyword">static</SPAN> void RegisterCustomNodeTypes(Session session, <SPAN class="code-object">String</SPAN> cndFileName)
+        <SPAN class="code-keyword">throws</SPAN> Exception {
+
+        <SPAN class="code-comment">// Get the JackrabbitNodeTypeManager from the Workspace.
+</SPAN>        <SPAN class="code-comment">// Note that it must be <SPAN class="code-keyword">cast</SPAN> from the <SPAN class="code-keyword">generic</SPAN> JCR NodeTypeManager to the
+</SPAN>        <SPAN class="code-comment">// Jackrabbit-specific implementation.
+</SPAN>        JackrabbitNodeTypeManager manager = (JackrabbitNodeTypeManager)
+               session.getWorkspace().getNodeTypeManager();
+        <SPAN class="code-comment">// Register the custom node types defined in the CND file
+</SPAN>        manager.registerNodeTypes(<SPAN class="code-keyword">new</SPAN> FileInputStream(cndFileName),
+               JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
+    }
+}
+</PRE>
+</DIV></DIV>
+
+<P>Continue to <A href="node-type-notation.html" title="Node Type Notation">Node Type Notation</A> or <A href="node-type-visualization.html" title="Node Type Visualization">Node Type Visualization</A></P>
+        </DIV>
+        <DIV id="end"></DIV>
+      </DIV>
+      <DIV id="footer">
+        <P>
+          &copy; 2004-2010 The Apache Software Foundation.
+          - <A href="http://jackrabbit.apache.org/privacy-policy.html">Privacy Policy</A> -
+          [<A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=75299">edit this page</A>]
+          <BR>
+          Apache Jackrabbit, Jackrabbit, Apache, the Apache feather logo, and the Apache
+          Jackrabbit project logo are trademarks of The Apache Software Foundation.
+        </P>
+      </DIV>
+    </DIV>
+<!-- JCR- 1315: Add Google Analytics to Jackrabbit web site -->
+<SCRIPT type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</SCRIPT>
+<SCRIPT type="text/javascript">
+var pageTracker = _gat._getTracker("UA-837900-2");
+pageTracker._initData();
+pageTracker._trackPageview();
+</SCRIPT>
+  </BODY>
+</HTML>

Added: jackrabbit/site/trunk/content/JCR/object-content-manager.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/JCR/object-content-manager.html?rev=1427110&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/JCR/object-content-manager.html (added)
+++ jackrabbit/site/trunk/content/JCR/object-content-manager.html Mon Dec 31 12:40:09 2012
@@ -0,0 +1,231 @@
+
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE- 2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License. 
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>Object Content Manager</TITLE>
+    <LINK type="text/css" rel="stylesheet" href="http://jackrabbit.apache.org/style/site.css">
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY>
+    <DIV id="page">
+      <DIV id="header">
+        <P id="jcr"><A href="http://jackrabbit.apache.org/"><IMG src="http://jackrabbit.apache.org/style/jlogo.gif" alt="Apache Jackrabbit" height="100" width="336"></A></P>
+        <P id="asf"><A href="http://www.apache.org/"><IMG src="http://jackrabbit.apache.org/style/asf-logo.gif" alt="Apache Software Foundation" height="100" width="387"></A></P>
+      </DIV>
+      <DIV id="body">
+        <DIV id="navigation">
+  <UL>
+	<LI>Apache Jackrabbit
+	<UL>
+		<LI><A href="welcome-to-apache-jackrabbit.html" title="Welcome to Apache Jackrabbit">Welcome</A></LI>
+		<LI><A href="downloads.html" title="Downloads">Downloads</A></LI>
+		<LI><A href="frequently-asked-questions.html" title="Frequently Asked Questions">FAQ</A></LI>
+		<LI><A href="http://wiki.apache.org/jackrabbit/FrontPage" class="external-link">Jackrabbit Wiki</A></LI>
+		<LI><A href="jackrabbit-history.html" title="Jackrabbit History">Jackrabbit History</A></LI>
+	</UL>
+	</LI>
+	<LI>Documentation
+	<UL>
+		<LI><A href="getting-started-with-apache-jackrabbit.html" title="Getting Started with Apache Jackrabbit">Getting Started</A></LI>
+		<LI><A href="standalone-server.html" title="Standalone Server">Standalone Server</A></LI>
+		<LI><A href="jackrabbit-components.html" title="Jackrabbit Components">Jackrabbit Components</A></LI>
+		<LI><A href="first-hops.html" title="First Hops">First Hops</A></LI>
+		<LI><A href="jcr-api.html" title="JCR & API">JCR &amp; API</A></LI>
+		<LI><A href="jackrabbit-architecture.html" title="Jackrabbit Architecture">Jackrabbit Architecture</A></LI>
+		<LI><A href="deployment-models.html" title="Deployment Models">Deployment Models</A></LI>
+		<LI><A href="jackrabbit-configuration.html" title="Jackrabbit Configuration">Jackrabbit Configuration</A></LI>
+		<LI><A href="node-types.html" title="Node Types">Node Types</A></LI>
+		<LI><A href="object-content-mapping.html" title="Object Content Mapping">Object Content Mapping</A></LI>
+	</UL>
+	</LI>
+	<LI>Development
+	<UL>
+		<LI><A href="jackrabbit-team.html" title="Jackrabbit Team">Jackrabbit Team</A></LI>
+		<LI><A href="jackrabbit-roadmap.html" title="Jackrabbit Roadmap">Jackrabbit Roadmap</A></LI>
+		<LI><A href="building-jackrabbit.html" title="Building Jackrabbit">Building Jackrabbit</A></LI>
+		<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
+		<LI><A href="issue-tracker.html" title="Issue Tracker">Issue Tracker</A></LI>
+		<LI><A href="source-repository.html" title="Source Repository">Source Repository</A></LI>
+		<LI><A href="continuous-integration.html" title="Continuous Integration">Continuous Integration</A></LI>
+		<LI><A href="website.html" title="Website">Website</A></LI>
+		<LI><A href="creating-releases.html" title="Creating Releases">Creating Releases</A></LI>
+		<LI><A href="supporting-software-attribution.html" title="Supporting software attribution">Attribution</A></LI>
+	</UL>
+	</LI>
+	<LI>Apache Software Foundation
+	<UL>
+		<LI><A href="http://www.apache.org/foundation/how-it-works.html" class="external-link">Introduction</A></LI>
+		<LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link">Sponsorship</A></LI>
+		<LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link">Current Sponsors</A></LI>
+	</UL>
+	</LI>
+</UL>
+        </DIV>
+        <DIV id="content">
+          <H1>Object Content Manager</H1>
+  <P>The main component in the OCM framework is the ObjectContentManager. It converts an object graph into JCR nodes and properties and vice versa. The ObjectContentManager is always associated with a JCR Session. It is used to retrieve, create, update and delete objects from a JCR content repository. Usually there is one ObjectContentManager per user session.</P>
+
+<P>This page describes how an ObjectContentManager is working and how it can be initialised in your applications. </P>
+
+<H2><A name="ObjectContentManager-HowdoestheObjectContentManagerwork%3F"></A>How does the Object Content Manager work ?</H2>
+
+<P>Thanks to a Mapping Descriptor, the ObjectContentManager is able to use the appropriate mapping strategy for each persistent object (pojo). The Mapping Descriptor contains one Class Descriptor per persistent class. Each Class Descriptor contains mapping information for the corresponding class attributes.</P>
+
+<P>In the point of view implementation, the Mappring Descriptor is a java object injected into the ObjectContentManager (see the interface org.apache.jackrabbit.ocm.mapper.Mapper). Right now, there are 2 different Mapping Descriptor implementations:</P>
+
+<UL>
+	<LI>Annotation : each persistent object is annoted in order to provide to the ObjectContentManager all the required information on its mapping strategy (see the class org.apache.jackrabbit.ocm.mapper.impl.annotation.AnnotationMapperImpl).</LI>
+	<LI>XML configuration file : the class descriptors are defined in one or more XML config files used by the ObjectContentManager when it is instantiated (see the class org.apache.jackrabbit.ocm.mapper.impl.digester.DigesterMapperImpl).</LI>
+</UL>
+
+
+<P>For a business developer, it is not necessary to know how the ObjectContentManager is using the Class Descriptors. He has to make only a choice between annoted classes or XML files. Below, you can see how to setup correctly an ObjectContentManager. </P>
+
+<H2><A name="ObjectContentManager-HowdoesanobjectispersistedintoaJCRrepository%3F"></A>How does an object is persisted into a JCR repository ?</H2>
+
+<P>In all cases, a persistent object (a pojo) is mapped into a JCR node and its fields are mapped into subnodes or properties depending on their types.</P>
+
+<P>There are 3 &quot;field types&quot;:</P>
+
+<UL>
+	<LI>Atomic fields<BR>
+    Primitive data types and simple objects (String, Long, Double, ...) . Those fields are mapped into JCR properties. </LI>
+</UL>
+
+
+<UL>
+	<LI>Bean fields<BR>
+    One class can contain an 1..1 association to another bean. In this case, the field is a custom object. Those fields are mapped into JCR subnodes or a referenced node. </LI>
+</UL>
+
+
+<UL>
+	<LI>Collection fields<BR>
+    One class can contain an 1..n association to a collection of beans (or Map). Those fields are mapped into a collection of JCR subnodes or a collection of referenced nodes. It is also possible to map a java collection into a multivalue property. </LI>
+</UL>
+
+
+<P>The Mapping descriptor contains also information on inheritances, interface mapping strategy, lazy loading, custom converter, cache strategy, etc. </P>
+<H2><A name="ObjectContentManager-Basicsetup%28withannotedpersistentclasses%29"></A>Basic setup (with annoted persistent classes)</H2>
+
+<P>When you start your application, you need the following code to initialize correctly the Object Content Manager.</P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+<SPAN class="code-keyword">import</SPAN> javax.jcr.Session;
+<SPAN class="code-keyword">import</SPAN> javax.jcr.Repository;
+		      
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.mapper.Mapper;
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.mapper.impl.annotation.AnnotationMapperImpl;
+
+		      
+<SPAN class="code-comment">// 1. Instantiate a JCR session
+</SPAN>Repository repository = ...;
+Session session = repository.login(...);
+		      
+<SPAN class="code-comment">// 2. Register the different persistent classes
+</SPAN>List classes = <SPAN class="code-keyword">new</SPAN> ArrayList();
+classes.add(MyContent.class); <SPAN class="code-comment">// Call <SPAN class="code-keyword">this</SPAN> method <SPAN class="code-keyword">for</SPAN> each persistent class
+</SPAN>
+				      
+<SPAN class="code-comment">// 3. Instantiate the object content manager
+</SPAN>Mapper mapper = <SPAN class="code-keyword">new</SPAN> AnnotationMapperImpl(classes);
+ObjectContentManager ocm = <SPAN class="code-keyword">new</SPAN> ObjectContentManagerImpl(session, mapper);
+</PRE>
+</DIV></DIV>
+
+<H2><A name="ObjectContentManager-Basicsetup%28withoneormoreXMLMappingDescriptorfiles%29"></A>Basic setup (with one or more XML Mapping Descriptor files)</H2>
+
+<P>When you start your application, you need the following code to initialize correctly the Object Content Manager.</P>
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+<SPAN class="code-keyword">import</SPAN> javax.jcr.Session;
+<SPAN class="code-keyword">import</SPAN> javax.jcr.Repository;
+
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.mapper.Mapper;
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.mapper.impl.digester.DigesterMapperImpl;
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.manager.ObjectContentManager;
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl;
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.manager.atomictypeconverter.AtomicTypeConverterProvider;
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.manager.atomictypeconverter.impl.DefaultAtomicTypeConverterProvider;
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.manager.objectconverter.ObjectConverter;
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl;
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.query.QueryManager;
+<SPAN class="code-keyword">import</SPAN> org.apache.jackrabbit.ocm.query.impl.QueryManagerImpl;
+
+<SPAN class="code-comment">// 1. Instantiate a JCR session
+</SPAN>Repository repository = ...;
+Session session = repository.login(...);
+
+<SPAN class="code-comment">// 2. Specify the different mapping files
+</SPAN><SPAN class="code-object">String</SPAN>[] files = {
+      <SPAN class="code-quote">&quot;./src/test-config/jcrmapping.xml&quot;</SPAN>,
+      <SPAN class="code-quote">&quot;./src/test-config/jcrmapping-atomic.xml&quot;</SPAN>,
+      <SPAN class="code-quote">&quot;./src/test-config/jcrmapping-beandescriptor.xml&quot;</SPAN>
+  };
+
+<SPAN class="code-comment">// 3. Instantiate the object content manager
+</SPAN>ObjectContentManager ocm = <SPAN class="code-keyword">new</SPAN> ObjectContentManagerImpl(session, files);
+
+</PRE>
+</DIV></DIV>
+
+
+<H2><A name="ObjectContentManager-APIOverview"></A>API Overview</H2>
+
+<P>With the current Object Manager API, it is possible to:</P>
+
+<UL>
+	<LI>Manage the object life cycle (insert, update, delete, retrieve). See <A href="basic-ocm-operations.html" title="Basic OCM operations">Basic OCM operations</A>.</LI>
+	<LI>Search single object or collections with criteria. See <A href="ocm-search.html" title="OCM Search">OCM Search</A>.</LI>
+	<LI>Lock objects. See <A href="ocm-locking.html" title="OCM Locking">OCM Locking</A>.</LI>
+	<LI>Manage versions (check int, check out, create a new version, show history). See <A href="ocm-version-management.html" title="OCM Version Management">OCM Version Management</A>.</LI>
+</UL>
+
+
+<P>We plan to add other features in a future release. </P>
+        </DIV>
+        <DIV id="end"></DIV>
+      </DIV>
+      <DIV id="footer">
+        <P>
+          &copy; 2004-2010 The Apache Software Foundation.
+          - <A href="http://jackrabbit.apache.org/privacy-policy.html">Privacy Policy</A> -
+          [<A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=75349">edit this page</A>]
+          <BR>
+          Apache Jackrabbit, Jackrabbit, Apache, the Apache feather logo, and the Apache
+          Jackrabbit project logo are trademarks of The Apache Software Foundation.
+        </P>
+      </DIV>
+    </DIV>
+<!-- JCR- 1315: Add Google Analytics to Jackrabbit web site -->
+<SCRIPT type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</SCRIPT>
+<SCRIPT type="text/javascript">
+var pageTracker = _gat._getTracker("UA-837900-2");
+pageTracker._initData();
+pageTracker._trackPageview();
+</SCRIPT>
+  </BODY>
+</HTML>

Added: jackrabbit/site/trunk/content/JCR/object-content-mapping.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/JCR/object-content-mapping.html?rev=1427110&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/JCR/object-content-mapping.html (added)
+++ jackrabbit/site/trunk/content/JCR/object-content-mapping.html Mon Dec 31 12:40:09 2012
@@ -0,0 +1,159 @@
+
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE- 2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License. 
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>Object Content Mapping</TITLE>
+    <LINK type="text/css" rel="stylesheet" href="http://jackrabbit.apache.org/style/site.css">
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY>
+    <DIV id="page">
+      <DIV id="header">
+        <P id="jcr"><A href="http://jackrabbit.apache.org/"><IMG src="http://jackrabbit.apache.org/style/jlogo.gif" alt="Apache Jackrabbit" height="100" width="336"></A></P>
+        <P id="asf"><A href="http://www.apache.org/"><IMG src="http://jackrabbit.apache.org/style/asf-logo.gif" alt="Apache Software Foundation" height="100" width="387"></A></P>
+      </DIV>
+      <DIV id="body">
+        <DIV id="navigation">
+  <UL>
+	<LI>Apache Jackrabbit
+	<UL>
+		<LI><A href="welcome-to-apache-jackrabbit.html" title="Welcome to Apache Jackrabbit">Welcome</A></LI>
+		<LI><A href="downloads.html" title="Downloads">Downloads</A></LI>
+		<LI><A href="articles.html" title="Articles">Articles</A></LI>
+		<LI><A href="frequently-asked-questions.html" title="Frequently Asked Questions">FAQ</A></LI>
+		<LI><A href="http://wiki.apache.org/jackrabbit/FrontPage" class="external-link">Jackrabbit Wiki</A></LI>
+		<LI><A href="jackrabbit-history.html" title="Jackrabbit History">Jackrabbit History</A></LI>
+	</UL>
+	</LI>
+	<LI>Documentation
+	<UL>
+		<LI><A href="getting-started-with-apache-jackrabbit.html" title="Getting Started with Apache Jackrabbit">Getting Started</A></LI>
+		<LI><A href="standalone-server.html" title="Standalone Server">Standalone Server</A></LI>
+		<LI><A href="jackrabbit-components.html" title="Jackrabbit Components">Jackrabbit Components</A></LI>
+		<LI><A href="first-hops.html" title="First Hops">First Hops</A></LI>
+		<LI><A href="jcr-api.html" title="JCR & API">JCR &amp; API</A></LI>
+		<LI><A href="jackrabbit-architecture.html" title="Jackrabbit Architecture">Jackrabbit Architecture</A></LI>
+		<LI><A href="deployment-models.html" title="Deployment Models">Deployment Models</A></LI>
+		<LI><A href="jackrabbit-configuration.html" title="Jackrabbit Configuration">Jackrabbit Configuration</A></LI>
+		<LI><A href="node-types.html" title="Node Types">Node Types</A></LI>
+		<LI><A href="" title="Object Content Mapping">Object Content Mapping</A></LI>
+	</UL>
+	</LI>
+	<LI>Development
+	<UL>
+		<LI><A href="jackrabbit-team.html" title="Jackrabbit Team">Jackrabbit Team</A></LI>
+		<LI><A href="jackrabbit-roadmap.html" title="Jackrabbit Roadmap">Jackrabbit Roadmap</A></LI>
+		<LI><A href="building-jackrabbit.html" title="Building Jackrabbit">Building Jackrabbit</A></LI>
+		<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
+		<LI><A href="issue-tracker.html" title="Issue Tracker">Issue Tracker</A></LI>
+		<LI><A href="source-repository.html" title="Source Repository">Source Repository</A></LI>
+		<LI><A href="continuous-integration.html" title="Continuous Integration">Continuous Integration</A></LI>
+		<LI><A href="website.html" title="Website">Website</A></LI>
+		<LI><A href="creating-releases.html" title="Creating Releases">Creating Releases</A></LI>
+		<LI><A href="supporting-software-attribution.html" title="Supporting software attribution">Attribution</A></LI>
+	</UL>
+	</LI>
+	<LI>Apache Software Foundation
+	<UL>
+		<LI><A href="http://www.apache.org/foundation/how-it-works.html" class="external-link">Introduction</A></LI>
+		<LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link">Sponsorship</A></LI>
+		<LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link">Current Sponsors</A></LI>
+	</UL>
+	</LI>
+</UL>
+        </DIV>
+        <DIV id="content">
+          <H1>Object Content Mapping</H1>
+  <DIV class="panelMacro"><TABLE class="warningMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>Warning</B><BR>The Jackrabbit OCM documentation is still in progress. We advise you also to review  <A href="http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-ocm/src/test/" class="external-link">the unit tests</A>to get an overview on current OCM features.</TD></TR></TABLE></DIV>
+
+<P>Latest stable Jackrabbit OCM is version 2.0.0, see <A href="downloads.html#Downloads-ocm">downloads page</A></P>
+
+<UL>
+	<LI><A href="object-content-manager.html" title="Object Content Manager">Object Content Manager</A>
+	<UL>
+		<LI><A href="basic-ocm-operations.html" title="Basic OCM operations">Basic OCM operations</A></LI>
+		<LI><A href="ocm-search.html" title="OCM Search">OCM Search</A></LI>
+		<LI><A href="ocm-version-management.html" title="OCM Version Management">OCM Version Management</A></LI>
+		<LI><A href="ocm-locking.html" title="OCM Locking">OCM Locking</A></LI>
+	</UL>
+	</LI>
+	<LI>Tutorials
+	<UL>
+		<LI><A href="5-with-jackrabbit-ocm.html" title="5' with Jackrabbit OCM">5' with Jackrabbit OCM</A></LI>
+		<LI><A href="a-simple-ocm-project-with-maven-eclipse.html" title="A simple OCM project with Maven & Eclipse">A simple OCM project with Maven &amp; Eclipse</A></LI>
+		<LI><A href="how-to-map-associations-between-objects.html" title="How to map associations between objects">How to map associations between objects</A></LI>
+	</UL>
+	</LI>
+	<LI><A href="mapping-stategies.html" title="Mapping Stategies">Mapping Stategies</A> (obsolete doc)
+	<UL>
+		<LI><A href="mapping-atomic-fields.html" title="Mapping Atomic Fields">Mapping Atomic Fields</A> (obsolete doc)</LI>
+		<LI><A href="mapping-bean-fields.html" title="Mapping Bean Fields">Mapping Bean Fields</A> (obsolete doc)</LI>
+		<LI><A href="mapping-collection-fields.html" title="Mapping Collection Fields">Mapping Collection Fields</A> (obsolete doc)</LI>
+		<LI><A href="advanced-mapping-strategies.html" title="Advanced Mapping Strategies">Advanced Mapping Strategies</A> (obsolete doc)</LI>
+	</UL>
+	</LI>
+</UL>
+
+
+<P>Jackrabbit OCM is a framework used to persist java objects (pojos) in a JCR repository including association, inheritance, polymorphism, composition, and the Java collections framework. It offers also features like version support, object locking and express queries with Java-based criteria, as well as with JCR query languages.</P>
+
+<P>In order to easily support the JCR specification, any content application managing an high level object model can use this framework. For example, a classic Forum application contains objects like &quot;Forum&quot;, &quot;Topic&quot; and &quot;Post&quot;. Now, the data objects (pojo) can be managed by our JCR mapping tools in order to persist them into a JCR compliant repository.</P>
+
+<H2><A name="ObjectContentMapping-Whyanocm%3F"></A>Why an ocm?</H2>
+
+<P>The object content mapping framework was created for the following different reasons:</P>
+
+<UL>
+	<LI>Sometimes it is very convenient to be able to just access the JCR nodes and properties directly from your presentation-layer for very simple things (mostly generic display). When a lot of &quot;business logic&quot; are involved, the JCR API can be too low level and real business objects (pojo) are more appreciate in such cases.</LI>
+	<LI>The OCM framework provides more abstraction on the technologies used to persist your content. The different application layers are less dependent on the JCR API.</LI>
+	<LI>ORM tools like OJB or Hibernate are not appropriate for content oriented application.</LI>
+</UL>
+
+
+<H2><A name="ObjectContentMapping-Prerequisite"></A>Prerequisite</H2>
+
+<P>Before using this OCM framework, you should review the JCR specification and implementations like Apache Jackrabbit.</P>
+        </DIV>
+        <DIV id="end"></DIV>
+      </DIV>
+      <DIV id="footer">
+        <P>
+          &copy; 2004-2010 The Apache Software Foundation.
+          - <A href="http://jackrabbit.apache.org/privacy-policy.html">Privacy Policy</A> -
+          [<A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=75348">edit this page</A>]
+          <BR>
+          Apache Jackrabbit, Jackrabbit, Apache, the Apache feather logo, and the Apache
+          Jackrabbit project logo are trademarks of The Apache Software Foundation.
+        </P>
+      </DIV>
+    </DIV>
+<!-- JCR- 1315: Add Google Analytics to Jackrabbit web site -->
+<SCRIPT type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</SCRIPT>
+<SCRIPT type="text/javascript">
+var pageTracker = _gat._getTracker("UA-837900-2");
+pageTracker._initData();
+pageTracker._trackPageview();
+</SCRIPT>
+  </BODY>
+</HTML>

Added: jackrabbit/site/trunk/content/JCR/ocm-locking.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/JCR/ocm-locking.html?rev=1427110&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/JCR/ocm-locking.html (added)
+++ jackrabbit/site/trunk/content/JCR/ocm-locking.html Mon Dec 31 12:40:09 2012
@@ -0,0 +1,176 @@
+
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE- 2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License. 
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>OCM Locking</TITLE>
+    <LINK type="text/css" rel="stylesheet" href="http://jackrabbit.apache.org/style/site.css">
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY>
+    <DIV id="page">
+      <DIV id="header">
+        <P id="jcr"><A href="http://jackrabbit.apache.org/"><IMG src="http://jackrabbit.apache.org/style/jlogo.gif" alt="Apache Jackrabbit" height="100" width="336"></A></P>
+        <P id="asf"><A href="http://www.apache.org/"><IMG src="http://jackrabbit.apache.org/style/asf-logo.gif" alt="Apache Software Foundation" height="100" width="387"></A></P>
+      </DIV>
+      <DIV id="body">
+        <DIV id="navigation">
+  <UL>
+	<LI>Apache Jackrabbit
+	<UL>
+		<LI><A href="welcome-to-apache-jackrabbit.html" title="Welcome to Apache Jackrabbit">Welcome</A></LI>
+		<LI><A href="downloads.html" title="Downloads">Downloads</A></LI>
+		<LI><A href="frequently-asked-questions.html" title="Frequently Asked Questions">FAQ</A></LI>
+		<LI><A href="http://wiki.apache.org/jackrabbit/FrontPage" class="external-link">Jackrabbit Wiki</A></LI>
+		<LI><A href="jackrabbit-history.html" title="Jackrabbit History">Jackrabbit History</A></LI>
+	</UL>
+	</LI>
+	<LI>Documentation
+	<UL>
+		<LI><A href="getting-started-with-apache-jackrabbit.html" title="Getting Started with Apache Jackrabbit">Getting Started</A></LI>
+		<LI><A href="standalone-server.html" title="Standalone Server">Standalone Server</A></LI>
+		<LI><A href="jackrabbit-components.html" title="Jackrabbit Components">Jackrabbit Components</A></LI>
+		<LI><A href="first-hops.html" title="First Hops">First Hops</A></LI>
+		<LI><A href="jcr-api.html" title="JCR & API">JCR &amp; API</A></LI>
+		<LI><A href="jackrabbit-architecture.html" title="Jackrabbit Architecture">Jackrabbit Architecture</A></LI>
+		<LI><A href="deployment-models.html" title="Deployment Models">Deployment Models</A></LI>
+		<LI><A href="jackrabbit-configuration.html" title="Jackrabbit Configuration">Jackrabbit Configuration</A></LI>
+		<LI><A href="node-types.html" title="Node Types">Node Types</A></LI>
+		<LI><A href="object-content-mapping.html" title="Object Content Mapping">Object Content Mapping</A></LI>
+	</UL>
+	</LI>
+	<LI>Development
+	<UL>
+		<LI><A href="jackrabbit-team.html" title="Jackrabbit Team">Jackrabbit Team</A></LI>
+		<LI><A href="jackrabbit-roadmap.html" title="Jackrabbit Roadmap">Jackrabbit Roadmap</A></LI>
+		<LI><A href="building-jackrabbit.html" title="Building Jackrabbit">Building Jackrabbit</A></LI>
+		<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
+		<LI><A href="issue-tracker.html" title="Issue Tracker">Issue Tracker</A></LI>
+		<LI><A href="source-repository.html" title="Source Repository">Source Repository</A></LI>
+		<LI><A href="continuous-integration.html" title="Continuous Integration">Continuous Integration</A></LI>
+		<LI><A href="website.html" title="Website">Website</A></LI>
+		<LI><A href="creating-releases.html" title="Creating Releases">Creating Releases</A></LI>
+		<LI><A href="supporting-software-attribution.html" title="Supporting software attribution">Attribution</A></LI>
+	</UL>
+	</LI>
+	<LI>Apache Software Foundation
+	<UL>
+		<LI><A href="http://www.apache.org/foundation/how-it-works.html" class="external-link">Introduction</A></LI>
+		<LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link">Sponsorship</A></LI>
+		<LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link">Current Sponsors</A></LI>
+	</UL>
+	</LI>
+</UL>
+        </DIV>
+        <DIV id="content">
+          <H1>OCM Locking</H1>
+  <P>Following the Jcr specification, it is possible to lock nodes and their children (see section 8.4). You can see on this page the OCM API used to lock on the object level. In order to lock an object, its matching node has to implement the jcr mixin type &quot;mix:lockable&quot;. It is possible to specify this node type in the class descriptor:</P>
+
+<H2><A name="OCMLocking-Abasicexample"></A>A basic example</H2>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+<SPAN class="code-comment">// --------------------------------------------------------------------------------
+</SPAN><SPAN class="code-comment">// Create and store an object graph in the repository
+</SPAN><SPAN class="code-comment">// --------------------------------------------------------------------------------
+</SPAN>A a = <SPAN class="code-keyword">new</SPAN> A();
+a.setPath(<SPAN class="code-quote">&quot;/test&quot;</SPAN>);
+a.setA1(<SPAN class="code-quote">&quot;a1&quot;</SPAN>);
+a.setA2(<SPAN class="code-quote">&quot;a2&quot;</SPAN>);
+B b = <SPAN class="code-keyword">new</SPAN> B();
+b.setB1(<SPAN class="code-quote">&quot;b1&quot;</SPAN>);
+b.setB2(<SPAN class="code-quote">&quot;b2&quot;</SPAN>);
+a.setB(b);
+
+C c1 = <SPAN class="code-keyword">new</SPAN> C();
+c1.setId(<SPAN class="code-quote">&quot;first&quot;</SPAN>);
+c1.setName(<SPAN class="code-quote">&quot;First Element&quot;</SPAN>);
+C c2 = <SPAN class="code-keyword">new</SPAN> C();
+c2.setId(<SPAN class="code-quote">&quot;second&quot;</SPAN>);
+c2.setName(<SPAN class="code-quote">&quot;Second Element&quot;</SPAN>);
+
+C c3 = <SPAN class="code-keyword">new</SPAN> C();
+c3.setId(<SPAN class="code-quote">&quot;third&quot;</SPAN>);
+c3.setName(<SPAN class="code-quote">&quot;Third Element&quot;</SPAN>);
+
+Collection collection = <SPAN class="code-keyword">new</SPAN> ArrayList();
+collection.add(c1);
+collection.add(c2);
+collection.add(c3);
+
+a.setCollection(collection);
+
+ocm.insert(a);
+ocm.save();
+
+
+<SPAN class="code-comment">// --------------------------------------------------------------------------------
+</SPAN><SPAN class="code-comment">// Check <SPAN class="code-keyword">if</SPAN> the object is not locked
+</SPAN><SPAN class="code-comment">// --------------------------------------------------------------------------------
+</SPAN><SPAN class="code-keyword">if</SPAN> (ocm.isLocked(<SPAN class="code-quote">&quot;/test&quot;</SPAN>))
+{
+   <SPAN class="code-object">System</SPAN>.out.println(<SPAN class="code-quote">&quot;Error : The object is locked- humm ??&quot;</SPAN>);
+}
+
+<SPAN class="code-comment">// --------------------------------------------------------------------------------
+</SPAN><SPAN class="code-comment">// Lock the object
+</SPAN><SPAN class="code-comment">// --------------------------------------------------------------------------------
+</SPAN><SPAN class="code-object">String</SPAN> lockToken = ocm.lock(<SPAN class="code-quote">&quot;/test&quot;</SPAN>, <SPAN class="code-keyword">true</SPAN>, <SPAN class="code-keyword">false</SPAN>);
+
+<SPAN class="code-comment">// --------------------------------------------------------------------------------
+</SPAN><SPAN class="code-comment">// Check <SPAN class="code-keyword">if</SPAN> the object is not locked
+</SPAN><SPAN class="code-comment">// --------------------------------------------------------------------------------
+</SPAN><SPAN class="code-keyword">if</SPAN> (! ocm.isLocked(<SPAN class="code-quote">&quot;/test&quot;</SPAN>))
+{
+   <SPAN class="code-object">System</SPAN>.out.println(<SPAN class="code-quote">&quot;Error : The object is not locked- humm ??&quot;</SPAN>);
+}
+
+<SPAN class="code-comment">// --------------------------------------------------------------------------------
+</SPAN><SPAN class="code-comment">// Unlock the object
+</SPAN><SPAN class="code-comment">// --------------------------------------------------------------------------------
+</SPAN>ocm.unlock(<SPAN class="code-quote">&quot;/test&quot;</SPAN>, lockToken);
+</PRE>
+</DIV></DIV>
+        </DIV>
+        <DIV id="end"></DIV>
+      </DIV>
+      <DIV id="footer">
+        <P>
+          &copy; 2004-2010 The Apache Software Foundation.
+          - <A href="http://jackrabbit.apache.org/privacy-policy.html">Privacy Policy</A> -
+          [<A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=75353">edit this page</A>]
+          <BR>
+          Apache Jackrabbit, Jackrabbit, Apache, the Apache feather logo, and the Apache
+          Jackrabbit project logo are trademarks of The Apache Software Foundation.
+        </P>
+      </DIV>
+    </DIV>
+<!-- JCR- 1315: Add Google Analytics to Jackrabbit web site -->
+<SCRIPT type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</SCRIPT>
+<SCRIPT type="text/javascript">
+var pageTracker = _gat._getTracker("UA-837900-2");
+pageTracker._initData();
+pageTracker._trackPageview();
+</SCRIPT>
+  </BODY>
+</HTML>

Added: jackrabbit/site/trunk/content/JCR/ocm-search.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/JCR/ocm-search.html?rev=1427110&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/JCR/ocm-search.html (added)
+++ jackrabbit/site/trunk/content/JCR/ocm-search.html Mon Dec 31 12:40:09 2012
@@ -0,0 +1,161 @@
+
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE- 2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License. 
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>OCM Search</TITLE>
+    <LINK type="text/css" rel="stylesheet" href="http://jackrabbit.apache.org/style/site.css">
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY>
+    <DIV id="page">
+      <DIV id="header">
+        <P id="jcr"><A href="http://jackrabbit.apache.org/"><IMG src="http://jackrabbit.apache.org/style/jlogo.gif" alt="Apache Jackrabbit" height="100" width="336"></A></P>
+        <P id="asf"><A href="http://www.apache.org/"><IMG src="http://jackrabbit.apache.org/style/asf-logo.gif" alt="Apache Software Foundation" height="100" width="387"></A></P>
+      </DIV>
+      <DIV id="body">
+        <DIV id="navigation">
+  <UL>
+	<LI>Apache Jackrabbit
+	<UL>
+		<LI><A href="welcome-to-apache-jackrabbit.html" title="Welcome to Apache Jackrabbit">Welcome</A></LI>
+		<LI><A href="downloads.html" title="Downloads">Downloads</A></LI>
+		<LI><A href="frequently-asked-questions.html" title="Frequently Asked Questions">FAQ</A></LI>
+		<LI><A href="http://wiki.apache.org/jackrabbit/FrontPage" class="external-link">Jackrabbit Wiki</A></LI>
+		<LI><A href="jackrabbit-history.html" title="Jackrabbit History">Jackrabbit History</A></LI>
+	</UL>
+	</LI>
+	<LI>Documentation
+	<UL>
+		<LI><A href="getting-started-with-apache-jackrabbit.html" title="Getting Started with Apache Jackrabbit">Getting Started</A></LI>
+		<LI><A href="standalone-server.html" title="Standalone Server">Standalone Server</A></LI>
+		<LI><A href="jackrabbit-components.html" title="Jackrabbit Components">Jackrabbit Components</A></LI>
+		<LI><A href="first-hops.html" title="First Hops">First Hops</A></LI>
+		<LI><A href="jcr-api.html" title="JCR & API">JCR &amp; API</A></LI>
+		<LI><A href="jackrabbit-architecture.html" title="Jackrabbit Architecture">Jackrabbit Architecture</A></LI>
+		<LI><A href="deployment-models.html" title="Deployment Models">Deployment Models</A></LI>
+		<LI><A href="jackrabbit-configuration.html" title="Jackrabbit Configuration">Jackrabbit Configuration</A></LI>
+		<LI><A href="node-types.html" title="Node Types">Node Types</A></LI>
+		<LI><A href="object-content-mapping.html" title="Object Content Mapping">Object Content Mapping</A></LI>
+	</UL>
+	</LI>
+	<LI>Development
+	<UL>
+		<LI><A href="jackrabbit-team.html" title="Jackrabbit Team">Jackrabbit Team</A></LI>
+		<LI><A href="jackrabbit-roadmap.html" title="Jackrabbit Roadmap">Jackrabbit Roadmap</A></LI>
+		<LI><A href="building-jackrabbit.html" title="Building Jackrabbit">Building Jackrabbit</A></LI>
+		<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
+		<LI><A href="issue-tracker.html" title="Issue Tracker">Issue Tracker</A></LI>
+		<LI><A href="source-repository.html" title="Source Repository">Source Repository</A></LI>
+		<LI><A href="continuous-integration.html" title="Continuous Integration">Continuous Integration</A></LI>
+		<LI><A href="website.html" title="Website">Website</A></LI>
+		<LI><A href="creating-releases.html" title="Creating Releases">Creating Releases</A></LI>
+		<LI><A href="supporting-software-attribution.html" title="Supporting software attribution">Attribution</A></LI>
+	</UL>
+	</LI>
+	<LI>Apache Software Foundation
+	<UL>
+		<LI><A href="http://www.apache.org/foundation/how-it-works.html" class="external-link">Introduction</A></LI>
+		<LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link">Sponsorship</A></LI>
+		<LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link">Current Sponsors</A></LI>
+	</UL>
+	</LI>
+</UL>
+        </DIV>
+        <DIV id="content">
+          <H1>OCM Search</H1>
+  
+<H2><A name="OCMSearch-Searchingasingleobject"></A>Searching a single object</H2>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+QueryManager queryManager = ocm.getQueryManager();
+
+<SPAN class="code-comment">// Build the search filter
+</SPAN>Filter filter = queryManager.createFilter(Paragraph.class);
+filter.addEqualTo(<SPAN class="code-quote">&quot;text&quot;</SPAN>, <SPAN class="code-quote">&quot;Para 1&quot;</SPAN>);   <SPAN class="code-comment">// Text is an attribute in the class Paragraph
+</SPAN>
+<SPAN class="code-comment">// Build the query
+</SPAN>Query query = queryManager.createQuery(filter);
+Paragraph paragraph = (Paragraph) ocm.getObject(query);
+</PRE>
+</DIV></DIV>
+
+<H2><A name="OCMSearch-Searchingacollection"></A>Searching a collection</H2>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+QueryManager queryManager = ocm.getQueryManager();
+Filter filter = queryManager.createFilter(Paragraph.class);
+filter.setScope(<SPAN class="code-quote">&quot;/test/node1<SPAN class="code-comment">//&quot;</SPAN>);
+</SPAN>Query query = queryManager.createQuery(filter);
+Collection result = ocm.getObjects(query);
+</PRE>
+</DIV></DIV>
+
+<H2><A name="OCMSearch-Searchingwithaniterator"></A>Searching with an iterator</H2>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+QueryManager queryManager = ocm.getQueryManager();
+Filter filter = queryManager.createFilter(Paragraph.class);
+filter.setScope(<SPAN class="code-quote">&quot;/test/node1<SPAN class="code-comment">//&quot;</SPAN>);
+</SPAN>Query query = queryManager.createQuery(filter);
+Iterator iterator = ocm.getObjectIterator(query);
+</PRE>
+</DIV></DIV>
+
+<H2><A name="OCMSearch-Removeobjectsbasedonaquery"></A>Remove objects based on a query</H2>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+QueryManager queryManager = ocm.getQueryManager();
+Filter filter = queryManager.createFilter(Paragraph.class);
+filter.setScope(<SPAN class="code-quote">&quot;/test/node1<SPAN class="code-comment">//&quot;</SPAN>);
+</SPAN>Query query = queryManager.createQuery(filter);
+ocm.remove(query);
+</PRE>
+</DIV></DIV>
+        </DIV>
+        <DIV id="end"></DIV>
+      </DIV>
+      <DIV id="footer">
+        <P>
+          &copy; 2004-2010 The Apache Software Foundation.
+          - <A href="http://jackrabbit.apache.org/privacy-policy.html">Privacy Policy</A> -
+          [<A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=75350">edit this page</A>]
+          <BR>
+          Apache Jackrabbit, Jackrabbit, Apache, the Apache feather logo, and the Apache
+          Jackrabbit project logo are trademarks of The Apache Software Foundation.
+        </P>
+      </DIV>
+    </DIV>
+<!-- JCR- 1315: Add Google Analytics to Jackrabbit web site -->
+<SCRIPT type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</SCRIPT>
+<SCRIPT type="text/javascript">
+var pageTracker = _gat._getTracker("UA-837900-2");
+pageTracker._initData();
+pageTracker._trackPageview();
+</SCRIPT>
+  </BODY>
+</HTML>

Added: jackrabbit/site/trunk/content/JCR/ocm-version-management.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/JCR/ocm-version-management.html?rev=1427110&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/JCR/ocm-version-management.html (added)
+++ jackrabbit/site/trunk/content/JCR/ocm-version-management.html Mon Dec 31 12:40:09 2012
@@ -0,0 +1,223 @@
+
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE- 2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License. 
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>OCM Version Management</TITLE>
+    <LINK type="text/css" rel="stylesheet" href="http://jackrabbit.apache.org/style/site.css">
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY>
+    <DIV id="page">
+      <DIV id="header">
+        <P id="jcr"><A href="http://jackrabbit.apache.org/"><IMG src="http://jackrabbit.apache.org/style/jlogo.gif" alt="Apache Jackrabbit" height="100" width="336"></A></P>
+        <P id="asf"><A href="http://www.apache.org/"><IMG src="http://jackrabbit.apache.org/style/asf-logo.gif" alt="Apache Software Foundation" height="100" width="387"></A></P>
+      </DIV>
+      <DIV id="body">
+        <DIV id="navigation">
+  <UL>
+	<LI>Apache Jackrabbit
+	<UL>
+		<LI><A href="welcome-to-apache-jackrabbit.html" title="Welcome to Apache Jackrabbit">Welcome</A></LI>
+		<LI><A href="downloads.html" title="Downloads">Downloads</A></LI>
+		<LI><A href="frequently-asked-questions.html" title="Frequently Asked Questions">FAQ</A></LI>
+		<LI><A href="http://wiki.apache.org/jackrabbit/FrontPage" class="external-link">Jackrabbit Wiki</A></LI>
+		<LI><A href="jackrabbit-history.html" title="Jackrabbit History">Jackrabbit History</A></LI>
+	</UL>
+	</LI>
+	<LI>Documentation
+	<UL>
+		<LI><A href="getting-started-with-apache-jackrabbit.html" title="Getting Started with Apache Jackrabbit">Getting Started</A></LI>
+		<LI><A href="standalone-server.html" title="Standalone Server">Standalone Server</A></LI>
+		<LI><A href="jackrabbit-components.html" title="Jackrabbit Components">Jackrabbit Components</A></LI>
+		<LI><A href="first-hops.html" title="First Hops">First Hops</A></LI>
+		<LI><A href="jcr-api.html" title="JCR & API">JCR &amp; API</A></LI>
+		<LI><A href="jackrabbit-architecture.html" title="Jackrabbit Architecture">Jackrabbit Architecture</A></LI>
+		<LI><A href="deployment-models.html" title="Deployment Models">Deployment Models</A></LI>
+		<LI><A href="jackrabbit-configuration.html" title="Jackrabbit Configuration">Jackrabbit Configuration</A></LI>
+		<LI><A href="node-types.html" title="Node Types">Node Types</A></LI>
+		<LI><A href="object-content-mapping.html" title="Object Content Mapping">Object Content Mapping</A></LI>
+	</UL>
+	</LI>
+	<LI>Development
+	<UL>
+		<LI><A href="jackrabbit-team.html" title="Jackrabbit Team">Jackrabbit Team</A></LI>
+		<LI><A href="jackrabbit-roadmap.html" title="Jackrabbit Roadmap">Jackrabbit Roadmap</A></LI>
+		<LI><A href="building-jackrabbit.html" title="Building Jackrabbit">Building Jackrabbit</A></LI>
+		<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
+		<LI><A href="issue-tracker.html" title="Issue Tracker">Issue Tracker</A></LI>
+		<LI><A href="source-repository.html" title="Source Repository">Source Repository</A></LI>
+		<LI><A href="continuous-integration.html" title="Continuous Integration">Continuous Integration</A></LI>
+		<LI><A href="website.html" title="Website">Website</A></LI>
+		<LI><A href="creating-releases.html" title="Creating Releases">Creating Releases</A></LI>
+		<LI><A href="supporting-software-attribution.html" title="Supporting software attribution">Attribution</A></LI>
+	</UL>
+	</LI>
+	<LI>Apache Software Foundation
+	<UL>
+		<LI><A href="http://www.apache.org/foundation/how-it-works.html" class="external-link">Introduction</A></LI>
+		<LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link">Sponsorship</A></LI>
+		<LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link">Current Sponsors</A></LI>
+	</UL>
+	</LI>
+</UL>
+        </DIV>
+        <DIV id="content">
+          <H1>OCM Version Management</H1>
+  <P>Right now, the OCM tools provides basic versioning features:</P>
+
+<UL>
+	<LI>Check in, check out.</LI>
+	<LI>Retrieve version history (first version, last version, the complete history, ...).</LI>
+	<LI>Apply labels.</LI>
+</UL>
+
+
+<P>Later, we would like to add more advanced versioning support like version compare, replace, revert, ... Each versioned object has to be mapped to a mix:versionable JCR node. It is possible to specify this node type in the xml class descriptor or with an annotation :</P>
+
+<H2><A name="OCMVersionManagement-CheckinCheckout"></A>Check in - Check out</H2>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+<SPAN class="code-comment">// Create a <SPAN class="code-keyword">new</SPAN> page - first version
+</SPAN>Page page = <SPAN class="code-keyword">new</SPAN> Page();
+page.setPath(<SPAN class="code-quote">&quot;/page&quot;</SPAN>);
+page.setTitle(<SPAN class="code-quote">&quot;Page Title&quot;</SPAN>);
+page.addParagraph(<SPAN class="code-keyword">new</SPAN> Paragraph(<SPAN class="code-quote">&quot;para1&quot;</SPAN>));
+page.addParagraph(<SPAN class="code-keyword">new</SPAN> Paragraph(<SPAN class="code-quote">&quot;para2&quot;</SPAN>));
+ocm.insert(page);
+ocm.save();
+
+<SPAN class="code-comment">// Update the page object and create a <SPAN class="code-keyword">new</SPAN> version
+</SPAN>page.addParagraph(<SPAN class="code-keyword">new</SPAN> Paragraph(<SPAN class="code-quote">&quot;para3&quot;</SPAN>));
+ocm.checkout(<SPAN class="code-quote">&quot;/page&quot;</SPAN>);
+ocm.update(page);
+ocm.save();
+ocm.checkin(<SPAN class="code-quote">&quot;/page&quot;</SPAN>);
+
+<SPAN class="code-comment">// Update the page object and create a <SPAN class="code-keyword">new</SPAN> version
+</SPAN>page.addParagraph(<SPAN class="code-keyword">new</SPAN> Paragraph(<SPAN class="code-quote">&quot;para4&quot;</SPAN>));
+ocm.checkout(<SPAN class="code-quote">&quot;/page&quot;</SPAN>);
+ocm.update(page);
+ocm.save();
+ocm.checkin(<SPAN class="code-quote">&quot;/page&quot;</SPAN>);
+</PRE>
+</DIV></DIV>
+
+<H2><A name="OCMVersionManagement-Retrievetheversionhistory"></A>Retrieve the version history</H2>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+VersionIterator versionIterator = ocm.getAllVersions(<SPAN class="code-quote">&quot;/page&quot;</SPAN>);
+<SPAN class="code-keyword">while</SPAN> (versionIterator.hasNext())
+{
+    Version version = (Version) versionIterator.next();
+    <SPAN class="code-object">System</SPAN>.out.println(<SPAN class="code-quote">&quot;version found : &quot;</SPAN>+ version.getName() + <SPAN class="code-quote">&quot; - &quot;</SPAN> +
+                          version.getPath() + <SPAN class="code-quote">&quot; - &quot;</SPAN> +  version.getCreated().getTime());
+}
+</PRE>
+</DIV></DIV>
+
+<H2><A name="OCMVersionManagement-Retrieveversiondescription"></A>Retrieve version description</H2>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+<SPAN class="code-comment">// Retrieve the first version description
+</SPAN>Version baseVersion = ocm.getBaseVersion(<SPAN class="code-quote">&quot;/page&quot;</SPAN>);
+<SPAN class="code-object">System</SPAN>.out.println(<SPAN class="code-quote">&quot;Base version : &quot;</SPAN> + baseVersion.getName());
+
+<SPAN class="code-comment">// Retrieve the latest version description
+</SPAN>Version rootVersion = ocm.getRootVersion(<SPAN class="code-quote">&quot;/page&quot;</SPAN>);
+<SPAN class="code-object">System</SPAN>.out.println(<SPAN class="code-quote">&quot;Root version : &quot;</SPAN> + rootVersion.getName());
+</PRE>
+</DIV></DIV>
+
+<H2><A name="OCMVersionManagement-Retrievetheobjectstatematchingtoaspecificversion"></A>Retrieve the object state matching to a specific version</H2>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+<SPAN class="code-comment">//Get the object matching to the first version
+</SPAN>Page  page = (Page) ocm.getObject( <SPAN class="code-quote">&quot;/page&quot;</SPAN>, <SPAN class="code-quote">&quot;1.0&quot;</SPAN>);
+</PRE>
+</DIV></DIV>
+
+<H2><A name="OCMVersionManagement-Usingversionlabels"></A>Using version labels</H2>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+Page page = <SPAN class="code-keyword">new</SPAN> Page();
+page.setPath(<SPAN class="code-quote">&quot;/page&quot;</SPAN>);
+page.setTitle(<SPAN class="code-quote">&quot;Page Title&quot;</SPAN>);
+page.addParagraph(<SPAN class="code-keyword">new</SPAN> Paragraph(<SPAN class="code-quote">&quot;para1&quot;</SPAN>));
+page.addParagraph(<SPAN class="code-keyword">new</SPAN> Paragraph(<SPAN class="code-quote">&quot;para2&quot;</SPAN>));
+ocm.insert(page);
+ocm.save();
+
+<SPAN class="code-comment">// Checkin with some labels
+</SPAN>page.addParagraph(<SPAN class="code-keyword">new</SPAN> Paragraph(<SPAN class="code-quote">&quot;para3&quot;</SPAN>));
+ocm.checkout(<SPAN class="code-quote">&quot;/page&quot;</SPAN>);
+ocm.update(page);
+ocm.save();
+ocm.checkin(<SPAN class="code-quote">&quot;/page&quot;</SPAN>, <SPAN class="code-keyword">new</SPAN> <SPAN class="code-object">String</SPAN>[] {<SPAN class="code-quote">&quot;A&quot;</SPAN>, <SPAN class="code-quote">&quot;B&quot;</SPAN>});
+
+<SPAN class="code-comment">// Checkin with some labels
+</SPAN>page.addParagraph(<SPAN class="code-keyword">new</SPAN> Paragraph(<SPAN class="code-quote">&quot;para4&quot;</SPAN>));
+ocm.checkout(<SPAN class="code-quote">&quot;/page&quot;</SPAN>);
+ocm.update(page);
+ocm.save();
+ocm.checkin(<SPAN class="code-quote">&quot;/page&quot;</SPAN>, <SPAN class="code-keyword">new</SPAN> <SPAN class="code-object">String</SPAN>[] {<SPAN class="code-quote">&quot;C&quot;</SPAN>, <SPAN class="code-quote">&quot;D&quot;</SPAN>});
+
+<SPAN class="code-comment">// Retrieve all labels
+</SPAN><SPAN class="code-object">String</SPAN>[] allLabels = ocm.getAllVersionLabels(<SPAN class="code-quote">&quot;/page&quot;</SPAN>);
+assertTrue(<SPAN class="code-quote">&quot;Incorrect number of labels&quot;</SPAN>, allLabels.length == 4);
+
+<SPAN class="code-comment">// Retrieve labels assigned to the version 1.1
+</SPAN><SPAN class="code-object">String</SPAN>[] versionLabels = ocm.getVersionLabels(<SPAN class="code-quote">&quot;/page&quot;</SPAN>, <SPAN class="code-quote">&quot;1.1&quot;</SPAN>);
+assertTrue(<SPAN class="code-quote">&quot;Incorrect number of labels&quot;</SPAN>, versionLabels.length == 2);
+assertTrue(<SPAN class="code-quote">&quot;Incorrect label&quot;</SPAN>, versionLabels[0].equals(<SPAN class="code-quote">&quot;C&quot;</SPAN>) || versionLabels[0].equals(<SPAN class="code-quote">&quot;D&quot;</SPAN>));
+assertTrue(<SPAN class="code-quote">&quot;Incorrect label&quot;</SPAN>, versionLabels[1].equals(<SPAN class="code-quote">&quot;C&quot;</SPAN>) || versionLabels[0].equals(<SPAN class="code-quote">&quot;D&quot;</SPAN>));
+</PRE>
+</DIV></DIV>
+        </DIV>
+        <DIV id="end"></DIV>
+      </DIV>
+      <DIV id="footer">
+        <P>
+          &copy; 2004-2010 The Apache Software Foundation.
+          - <A href="http://jackrabbit.apache.org/privacy-policy.html">Privacy Policy</A> -
+          [<A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=75354">edit this page</A>]
+          <BR>
+          Apache Jackrabbit, Jackrabbit, Apache, the Apache feather logo, and the Apache
+          Jackrabbit project logo are trademarks of The Apache Software Foundation.
+        </P>
+      </DIV>
+    </DIV>
+<!-- JCR- 1315: Add Google Analytics to Jackrabbit web site -->
+<SCRIPT type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</SCRIPT>
+<SCRIPT type="text/javascript">
+var pageTracker = _gat._getTracker("UA-837900-2");
+pageTracker._initData();
+pageTracker._trackPageview();
+</SCRIPT>
+  </BODY>
+</HTML>

Added: jackrabbit/site/trunk/content/JCR/privacy-policy.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/JCR/privacy-policy.html?rev=1427110&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/JCR/privacy-policy.html (added)
+++ jackrabbit/site/trunk/content/JCR/privacy-policy.html Mon Dec 31 12:40:09 2012
@@ -0,0 +1,125 @@
+
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE- 2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License. 
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>Privacy Policy</TITLE>
+    <LINK type="text/css" rel="stylesheet" href="http://jackrabbit.apache.org/style/site.css">
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY>
+    <DIV id="page">
+      <DIV id="header">
+        <P id="jcr"><A href="http://jackrabbit.apache.org/"><IMG src="http://jackrabbit.apache.org/style/jlogo.gif" alt="Apache Jackrabbit" height="100" width="336"></A></P>
+        <P id="asf"><A href="http://www.apache.org/"><IMG src="http://jackrabbit.apache.org/style/asf-logo.gif" alt="Apache Software Foundation" height="100" width="387"></A></P>
+      </DIV>
+      <DIV id="body">
+        <DIV id="navigation">
+  <UL>
+	<LI>Apache Jackrabbit
+	<UL>
+		<LI><A href="welcome-to-apache-jackrabbit.html" title="Welcome to Apache Jackrabbit">Welcome</A></LI>
+		<LI><A href="downloads.html" title="Downloads">Downloads</A></LI>
+		<LI><A href="frequently-asked-questions.html" title="Frequently Asked Questions">FAQ</A></LI>
+		<LI><A href="http://wiki.apache.org/jackrabbit/FrontPage" class="external-link">Jackrabbit Wiki</A></LI>
+		<LI><A href="jackrabbit-history.html" title="Jackrabbit History">Jackrabbit History</A></LI>
+	</UL>
+	</LI>
+	<LI>Documentation
+	<UL>
+		<LI><A href="getting-started-with-apache-jackrabbit.html" title="Getting Started with Apache Jackrabbit">Getting Started</A></LI>
+		<LI><A href="standalone-server.html" title="Standalone Server">Standalone Server</A></LI>
+		<LI><A href="jackrabbit-components.html" title="Jackrabbit Components">Jackrabbit Components</A></LI>
+		<LI><A href="first-hops.html" title="First Hops">First Hops</A></LI>
+		<LI><A href="jcr-api.html" title="JCR & API">JCR &amp; API</A></LI>
+		<LI><A href="jackrabbit-architecture.html" title="Jackrabbit Architecture">Jackrabbit Architecture</A></LI>
+		<LI><A href="deployment-models.html" title="Deployment Models">Deployment Models</A></LI>
+		<LI><A href="jackrabbit-configuration.html" title="Jackrabbit Configuration">Jackrabbit Configuration</A></LI>
+		<LI><A href="node-types.html" title="Node Types">Node Types</A></LI>
+		<LI><A href="object-content-mapping.html" title="Object Content Mapping">Object Content Mapping</A></LI>
+	</UL>
+	</LI>
+	<LI>Development
+	<UL>
+		<LI><A href="jackrabbit-team.html" title="Jackrabbit Team">Jackrabbit Team</A></LI>
+		<LI><A href="jackrabbit-roadmap.html" title="Jackrabbit Roadmap">Jackrabbit Roadmap</A></LI>
+		<LI><A href="building-jackrabbit.html" title="Building Jackrabbit">Building Jackrabbit</A></LI>
+		<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
+		<LI><A href="issue-tracker.html" title="Issue Tracker">Issue Tracker</A></LI>
+		<LI><A href="source-repository.html" title="Source Repository">Source Repository</A></LI>
+		<LI><A href="continuous-integration.html" title="Continuous Integration">Continuous Integration</A></LI>
+		<LI><A href="website.html" title="Website">Website</A></LI>
+		<LI><A href="creating-releases.html" title="Creating Releases">Creating Releases</A></LI>
+		<LI><A href="supporting-software-attribution.html" title="Supporting software attribution">Attribution</A></LI>
+	</UL>
+	</LI>
+	<LI>Apache Software Foundation
+	<UL>
+		<LI><A href="http://www.apache.org/foundation/how-it-works.html" class="external-link">Introduction</A></LI>
+		<LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link">Sponsorship</A></LI>
+		<LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link">Current Sponsors</A></LI>
+	</UL>
+	</LI>
+</UL>
+        </DIV>
+        <DIV id="content">
+          <H1>Privacy Policy</H1>
+  <P>Information about your use of this website is collected using server access logs and a tracking cookie. The collected information consists of the following:</P>
+
+<OL>
+	<LI>The IP address from which you access the website;</LI>
+	<LI>The type of browser and operating system you use to access our site;</LI>
+	<LI>The date and time you access our site;</LI>
+	<LI>The pages you visit; and</LI>
+	<LI>The addresses of pages from where you followed a link to our site.</LI>
+</OL>
+
+
+<P>Part of this information is gathered using a tracking cookie set by the <A href="http://www.google.com/analytics/" class="external-link">Google Analytics</A> service and handled by Google as described in their <A href="http://www.google.com/privacy.html" class="external-link">privacy policy</A>. See your browser documentation for instructions on how to disable the cookie if you prefer not to share this data with Google.</P>
+
+<P>We use the gathered information to help us make our site more useful to visitors and to better understand how and when our site is used. We do not track or collect personally identifiable information or associate gathered data with any personally identifying information from other sources.</P>
+
+<P>By using this website, you consent to the collection of this data in the manner and for the purpose described above.</P>
+        </DIV>
+        <DIV id="end"></DIV>
+      </DIV>
+      <DIV id="footer">
+        <P>
+          &copy; 2004-2010 The Apache Software Foundation.
+          - <A href="http://jackrabbit.apache.org/privacy-policy.html">Privacy Policy</A> -
+          [<A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=105185">edit this page</A>]
+          <BR>
+          Apache Jackrabbit, Jackrabbit, Apache, the Apache feather logo, and the Apache
+          Jackrabbit project logo are trademarks of The Apache Software Foundation.
+        </P>
+      </DIV>
+    </DIV>
+<!-- JCR- 1315: Add Google Analytics to Jackrabbit web site -->
+<SCRIPT type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</SCRIPT>
+<SCRIPT type="text/javascript">
+var pageTracker = _gat._getTracker("UA-837900-2");
+pageTracker._initData();
+pageTracker._trackPageview();
+</SCRIPT>
+  </BODY>
+</HTML>

Added: jackrabbit/site/trunk/content/JCR/repository-lifecycle.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/JCR/repository-lifecycle.html?rev=1427110&view=auto
==============================================================================
--- jackrabbit/site/trunk/content/JCR/repository-lifecycle.html (added)
+++ jackrabbit/site/trunk/content/JCR/repository-lifecycle.html Mon Dec 31 12:40:09 2012
@@ -0,0 +1,138 @@
+
+<!-- 
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE- 2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License. 
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+    <TITLE>Repository lifecycle</TITLE>
+    <LINK type="text/css" rel="stylesheet" href="http://jackrabbit.apache.org/style/site.css">
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY>
+    <DIV id="page">
+      <DIV id="header">
+        <P id="jcr"><A href="http://jackrabbit.apache.org/"><IMG src="http://jackrabbit.apache.org/style/jlogo.gif" alt="Apache Jackrabbit" height="100" width="336"></A></P>
+        <P id="asf"><A href="http://www.apache.org/"><IMG src="http://jackrabbit.apache.org/style/asf-logo.gif" alt="Apache Software Foundation" height="100" width="387"></A></P>
+      </DIV>
+      <DIV id="body">
+        <DIV id="navigation">
+  <UL>
+	<LI>Apache Jackrabbit
+	<UL>
+		<LI><A href="welcome-to-apache-jackrabbit.html" title="Welcome to Apache Jackrabbit">Welcome</A></LI>
+		<LI><A href="downloads.html" title="Downloads">Downloads</A></LI>
+		<LI><A href="frequently-asked-questions.html" title="Frequently Asked Questions">FAQ</A></LI>
+		<LI><A href="http://wiki.apache.org/jackrabbit/FrontPage" class="external-link">Jackrabbit Wiki</A></LI>
+		<LI><A href="jackrabbit-history.html" title="Jackrabbit History">Jackrabbit History</A></LI>
+	</UL>
+	</LI>
+	<LI>Documentation
+	<UL>
+		<LI><A href="getting-started-with-apache-jackrabbit.html" title="Getting Started with Apache Jackrabbit">Getting Started</A></LI>
+		<LI><A href="standalone-server.html" title="Standalone Server">Standalone Server</A></LI>
+		<LI><A href="jackrabbit-components.html" title="Jackrabbit Components">Jackrabbit Components</A></LI>
+		<LI><A href="first-hops.html" title="First Hops">First Hops</A></LI>
+		<LI><A href="jcr-api.html" title="JCR & API">JCR &amp; API</A></LI>
+		<LI><A href="jackrabbit-architecture.html" title="Jackrabbit Architecture">Jackrabbit Architecture</A></LI>
+		<LI><A href="deployment-models.html" title="Deployment Models">Deployment Models</A></LI>
+		<LI><A href="jackrabbit-configuration.html" title="Jackrabbit Configuration">Jackrabbit Configuration</A></LI>
+		<LI><A href="node-types.html" title="Node Types">Node Types</A></LI>
+		<LI><A href="object-content-mapping.html" title="Object Content Mapping">Object Content Mapping</A></LI>
+	</UL>
+	</LI>
+	<LI>Development
+	<UL>
+		<LI><A href="jackrabbit-team.html" title="Jackrabbit Team">Jackrabbit Team</A></LI>
+		<LI><A href="jackrabbit-roadmap.html" title="Jackrabbit Roadmap">Jackrabbit Roadmap</A></LI>
+		<LI><A href="building-jackrabbit.html" title="Building Jackrabbit">Building Jackrabbit</A></LI>
+		<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
+		<LI><A href="issue-tracker.html" title="Issue Tracker">Issue Tracker</A></LI>
+		<LI><A href="source-repository.html" title="Source Repository">Source Repository</A></LI>
+		<LI><A href="continuous-integration.html" title="Continuous Integration">Continuous Integration</A></LI>
+		<LI><A href="website.html" title="Website">Website</A></LI>
+		<LI><A href="creating-releases.html" title="Creating Releases">Creating Releases</A></LI>
+		<LI><A href="supporting-software-attribution.html" title="Supporting software attribution">Attribution</A></LI>
+	</UL>
+	</LI>
+	<LI>Apache Software Foundation
+	<UL>
+		<LI><A href="http://www.apache.org/foundation/how-it-works.html" class="external-link">Introduction</A></LI>
+		<LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link">Sponsorship</A></LI>
+		<LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link">Current Sponsors</A></LI>
+	</UL>
+	</LI>
+</UL>
+        </DIV>
+        <DIV id="content">
+          <H1>Repository lifecycle</H1>
+  <P>The lifecycle of any Jackrabbit Content Repository starts with a call to one of the RepositoryFactory.create() methods passing optionally the source of a repository configuration file (which by convention is called config.xml) and the RepositoryFactoryHome, which points to a directory from which the Repository will continue reading further information for start-up and in many cases will store the actual data that is persisted in the repository and its workspaces.</P>
+
+<P>Not supplying the RepositoryFactoryHome will default to the users home dir from the System property user.dir.</P>
+
+<P>Not supplying the configuration file parameter will default to the value of Repository.factory.config System Property and if that is not set it will default to the config.xml in the RepositoryFactoryHome.</P>
+
+<P>Calling the create() method will instantiate the RepositoryFactory singleton that will then, through the getRepository(String name) method, serve as the factory for Repository instances.</P>
+
+<P>As per the config.xml a repository are started up with the respectively configured RepositoryStore, the RepositoryStore defines where the repository stores information that is visible for the entire Repository which includes things like the uuid of the root node, repository properties, the namespace registry, node type definitions or the version backing store in a file structure as follows.</P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+./meta:
+rep.properties
+rootUUID
+
+./namespaces:
+ns_reg.properties
+
+./nodetypes:
+custom_nodetypes.xml
+
+./versions:
+</PRE>
+</DIV></DIV>
+
+<P>The RepositoryStore normally points to a regular (i.e. local) file system but is abstracted through an abstract FileSystem that can be configured to point to a different FileSystem implementation, in case the above information should be stored in a different data container.</P>
+
+<P>... to be continued ... </P>
+        </DIV>
+        <DIV id="end"></DIV>
+      </DIV>
+      <DIV id="footer">
+        <P>
+          &copy; 2004-2010 The Apache Software Foundation.
+          - <A href="http://jackrabbit.apache.org/privacy-policy.html">Privacy Policy</A> -
+          [<A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=75336">edit this page</A>]
+          <BR>
+          Apache Jackrabbit, Jackrabbit, Apache, the Apache feather logo, and the Apache
+          Jackrabbit project logo are trademarks of The Apache Software Foundation.
+        </P>
+      </DIV>
+    </DIV>
+<!-- JCR- 1315: Add Google Analytics to Jackrabbit web site -->
+<SCRIPT type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</SCRIPT>
+<SCRIPT type="text/javascript">
+var pageTracker = _gat._getTracker("UA-837900-2");
+pageTracker._initData();
+pageTracker._trackPageview();
+</SCRIPT>
+  </BODY>
+</HTML>



Mime
View raw message