chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r866588 [5/7] - in /websites/staging/chemistry/trunk/content: ./ dotnet/ internal/ java/0.6.0/maven/apidocs/ java/developing/ java/developing/repositories/ java/examples/ java/how-to/ php/
Date Thu, 20 Jun 2013 10:26:44 GMT
Modified: websites/staging/chemistry/trunk/content/java/developing/guide.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/developing/guide.html (original)
+++ websites/staging/chemistry/trunk/content/java/developing/guide.html Thu Jun 20 10:26:44 2013
@@ -633,20 +633,21 @@ be of this version only.</p>
 <p>You can delete a folder and all its contents using just one method. The following code snippet
 creates a new folder tree and then deletes it, ignoring any failures to delete individual objects, and deleting
 all versions of any documents in the tree.</p>
-<div class="codehilite"><pre>    <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Creating &#39;ADGFolder1&#39; in the root folder&quot;</span><span class="o">);</span>
-    <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">newFolderProps</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;();</span>
-    <span class="n">newFolderProps</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="na">OBJECT_TYPE_ID</span><span class="o">,</span> <span class="s">&quot;cmis:folder&quot;</span><span class="o">);</span>
-    <span class="n">newFolderProps</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="na">NAME</span><span class="o">,</span> <span class="s">&quot;ADGFolder1&quot;</span><span class="o">);</span>
-    <span class="n">Folder</span> <span class="n">folder1</span> <span class="o">=</span> <span class="n">root</span><span class="o">.</span><span class="na">createFolder</span><span class="o">(</span><span class="n">newFolderProps</span><span class="o">);</span>
+<div class="codehilite"><pre>    <span class="p">:::</span><span class="n">java</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Creating</span> <span class="s">&#39;ADGFolder1&#39;</span> <span class="n">in</span> <span class="n">the</span> <span class="n">root</span> <span class="n">folder</span>&quot;<span class="p">);</span>
+    <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">newFolderProps</span> <span class="p">=</span> <span class="n">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span> <span class="n">String</span><span class="o">&gt;</span><span class="p">();</span>
+    <span class="n">newFolderProps</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">PropertyIds</span><span class="p">.</span><span class="n">OBJECT_TYPE_ID</span><span class="p">,</span> &quot;<span class="n">cmis</span><span class="p">:</span><span class="n">folder</span>&quot;<span class="p">);</span>
+    <span class="n">newFolderProps</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">PropertyIds</span><span class="p">.</span><span class="n">NAME</span><span class="p">,</span> &quot;<span class="n">ADGFolder1</span>&quot;<span class="p">);</span>
+    <span class="n">Folder</span> <span class="n">folder1</span> <span class="p">=</span> <span class="n">root</span><span class="p">.</span><span class="n">createFolder</span><span class="p">(</span><span class="n">newFolderProps</span><span class="p">);</span>
 
-    <span class="n">newFolderProps</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="na">NAME</span><span class="o">,</span> <span class="s">&quot;ADGFolder11&quot;</span><span class="o">);</span>
-    <span class="n">Folder</span> <span class="n">folder11</span> <span class="o">=</span> <span class="n">folder1</span><span class="o">.</span><span class="na">createFolder</span><span class="o">(</span><span class="n">newFolderProps</span><span class="o">);</span>
+    <span class="n">newFolderProps</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">PropertyIds</span><span class="p">.</span><span class="n">NAME</span><span class="p">,</span> &quot;<span class="n">ADGFolder11</span>&quot;<span class="p">);</span>
+    <span class="n">Folder</span> <span class="n">folder11</span> <span class="p">=</span> <span class="n">folder1</span><span class="p">.</span><span class="n">createFolder</span><span class="p">(</span><span class="n">newFolderProps</span><span class="p">);</span>
 
-    <span class="n">newFolderProps</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="na">NAME</span><span class="o">,</span> <span class="s">&quot;ADGFolder12&quot;</span><span class="o">);</span>
-    <span class="n">Folder</span> <span class="n">folder12</span> <span class="o">=</span> <span class="n">folder1</span><span class="o">.</span><span class="na">createFolder</span><span class="o">(</span><span class="n">newFolderProps</span><span class="o">);</span>
+    <span class="n">newFolderProps</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">PropertyIds</span><span class="p">.</span><span class="n">NAME</span><span class="p">,</span> &quot;<span class="n">ADGFolder12</span>&quot;<span class="p">);</span>
+    <span class="n">Folder</span> <span class="n">folder12</span> <span class="p">=</span> <span class="n">folder1</span><span class="p">.</span><span class="n">createFolder</span><span class="p">(</span><span class="n">newFolderProps</span><span class="p">);</span>
 
-    <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;delete the &#39;ADGFolder1&#39; tree&quot;</span><span class="o">);</span>        
-    <span class="n">folder1</span><span class="o">.</span><span class="na">deleteTree</span><span class="o">(</span><span class="kc">true</span><span class="o">,</span> <span class="n">UnfileObject</span><span class="o">.</span><span class="na">DELETE</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">delete</span> <span class="n">the</span> <span class="s">&#39;ADGFolder1&#39;</span> <span class="n">tree</span>&quot;<span class="p">);</span>        
+    <span class="n">folder1</span><span class="p">.</span><span class="n">deleteTree</span><span class="p">(</span><span class="n">true</span><span class="p">,</span> <span class="n">UnfileObject</span><span class="p">.</span><span class="n">DELETE</span><span class="p">,</span> <span class="n">true</span><span class="p">);</span>
 </pre></div>
 
 
@@ -758,8 +759,7 @@ Folder ADGFolder122
 
 <p>Note that <code>getDescendants</code> and <code>getFolderTree</code> are similar, but <code>getDescendants</code> finds objects of any fileable type, <code>getFolderTree</code> finds only folder
 objects.</p>
-<p><a name="ObjectTypes"></a>   <br />
-</p>
+<p><a name="ObjectTypes"></a>     </p>
 <h3 id="object-types">Object Types</h3>
 <p>CMIS Objects have an object type. There are four base types, two of which <em>must</em> be supported by a repository </p>
 <ul>
@@ -777,33 +777,34 @@ and a property schema that will apply to
 <p>Every object type has a parent type, except a base type.</p>
 <p>CMIS 1.0 does not allow you to create types, but it does have allow you to navigate the object type tree, and look at type definitions.</p>
 <p>So, we can retrieve information in the type definition for our <code>doc</code> object :-</p>
-<div class="codehilite"><pre>    <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Getting type definition for doc type&quot;</span><span class="o">);</span>
-    <span class="n">ObjectType</span> <span class="n">objectType</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="na">getTypeDefinition</span><span class="o">(</span><span class="n">doc</span><span class="o">.</span><span class="na">getType</span><span class="o">().</span><span class="na">getId</span><span class="o">());</span>
-    <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;isBaseType() returns &quot;</span> <span class="o">+</span> <span class="o">(</span><span class="n">objectType</span><span class="o">.</span><span class="na">isBaseType</span><span class="o">()</span> <span class="o">?</span> <span class="s">&quot;true&quot;</span> <span class="o">:</span> <span class="s">&quot;false&quot;</span><span class="o">));</span>
-
-    <span class="n">ObjectType</span> <span class="n">baseType</span> <span class="o">=</span> <span class="n">objectType</span><span class="o">.</span><span class="na">getBaseType</span><span class="o">();</span>
-    <span class="k">if</span> <span class="o">(</span><span class="n">baseType</span> <span class="o">==</span> <span class="kc">null</span><span class="o">)</span> <span class="o">{</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;getBaseType() returns null&quot;</span><span class="o">);</span>
-    <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;getBaseType() returns &quot;</span> <span class="o">+</span> <span class="n">baseType</span><span class="o">.</span><span class="na">getDisplayName</span><span class="o">());</span>
-    <span class="o">}</span>
+<div class="codehilite"><pre>    <span class="p">:::</span><span class="n">java</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Getting</span> <span class="n">type</span> <span class="n">definition</span> <span class="k">for</span> <span class="n">doc</span> <span class="n">type</span>&quot;<span class="p">);</span>
+    <span class="n">ObjectType</span> <span class="n">objectType</span> <span class="p">=</span> <span class="n">session</span><span class="p">.</span><span class="n">getTypeDefinition</span><span class="p">(</span><span class="n">doc</span><span class="p">.</span><span class="n">getType</span><span class="p">().</span><span class="n">getId</span><span class="p">());</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">isBaseType</span><span class="p">()</span> <span class="n">returns</span> &quot; <span class="o">+</span> <span class="p">(</span><span class="n">objectType</span><span class="p">.</span><span class="n">isBaseType</span><span class="p">()</span> ? &quot;<span class="n">true</span>&quot; <span class="p">:</span> &quot;<span class="n">false</span>&quot;<span class="p">));</span>
+
+    <span class="n">ObjectType</span> <span class="n">baseType</span> <span class="p">=</span> <span class="n">objectType</span><span class="p">.</span><span class="n">getBaseType</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">baseType</span> <span class="o">==</span> <span class="n">null</span><span class="p">)</span> <span class="p">{</span>
+        <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">getBaseType</span><span class="p">()</span> <span class="n">returns</span> <span class="n">null</span>&quot;<span class="p">);</span>
+    <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+        <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">getBaseType</span><span class="p">()</span> <span class="n">returns</span> &quot; <span class="o">+</span> <span class="n">baseType</span><span class="p">.</span><span class="n">getDisplayName</span><span class="p">());</span>
+    <span class="p">}</span>
 
