You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by mr...@apache.org on 2022/12/15 09:54:28 UTC

svn commit: r1906010 [5/22] - in /jackrabbit/site/live/jcr: ./ components/ css/ fonts/ js/ ocm/ status/

Modified: jackrabbit/site/live/jcr/first-hops.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/jcr/first-hops.html?rev=1906010&r1=1906009&r2=1906010&view=diff
==============================================================================
--- jackrabbit/site/live/jcr/first-hops.html (original)
+++ jackrabbit/site/live/jcr/first-hops.html Thu Dec 15 09:54:26 2022
@@ -1,42 +1,40 @@
 <!DOCTYPE html>
+
+
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.9.2 from src\site\markdown/first-hops.md at 2022-05-12
- | Rendered using Apache Maven Fluido Skin 1.9
+ | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src/site/markdown/first-hops.md at 2022-12-15
+ | Rendered using Apache Maven Fluido Skin 1.11.1
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1" />
-    <meta name="generator" content="Apache Maven Doxia Site Renderer 1.9.2" />
+    <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
     <title>Apache Jackrabbit &#x2013; First Hops</title>
-    <link rel="stylesheet" href="./css/apache-maven-fluido-1.9.min.css" />
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.11.1.min.css" />
     <link rel="stylesheet" href="./css/site.css" />
     <link rel="stylesheet" href="./css/print.css" media="print" />
-    <script src="./js/apache-maven-fluido-1.9.min.js"></script>
-<!-- Matomo -->
-<script>
-  var _paq = window._paq = window._paq || [];
-  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
-  /* We explicitly disable cookie tracking to avoid privacy issues */
-  _paq.push(['disableCookies']);
-  _paq.push(['trackPageView']);
-  _paq.push(['enableLinkTracking']);
-  (function() {
-    var u="https://matomo.privacy.apache.org/";
-    _paq.push(['setTrackerUrl', u+'matomo.php']);
-    _paq.push(['setSiteId', '4']);
-    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
-    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
-  })();
-</script>
-<!-- End Matomo Code -->
+    <script src="./js/apache-maven-fluido-1.11.1.min.js"></script>
+
+    <!-- Matomo -->
+    <script>
+        var _paq = window._paq = window._paq || [];
+                _paq.push(['disableCookies']);
+                    _paq.push(['trackPageView']);
+                    _paq.push(['enableLinkTracking']);
+        
+        (function() {
+            var u="https://analytics.apache.org";
+            _paq.push(['setTrackerUrl', u+'/matomo.php']);
+            _paq.push(['setSiteId', '4']);
+            var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+            g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s);
+        })();
+    </script>
+    <!-- End Matomo Code -->
   </head>
   <body class="topBarEnabled">
-    <a href="https://github.com/apache/jackrabbit">
-      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
-        src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
-        alt="Fork me on GitHub">
-    </a>
+    <a class="github-fork-ribbon right-top" href="https://github.com/apache/jackrabbit" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>
     <header id="topbar" class="navbar navbar-fixed-top ">
       <div class="navbar-inner">
         <div class="container-fluid">
@@ -49,7 +47,7 @@
 </a>
             <ul class="nav">
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Jackrabbit <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">Apache Jackrabbit <b class="caret"></b></a>
         <ul class="dropdown-menu">
             <li><a href="index.html" title="Welcome">Welcome</a></li>
             <li><a href="downloads.html" title="Downloads">Downloads</a></li>
@@ -60,12 +58,12 @@
         </ul>
       </li>
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
         <ul class="dropdown-menu">
             <li><a href="getting-started-with-apache-jackrabbit.html" title="Getting Started">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 title="First Hops">First Hops</a></li>
             <li><a href="jcr-api.html" title="JCR & API">JCR & 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>
@@ -75,7 +73,7 @@
         </ul>
       </li>
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
         <ul class="dropdown-menu">
             <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>
@@ -90,7 +88,7 @@
         </ul>
       </li>
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
         <ul class="dropdown-menu">
             <li><a href="https://www.apache.org/foundation/how-it-works.html" title="Introduction">Introduction</a></li>
             <li><a href="https://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li>
@@ -105,7 +103,7 @@
     <div class="container-fluid">
       <header>
         <div id="banner">
-          <div class="pull-left"><div id="bannerLeft"><h2>Apache Jackrabbit Site</h2>
+          <div class="pull-left"><div id="bannerLeft"><h1>Apache Jackrabbit Site</h1>
 </div>
 </div>
           <div class="pull-right"></div>
@@ -114,7 +112,7 @@
 
         <div id="breadcrumbs">
           <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2022-05-12</li>
+        <li id="publishDate">Last Published: 2022-12-15</li>
           </ul>
         </div>
       </header>
@@ -133,7 +131,7 @@
     <li><a href="getting-started-with-apache-jackrabbit.html" title="Getting Started"><span class="none"></span>Getting Started</a></li>
     <li><a href="standalone-server.html" title="Standalone Server"><span class="none"></span>Standalone Server</a></li>
     <li><a href="jackrabbit-components.html" title="Jackrabbit Components"><span class="none"></span>Jackrabbit Components</a></li>
-    <li class="active"><a href="#"><span class="none"></span>First Hops</a></li>
+    <li class="active"><a><span class="none"></span>First Hops</a></li>
     <li><a href="jcr-api.html" title="JCR & API"><span class="none"></span>JCR & API</a></li>
     <li><a href="jackrabbit-architecture.html" title="Jackrabbit Architecture"><span class="none"></span>Jackrabbit Architecture</a></li>
     <li><a href="deployment-models.html" title="Deployment Models"><span class="none"></span>Deployment Models</a></li>