-    <span class="n">ObjectType</span> <span class="n">parentType</span> <span class="o">=</span> <span class="n">objectType</span><span class="o">.</span><span class="na">getParentType</span><span class="o">();</span>
-    <span class="k">if</span> <span class="o">(</span><span class="n">parentType</span> <span class="o">==</span> <span class="kc">null</span><span class="o">)</span> <span class="o">{</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;getParentType() returns null&quot;</span><span class="o">);</span>
-    <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;getParentType() returns &quot;</span> <span class="o">+</span> <span class="n">parentType</span><span class="o">.</span><span class="na">getDisplayName</span><span class="o">());</span>
-    <span class="o">}</span>
+    <span class="n">ObjectType</span> <span class="n">parentType</span> <span class="p">=</span> <span class="n">objectType</span><span class="p">.</span><span class="n">getParentType</span><span class="p">();</span>
+    <span class="k">if</span> <span class="p">(</span><span class="n">parentType</span> <span class="o">==</span> <span class="n">null</span><span class="p">)</span> <span class="p">{</span>
+        <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">getParentType</span><span class="p">()</span> <span class="n">returns</span> <span class="n">null</span>&quot;<span class="p">);</span>
+    <span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
+        <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">getParentType</span><span class="p">()</span> <span class="n">returns</span> &quot; <span class="o">+</span> <span class="n">parentType</span><span class="p">.</span><span class="n">getDisplayName</span><span class="p">());</span>
+    <span class="p">}</span>
 
-    <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Listing child types of &quot;</span> <span class="o">+</span> <span class="n">objectType</span><span class="o">.</span><span class="na">getDisplayName</span><span class="o">());</span>
-    <span class="k">for</span> <span class="o">(</span><span class="n">ObjectType</span> <span class="n">o</span> <span class="o">:</span> <span class="n">objectType</span><span class="o">.</span><span class="na">getChildren</span><span class="o">())</span> <span class="o">{</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;\t&quot;</span> <span class="o">+</span> <span class="n">o</span><span class="o">.</span><span class="na">getDisplayName</span><span class="o">());</span>
-    <span class="o">}</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Listing</span> <span class="n">child</span> <span class="n">types</span> <span class="n">of</span> &quot; <span class="o">+</span> <span class="n">objectType</span><span class="p">.</span><span class="n">getDisplayName</span><span class="p">());</span>
+    <span class="k">for</span> <span class="p">(</span><span class="n">ObjectType</span> <span class="n">o</span> <span class="p">:</span> <span class="n">objectType</span><span class="p">.</span><span class="n">getChildren</span><span class="p">())</span> <span class="p">{</span>
+        <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">\</span><span class="n">t</span>&quot; <span class="o">+</span> <span class="n">o</span><span class="p">.</span><span class="n">getDisplayName</span><span class="p">());</span>
+    <span class="p">}</span>
 
-    <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Getting immediate descendant types of &quot;</span> <span class="o">+</span> <span class="n">objectType</span><span class="o">.</span><span class="na">getDisplayName</span><span class="o">());</span>
-    <span class="k">for</span> <span class="o">(</span><span class="n">Tree</span><span class="o">&lt;</span><span class="n">ObjectType</span><span class="o">&gt;</span> <span class="n">o</span> <span class="o">:</span> <span class="n">objectType</span><span class="o">.</span><span class="na">getDescendants</span><span class="o">(</span><span class="mi">1</span><span class="o">))</span> <span class="o">{</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;\t&quot;</span> <span class="o">+</span> <span class="n">o</span><span class="o">.</span><span class="na">getItem</span><span class="o">().</span><span class="na">getDisplayName</span><span class="o">());</span>
-    <span class="o">}</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Getting</span> <span class="n">immediate</span> <span class="n">descendant</span> <span class="n">types</span> <span class="n">of</span> &quot; <span class="o">+</span> <span class="n">objectType</span><span class="p">.</span><span class="n">getDisplayName</span><span class="p">());</span>
+    <span class="k">for</span> <span class="p">(</span><span class="n">Tree</span><span class="o">&lt;</span><span class="n">ObjectType</span><span class="o">&gt;</span> <span class="n">o</span> <span class="p">:</span> <span class="n">objectType</span><span class="p">.</span><span class="n">getDescendants</span><span class="p">(</span>1<span class="p">))</span> <span class="p">{</span>
+        <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">\</span><span class="n">t</span>&quot; <span class="o">+</span> <span class="n">o</span><span class="p">.</span><span class="n">getItem</span><span class="p">().</span><span class="n">getDisplayName</span><span class="p">());</span>
+    <span class="p">}</span>
 </pre></div>
 
 
@@ -930,8 +931,7 @@ capability for the CMIS data model. You 
 is implicitly defined for each queryable object type defined in the repository.
 In each virtual table, virtual columns are implicitly defined for:-</p>
 <ul>
-<li>each property defined in the object type definition.<br />
-</li>
+<li>each property defined in the object type definition.  </li>
 <li>all properties defined on any ancestor-type of the object type but not defined in the object type definition. </li>
 </ul>
 <p>In this case we have selected all columns from the cmis:document virtual table, by specifying the asterisk.</p>
@@ -940,24 +940,25 @@ In this case the value in the virtual co
 This is specified using a LIKE predicate.</p>
 <p>You can run the query against any repository using the OpenCMIS workbench. </p>
 <p>Let's look at the code required for this query when using the OpenCMIS client library:-</p>