@@ -159,7 +157,6 @@
   </ul>
           </nav>
           <div class="well sidebar-nav">
-            <hr />
             <div id="poweredBy">
               <div class="clear"></div>
               <div class="clear"></div>
@@ -186,12 +183,20 @@
    limitations under the License.
 -->
 <h1>First Hops</h1>
-<p>Welcome to your first hops into the world of Jackrabbit! This introduction gives you a hands-on experience with Jackrabbit and the JCR API. Once you have finished hopping through this document, you should be all set to continue on your own with the official JCR specification and the documentation on this site.</p><section>
+<p>Welcome to your first hops into the world of Jackrabbit! This introduction
+gives you a hands-on experience with Jackrabbit and the JCR API. Once you
+have finished hopping through this document, you should be all set to
+continue on your own with the official JCR specification and the
+documentation on this site.</p><section>
 <h2><a name="Hop_0:_Getting_started"></a>Hop 0: Getting started</h2>
-<p>The easiest way to get started with Jackrabbit is to <a href="downloads.html">download</a> the runnable <a href="standalone-server.html">Standalone Server</a> jar. In addition to running it, you can also put it in your classpath to quickly access all the classes and interfaces you need below. Alternatively, if you use the <a class="externalLink" href="http://maven.apache.org/">Apache Maven</a> build system (which we recommend), you can set up your first hops project with the following dependencies.</p>
+<p>The easiest way to get started with Jackrabbit is to <a href="downloads.html">download</a>
+the runnable <a href="standalone-server.html">Standalone Server</a> jar. In addition to
+running it, you can also put it in your classpath to quickly access all the classes
+and interfaces you need below. Alternatively, if you use the <a class="externalLink" href="http://maven.apache.org/">Apache Maven</a>
+build system (which we recommend), you can set up your first hops project
+with the following dependencies.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">&lt;dependencies&gt; 
+<div class="source"><pre class="prettyprint linenums"><code>&lt;dependencies&gt; 
     &lt;!-- The JCR API --&gt; 
     &lt;dependency&gt; 
         &lt;groupId&gt;javax.jcr&lt;/groupId&gt; 
@@ -213,14 +218,17 @@
         &lt;version&gt;1.5.11&lt;/version&gt; 
     &lt;/dependency&gt; 
 &lt;/dependencies&gt; 
-</pre></div></div>
-
-<p>You probably have an error in your classpath settings if you get a <code>ClassNotFoundException</code> message when trying to compile or run the examples below.</p></section><section>
+</code></pre></div>
+<p>You probably have an error in your classpath settings if you get a
+<code>ClassNotFoundException</code> message when trying to compile or run the
+examples below.</p></section><section>
 <h2><a name="Hop_1:_Logging_in_to_Jackrabbit"></a>Hop 1: Logging in to Jackrabbit</h2>
-<p>So let&#x2019;s get started. As a warm-up we&#x2019;ll create a Jackrabbit content repository and start a login session for accessing it. The full example application that does this is shown below, with line-by-line explanations following shortly after.</p>
+<p>So let's get started. As a warm-up we'll create a Jackrabbit content
+repository and start a login session for accessing it. The full example
+application that does this is shown below, with line-by-line explanations
+following shortly after.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.GuestCredentials;
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.GuestCredentials;
 import javax.jcr.Repository;
 import javax.jcr.Session; 
 import org.apache.jackrabbit.commons.JcrUtils;
@@ -250,77 +258,120 @@ public class FirstHop {
         } 
     } 
 } 
-</pre></div></div>
-
-<p>You can also download the source file as <code>FirstHop.java</code>. If you have your classpath set up, you can compile the application with javac <code>FirstHop.java</code> and run it with java FirstHop to get the following output.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Logged in as anonymous to a Jackrabbit repository. 
-</pre></div></div>
-
-<p>In addition to producing the above status line the application copies a default repository configuration file to <code>repository.xml</code> and creates an initial Jackrabbit content repository in the <code>jackrabbit</code> subdirectory. You can use the system properties <code>org.apache.jackrabbit.repository.conf</code> and <code>org.apache.jackrabbit.repository.home</code> to set alternative configuration file and repository directory locations.</p>
+</code></pre></div>
+<p>You can also download the source file as <code>FirstHop.java</code>. If you have your
+classpath set up, you can compile the application with javac <code>FirstHop.java</code>
+and run it with java FirstHop to get the following output.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Logged in as anonymous to a Jackrabbit repository. 
+</code></pre></div>
+<p>In addition to producing the above status line the application copies a
+default repository configuration file to <code>repository.xml</code> and creates an
+initial Jackrabbit content repository in the <code>jackrabbit</code> subdirectory. You
+can use the system properties <code>org.apache.jackrabbit.repository.conf</code> and
+<code>org.apache.jackrabbit.repository.home</code> to set alternative configuration
+file and repository directory locations.</p>
 <p>Read on for a detailed breakdown of the FirstHop application:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.Repository; 
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.Repository; 
 import javax.jcr.Session; 
-</pre></div></div>
-
-<p>The JCR API interfaces are located in the javax.jcr package found in the jcr-2.0.jar library. The promise of the JCR API is that if you only use these interfaces in your content application, it should remain mostly independent of the underlying content repository implementation.</p>
-<p>The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Repository.html?is-external=true">Repository</a> interface represents a given content repository instance and the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Session.html?is-external=true">Session</a> interface represents a single login session for accessing the repository. A session is needed to access any content within a repository.</p>
-<p>Note that a Session instance is not guaranteed to be thread-safe so you should start multiple sessions if you need to access repository content simultaneously from different threads. This is especially important for things like web applications.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import org.apache.jackrabbit.commons.JcrUtils;
-</pre></div></div>
+</code></pre></div>
+<p>The JCR API interfaces are located in the javax.jcr package found in the
+jcr-2.0.jar library. The promise of the JCR API is that if you only use
+these interfaces in your content application, it should remain mostly
+independent of the underlying content repository implementation.</p>
+<p>The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Repository.html?is-external=true">Repository</a>
+interface represents a given content repository instance and the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Session.html?is-external=true">Session</a>
+interface represents a single login session for accessing the repository.
+A session is needed to access any content within a repository.</p>
+<p>Note that a Session instance is not guaranteed to be thread-safe so you
+should start multiple sessions if you need to access repository content
+simultaneously from different threads. This is especially important for
+things like web applications.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>import org.apache.jackrabbit.commons.JcrUtils;
+</code></pre></div>
+<p>The best practice for deploying Jackrabbit is to use JNDI or some other
+configuration mechanism in a container environment to keep the application
+code free of direct Jackrabbit dependencies, but since we are creating a
+simple standalone application we can take a shortcut by using the <a class="externalLink" href="http://jackrabbit.apache.org/api/2.10/org/apache/jackrabbit/commons/JcrUtils.html">JcrUtils</a>
+class from Jackrabbit commons.</p>
 
-<p>The best practice for deploying Jackrabbit is to use JNDI or some other configuration mechanism in a container environment to keep the application code free of direct Jackrabbit dependencies, but since we are creating a simple standalone application we can take a shortcut by using the <a class="externalLink" href="http://jackrabbit.apache.org/api/2.10/org/apache/jackrabbit/commons/JcrUtils.html">JcrUtils</a> class from Jackrabbit commons.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">public class FirstHop 
+<div class="source"><pre class="prettyprint linenums"><code>public class FirstHop 
 public static void main(String[] args) throws Exception 
-</pre></div></div>
-
-<p>The FirstHop example is a simple standalone application that fits nicely in the <code>main()</code> method and lets the JVM take care of the possible exceptions. More substantial content applications could also be written as web application or EJB components with different setup and error handling patterns.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Repository repository = JcrUtils.getRepository();
-</pre></div></div>
-
-<p>The <code>JcrUtils.getRepository()</code> method returns an object that implements the JCR Repository interface. The actual implementation depends on the jar files available on the classpath and in this example is a <a class="externalLink" href="http://jackrabbit.apache.org/api/2.10/org/apache/jackrabbit/core/TransientRepository.html">TransientRepository</a>. The implementation contains a utility feature that will take care of the initial configuration and repository construction when the first session is started. Thus there is no need for manual configuration for now unless you want direct control over the repository setup.</p>
-<p>The <code>TransientRepository</code> implementation will automatically initialize the content repository when the first session is started and shut it down when the last session is closed. Thus there is no need for explicit repository shutdown as long as all sessions are properly closed. Note that a Jackrabbit repository directory contains a lock file that prevents it from being accessed simultaneously by multiple processes. You will see repository startup exceptions caused by the lock file if you fail to properly close all sessions or otherwise shut down the repository before leaving the process that accesses a repository. Normally you can just manually remove the lock file in such cases but such cases always present a chance of repository corruption especially if you use a non-transactional persistence manager.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Session session = repository.login(new GuestCredentials());
-</pre></div></div>
-
-<p>The <code>Repository.login(Credentials)</code> method starts a repository session using the default workspace and some user credentials. The FirstHop example uses <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/GuestCredentials.html?is-external=true">GuestCredentials</a> and Jackrabbit maps it to the read-only anonymous user.</p>
-<p>Since we use the <code>TransientRepository</code> class as the Repository implementation, this step will also cause the repository to be initialized.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">try { ... } finally { session.logout(); } 
-</pre></div></div>
-
-<p>It is a good practice to properly release all acquired resources, and the JCR sessions are no exception. The try-finally idiom is a good way to ensure that a resource really gets released, as the release method gets called even if the intervening code throws an exception or otherwise jumps outside the scope (for example using a return, break, or continue statement).</p>
-<p>The <code>Session.logout()</code> method in the finally branch closes the session and since this is the only session we have started, the TransientRepository is automatically shut down.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">String user = session.getUserID(); 
-</pre></div></div>
-
-<p>The username or identifier of the user associated with a session is available using the <code>Session.getUserID()</code> method. Jackrabbit returns <code>&quot;anonymous&quot;</code> by default.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">String name = repository.getDescriptor(Repository.REP_NAME_DESC); 
-</pre></div></div>
-
-<p>Each content repository implementation publishes a number of string descriptors that describe the various implementation properties, like the implementation level and the supported optional JCR features. See the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Repository.html?is-external=true">Repository</a> interface for a list of the standard repository descriptors. The <code>REP_NAME_DESC</code> descriptor contains the name of the repository implementation, in this case <code>&quot;Jackrabbit&quot;</code>.</p></section><section>
+</code></pre></div>
+<p>The FirstHop example is a simple standalone application that fits nicely in
+the <code>main()</code> method and lets the JVM take care of the possible exceptions.
+More substantial content applications could also be written as web
+application or EJB components with different setup and error handling
+patterns.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Repository repository = JcrUtils.getRepository();
+</code></pre></div>
+<p>The <code>JcrUtils.getRepository()</code> method returns an object that implements the
+JCR Repository interface. The actual implementation depends on the jar files
+available on the classpath and in this example is a <a class="externalLink" href="http://jackrabbit.apache.org/api/2.10/org/apache/jackrabbit/core/TransientRepository.html">TransientRepository</a>.
+The implementation contains a utility feature that will take
+care of the initial configuration and repository construction when the
+first session is started. Thus there is no need for manual configuration
+for now unless you want direct control over the repository setup.</p>
+<p>The <code>TransientRepository</code> implementation will automatically initialize the
+content repository when the first session is started and shut it down when
+the last session is closed. Thus there is no need for explicit repository
+shutdown as long as all sessions are properly closed. Note that a
+Jackrabbit repository directory contains a lock file that prevents it from
+being accessed simultaneously by multiple processes. You will see
+repository startup exceptions caused by the lock file if you fail to
+properly close all sessions or otherwise shut down the repository before
+leaving the process that accesses a repository. Normally you can just
+manually remove the lock file in such cases but such cases always present a
+chance of repository corruption especially if you use a non-transactional
+persistence manager.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Session session = repository.login(new GuestCredentials());
+</code></pre></div>
+<p>The <code>Repository.login(Credentials)</code> method starts a repository session using the
+default workspace and some user credentials. The FirstHop example uses <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/GuestCredentials.html?is-external=true">GuestCredentials</a>
+and Jackrabbit maps it to the read-only anonymous user.</p>
+<p>Since we use the <code>TransientRepository</code> class as the Repository
+implementation, this step will also cause the repository to be initialized.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>try { ... } finally { session.logout(); } 
+</code></pre></div>
+<p>It is a good practice to properly release all acquired resources, and the
+JCR sessions are no exception. The try-finally idiom is a good way to
+ensure that a resource really gets released, as the release method gets
+called even if the intervening code throws an exception or otherwise jumps
+outside the scope (for example using a return, break, or continue
+statement).</p>
+<p>The <code>Session.logout()</code> method in the finally branch closes the session and
+since this is the only session we have started, the TransientRepository is
+automatically shut down.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>String user = session.getUserID(); 
+</code></pre></div>
+<p>The username or identifier of the user associated with a session is
+available using the <code>Session.getUserID()</code> method. Jackrabbit returns
+<code>&quot;anonymous&quot;</code> by default.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>String name = repository.getDescriptor(Repository.REP_NAME_DESC); 
+</code></pre></div>
+<p>Each content repository implementation publishes a number of string
+descriptors that describe the various implementation properties, like the
+implementation level and the supported optional JCR features. See the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Repository.html?is-external=true">Repository</a>
+interface for a list of the standard repository descriptors. The
+<code>REP_NAME_DESC</code> descriptor contains the name of the repository
+implementation, in this case <code>&quot;Jackrabbit&quot;</code>.</p></section><section>
 <h2><a name="Hop_2:_Working_with_content"></a>Hop 2: Working with content</h2>