-<div class="codehilite"><pre>        <span class="n">String</span> <span class="n">query</span> <span class="o">=</span> <span class="s">&quot;SELECT * FROM cmis:document WHERE cmis:name LIKE &#39;test%&#39;&quot;</span><span class="o">;</span>
-        <span class="n">ItemIterable</span><span class="o">&lt;</span><span class="n">QueryResult</span><span class="o">&gt;</span> <span class="n">q</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="na">query</span><span class="o">(</span><span class="n">query</span><span class="o">,</span> <span class="kc">false</span><span class="o">);</span>
-
-        <span class="c1">// Did it work?</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;***results from query &quot;</span> <span class="o">+</span> <span class="n">query</span><span class="o">);</span>
-
-        <span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">1</span><span class="o">;</span>
-        <span class="k">for</span> <span class="o">(</span><span class="n">QueryResult</span> <span class="n">qr</span> <span class="o">:</span> <span class="n">q</span><span class="o">)</span> <span class="o">{</span>
-            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;--------------------------------------------\n&quot;</span> <span class="o">+</span> <span class="n">i</span> <span class="o">+</span> <span class="s">&quot; , &quot;</span>
-                    <span class="o">+</span> <span class="n">qr</span><span class="o">.</span><span class="na">getPropertyByQueryName</span><span class="o">(</span><span class="s">&quot;cmis:objectTypeId&quot;</span><span class="o">).</span><span class="na">getFirstValue</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot; , &quot;</span>
-                    <span class="o">+</span> <span class="n">qr</span><span class="o">.</span><span class="na">getPropertyByQueryName</span><span class="o">(</span><span class="s">&quot;cmis:name&quot;</span><span class="o">).</span><span class="na">getFirstValue</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot; , &quot;</span>
-                    <span class="o">+</span> <span class="n">qr</span><span class="o">.</span><span class="na">getPropertyByQueryName</span><span class="o">(</span><span class="s">&quot;cmis:createdBy&quot;</span><span class="o">).</span><span class="na">getFirstValue</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot; , &quot;</span>
-                    <span class="o">+</span> <span class="n">qr</span><span class="o">.</span><span class="na">getPropertyByQueryName</span><span class="o">(</span><span class="s">&quot;cmis:objectId&quot;</span><span class="o">).</span><span class="na">getFirstValue</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot; , &quot;</span>
-                    <span class="o">+</span> <span class="n">qr</span><span class="o">.</span><span class="na">getPropertyByQueryName</span><span class="o">(</span><span class="s">&quot;cmis:contentStreamFileName&quot;</span><span class="o">).</span><span class="na">getFirstValue</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot; , &quot;</span>
-                    <span class="o">+</span> <span class="n">qr</span><span class="o">.</span><span class="na">getPropertyByQueryName</span><span class="o">(</span><span class="s">&quot;cmis:contentStreamMimeType&quot;</span><span class="o">).</span><span class="na">getFirstValue</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot; , &quot;</span>
-                    <span class="o">+</span> <span class="n">qr</span><span class="o">.</span><span class="na">getPropertyByQueryName</span><span class="o">(</span><span class="s">&quot;cmis:contentStreamLength&quot;</span><span class="o">).</span><span class="na">getFirstValue</span><span class="o">());</span>
-            <span class="n">i</span><span class="o">++;</span>
-        <span class="o">}</span>
+<div class="codehilite"><pre>        <span class="p">:::</span><span class="n">java</span>
+        <span class="n">String</span> <span class="n">query</span> <span class="p">=</span> &quot;<span class="n">SELECT</span> <span class="o">*</span> <span class="n">FROM</span> <span class="n">cmis</span><span class="p">:</span><span class="n">document</span> <span class="n">WHERE</span> <span class="n">cmis</span><span class="p">:</span><span class="n">name</span> <span class="n">LIKE</span> <span class="s">&#39;test%&#39;</span>&quot;<span class="p">;</span>
+        <span class="n">ItemIterable</span><span class="o">&lt;</span><span class="n">QueryResult</span><span class="o">&gt;</span> <span class="n">q</span> <span class="p">=</span> <span class="n">session</span><span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="n">query</span><span class="p">,</span> <span class="n">false</span><span class="p">);</span>
+
+        <span class="o">//</span> <span class="n">Did</span> <span class="n">it</span> <span class="n">work</span>?
+        <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">***</span><span class="n">results</span> <span class="n">from</span> <span class="n">query</span> &quot; <span class="o">+</span> <span class="n">query</span><span class="p">);</span>
+
+        <span class="n">int</span> <span class="nb">i</span> <span class="p">=</span> 1<span class="p">;</span>
+        <span class="k">for</span> <span class="p">(</span><span class="n">QueryResult</span> <span class="n">qr</span> <span class="p">:</span> <span class="n">q</span><span class="p">)</span> <span class="p">{</span>
+            <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">--------------------------------------------\</span><span class="n">n</span>&quot; <span class="o">+</span> <span class="nb">i</span> <span class="o">+</span> &quot; <span class="p">,</span> &quot;
+                    <span class="o">+</span> <span class="n">qr</span><span class="p">.</span><span class="n">getPropertyByQueryName</span><span class="p">(</span>&quot;<span class="n">cmis</span><span class="p">:</span><span class="n">objectTypeId</span>&quot;<span class="p">).</span><span class="n">getFirstValue</span><span class="p">()</span> <span class="o">+</span> &quot; <span class="p">,</span> &quot;
+                    <span class="o">+</span> <span class="n">qr</span><span class="p">.</span><span class="n">getPropertyByQueryName</span><span class="p">(</span>&quot;<span class="n">cmis</span><span class="p">:</span><span class="n">name</span>&quot;<span class="p">).</span><span class="n">getFirstValue</span><span class="p">()</span> <span class="o">+</span> &quot; <span class="p">,</span> &quot;
+                    <span class="o">+</span> <span class="n">qr</span><span class="p">.</span><span class="n">getPropertyByQueryName</span><span class="p">(</span>&quot;<span class="n">cmis</span><span class="p">:</span><span class="n">createdBy</span>&quot;<span class="p">).</span><span class="n">getFirstValue</span><span class="p">()</span> <span class="o">+</span> &quot; <span class="p">,</span> &quot;
+                    <span class="o">+</span> <span class="n">qr</span><span class="p">.</span><span class="n">getPropertyByQueryName</span><span class="p">(</span>&quot;<span class="n">cmis</span><span class="p">:</span><span class="n">objectId</span>&quot;<span class="p">).</span><span class="n">getFirstValue</span><span class="p">()</span> <span class="o">+</span> &quot; <span class="p">,</span> &quot;
+                    <span class="o">+</span> <span class="n">qr</span><span class="p">.</span><span class="n">getPropertyByQueryName</span><span class="p">(</span>&quot;<span class="n">cmis</span><span class="p">:</span><span class="n">contentStreamFileName</span>&quot;<span class="p">).</span><span class="n">getFirstValue</span><span class="p">()</span> <span class="o">+</span> &quot; <span class="p">,</span> &quot;
+                    <span class="o">+</span> <span class="n">qr</span><span class="p">.</span><span class="n">getPropertyByQueryName</span><span class="p">(</span>&quot;<span class="n">cmis</span><span class="p">:</span><span class="n">contentStreamMimeType</span>&quot;<span class="p">).</span><span class="n">getFirstValue</span><span class="p">()</span> <span class="o">+</span> &quot; <span class="p">,</span> &quot;
+                    <span class="o">+</span> <span class="n">qr</span><span class="p">.</span><span class="n">getPropertyByQueryName</span><span class="p">(</span>&quot;<span class="n">cmis</span><span class="p">:</span><span class="n">contentStreamLength</span>&quot;<span class="p">).</span><span class="n">getFirstValue</span><span class="p">());</span>
+            <span class="nb">i</span><span class="o">++</span><span class="p">;</span>
+        <span class="p">}</span>
 </pre></div>
 
 
@@ -987,24 +988,25 @@ debugging, as the server side is normall
 In the following code snippet, a <code>CmisObjectNotFoundException</code> exception is forced by 
 trying to create a document with an invalid type. The catch block prints the server's error page
 and the client stack trace.</p>