-<p>The main function of a content repository is allow applications to store and retrieve content. The content in a JCR content repository consists of structured or unstructured data modeled as a hierarchy of nodes with properties that contain the actual data.</p>
-<p>The following example application first stores some content to the initially empty content repository, then retrieves the stored content and outputs it, and finally removes the stored content.</p>
+<p>The main function of a content repository is allow applications to store
+and retrieve content. The content in a JCR content repository consists of
+structured or unstructured data modeled as a hierarchy of nodes with
+properties that contain the actual data.</p>
+<p>The following example application first stores some content to the
+initially empty content repository, then retrieves the stored content and
+outputs it, and finally removes the stored content.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.Repository; 
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.Repository; 
 import javax.jcr.Session; 
 import javax.jcr.SimpleCredentials; 
 import javax.jcr.Node; 
@@ -364,101 +415,153 @@ public class SecondHop {
     } 
     
 } 
-</pre></div></div>
+</code></pre></div>
+<p>Like in the first hop, this example source is also available as
+SecondHop.java. You can also compile and run this class just like you did
+in the first hop example. Running this example should produce the following
+output:</p>
 
-<p>Like in the first hop, this example source is also available as SecondHop.java. You can also compile and run this class just like you did in the first hop example. Running this example should produce the following output:</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">/hello/world 
+<div class="source"><pre class="prettyprint linenums"><code>/hello/world 
 Hello, World! 
-</pre></div></div>
-
-<p>The basic structure of this example application is the same as in the First Hop example, so let&#x2019;s just walk through the differences:</p>
+</code></pre></div>
+<p>The basic structure of this example application is the same as in the First
+Hop example, so let's just walk through the differences:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.SimpleCredentials; 
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.SimpleCredentials; 
 import javax.jcr.Node; 
-</pre></div></div>
-
-<p>These are two new classes we need for this example. The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/SimpleCredentials.html?is-external=true">SimpleCredentials</a> class is a simple implementation of the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Credentials.html?is-external=true">Credentials</a> interface used for passing explicit user credentials to the <code>Repository.login(Credentials)</code> method.</p>
-<p>The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Node.html?is-external=true">Node</a> interface is used to manage the content nodes in a repository. There is a related interface called <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Property.html?is-external=true">Property</a> for managing content properties, but in this example we use the Property interface only indirectly.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">new SimpleCredentials(&quot;admin&quot;, &quot;admin&quot;.toCharArray())
-</pre></div></div>
-
-<p>As discussed in the First Hop example, a login with <code>GuestCredentials</code> returns an anonymous read-only session in the Jackrabbit default configuration. To be able to store and remove content we need to create a session with write access, and to do that we need to pass credentials with a username and password to the</p>
+</code></pre></div>
+<p>These are two new classes we need for this example. The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/SimpleCredentials.html?is-external=true">SimpleCredentials</a>
+class is a simple implementation of the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Credentials.html?is-external=true">Credentials</a>
+interface used for passing explicit user credentials to the
+<code>Repository.login(Credentials)</code> method.</p>
+<p>The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Node.html?is-external=true">Node</a>
+interface is used to manage the content nodes in a repository. There is a
+related interface called <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Property.html?is-external=true">Property</a>
+for managing content properties, but in this example we use the Property
+interface only indirectly.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>new SimpleCredentials(&quot;admin&quot;, &quot;admin&quot;.toCharArray())
+</code></pre></div>
+<p>As discussed in the First Hop example, a login with <code>GuestCredentials</code>
+returns an anonymous read-only session in the Jackrabbit default
+configuration. To be able to store and remove content we need to create a
+session with write access, and to do that we need to pass credentials with
+a username and password to the</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Repository.login(Credentials credentials) method. 
+</code></pre></div>
+<p>The default Jackrabbit login mechanism accepts only username and password as
+valid credentials for known users. A Jackrabbit repository with a default
+configuration will create an admin user when it is first initialized. Thus we
+need to construct and use a SimpleCredentials instance with the username and
+initial default password of the admin user, in this case <code>&quot;admin&quot;</code> and <code>&quot;admin&quot;</code>.</p>
+<p>The SimpleCredentials constructor follows the JAAS convention of
+representing the username as a normal String, but the password as a
+character array, so we need to use the <code>String.toCharArray()</code> method to
+satisfy the constructor.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Node root = session.getRootNode(); 
+</code></pre></div>
+<p>Each JCR session is associated with a workspace that contains a single node
+tree. A simple way to access the root node is to call the
+<code>Session.getRootNode()</code> method. Having a reference to the root node allows us
+to easily store and retrieve content in the current workspace.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Repository.login(Credentials credentials) method. 
-</pre></div></div>
-
-<p>The default Jackrabbit login mechanism accepts only username and password as valid credentials for known users. A Jackrabbit repository with a default configuration will create an admin user when it is first initialized. Thus we need to construct and use a SimpleCredentials instance with the username and initial default password of the admin user, in this case <code>&quot;admin&quot;</code> and <code>&quot;admin&quot;</code>.</p>
-<p>The SimpleCredentials constructor follows the JAAS convention of representing the username as a normal String, but the password as a character array, so we need to use the <code>String.toCharArray()</code> method to satisfy the constructor.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Node root = session.getRootNode(); 
-</pre></div></div>
-
-<p>Each JCR session is associated with a workspace that contains a single node tree. A simple way to access the root node is to call the <code>Session.getRootNode()</code> method. Having a reference to the root node allows us to easily store and retrieve content in the current workspace.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Node hello = root.addNode(&quot;hello&quot;); 
+<div class="source"><pre class="prettyprint linenums"><code>Node hello = root.addNode(&quot;hello&quot;); 
 Node world = hello.addNode(&quot;world&quot;); 