-<div class="codehilite"><pre>    <span class="n">Folder</span> <span class="n">root</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="na">getRootFolder</span><span class="o">();</span>
-    <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">newFolderProps</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;();</span>
-    <span class="n">newFolderProps</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="na">OBJECT_TYPE_ID</span><span class="o">,</span> <span class="s">&quot;cmis:folder&quot;</span><span class="o">);</span>
-    <span class="n">newFolderProps</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="na">NAME</span><span class="o">,</span> <span class="s">&quot;ADGFolderTest&quot;</span><span class="o">);</span>
-    <span class="n">Folder</span> <span class="n">folderTest</span> <span class="o">=</span> <span class="n">root</span><span class="o">.</span><span class="na">createFolder</span><span class="o">(</span><span class="n">newFolderProps</span><span class="o">);</span>
-
-    <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">newFileProps</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;();</span>
-
-    <span class="n">newFileProps</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="na">OBJECT_TYPE_ID</span><span class="o">,</span> <span class="s">&quot;cmis:badtype&quot;</span><span class="o">);</span>
-    <span class="n">newFileProps</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="na">NAME</span><span class="o">,</span> <span class="s">&quot;ADGFileTest&quot;</span><span class="o">);</span>
-
-    <span class="k">try</span> <span class="o">{</span>
-        <span class="n">folderTest</span><span class="o">.</span><span class="na">createDocument</span><span class="o">(</span><span class="n">newFileProps</span><span class="o">,</span> <span class="kc">null</span><span class="o">,</span> <span class="n">VersioningState</span><span class="o">.</span><span class="na">MAJOR</span><span class="o">);</span>
-    <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">CmisObjectNotFoundException</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">err</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;server error page :\n&quot;</span> <span class="o">+</span> <span class="n">e</span><span class="o">.</span><span class="na">getErrorContent</span><span class="o">());</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">err</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;\nClient stack trace :\n&quot;</span><span class="o">);</span>
-        <span class="n">e1</span><span class="o">.</span><span class="na">printStackTrace</span><span class="o">();</span>
-    <span class="o">}</span>
+<div class="codehilite"><pre>    <span class="p">:::</span><span class="n">java</span>
+    <span class="n">Folder</span> <span class="n">root</span> <span class="p">=</span> <span class="n">session</span><span class="p">.</span><span class="n">getRootFolder</span><span class="p">();</span>
+    <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">newFolderProps</span> <span class="p">=</span> <span class="n">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span> <span class="n">String</span><span class="o">&gt;</span><span class="p">();</span>
+    <span class="n">newFolderProps</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">PropertyIds</span><span class="p">.</span><span class="n">OBJECT_TYPE_ID</span><span class="p">,</span> &quot;<span class="n">cmis</span><span class="p">:</span><span class="n">folder</span>&quot;<span class="p">);</span>
+    <span class="n">newFolderProps</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">PropertyIds</span><span class="p">.</span><span class="n">NAME</span><span class="p">,</span> &quot;<span class="n">ADGFolderTest</span>&quot;<span class="p">);</span>
+    <span class="n">Folder</span> <span class="n">folderTest</span> <span class="p">=</span> <span class="n">root</span><span class="p">.</span><span class="n">createFolder</span><span class="p">(</span><span class="n">newFolderProps</span><span class="p">);</span>
+
+    <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">newFileProps</span> <span class="p">=</span> <span class="n">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="p">,</span> <span class="n">String</span><span class="o">&gt;</span><span class="p">();</span>
+
+    <span class="n">newFileProps</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">PropertyIds</span><span class="p">.</span><span class="n">OBJECT_TYPE_ID</span><span class="p">,</span> &quot;<span class="n">cmis</span><span class="p">:</span><span class="n">badtype</span>&quot;<span class="p">);</span>
+    <span class="n">newFileProps</span><span class="p">.</span><span class="n">put</span><span class="p">(</span><span class="n">PropertyIds</span><span class="p">.</span><span class="n">NAME</span><span class="p">,</span> &quot;<span class="n">ADGFileTest</span>&quot;<span class="p">);</span>
+
+    <span class="k">try</span> <span class="p">{</span>
+        <span class="n">folderTest</span><span class="p">.</span><span class="n">createDocument</span><span class="p">(</span><span class="n">newFileProps</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">VersioningState</span><span class="p">.</span><span class="n">MAJOR</span><span class="p">);</span>
+    <span class="p">}</span> <span class="k">catch</span> <span class="p">(</span><span class="n">CmisObjectNotFoundException</span> <span class="n">e</span><span class="p">)</span> <span class="p">{</span>
+        <span class="n">System</span><span class="p">.</span><span class="n">err</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">server</span> <span class="n">error</span> <span class="n">page</span> <span class="p">:</span><span class="o">\</span><span class="n">n</span>&quot; <span class="o">+</span> <span class="n">e</span><span class="p">.</span><span class="n">getErrorContent</span><span class="p">());</span>
+        <span class="n">System</span><span class="p">.</span><span class="n">err</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">\</span><span class="n">nClient</span> <span class="n">stack</span> <span class="n">trace</span> <span class="p">:</span><span class="o">\</span><span class="n">n</span>&quot;<span class="p">);</span>
+        <span class="n">e1</span><span class="p">.</span><span class="n">printStackTrace</span><span class="p">();</span>
+    <span class="p">}</span>
 </pre></div>
 
 
@@ -1023,8 +1025,7 @@ org.apache.chemistry.opencmis.commons.ex
 </pre></div>
 
 
-<p><a name="OperationContext"></a><br />
-</p>
+<p><a name="OperationContext"></a>  </p>
 <h3 id="operation-context">Operation Context</h3>
 <p>The amount of metadata and associated information retrieved during an OpenCMIS operation could be large, 
 so certain OpenCMIS methods return a sensible subset of the information by default, 
@@ -1081,24 +1082,25 @@ The <code>OperationContext</code> specif
 
 <p>Note that <code>skipTo()</code> method returns a  an iterable over the complete collection. The <code>getPage()</code> method is then be used to create an iterable over the page.</p>
 <p>The following code snippet retrieves all objects in the result set, using the <code>getHasMoreItems()</code> method to end the <code>getPage()</code> loop.</p>
-<div class="codehilite"><pre>    <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Getting complete result set in pages of 3&quot;</span><span class="o">);</span>
-    <span class="n">OperationContext</span> <span class="n">operationContext</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="na">createOperationContext</span><span class="o">();</span>
-    <span class="n">operationContext</span><span class="o">.</span><span class="na">setMaxItemsPerPage</span><span class="o">(</span><span class="mi">3</span><span class="o">);</span>
-    <span class="n">children1</span> <span class="o">=</span> <span class="n">folderPaging</span><span class="o">.</span><span class="na">getChildren</span><span class="o">(</span><span class="n">operationContext</span><span class="o">);</span>
-    <span class="kt">int</span> <span class="n">pageNumber</span> <span class="o">=</span> <span class="mi">0</span><span class="o">;</span>
-    <span class="kt">boolean</span> <span class="n">finished</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
-    <span class="n">count</span><span class="o">=</span> <span class="mi">0</span><span class="o">;</span>
-    <span class="k">while</span> <span class="o">(!</span><span class="n">finished</span><span class="o">)</span> <span class="o">{</span>
-        <span class="n">ItemIterable</span><span class="o">&lt;</span><span class="n">CmisObject</span><span class="o">&gt;</span> <span class="n">currentPage</span> <span class="o">=</span> <span class="n">children1</span><span class="o">.</span><span class="na">skipTo</span><span class="o">(</span><span class="n">count</span><span class="o">).</span><span class="na">getPage</span><span class="o">();</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;page &quot;</span> <span class="o">+</span> <span class="n">pageNumber</span> <span class="o">+</span> <span class="s">&quot; has &quot;</span> <span class="o">+</span> <span class="n">currentPage</span><span class="o">.</span><span class="na">getPageNumItems</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot; items&quot;</span><span class="o">);</span>
-        <span class="k">for</span> <span class="o">(</span><span class="n">CmisObject</span> <span class="n">item</span> <span class="o">:</span> <span class="n">currentPage</span><span class="o">)</span> <span class="o">{</span>
-            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;object &quot;</span> <span class="o">+</span> <span class="n">count</span> <span class="o">+</span>  <span class="s">&quot; is &quot;</span> <span class="o">+</span> <span class="n">item</span><span class="o">.</span><span class="na">getName</span><span class="o">());</span>
-            <span class="n">count</span><span class="o">++;</span>
-        <span class="o">}</span>
-        <span class="n">pageNumber</span><span class="o">++;</span>
-        <span class="k">if</span> <span class="o">(!</span><span class="n">currentPage</span><span class="o">.</span><span class="na">getHasMoreItems</span><span class="o">())</span>
-            <span class="n">finished</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
-    <span class="o">}</span>
+<div class="codehilite"><pre>    <span class="p">:::</span><span class="n">java</span>
+    <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Getting</span> <span class="n">complete</span> <span class="n">result</span> <span class="n">set</span> <span class="n">in</span> <span class="n">pages</span> <span class="n">of</span> 3&quot;<span class="p">);</span>
+    <span class="n">OperationContext</span> <span class="n">operationContext</span> <span class="p">=</span> <span class="n">session</span><span class="p">.</span><span class="n">createOperationContext</span><span class="p">();</span>
+    <span class="n">operationContext</span><span class="p">.</span><span class="n">setMaxItemsPerPage</span><span class="p">(</span>3<span class="p">);</span>
+    <span class="n">children1</span> <span class="p">=</span> <span class="n">folderPaging</span><span class="p">.</span><span class="n">getChildren</span><span class="p">(</span><span class="n">operationContext</span><span class="p">);</span>
+    <span class="n">int</span> <span class="n">pageNumber</span> <span class="p">=</span> 0<span class="p">;</span>
+    <span class="n">boolean</span> <span class="n">finished</span> <span class="p">=</span> <span class="n">false</span><span class="p">;</span>
+    <span class="n">count</span><span class="p">=</span> 0<span class="p">;</span>
+    <span class="k">while</span> <span class="p">(</span>!<span class="n">finished</span><span class="p">)</span> <span class="p">{</span>
+        <span class="n">ItemIterable</span><span class="o">&lt;</span><span class="n">CmisObject</span><span class="o">&gt;</span> <span class="n">currentPage</span> <span class="p">=</span> <span class="n">children1</span><span class="p">.</span><span class="n">skipTo</span><span class="p">(</span><span class="n">count</span><span class="p">).</span><span class="n">getPage</span><span class="p">();</span>
+        <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">page</span> &quot; <span class="o">+</span> <span class="n">pageNumber</span> <span class="o">+</span> &quot; <span class="n">has</span> &quot; <span class="o">+</span> <span class="n">currentPage</span><span class="p">.</span><span class="n">getPageNumItems</span><span class="p">()</span> <span class="o">+</span> &quot; <span class="n">items</span>&quot;<span class="p">);</span>
+        <span class="k">for</span> <span class="p">(</span><span class="n">CmisObject</span> <span class="n">item</span> <span class="p">:</span> <span class="n">currentPage</span><span class="p">)</span> <span class="p">{</span>
+            <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">object</span> &quot; <span class="o">+</span> <span class="n">count</span> <span class="o">+</span>  &quot; <span class="n">is</span> &quot; <span class="o">+</span> <span class="n">item</span><span class="p">.</span><span class="n">getName</span><span class="p">());</span>
+            <span class="n">count</span><span class="o">++</span><span class="p">;</span>
+        <span class="p">}</span>
+        <span class="n">pageNumber</span><span class="o">++</span><span class="p">;</span>
+        <span class="k">if</span> <span class="p">(</span>!<span class="n">currentPage</span><span class="p">.</span><span class="n">getHasMoreItems</span><span class="p">())</span>
+            <span class="n">finished</span> <span class="p">=</span> <span class="n">true</span><span class="p">;</span>
+    <span class="p">}</span>
 </pre></div>
 
 
@@ -1110,36 +1112,37 @@ The <code>OperationContext</code> specif
 that are not needed for that domain. This means a repository implementation may not be able to support all the capabilities that the CMIS specification provides.
 To allow this, some capabilities can be optionally supported by a CMIS repository. 
 You can discover which optional capabilities your repository supports using the getRepositoryInfo service:-</p>
-<div class="codehilite"><pre>     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Printing repository capabilities...&quot;</span><span class="o">);</span>
-     <span class="kd">final</span> <span class="n">RepositoryInfo</span> <span class="n">repInfo</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="na">getRepositoryInfo</span><span class="o">();</span>
-     <span class="n">RepositoryCapabilities</span> <span class="n">cap</span> <span class="o">=</span> <span class="n">repInfo</span><span class="o">.</span><span class="na">getCapabilities</span><span class="o">();</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;\nNavigation Capabilities&quot;</span><span class="o">);</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;-----------------------&quot;</span><span class="o">);</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Get descendants supported: &quot;</span> <span class="o">+</span> <span class="o">(</span><span class="n">cap</span><span class="o">.</span><span class="na">isGetDescendantsSupported</span><span class="o">()?</span><span class="s">&quot;true&quot;</span><span class="o">:</span><span class="s">&quot;false&quot;</span><span class="o">));</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Get folder tree supported: &quot;</span> <span class="o">+</span> <span class="o">(</span><span class="n">cap</span><span class="o">.</span><span class="na">isGetFolderTreeSupported</span><span class="o">()?</span><span class="s">&quot;true&quot;</span><span class="o">:</span><span class="s">&quot;false&quot;</span><span class="o">));</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;\nObject Capabilities&quot;</span><span class="o">);</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;-----------------------&quot;</span><span class="o">);</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Content Stream: &quot;</span> <span class="o">+</span> <span class="n">cap</span><span class="o">.</span><span class="na">getContentStreamUpdatesCapability</span><span class="o">().</span><span class="na">value</span><span class="o">());</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Changes: &quot;</span> <span class="o">+</span> <span class="n">cap</span><span class="o">.</span><span class="na">getChangesCapability</span><span class="o">().</span><span class="na">value</span><span class="o">());</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Renditions: &quot;</span> <span class="o">+</span> <span class="n">cap</span><span class="o">.</span><span class="na">getRenditionsCapability</span><span class="o">().</span><span class="na">value</span><span class="o">());</span> 
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;\nFiling Capabilities&quot;</span><span class="o">);</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;-----------------------&quot;</span><span class="o">);</span>        
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Multifiling supported: &quot;</span> <span class="o">+</span> <span class="o">(</span><span class="n">cap</span><span class="o">.</span><span class="na">isMultifilingSupported</span><span class="o">()?</span><span class="s">&quot;true&quot;</span><span class="o">:</span><span class="s">&quot;false&quot;</span><span class="o">));</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Unfiling supported: &quot;</span> <span class="o">+</span> <span class="o">(</span><span class="n">cap</span><span class="o">.</span><span class="na">isUnfilingSupported</span><span class="o">()?</span><span class="s">&quot;true&quot;</span><span class="o">:</span><span class="s">&quot;false&quot;</span><span class="o">));</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Version specific filing supported: &quot;</span> <span class="o">+</span> <span class="o">(</span><span class="n">cap</span><span class="o">.</span><span class="na">isVersionSpecificFilingSupported</span><span class="o">()?</span><span class="s">&quot;true&quot;</span><span class="o">:</span><span class="s">&quot;false&quot;</span><span class="o">));</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;\nVersioning Capabilities&quot;</span><span class="o">);</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;-----------------------&quot;</span><span class="o">);</span>        
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;PWC searchable: &quot;</span> <span class="o">+</span> <span class="o">(</span><span class="n">cap</span><span class="o">.</span><span class="na">isPwcSearchableSupported</span><span class="o">()?</span><span class="s">&quot;true&quot;</span><span class="o">:</span><span class="s">&quot;false&quot;</span><span class="o">));</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;PWC updatable: &quot;</span> <span class="o">+</span> <span class="o">(</span><span class="n">cap</span><span class="o">.</span><span class="na">isPwcUpdatableSupported</span><span class="o">()?</span><span class="s">&quot;true&quot;</span><span class="o">:</span><span class="s">&quot;false&quot;</span><span class="o">));</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;All versions searchable: &quot;</span> <span class="o">+</span> <span class="o">(</span><span class="n">cap</span><span class="o">.</span><span class="na">isAllVersionsSearchableSupported</span><span class="o">()?</span><span class="s">&quot;true&quot;</span><span class="o">:</span><span class="s">&quot;false&quot;</span><span class="o">));</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;\nQuery Capabilities&quot;</span><span class="o">);</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;-----------------------&quot;</span><span class="o">);</span>        
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Query: &quot;</span> <span class="o">+</span> <span class="n">cap</span><span class="o">.</span><span class="na">getQueryCapability</span><span class="o">().</span><span class="na">value</span><span class="o">());</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Join: &quot;</span> <span class="o">+</span> <span class="n">cap</span><span class="o">.</span><span class="na">getJoinCapability</span><span class="o">().</span><span class="na">value</span><span class="o">());</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;\nACL Capabilities&quot;</span><span class="o">);</span>
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;-----------------------&quot;</span><span class="o">);</span>        
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;ACL: &quot;</span> <span class="o">+</span> <span class="n">cap</span><span class="o">.</span><span class="na">getAclCapability</span><span class="o">().</span><span class="na">value</span><span class="o">());</span> 
-     <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;End of  repository capabilities&quot;</span><span class="o">);</span>
+<div class="codehilite"><pre>     <span class="p">:::</span><span class="n">java</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Printing</span> <span class="n">repository</span> <span class="n">capabilities</span><span class="p">...</span>&quot;<span class="p">);</span>
+     <span class="n">final</span> <span class="n">RepositoryInfo</span> <span class="n">repInfo</span> <span class="p">=</span> <span class="n">session</span><span class="p">.</span><span class="n">getRepositoryInfo</span><span class="p">();</span>
+     <span class="n">RepositoryCapabilities</span> <span class="n">cap</span> <span class="p">=</span> <span class="n">repInfo</span><span class="p">.</span><span class="n">getCapabilities</span><span class="p">();</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">\</span><span class="n">nNavigation</span> <span class="n">Capabilities</span>&quot;<span class="p">);</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">-----------------------</span>&quot;<span class="p">);</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Get</span> <span class="n">descendants</span> <span class="n">supported</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="p">(</span><span class="n">cap</span><span class="p">.</span><span class="n">isGetDescendantsSupported</span><span class="p">()</span>?&quot;<span class="n">true</span>&quot;<span class="p">:</span>&quot;<span class="n">false</span>&quot;<span class="p">));</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Get</span> <span class="n">folder</span> <span class="n">tree</span> <span class="n">supported</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="p">(</span><span class="n">cap</span><span class="p">.</span><span class="n">isGetFolderTreeSupported</span><span class="p">()</span>?&quot;<span class="n">true</span>&quot;<span class="p">:</span>&quot;<span class="n">false</span>&quot;<span class="p">));</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">\</span><span class="n">nObject</span> <span class="n">Capabilities</span>&quot;<span class="p">);</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">-----------------------</span>&quot;<span class="p">);</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Content</span> <span class="n">Stream</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">cap</span><span class="p">.</span><span class="n">getContentStreamUpdatesCapability</span><span class="p">().</span><span class="n">value</span><span class="p">());</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Changes</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">cap</span><span class="p">.</span><span class="n">getChangesCapability</span><span class="p">().</span><span class="n">value</span><span class="p">());</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Renditions</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">cap</span><span class="p">.</span><span class="n">getRenditionsCapability</span><span class="p">().</span><span class="n">value</span><span class="p">());</span> 
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">\</span><span class="n">nFiling</span> <span class="n">Capabilities</span>&quot;<span class="p">);</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">-----------------------</span>&quot;<span class="p">);</span>        
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Multifiling</span> <span class="n">supported</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="p">(</span><span class="n">cap</span><span class="p">.</span><span class="n">isMultifilingSupported</span><span class="p">()</span>?&quot;<span class="n">true</span>&quot;<span class="p">:</span>&quot;<span class="n">false</span>&quot;<span class="p">));</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Unfiling</span> <span class="n">supported</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="p">(</span><span class="n">cap</span><span class="p">.</span><span class="n">isUnfilingSupported</span><span class="p">()</span>?&quot;<span class="n">true</span>&quot;<span class="p">:</span>&quot;<span class="n">false</span>&quot;<span class="p">));</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Version</span> <span class="n">specific</span> <span class="n">filing</span> <span class="n">supported</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="p">(</span><span class="n">cap</span><span class="p">.</span><span class="n">isVersionSpecificFilingSupported</span><span class="p">()</span>?&quot;<span class="n">true</span>&quot;<span class="p">:</span>&quot;<span class="n">false</span>&quot;<span class="p">));</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">\</span><span class="n">nVersioning</span> <span class="n">Capabilities</span>&quot;<span class="p">);</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">-----------------------</span>&quot;<span class="p">);</span>        
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">PWC</span> <span class="n">searchable</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="p">(</span><span class="n">cap</span><span class="p">.</span><span class="n">isPwcSearchableSupported</span><span class="p">()</span>?&quot;<span class="n">true</span>&quot;<span class="p">:</span>&quot;<span class="n">false</span>&quot;<span class="p">));</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">PWC</span> <span class="n">updatable</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="p">(</span><span class="n">cap</span><span class="p">.</span><span class="n">isPwcUpdatableSupported</span><span class="p">()</span>?&quot;<span class="n">true</span>&quot;<span class="p">:</span>&quot;<span class="n">false</span>&quot;<span class="p">));</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">All</span> <span class="n">versions</span> <span class="n">searchable</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="p">(</span><span class="n">cap</span><span class="p">.</span><span class="n">isAllVersionsSearchableSupported</span><span class="p">()</span>?&quot;<span class="n">true</span>&quot;<span class="p">:</span>&quot;<span class="n">false</span>&quot;<span class="p">));</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">\</span><span class="n">nQuery</span> <span class="n">Capabilities</span>&quot;<span class="p">);</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">-----------------------</span>&quot;<span class="p">);</span>        
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Query</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">cap</span><span class="p">.</span><span class="n">getQueryCapability</span><span class="p">().</span><span class="n">value</span><span class="p">());</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">Join</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">cap</span><span class="p">.</span><span class="n">getJoinCapability</span><span class="p">().</span><span class="n">value</span><span class="p">());</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">\</span><span class="n">nACL</span> <span class="n">Capabilities</span>&quot;<span class="p">);</span>
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="o">-----------------------</span>&quot;<span class="p">);</span>        
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">ACL</span><span class="p">:</span> &quot; <span class="o">+</span> <span class="n">cap</span><span class="p">.</span><span class="n">getAclCapability</span><span class="p">().</span><span class="n">value</span><span class="p">());</span> 
+     <span class="n">System</span><span class="p">.</span><span class="n">out</span><span class="p">.</span><span class="n">println</span><span class="p">(</span>&quot;<span class="n">End</span> <span class="n">of</span>  <span class="n">repository</span> <span class="n">capabilities</span>&quot;<span class="p">);</span>
 </pre></div>
 
 