-</pre></div></div>
-
-<p>New content nodes can be added using the <code>Node.addNode(String relPath)</code> method. The method takes the name (or relative path) of the node to be added and creates the named node in the transient storage associated with the current session. Until the transient storage is persisted, the added node is only visible within the current session and not within any other session that is concurrently accessing the content repository.</p>
-<p>This code snippet creates two new nodes, called <code>&quot;hello&quot;</code> and <code>&quot;world&quot;</code>, with <code>&quot;hello&quot;</code> being a child of the root node and <code>&quot;world&quot;</code> a child of the <code>&quot;hello&quot;</code> node.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">world.setProperty(&quot;message&quot;, &quot;Hello, World!&quot;); 
-</pre></div></div>
-
-<p>To add some content to the structure created using the <code>&quot;hello&quot;</code> and <code>&quot;world&quot;</code> nodes, we use the <code>Node.setProperty(String name, String value)</code> method to add a string property called <code>&quot;message&quot;</code> to the <code>&quot;world&quot;</code> node. The value of the property is the string <code>&quot;Hello, World!&quot;</code>.</p>
-<p>Like the added nodes, also the property is first created in the transient storage associated with the current session. If the named property already exists, then this method will change the value of that property.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">session.save(); 
-</pre></div></div>
-
-<p>Even though the rest of our example would work just fine using only the transient storage of the single session, we&#x2019;d like to persist the changes we&#x2019;ve made so far. This way other sessions could also access the example content we just created. If you like, you could even split the example application into three pieces for respectively storing, retrieving, and removing the example content. Such a split would not work unless we persisted the changes we make.</p>
-<p>The <code>Session.save()</code> method persists all pending changes in the transient storage. The changes are written to the persistent repository storage and they become visible to all sessions accessing the same workspace. Without this call all changes will be lost forever when the session is closed.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Node node = root.getNode(&quot;hello/world&quot;); 
-</pre></div></div>
-
-<p>Since we are still using the same session, we could use the existing hello and world node references to access the stored content, but let&#x2019;s pretend that we&#x2019;ve started another session and want to retrieve the content that was previously stored.</p>
-<p>The <code>Node.getNode(String relPath)</code> method returns a reference to the node at the given path relative to this node. The path syntax follows common file system conventions: a forward slash separates node names, a single dot represents the current node, and a double dot the parent node. Thus the path <code>&quot;hello/world&quot;</code> identifies the <code>&quot;world&quot;</code> child node of the <code>&quot;hello&quot;</code> child node of the current node - in this case the root node. The end result is that the method returns a node instance that represents the same content node as the world instance created a few lines earlier.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">System.out.println(node.getPath()); 
-</pre></div></div>
-
-<p>Each content node and property is uniquely identified by its absolute path within the workspace. The absolute path starts with a forward slash and contains all the names of the ancestor nodes in order before the name of the current node or property.</p>
-<p>The path of a node or property can be retrieved using the Item.getPath() method. The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Item.html?is-external=true">Item</a> interface is a superinterface of Node and Property, and contains all the functionality shared by nodes and properties.</p>
-<p>The node variable references the <code>&quot;world&quot;</code> node, so this statement will output the line <code>&quot;/hello/world&quot;</code>.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">System.out.println(node.getProperty(&quot;message&quot;).getString()); 
-</pre></div></div>
-
-<p>Properties can be accessed using the <code>Node.getProperty(String relPath)</code> method that returns an instance of the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Property.html?is-external=true">Property</a> interface that represents the property at the given path relative to the current node. In this case the &#x201c;message&#x201d; property is the one we created a few lines earlier.</p>
-<p>A JCR property can contain either a single or multiple values of a given type. There are property types for storing strings, numbers, dates, binary streams, node references, etc. We just want the single string value, so we use the <code>Property.getString()</code> method. The result of this statement is the line <code>&quot;Hello, World!&quot;</code> being outputted.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">root.getNode(&quot;hello&quot;).remove(); 
-</pre></div></div>
-
-<p>Nodes and properties can be removed using the<code>Item.remove()</code> method. The method removes the entire content subtree, so we only need to remove the topmost <code>&quot;hello&quot;</code> node to get rid of all the content we added before.</p>
-<p>Removals are first stored in the session-local transient storage, just like added and changed content. Like before, the transient changes need to be explicitly saved for the content to be removed from the persistent storage.</p></section><section>
+</code></pre></div>
+<p>New content nodes can be added using the <code>Node.addNode(String relPath)</code>
+method. The method takes the name (or relative path) of the node to be
+added and creates the named node in the transient storage associated with
+the current session. Until the transient storage is persisted, the added
+node is only visible within the current session and not within any other
+session that is concurrently accessing the content repository.</p>
+<p>This code snippet creates two new nodes, called <code>&quot;hello&quot;</code> and <code>&quot;world&quot;</code>, with
+<code>&quot;hello&quot;</code> being a child of the root node and <code>&quot;world&quot;</code> a child of the <code>&quot;hello&quot;</code>
+node.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>world.setProperty(&quot;message&quot;, &quot;Hello, World!&quot;); 
+</code></pre></div>
+<p>To add some content to the structure created using the <code>&quot;hello&quot;</code> and <code>&quot;world&quot;</code>
+nodes, we use the <code>Node.setProperty(String name, String value)</code> method to add
+a string property called <code>&quot;message&quot;</code> to the <code>&quot;world&quot;</code> node. The value of the
+property is the string <code>&quot;Hello, World!&quot;</code>.</p>
+<p>Like the added nodes, also the property is first created in the transient
+storage associated with the current session. If the named property already
+exists, then this method will change the value of that property.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>session.save(); 
+</code></pre></div>
+<p>Even though the rest of our example would work just fine using only the
+transient storage of the single session, we'd like to persist the changes
+we've made so far. This way other sessions could also access the example
+content we just created. If you like, you could even split the example
+application into three pieces for respectively storing, retrieving, and
+removing the example content. Such a split would not work unless we
+persisted the changes we make.</p>
+<p>The <code>Session.save()</code> method persists all pending changes in the transient
+storage. The changes are written to the persistent repository storage and
+they become visible to all sessions accessing the same workspace. Without
+this call all changes will be lost forever when the session is closed.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Node node = root.getNode(&quot;hello/world&quot;); 
+</code></pre></div>
+<p>Since we are still using the same session, we could use the existing hello
+and world node references to access the stored content, but let's pretend
+that we've started another session and want to retrieve the content that
+was previously stored.</p>
+<p>The <code>Node.getNode(String relPath)</code> method returns a reference to the node at
+the given path relative to this node. The path syntax follows common file
+system conventions: a forward slash separates node names, a single dot
+represents the current node, and a double dot the parent node. Thus the
+path <code>&quot;hello/world&quot;</code> identifies the <code>&quot;world&quot;</code> child node of the <code>&quot;hello&quot;</code> child
+node of the current node - in this case the root node. The end result is
+that the method returns a node instance that represents the same content
+node as the world instance created a few lines earlier.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>System.out.println(node.getPath()); 
+</code></pre></div>
+<p>Each content node and property is uniquely identified by its absolute path
+within the workspace. The absolute path starts with a forward slash and
+contains all the names of the ancestor nodes in order before the name of
+the current node or property.</p>
+<p>The path of a node or property can be retrieved using the Item.getPath()
+method. The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Item.html?is-external=true">Item</a>
+interface is a superinterface of Node and Property, and contains all the
+functionality shared by nodes and properties.</p>
+<p>The node variable references the <code>&quot;world&quot;</code> node, so this statement will
+output the line <code>&quot;/hello/world&quot;</code>.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>System.out.println(node.getProperty(&quot;message&quot;).getString()); 
+</code></pre></div>
+<p>Properties can be accessed using the <code>Node.getProperty(String relPath)</code>
+method that returns an instance of the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Property.html?is-external=true">Property</a>
+interface that represents the property at the given path relative to the
+current node. In this case the &#x201c;message&#x201d; property is the one we created a
+few lines earlier.</p>
+<p>A JCR property can contain either a single or multiple values of a given
+type. There are property types for storing strings, numbers, dates, binary
+streams, node references, etc. We just want the single string value, so we
+use the <code>Property.getString()</code> method. The result of this statement is the
+line <code>&quot;Hello, World!&quot;</code> being outputted.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>root.getNode(&quot;hello&quot;).remove(); 
+</code></pre></div>
+<p>Nodes and properties can be removed using the<code>Item.remove()</code> method. The
+method removes the entire content subtree, so we only need to remove the
+topmost <code>&quot;hello&quot;</code> node to get rid of all the content we added before.</p>
+<p>Removals are first stored in the session-local transient storage, just like
+added and changed content. Like before, the transient changes need to be
+explicitly saved for the content to be removed from the persistent storage.</p></section><section>
 <h2><a name="Hop_3:_Importing_content"></a>Hop 3: Importing content</h2>
 <p>TODO: Update to match the style of previous hops.</p>
-<p>To add content a bit more efficiently, you may want to try JCR&#x2019;s import facilities, such as Session.importXML. The following XML document by Elliotte Rusty Harold provides an interesting example that demonstrates a repository&#x2019;s namespace capabilities:</p>
+<p>To add content a bit more efficiently, you may want to try JCR's import
+facilities, such as Session.importXML. The following XML document by
+Elliotte Rusty Harold provides an interesting example that demonstrates a
+repository's namespace capabilities:</p>
 <p><b>test.xml</b></p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">&lt;xhtml:html xmlns:xhtml=&quot;http://www.w3.org/1999/xhtml&quot; 
+<div class="source"><pre class="prettyprint linenums"><code>&lt;xhtml:html xmlns:xhtml=&quot;http://www.w3.org/1999/xhtml&quot; 
 xmlns:mathml=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt; 
 &lt;xhtml:head&gt;&lt;xhtml:title&gt;Three Namespaces&lt;/xhtml:title&gt;&lt;/xhtml:head&gt; 
 &lt;xhtml:body&gt; 
@@ -508,12 +611,14 @@ width=&quot;12cm&quot; height=&quot;10cm
 &lt;xhtml:p&gt;Last Modified January 10, 2002&lt;/xhtml:p&gt; 
 &lt;/xhtml:body&gt; 
 &lt;/xhtml:html&gt; 
-</pre></div></div>
+</code></pre></div>
+<p>The third example application shown below will import the XML file called
+<code>test.xml</code> from the current directory into a new content repository node
+called <code>importxml</code>. Once the XML content is imported, the application
+recursively dumps the contents of the entire workspace using the simple
+<code>dump()</code> method.</p>
 
-<p>The third example application shown below will import the XML file called <code>test.xml</code> from the current directory into a new content repository node called <code>importxml</code>. Once the XML content is imported, the application recursively dumps the contents of the entire workspace using the simple <code>dump()</code> method.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.*; 
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.*; 
 import java.io.FileInputStream;
 import org.apache.jackrabbit.commons.JcrUtils;
 
@@ -593,12 +698,10 @@ public class ThirdHop {
         } 
     } 
 } 
-</pre></div></div>
-
+</code></pre></div>
 <p>Running the ThirdHop class should produce output like the following:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Importing XML... done. 
+<div class="source"><pre class="prettyprint linenums"><code>Importing XML... done. 
 / 
 /jcr:primaryType=rep:root 
 /jcr:system 