@@ -1176,32 +1179,33 @@ optional, and your repository may not su
  creates a second folder in the root folder, and then adds our document to the new
 folder. Since multi-filing is supported, the document should be seen in both folders, 
 and the code checks for this.</p>
-<div class="codehilite"><pre>    <span class="k">if</span> <span class="o">(!(</span><span class="n">cap</span><span class="o">.</span><span class="na">isMultifilingSupported</span><span class="o">()))</span> <span class="o">{</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Multifiling not supported by this repository&quot;</span><span class="o">);</span>
-    <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
-        <span class="c1">// Add a new folder to the root folder</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Creating &#39;ADGNewFolder 2&#39; in the root folder&quot;</span><span class="o">);</span>
-        <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">Object</span><span class="o">&gt;</span> <span class="n">newFolderProps</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">Object</span><span class="o">&gt;();</span>
-        <span class="n">newFolderProps</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="na">OBJECT_TYPE_ID</span><span class="o">,</span> <span class="s">&quot;cmis:folder&quot;</span><span class="o">);</span>
-        <span class="n">newFolderProps</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="na">NAME</span><span class="o">,</span> <span class="s">&quot;ADGNewFolder 2&quot;</span><span class="o">);</span>
-        <span class="n">newFolder2</span> <span class="o">=</span> <span class="n">root</span><span class="o">.</span><span class="na">createFolder</span><span class="o">(</span><span class="n">newFolderProps</span><span class="o">);</span>
-
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Adding &quot;</span> <span class="o">+</span> <span class="n">textFileName</span> <span class="o">+</span> <span class="s">&quot;to &#39;ADGNewFolder 2&#39; in the root folder&quot;</span><span class="o">);</span>
-        <span class="n">doc</span><span class="o">.</span><span class="na">addToFolder</span><span class="o">(</span><span class="n">newFolder2</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>
-
-        <span class="c1">// Did it work?</span>
-        <span class="n">ItemIterable</span><span class="o">&lt;</span><span class="n">CmisObject</span><span class="o">&gt;</span><span class="n">children</span> <span class="o">=</span> <span class="n">newFolder</span><span class="o">.</span><span class="na">getChildren</span><span class="o">();</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Now finding the following objects in the &#39;ADGNewFolder&#39; folder:-&quot;</span><span class="o">);</span>
-        <span class="k">for</span> <span class="o">(</span><span class="n">CmisObject</span> <span class="n">o</span> <span class="o">:</span> <span class="n">children</span><span class="o">)</span> <span class="o">{</span>
-            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">o</span><span class="o">.</span><span class="na">getName</span><span class="o">());</span>
-        <span class="o">}</span>
-
-        <span class="n">children</span> <span class="o">=</span> <span class="n">newFolder2</span><span class="o">.</span><span class="na">getChildren</span><span class="o">();</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Now finding the following objects in the &#39;ADGNewFolder 2&#39; folder:-&quot;</span><span class="o">);</span>
-        <span class="k">for</span> <span class="o">(</span><span class="n">CmisObject</span> <span class="n">o</span> <span class="o">:</span> <span class="n">children</span><span class="o">)</span> <span class="o">{</span>
-            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">o</span><span class="o">.</span><span class="na">getName</span><span class="o">());</span>
-        <span class="o">}</span>
-    <span class="o">}</span>
+<div class="codehilite"><pre>    <span class="s-Atom">:::java</span>
+    <span class="nf">if</span> <span class="p">(!(</span><span class="s-Atom">cap</span><span class="p">.</span><span class="o">is</span><span class="nv">MultifilingSupported</span><span class="p">()))</span> <span class="p">{</span>
+        <span class="nv">System</span><span class="p">.</span><span class="s-Atom">out</span><span class="p">.</span><span class="nf">println</span><span class="p">(</span><span class="s2">&quot;Multifiling not supported by this repository&quot;</span><span class="p">);</span>
+    <span class="p">}</span> <span class="s-Atom">else</span> <span class="p">{</span>
+        <span class="o">//</span> <span class="nv">Add</span> <span class="s-Atom">a</span> <span class="s-Atom">new</span> <span class="s-Atom">folder</span> <span class="s-Atom">to</span> <span class="s-Atom">the</span> <span class="s-Atom">root</span> <span class="s-Atom">folder</span>
+        <span class="nv">System</span><span class="p">.</span><span class="s-Atom">out</span><span class="p">.</span><span class="nf">println</span><span class="p">(</span><span class="s2">&quot;Creating &#39;ADGNewFolder 2&#39; in the root folder&quot;</span><span class="p">);</span>
+        <span class="nv">Map</span><span class="o">&lt;</span><span class="nv">String</span><span class="p">,</span> <span class="nv">Object</span><span class="o">&gt;</span> <span class="s-Atom">newFolderProps</span> <span class="o">=</span> <span class="s-Atom">new</span> <span class="nv">HashMap</span><span class="o">&lt;</span><span class="nv">String</span><span class="p">,</span> <span class="nv">Object</span><span class="s-Atom">&gt;</span><span class="p">();</span>
+        <span class="s-Atom">newFolderProps</span><span class="p">.</span><span class="nf">put</span><span class="p">(</span><span class="nv">PropertyIds</span><span class="p">.</span><span class="nv">OBJECT_TYPE_ID</span><span class="p">,</span> <span class="s2">&quot;cmis:folder&quot;</span><span class="p">);</span>
+        <span class="s-Atom">newFolderProps</span><span class="p">.</span><span class="nf">put</span><span class="p">(</span><span class="nv">PropertyIds</span><span class="p">.</span><span class="nv">NAME</span><span class="p">,</span> <span class="s2">&quot;ADGNewFolder 2&quot;</span><span class="p">);</span>
+        <span class="s-Atom">newFolder2</span> <span class="o">=</span> <span class="s-Atom">root</span><span class="p">.</span><span class="nf">createFolder</span><span class="p">(</span><span class="s-Atom">newFolderProps</span><span class="p">);</span>
+
+        <span class="nv">System</span><span class="p">.</span><span class="s-Atom">out</span><span class="p">.</span><span class="nf">println</span><span class="p">(</span><span class="s2">&quot;Adding &quot;</span> <span class="o">+</span> <span class="s-Atom">textFileName</span> <span class="o">+</span> <span class="s2">&quot;to &#39;ADGNewFolder 2&#39; in the root folder&quot;</span><span class="p">);</span>
+        <span class="s-Atom">doc</span><span class="p">.</span><span class="nf">addToFolder</span><span class="p">(</span><span class="s-Atom">newFolder2</span><span class="p">,</span> <span class="s-Atom">true</span><span class="p">);</span>
+
+        <span class="o">//</span> <span class="nv">Did</span> <span class="s-Atom">it</span> <span class="s-Atom">work?</span>
+        <span class="nv">ItemIterable</span><span class="o">&lt;</span><span class="nv">CmisObject</span><span class="o">&gt;</span><span class="s-Atom">children</span> <span class="o">=</span> <span class="s-Atom">newFolder</span><span class="p">.</span><span class="nf">getChildren</span><span class="p">();</span>
+        <span class="nv">System</span><span class="p">.</span><span class="s-Atom">out</span><span class="p">.</span><span class="nf">println</span><span class="p">(</span><span class="s2">&quot;Now finding the following objects in the &#39;ADGNewFolder&#39; folder:-&quot;</span><span class="p">);</span>
+        <span class="nf">for</span> <span class="p">(</span><span class="nv">CmisObject</span> <span class="s-Atom">o</span> <span class="s-Atom">:</span> <span class="s-Atom">children</span><span class="p">)</span> <span class="p">{</span>
+            <span class="nv">System</span><span class="p">.</span><span class="s-Atom">out</span><span class="p">.</span><span class="nf">println</span><span class="p">(</span><span class="s-Atom">o</span><span class="p">.</span><span class="nf">getName</span><span class="p">());</span>
+        <span class="p">}</span>
+
+        <span class="s-Atom">children</span> <span class="o">=</span> <span class="s-Atom">newFolder2</span><span class="p">.</span><span class="nf">getChildren</span><span class="p">();</span>
+        <span class="nv">System</span><span class="p">.</span><span class="s-Atom">out</span><span class="p">.</span><span class="nf">println</span><span class="p">(</span><span class="s2">&quot;Now finding the following objects in the &#39;ADGNewFolder 2&#39; folder:-&quot;</span><span class="p">);</span>
+        <span class="nf">for</span> <span class="p">(</span><span class="nv">CmisObject</span> <span class="s-Atom">o</span> <span class="s-Atom">:</span> <span class="s-Atom">children</span><span class="p">)</span> <span class="p">{</span>
+            <span class="nv">System</span><span class="p">.</span><span class="s-Atom">out</span><span class="p">.</span><span class="nf">println</span><span class="p">(</span><span class="s-Atom">o</span><span class="p">.</span><span class="nf">getName</span><span class="p">());</span>
+        <span class="p">}</span>
+    <span class="p">}</span>
 </pre></div>
 
 
@@ -1209,27 +1213,27 @@ and the code checks for this.</p>
 If it is, it removes our document from both folders that contain it.
 Since unfiling is supported, the document should still be accessible by its ID, 
 and the code checks for this.</p>
-<div class="codehilite"><pre>    <span class="k">if</span> <span class="o">(!(</span><span class="n">cap</span><span class="o">.</span><span class="na">isUnfilingSupported</span><span class="o">()))</span> <span class="o">{</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Unfiling not supported by this repository&quot;</span><span class="o">);</span>
-    <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
-        <span class="c1">// remove our document from both folders</span>
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;removing :&quot;</span> <span class="o">+</span> <span class="n">doc</span><span class="o">.</span><span class="na">getName</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot;from &#39;ADGNewFolder&#39;:-&quot;</span><span class="o">);</span>
-        <span class="n">doc</span><span class="o">.</span><span class="na">removeFromFolder</span><span class="o">(</span><span class="n">newFolder</span><span class="o">);</span>
-
-        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;removing :&quot;</span> <span class="o">+</span> <span class="n">doc</span><span class="o">.</span><span class="na">getName</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot;from &#39;ADGNewFolder 2&#39;:-&quot;</span><span class="o">);</span>
-        <span class="n">doc</span><span class="o">.</span><span class="na">removeFromFolder</span><span class="o">(</span><span class="n">newFolder2</span><span class="o">);</span>
-
-        <span class="c1">// Did it work?</span>
-        <span class="n">Document</span> <span class="n">docTest</span> <span class="o">=</span> <span class="o">(</span><span class="n">Document</span><span class="o">)</span> <span class="n">session</span><span class="o">.</span><span class="na">getObject</span><span class="o">(</span><span class="n">id</span><span class="o">);</span>
-        <span class="k">if</span> <span class="o">(</span><span class="n">docTest</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <span class="o">{</span>
-            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">docTest</span><span class="o">.</span><span class="na">getName</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot; still exists&quot;</span><span class="o">);</span>
-        <span class="o">}</span>
-    <span class="o">}</span>
+<div class="codehilite"><pre>    <span class="s-Atom">:::java</span>
+    <span class="nf">if</span> <span class="p">(!(</span><span class="s-Atom">cap</span><span class="p">.</span><span class="o">is</span><span class="nv">UnfilingSupported</span><span class="p">()))</span> <span class="p">{</span>
+        <span class="nv">System</span><span class="p">.</span><span class="s-Atom">out</span><span class="p">.</span><span class="nf">println</span><span class="p">(</span><span class="s2">&quot;Unfiling not supported by this repository&quot;</span><span class="p">);</span>
+    <span class="p">}</span> <span class="s-Atom">else</span> <span class="p">{</span>
+        <span class="o">//</span> <span class="s-Atom">remove</span> <span class="s-Atom">our</span> <span class="s-Atom">document</span> <span class="s-Atom">from</span> <span class="s-Atom">both</span> <span class="s-Atom">folders</span>
+        <span class="nv">System</span><span class="p">.</span><span class="s-Atom">out</span><span class="p">.</span><span class="nf">println</span><span class="p">(</span><span class="s2">&quot;removing :&quot;</span> <span class="o">+</span> <span class="s-Atom">doc</span><span class="p">.</span><span class="nf">getName</span><span class="p">()</span> <span class="o">+</span> <span class="s2">&quot;from &#39;ADGNewFolder&#39;:-&quot;</span><span class="p">);</span>
+        <span class="s-Atom">doc</span><span class="p">.</span><span class="nf">removeFromFolder</span><span class="p">(</span><span class="s-Atom">newFolder</span><span class="p">);</span>
+
+        <span class="nv">System</span><span class="p">.</span><span class="s-Atom">out</span><span class="p">.</span><span class="nf">println</span><span class="p">(</span><span class="s2">&quot;removing :&quot;</span> <span class="o">+</span> <span class="s-Atom">doc</span><span class="p">.</span><span class="nf">getName</span><span class="p">()</span> <span class="o">+</span> <span class="s2">&quot;from &#39;ADGNewFolder 2&#39;:-&quot;</span><span class="p">);</span>
+        <span class="s-Atom">doc</span><span class="p">.</span><span class="nf">removeFromFolder</span><span class="p">(</span><span class="s-Atom">newFolder2</span><span class="p">);</span>
+
+        <span class="o">//</span> <span class="nv">Did</span> <span class="s-Atom">it</span> <span class="s-Atom">work?</span>
+        <span class="nv">Document</span> <span class="s-Atom">docTest</span> <span class="o">=</span> <span class="p">(</span><span class="nv">Document</span><span class="p">)</span> <span class="s-Atom">session</span><span class="p">.</span><span class="nf">getObject</span><span class="p">(</span><span class="s-Atom">id</span><span class="p">);</span>
+        <span class="nf">if</span> <span class="p">(</span><span class="s-Atom">docTest</span> <span class="p">!</span><span class="o">=</span> <span class="s-Atom">null</span><span class="p">)</span> <span class="p">{</span>
+            <span class="nv">System</span><span class="p">.</span><span class="s-Atom">out</span><span class="p">.</span><span class="nf">println</span><span class="p">(</span><span class="s-Atom">docTest</span><span class="p">.</span><span class="nf">getName</span><span class="p">()</span> <span class="o">+</span> <span class="s2">&quot; still exists&quot;</span><span class="p">);</span>
+        <span class="p">}</span>
+    <span class="p">}</span>
 </pre></div>
 
 
-<p><a name="Versioning"></a>     <br />
-</p>
+<p><a name="Versioning"></a>       </p>
 <h3 id="versioning">Versioning</h3>
 <p>Only document objects can be versioned.<br />
 Whether or not a document object is versionable is specified by the <code>versionable</code> attribute on its Object-type.
@@ -1259,55 +1263,55 @@ Repositories may allow any version of a 
 The following code snippet checks out the latest version of the test.txt document, updates the content stream, and checks in the new version of the 
 document as a minor version. </p>
 <div class="codehilite"><pre> <span class="k">if</span> <span class="p">(</span><span class="n">versionable</span><span class="p">)</span> <span class="p">{</span>

[... 322 lines stripped ...]


Mime
View raw message