@@ -628,73 +731,90 @@ public class ThirdHop {
 . 
 . 
 . 
-</pre></div></div>
-
-<p>This hop has a lot of similarities with the Second Hop example: we create a new session with write access by logging in, next we insert data into the repository, this time by importing an xml file and finally we output the entire repository content.</p>
-<p>By now you should be familiar with logging into a repository (Repository.login), creating a new node (Node.addNode) under the repository root (Session.getRootNode) and saving the session so that our changes are persisted (Session.save).</p>
-<p>Let us look at the new methods used in this example, how to import xml content:</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">session.importXML(node.getPath(), xml, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
-</pre></div></div>
-
-<p>This deserializes an XML document and adds the resulting item subgraph as a child of the node at the provided path.</p>
-<p>The flag <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/ImportUUIDBehavior.html?is-external=true">ImportUUIDBehavior</a> governs how the identifiers of incoming nodes are handled.</p>
+</code></pre></div>
+<p>This hop has a lot of similarities with the Second Hop example: we create a
+new session with write access by logging in, next we insert data into the
+repository, this time by importing an xml file and finally we output the
+entire repository content.</p>
+<p>By now you should be familiar with logging into a repository
+(Repository.login), creating a new node (Node.addNode) under the repository
+root (Session.getRootNode) and saving the session so that our changes are
+persisted (Session.save).</p>
+<p>Let us look at the new methods used in this example, how to import xml
+content:</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>session.importXML(node.getPath(), xml, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
+</code></pre></div>
+<p>This deserializes an XML document and adds the resulting item subgraph as a
+child of the node at the provided path.</p>
+<p>The flag <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/ImportUUIDBehavior.html?is-external=true">ImportUUIDBehavior</a>
+governs how the identifiers of incoming nodes are handled.</p>
 <p>There are four options:</p>
 <ul>
 
 <li>
 
 <p><code>ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW</code>:<br />
-Incoming nodes are added in the same way that new node is added with Node.addNode. That is, they are either assigned newly created identifiers upon addition or upon save. In either case, identifier collisions will not occur.</p>
+Incoming nodes are added in
+the same way that new node is added with Node.addNode. That is, they are
+either assigned newly created identifiers upon addition or upon save. In
+either case, identifier collisions will not occur.</p>
 </li>
 <li>
 
 <p><code>ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING</code>:<br />
-If an incoming node has the same identifier as a node already existing in the workspace then the already existing node (and its subgraph) is removed from wherever it may be in the workspace before the incoming node is added. Note that this can result in nodes &#x201c;disappearing&#x201d; from locations in the workspace that are remote from the location to which the incoming subgraph is being written. Both the removal and the new addition will be dispatched on save.</p>
+If an incoming
+node has the same identifier as a node already existing in the workspace
+then the already existing node (and its subgraph) is removed from wherever
+it may be in the workspace before the incoming node is added. Note that
+this can result in nodes &#x201c;disappearing&#x201d; from locations in the workspace
+that are remote from the location to which the incoming subgraph is being
+written. Both the removal and the new addition will be dispatched on save.</p>
 </li>
 <li>
 
 <p><code>ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING</code>:<br />
-If an incoming node has the same identifier as a node already existing in the workspace, then the already-existing node is replaced by the incoming node in the same position as the existing node. Note that this may result in the incoming subgraph being disaggregated and &#x201c;spread around&#x201d; to different locations in the workspace. In the most extreme case this behavior may result in no node at all being added as child of parentAbsPath. This will occur if the topmost element of the incoming XML has the same identifier as an existing node elsewhere in the workspace. The change will be dispatched on save.</p>
+If an incoming
+node has the same identifier as a node already existing in the workspace,
+then the already-existing node is replaced by the incoming node in the same
+position as the existing node. Note that this may result in the incoming
+subgraph being disaggregated and &#x201c;spread around&#x201d; to different locations in
+the workspace. In the most extreme case this behavior may result in no node
+at all being added as child of parentAbsPath. This will occur if the
+topmost element of the incoming XML has the same identifier as an existing
+node elsewhere in the workspace. The change will be dispatched on save.</p>
 </li>
 <li>
 
 <p><code>ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW</code>:<br />
-If an incoming node has the same identifier as a node already existing in the workspace then an ItemExistsException is thrown.</p>
+If an incoming node has
+the same identifier as a node already existing in the workspace then an
+ItemExistsException is thrown.</p>
 </li>
 </ul>
 <p>Another interesting method is</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">void dump(Node node)
-</pre></div></div>
-
-<p>This can be used as an example of how to do a recursive traversal of all the repository, and check the properties of each node.</p>
-<p>Notice how we have to pay special attention to the multi-value properties, because that impacts the way we use them:</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">property.getDefinition().isMultiple()
-</pre></div></div>
+<div class="source"><pre class="prettyprint linenums"><code>void dump(Node node)
+</code></pre></div>
+<p>This can be used as an example of how to do a recursive traversal of all
+the repository, and check the properties of each node.</p>
+<p>Notice how we have to pay special attention to the multi-value properties,
+because that impacts the way we use them:</p>
 
+<div class="source"><pre class="prettyprint linenums"><code>property.getDefinition().isMultiple()
+</code></pre></div>
 <p>if this yields true, then we are dealing with an array of values:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Value[] values = property.getValues();
-</pre></div></div>
-
+<div class="source"><pre class="prettyprint linenums"><code>Value[] values = property.getValues();
+</code></pre></div>
 <p>or else, we can use the provided api shortcuts, to get the desired value:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">property.getString()
-</pre></div></div>
-
+<div class="source"><pre class="prettyprint linenums"><code>property.getString()
+</code></pre></div>
 <p>which is equivalent to</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">property.getValue().getString()
-</pre></div></div>
-
+<div class="source"><pre class="prettyprint linenums"><code>property.getValue().getString()
+</code></pre></div>
 <p>A very good entry point for utilities related code examples is <a class="externalLink" href="http://jackrabbit.apache.org/api/2.10/org/apache/jackrabbit/commons/JcrUtils.html">JcrUtils</a>.</p></section>
         </main>
       </div>
@@ -707,10 +827,12 @@ If an incoming node has the same identif
 <a href="https://www.apache.org/">The Apache Software Foundation</a> &vert; <a href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy Policy</a>
 </p>
         </div>
-    <div id="ohloh" class="pull-right">
-      <script src="https://www.ohloh.net/p/jackrabbit/widgets/project_users_logo.js"></script>
-    </div>
-        </div>
+      </div>
     </footer>
+<script>
+	if(anchors) {
+	  anchors.add();
+	}
+</script>
   </body>
 </html>
\ No newline at end of file

Modified: jackrabbit/site/live/jcr/fonts/glyphicons-halflings-regular.eot
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/jcr/fonts/glyphicons-halflings-regular.eot?rev=1906010&r1=1906009&r2=1906010&view=diff
==============================================================================
Binary files - no diff available.