chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r787530 - in /websites/production/chemistry: ./ content/ content/java/ content/java/developing/ content/java/developing/client/ content/java/examples/
Date Fri, 25 Mar 2011 17:28:11 GMT
Author: fmui
Date: Fri Mar 25 17:28:11 2011
New Revision: 787530

Log:
Publishing merge to chemistry site by fmui

Modified:
    websites/production/chemistry/   (props changed)
    websites/production/chemistry/content/index.html
    websites/production/chemistry/content/java/developing/client/dev-client-overview.html
    websites/production/chemistry/content/java/developing/dev-compare-client-api-binding.html
    websites/production/chemistry/content/java/developing/dev-session-parameters.html
    websites/production/chemistry/content/java/developing/index.html
    websites/production/chemistry/content/java/examples/example-create-session.html
    websites/production/chemistry/content/java/opencmis.html

Propchange: websites/production/chemistry/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Mar 25 17:28:11 2011
@@ -1 +1 @@
-/websites/staging/chemistry/trunk:785583-787507
+/websites/staging/chemistry/trunk:785583-787529

Modified: websites/production/chemistry/content/index.html
==============================================================================
--- websites/production/chemistry/content/index.html (original)
+++ websites/production/chemistry/content/index.html Fri Mar 25 17:28:11 2011
@@ -189,7 +189,8 @@ Apache Chemistry - Index
 
 <p>Apache Chemistry provides open source implementations of the
  <a href="http://docs.oasis-open.org/cmis/CMIS/v1.0/cmis-spec-v1.0.html">Content Management Interoperability Services (CMIS)</a>
- specification. See the <a href="project/cmis.html">What is CMIS?</a> page for more information about the standard.</p>
+ specification.<br />
+See the <a href="project/cmis.html">What is CMIS?</a> page for more information about the standard.</p>
 <p>The project currently consists of the following sub-projects:</p>
 <ul>
 <li><a href="java/opencmis.html">OpenCMIS</a> - CMIS client and server libraries for Java </li>
@@ -198,8 +199,8 @@ Apache Chemistry - Index
 <li><a href="dotnet/dotcmis.html">DotCMIS</a> - CMIS client library for .NET</li>
 </ul>
 <p>Chemistry mailing list for questions and contributions:
-dev@chemistry.apache.org</p>
-<p>Important time-saving note for chemists: the Apache Chemistry project has
+<a href="http://mail-archives.apache.org/mod_mbox/chemistry-dev/">dev@chemistry.apache.org</a></p>
+<p><em>Important time-saving note for chemists:</em> the Apache Chemistry project has
 nothing to do with chemistry or chemicals! The name comes from the
 inclusion of the C.M.I.S. letters, "CheMIStry".</p>
 <p><a name="news"></a></p>

Modified: websites/production/chemistry/content/java/developing/client/dev-client-overview.html
==============================================================================
--- websites/production/chemistry/content/java/developing/client/dev-client-overview.html (original)
+++ websites/production/chemistry/content/java/developing/client/dev-client-overview.html Fri Mar 25 17:28:11 2011
@@ -183,12 +183,53 @@ Apache Chemistry - CMIS Client Overview
            </td>
            <td height="100%">
              <!-- Content -->
-             <div class="wiki-content"><h1 id="cmis_client_overview">CMIS Client Overview</h1>
-<p>OpenCMIS provides two CMIS client APIs that are called <a href="dev-client-api.html">Client API</a> and <a href="dev-client-bindings.html">Client Bindings API</a>.
-The <a href="dev-client-api.html">Client API</a> is a high-level, object orientated API and suitable for most use cases.
-It sits on top of the Client Bindings API.
-The <a href="dev-client-bindings.html">Client Bindings API</a> reflects the CMIS domain model.
-It allows fine-grained control which makes the interfaces a bit clunky.</p></div>
+             <div class="wiki-content"><h1 id="opencmis_client_development">OpenCMIS Client Development</h1>
+<p>The OpenCMIS client API provides an easy way to connect to CMIS repositories. This is a short step-by-step guide.</p>
+<h2 id="prerequisite">Prerequisite</h2>
+<ol>
+<li>
+<p>Read the second chapter of the <a href="http://docs.oasis-open.org/cmis/CMIS/v1.0/cmis-spec-v1.0.html">CMIS specification</a>. You can skip the other chapters but you need to understand the CMIS domain model to in order to use OpenCMIS.</p>
+</li>
+<li>
+<p>Set up your repository. Some repositories provide CMIS out-of-the-box. Other repositories require an update, a module, a service pack, or something like that.</p>
+</li>
+<li>
+<p>Select your binding. The CMIS specification defines two bindings, AtomPub and Web Services. Check which binding your repository supports. If the repository supports both, go for the AtomPub binding. In most cases it is the better choice. But don't worry; you can switch the binding at any time. The OpenCMIS API is not binding specific.</p>
+</li>
+<li>
+<p>Check which authentication method the repository provides. Refer to the authentication section for more information. </p>
+</li>
+<li>
+<p>Make sure your repository speaks HTTPS. You probably don't want to expose your password and your documents to everyone on the network.</p>
+</li>
+<li>
+<p>Download the <a href="../../download.html">OpenCMIS client library</a> and the <a href="../../download.html">CMIS Workbench</a>.</p>
+</li>
+<li>
+<p>Choose an API. OpenCMIS provides two CMIS client APIs that are called <a href="dev-client-api.html">Client API</a> and <a href="dev-client-bindings.html">Client Bindings API</a>. The Client API is a high-level, object orientated API and suitable for most use cases. It sits on top of the Client Bindings API. The Client Bindings API reflects the CMIS domain model. It allows fine-grained control, which makes the interfaces a bit clunky. This guide explains the Client API and <a href="../dev-compare-client-api-binding.html">this page</a> compares both.</p>
+</li>
+</ol>
+<h2 id="the_theory">The Theory</h2>
+<p>CMIS is stateless. That has a few implications.
+It scales well since each call can go to a different cluster node. But it also implies that each call has to contain authentication information. It also makes the client responsible for the information it pulls from the repository. And this has a direct effect on the application performance. Keep in mind that CMIS sends and receives XML over HTTP. Avoiding such a call can save valuable time.</p>
+<p>OpenCMIS introduces a session concept on top of CMIS and provides a set of caches that help reducing the number of calls and the amount of transmitted data. </p>
+<p>The central object of the client API is the Session object. It manages the authentication, all caches and provides the entry point to all CMIS operations. A Session object is bound to a user and therefore there is a set of separate caches per user. The repository might send different data for different users, for example to obey permissions or provide localized display names and property values. Therefore it is not possible to manage a shared cache. (The Client Bindings API is more flexible in this respect but also requires more effort and care.)</p>
+<p>In order to be effective, this Session object has to be reused as much as possible! Don't throw it away. Keep it and reuse it! OpenCMIS is thread-safe. The Session object can and should be reused across thread boundaries.</p>
+<h2 id="first_steps">First Steps</h2>
+<p>The OpenCMIS client package contains all jars you need to connect to a repository. Make sure they are all in your classpath.</p>
+<p>Before you start implementing have a look at the OpenCMIS JavaDoc. Start with the Session interface, the Document interface, and the Folder interface. Together with your CMIS domain model knowledge (you remember the second chapter of the CMIS specification) you should now have a picture of what is available. </p>
+<p>To connect to a repository you have to create a Session object. See <a href="../../examples/example-create-session.html">this page</a> for code examples. There are a few required entries in the session parameters map. OpenCMIS has to know which binding you want to use and where to find the CMIS endpoint. Most repositories also need a username and a password to identify the user. (See the authentication section for more details.)</p>
+<p>The repository id parameter tells OpenCMIS which repository at this CMIS endpoint it should talk to. How do you get this repository id is repository specific. The SessionFactory can also fetch a list of all available repositories. </p>
+<p>There are also a number of optional <a href="../dev-session-parameters.html">session parameters</a> that control the cache behavior, HTTP settings, etc. Leave them alone as long as you don't want or have to optimize your setup.</p>
+<p>The Session object gives you access to all CMIS features.  There are a few common and repeating patterns. Have a look at the <a href="../../examples/index.html">examples sections</a>.</p>
+<p>When you feel comfortable with the API, familiarize yourself with the <a href="../dev-client-cache.html">OpenCMIS caches</a> and the <a href="../dev-operation-context.html">OperationContext</a>. They can improve the performance considerably.</p>
+<h2 id="authentication">Authentication</h2>
+<p>The CMIS specification recommends HTTP basic authentication for AtomPub and WS-Security UsernameToken for Web Services. Most repositories support that. If can't find any information in the repository documentation, assume that those are enabled.</p>
+<p>OpenCMIS also supports <a href="../dev-session-parameters.html">NTLM</a> but you should avoid it if you can. It generates some side effects in the JVM and has streaming issues. </p>
+<p>If the repository need requires a different authentication mechanism, you have to implement your own <a href="dev-client-bindings.html">authentication provider</a>.</p>
+<h2 id="cmis_workbench">CMIS Workbench</h2>
+<p>The CMIS Workbench is desktop client build on top of OpenCMIS. It lets you see the repository through the eyes of CMIS and OpenCMIS. That can be handy during development.</p>
+<p>You should also play with console that is built into the CMIS Workbench. It runs code snippets and lets you experiment with the OpenCMIS client API without setting up a full-blown Java project.</p></div>
              <!-- Content -->
            </td>
           </tr>

Modified: websites/production/chemistry/content/java/developing/dev-compare-client-api-binding.html
==============================================================================
--- websites/production/chemistry/content/java/developing/dev-compare-client-api-binding.html (original)
+++ websites/production/chemistry/content/java/developing/dev-compare-client-api-binding.html Fri Mar 25 17:28:11 2011
@@ -196,15 +196,13 @@ fine-grained control.</p>
 See also <a href="client/dev-client-api.html">OpenCMIS Client API</a>.</p>
 <div class="codehilite"><pre><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">parameters</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="p">,</span> <span class="n">String</span><span class="o">&gt;</span><span class="p">();</span>
 <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">BINDING_TYPE</span><span class="p">,</span> <span class="n">BindingType</span><span class="o">.</span><span class="n">ATOMPUB</span><span class="o">.</span><span class="n">value</span><span class="p">());</span>
-<span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">ATOMPUB_URL</span><span class="p">,</span>
-    <span class="s">&quot;http://localhost:8080/opencmis/atom&quot;</span><span class="p">);</span>
+<span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">ATOMPUB_URL</span><span class="p">,</span> <span class="s">&quot;http://localhost:8080/opencmis/atom&quot;</span><span class="p">);</span>
 <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">REPOSITORY_ID</span><span class="p">,</span> <span class="s">&quot;A1&quot;</span><span class="p">);</span>
 <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">USER</span><span class="p">,</span> <span class="s">&quot;test&quot;</span><span class="p">);</span>
 <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">PASSWORD</span><span class="p">,</span> <span class="s">&quot;test&quot;</span><span class="p">);</span>
 
 <span class="sr">//</span> <span class="n">create</span> <span class="n">the</span> <span class="n">session</span>
-<span class="n">Session</span> <span class="n">session</span> <span class="o">=</span>
-    <span class="n">SessionFactoryImpl</span><span class="o">.</span><span class="n">newInstance</span><span class="p">()</span><span class="o">.</span><span class="n">createSession</span><span class="p">(</span><span class="n">parameters</span><span class="p">);</span>
+<span class="n">Session</span> <span class="n">session</span> <span class="o">=</span> <span class="n">SessionFactoryImpl</span><span class="o">.</span><span class="n">newInstance</span><span class="p">()</span><span class="o">.</span><span class="n">createSession</span><span class="p">(</span><span class="n">parameters</span><span class="p">);</span>
 
 <span class="sr">//</span> <span class="n">get</span> <span class="n">repository</span> <span class="n">info</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="n">getRepositoryInfo</span><span class="p">();</span>
@@ -218,23 +216,20 @@ See also <a href="client/dev-client-api.
 <span class="sr">//</span> <span class="n">list</span> <span class="n">root</span> <span class="n">folder</span> <span class="n">children</span>
 <span class="n">ItemIterable</span><span class="sr">&lt;CmisObject&gt;</span> <span class="n">children</span> <span class="o">=</span> <span class="n">rootFolder</span><span class="o">.</span><span class="n">getChildren</span><span class="p">();</span>
 <span class="k">for</span> <span class="p">(</span><span class="n">CmisObject</span> <span class="n">object</span> <span class="p">:</span> <span class="n">children</span><span class="p">)</span> <span class="p">{</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;---------------------------------&quot;</span><span class="p">);</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Id:       &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Name:         &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getName</span><span class="p">());</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Base Type:    &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">());</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Property &#39;bla&#39;:   &quot;</span> <span class="o">+</span>
-<span class="n">object</span><span class="o">.</span><span class="n">getPropertyValue</span><span class="p">(</span><span class="s">&quot;bla&quot;</span><span class="p">));</span>
-
-  <span class="n">ObjectType</span> <span class="n">type</span> <span class="o">=</span> <span class="n">object</span><span class="o">.</span><span class="n">getType</span><span class="p">();</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Id:      &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Name:    &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getDisplayName</span><span class="p">());</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Query Name:  &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getQueryName</span><span class="p">());</span>
-
-  <span class="n">AllowableActions</span> <span class="n">actions</span> <span class="o">=</span> <span class="n">object</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">();</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  canGetProperties: &quot;</span> <span class="o">+</span>
-    <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_GET_PROPERTIES</span><span class="p">));</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  canDeleteObject:  &quot;</span> <span class="o">+</span>
-    <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_DELETE_OBJECT</span><span class="p">));</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;---------------------------------&quot;</span><span class="p">);</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Id:              &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Name:            &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getName</span><span class="p">());</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Base Type:       &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">());</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Property &#39;bla&#39;:  &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getPropertyValue</span><span class="p">(</span><span class="s">&quot;bla&quot;</span><span class="p">));</span>
+
+    <span class="n">ObjectType</span> <span class="n">type</span> <span class="o">=</span> <span class="n">object</span><span class="o">.</span><span class="n">getType</span><span class="p">();</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Type Id:          &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Type Name:        &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getDisplayName</span><span class="p">());</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    Type Query Name:  &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getQueryName</span><span class="p">());</span>
+
+    <span class="n">AllowableActions</span> <span class="n">actions</span> <span class="o">=</span> <span class="n">object</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">();</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    canGetProperties: &quot;</span> <span class="o">+</span> <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_GET_PROPERTIES</span><span class="p">));</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;    canDeleteObject:  &quot;</span> <span class="o">+</span> <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_DELETE_OBJECT</span><span class="p">));</span>
 <span class="p">}</span>
 
 <span class="sr">//</span> <span class="n">get</span> <span class="n">an</span> <span class="n">object</span>
@@ -242,114 +237,84 @@ See also <a href="client/dev-client-api.
 <span class="n">CmisObject</span> <span class="n">object</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="n">getObject</span><span class="p">(</span><span class="n">objectId</span><span class="p">);</span>
 
 <span class="k">if</span> <span class="p">(</span><span class="n">object</span> <span class="n">instanceof</span> <span class="n">Folder</span><span class="p">)</span> <span class="p">{</span>
-  <span class="n">Folder</span> <span class="n">folder</span> <span class="o">=</span> <span class="p">(</span><span class="n">Folder</span><span class="p">)</span> <span class="n">object</span><span class="p">;</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Is root folder: &quot;</span> <span class="o">+</span> <span class="n">folder</span><span class="o">.</span><span class="n">isRootFolder</span><span class="p">());</span>
+    <span class="n">Folder</span> <span class="n">folder</span> <span class="o">=</span> <span class="p">(</span><span class="n">Folder</span><span class="p">)</span> <span class="n">object</span><span class="p">;</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Is root folder: &quot;</span> <span class="o">+</span> <span class="n">folder</span><span class="o">.</span><span class="n">isRootFolder</span><span class="p">());</span>
 <span class="p">}</span>
 
 <span class="k">if</span> <span class="p">(</span><span class="n">object</span> <span class="n">instanceof</span> <span class="n">Document</span><span class="p">)</span> <span class="p">{</span>
-  <span class="n">Document</span> <span class="n">document</span> <span class="o">=</span> <span class="p">(</span><span class="n">Document</span><span class="p">)</span> <span class="n">object</span><span class="p">;</span>
-  <span class="n">ContentStream</span> <span class="n">content</span> <span class="o">=</span> <span class="n">document</span><span class="o">.</span><span class="n">getContentStream</span><span class="p">();</span>
-  <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Document MIME type: &quot;</span> <span class="o">+</span> <span class="n">content</span><span class="o">.</span><span class="n">getMimeType</span><span class="p">());</span>
+    <span class="n">Document</span> <span class="n">document</span> <span class="o">=</span> <span class="p">(</span><span class="n">Document</span><span class="p">)</span> <span class="n">object</span><span class="p">;</span>
+    <span class="n">ContentStream</span> <span class="n">content</span> <span class="o">=</span> <span class="n">document</span><span class="o">.</span><span class="n">getContentStream</span><span class="p">();</span>
+    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Document MIME type: &quot;</span> <span class="o">+</span> <span class="n">content</span><span class="o">.</span><span class="n">getMimeType</span><span class="p">());</span>
 <span class="p">}</span>
 </pre></div>
 
 
 <p><a name="OpenCMISAPIExamples-ClientBindingAPI"></a></p>
 <h2 id="client_binding_api">Client Binding API</h2>
-<p><a href="http://hudson.zones.apache.org/hudson/job/Chemistry%20-%20OpenCMIS%20-%20site/javadoc/org/apache/opencmis/commons/provider/package-summary.html">Client Binding API JavaDoc</a>
-. See also <a href="client/dev-client-bindings.html">OpenCMIS Client Binding API</a>
-.</p>
-<div class="codehilite"><pre>    <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">parameters</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="p">,</span> <span class="n">String</span><span class="o">&gt;</span><span class="p">();</span>
-    <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">ATOMPUB_URL</span><span class="p">,</span>
-    <span class="s">&quot;http://localhost:8080/opencmis/atom&quot;</span><span class="p">);</span>
-    <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">USER</span><span class="p">,</span> <span class="s">&quot;test&quot;</span><span class="p">);</span>
-    <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">PASSWORD</span><span class="p">,</span> <span class="s">&quot;test&quot;</span><span class="p">);</span>
-
-    <span class="sr">//</span> <span class="n">create</span> <span class="n">provider</span>
-    <span class="n">CmisBinding</span> <span class="n">binding</span> <span class="o">=</span>
-    <span class="n">CmisBindingFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">()</span><span class="o">.</span><span class="n">createCmisAtomPubBinding</span><span class="p">(</span><span class="n">parameters</span><span class="p">);</span>
-
-    <span class="n">String</span> <span class="n">repositoryId</span> <span class="o">=</span> <span class="s">&quot;A1&quot;</span><span class="p">;</span>
-
-    <span class="sr">//</span> <span class="n">get</span> <span class="n">repository</span> <span class="n">info</span>
-    <span class="n">RepositoryInfo</span> <span class="n">repInfo</span> <span class="o">=</span>
-    <span class="n">binding</span><span class="o">.</span><span class="n">getRepositoryService</span><span class="p">()</span><span class="o">.</span><span class="n">getRepositoryInfo</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
-    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Repository name: &quot;</span> <span class="o">+</span> <span class="n">repInfo</span><span class="o">.</span><span class="n">getName</span><span class="p">());</span>
-
-    <span class="sr">//</span> <span class="n">get</span> <span class="n">root</span> <span class="n">folder</span> <span class="ow">and</span> <span class="n">its</span> <span class="n">path</span>
-    <span class="n">ObjectData</span> <span class="n">rootFolder</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getObjectService</span><span class="p">()</span><span class="o">.</span><span class="n">getObject</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span>
-    <span class="n">repInfo</span><span class="o">.</span><span class="n">getRootFolderId</span><span class="p">(),</span> <span class="s">&quot;*&quot;</span><span class="p">,</span>
-          <span class="n">true</span><span class="p">,</span> <span class="n">IncludeRelationships</span><span class="o">.</span><span class="n">NONE</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
-
-    <span class="n">PropertyString</span> <span class="n">pathProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span>
-    <span class="n">rootFolder</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="n">PATH</span><span class="p">);</span>
-    <span class="n">String</span> <span class="n">path</span> <span class="o">=</span> <span class="n">pathProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">();</span>
-    <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Root folder path: &quot;</span> <span class="o">+</span> <span class="n">path</span><span class="p">);</span>
-
-    <span class="sr">//</span> <span class="n">list</span> <span class="n">root</span> <span class="n">folder</span> <span class="n">children</span>
-    <span class="n">ObjectInFolderList</span> <span class="n">childrenList</span> <span class="o">=</span>
-    <span class="n">binding</span><span class="o">.</span><span class="n">getNavigationService</span><span class="p">()</span><span class="o">.</span><span class="n">getChildren</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span>
-          <span class="n">repInfo</span><span class="o">.</span><span class="n">getRootFolderId</span><span class="p">(),</span> <span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span>
-    <span class="n">IncludeRelationships</span><span class="o">.</span><span class="n">NONE</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span>
-          <span class="n">BigInteger</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="mi">10000</span><span class="p">),</span> <span class="n">BigInteger</span><span class="o">.</span><span class="n">ZERO</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
-
-    <span class="k">for</span> <span class="p">(</span><span class="n">ObjectInFolderData</span> <span class="n">object</span> <span class="p">:</span> <span class="n">childrenList</span><span class="o">.</span><span class="n">getObjects</span><span class="p">())</span> <span class="p">{</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;---------------------------------&quot;</span><span class="p">);</span>
-
-       <span class="n">PropertyString</span> <span class="n">nameProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span>
-    <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span>
-             <span class="n">PropertyIds</span><span class="o">.</span><span class="n">NAME</span><span class="p">);</span>
-       <span class="n">PropertyString</span> <span class="n">blaProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span>
-    <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&quot;bla&quot;</span><span class="p">);</span>
-       <span class="n">PropertyId</span> <span class="n">typeProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyId</span><span class="p">)</span>
-    <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span>
-             <span class="n">PropertyIds</span><span class="o">.</span><span class="n">OBJECT_TYPE_ID</span><span class="p">);</span>
-
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Id:        &quot;</span> <span class="o">+</span>
-    <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Name:      &quot;</span> <span class="o">+</span>
-    <span class="n">nameProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">());</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Base Type: &quot;</span> <span class="o">+</span>
-    <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">());</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Property &#39;bla&#39;:    &quot;</span> <span class="o">+</span> <span class="p">(</span><span class="n">blaProperty</span> <span class="o">==</span> <span class="n">null</span> <span class="p">?</span>
-    <span class="n">null</span> <span class="p">:</span> <span class="n">blaProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">()));</span>
-
-       <span class="n">TypeDefinition</span> <span class="n">type</span> <span class="o">=</span>
-    <span class="n">binding</span><span class="o">.</span><span class="n">getRepositoryService</span><span class="p">()</span><span class="o">.</span><span class="n">getTypeDefinition</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span>
-             <span class="n">typeProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">(),</span> <span class="n">null</span><span class="p">);</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Id:       &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Name: &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getDisplayName</span><span class="p">());</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Query Name:   &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getQueryName</span><span class="p">());</span>
-
-       <span class="n">AllowableActions</span> <span class="n">actions</span> <span class="o">=</span>
-    <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">();</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  canGetProperties: &quot;</span>
-             <span class="o">+</span>
-    <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_GET_PROPERTIES</span><span class="p">));</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  canDeleteObject:   &quot;</span>
-             <span class="o">+</span>
-    <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_DELETE_OBJECT</span><span class="p">));</span>
-    <span class="p">}</span>
-
-    <span class="sr">//</span> <span class="n">get</span> <span class="n">an</span> <span class="n">object</span>
-    <span class="n">String</span> <span class="n">objectId</span> <span class="o">=</span> <span class="s">&quot;100&quot;</span><span class="p">;</span>
-
-    <span class="n">ObjectData</span> <span class="n">object</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getObjectService</span><span class="p">()</span><span class="o">.</span><span class="n">getObject</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span>
-    <span class="n">objectId</span><span class="p">,</span> <span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span>
-          <span class="n">IncludeRelationships</span><span class="o">.</span><span class="n">NONE</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
-
-    <span class="k">if</span> <span class="p">(</span><span class="n">object</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">()</span> <span class="o">==</span> <span class="n">BaseTypeId</span><span class="o">.</span><span class="n">CMIS_FOLDER</span><span class="p">)</span> <span class="p">{</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Is root folder: &quot;</span> <span class="o">+</span>
-    <span class="p">(</span><span class="n">repInfo</span><span class="o">.</span><span class="n">getRootFolderId</span><span class="p">()</span><span class="o">.</span><span class="n">equals</span><span class="p">(</span><span class="n">object</span><span class="o">.</span><span class="n">getId</span><span class="p">())));</span>
-    <span class="p">}</span>
-
-    <span class="k">if</span> <span class="p">(</span><span class="n">object</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">()</span> <span class="o">==</span> <span class="n">BaseTypeId</span><span class="o">.</span><span class="n">CMIS_DOCUMENT</span><span class="p">)</span> <span class="p">{</span>
-       <span class="n">ContentStream</span> <span class="n">content</span> <span class="o">=</span>
-    <span class="n">binding</span><span class="o">.</span><span class="n">getObjectService</span><span class="p">()</span><span class="o">.</span><span class="n">getContentStream</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">objectId</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span>
-    <span class="n">null</span><span class="p">,</span>
-             <span class="n">null</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
-       <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Document MIME type: &quot;</span> <span class="o">+</span> <span class="n">content</span><span class="o">.</span><span class="n">getMimeType</span><span class="p">());</span>
-    <span class="p">}</span>
+<p><a href="http://hudson.zones.apache.org/hudson/job/Chemistry%20-%20OpenCMIS%20-%20site/javadoc/org/apache/opencmis/commons/provider/package-summary.html">Client Binding API JavaDoc</a>. See also <a href="client/dev-client-bindings.html">OpenCMIS Client Binding API</a>.</p>
+<div class="codehilite"><pre> <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">parameters</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="p">,</span> <span class="n">String</span><span class="o">&gt;</span><span class="p">();</span>
+ <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">ATOMPUB_URL</span><span class="p">,</span> <span class="s">&quot;http://localhost:8080/opencmis/atom&quot;</span><span class="p">);</span>
+ <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">USER</span><span class="p">,</span> <span class="s">&quot;test&quot;</span><span class="p">);</span>
+ <span class="n">parameters</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="n">PASSWORD</span><span class="p">,</span> <span class="s">&quot;test&quot;</span><span class="p">);</span>
+
+ <span class="sr">//</span> <span class="n">create</span> <span class="n">binding</span>
+ <span class="n">CmisBinding</span> <span class="n">binding</span> <span class="o">=</span> <span class="n">CmisBindingFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">()</span><span class="o">.</span><span class="n">createCmisAtomPubBinding</span><span class="p">(</span><span class="n">parameters</span><span class="p">);</span>
+
+ <span class="n">String</span> <span class="n">repositoryId</span> <span class="o">=</span> <span class="s">&quot;A1&quot;</span><span class="p">;</span>
+
+ <span class="sr">//</span> <span class="n">get</span> <span class="n">repository</span> <span class="n">info</span>
+ <span class="n">RepositoryInfo</span> <span class="n">repInfo</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getRepositoryService</span><span class="p">()</span><span class="o">.</span><span class="n">getRepositoryInfo</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+ <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Repository name: &quot;</span> <span class="o">+</span> <span class="n">repInfo</span><span class="o">.</span><span class="n">getName</span><span class="p">());</span>
+
+ <span class="sr">//</span> <span class="n">get</span> <span class="n">root</span> <span class="n">folder</span> <span class="ow">and</span> <span class="n">its</span> <span class="n">path</span>
+ <span class="n">ObjectData</span> <span class="n">rootFolder</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getObjectService</span><span class="p">()</span><span class="o">.</span><span class="n">getObject</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span>
+     <span class="n">repInfo</span><span class="o">.</span><span class="n">getRootFolderId</span><span class="p">(),</span> <span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span> <span class="n">IncludeRelationships</span><span class="o">.</span><span class="n">NONE</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+
+ <span class="n">PropertyString</span> <span class="n">pathProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span>
+ <span class="n">rootFolder</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="n">PATH</span><span class="p">);</span>
+ <span class="n">String</span> <span class="n">path</span> <span class="o">=</span> <span class="n">pathProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">();</span>
+ <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Root folder path: &quot;</span> <span class="o">+</span> <span class="n">path</span><span class="p">);</span>
+
+ <span class="sr">//</span> <span class="n">list</span> <span class="n">root</span> <span class="n">folder</span> <span class="n">children</span>
+ <span class="n">ObjectInFolderList</span> <span class="n">childrenList</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getNavigationService</span><span class="p">()</span><span class="o">.</span><span class="n">getChildren</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">repInfo</span><span class="o">.</span><span class="n">getRootFolderId</span><span class="p">(),</span> <span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">true</span><span class="p">,</span>
+     <span class="n">IncludeRelationships</span><span class="o">.</span><span class="n">NONE</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">BigInteger</span><span class="o">.</span><span class="n">valueOf</span><span class="p">(</span><span class="mi">10000</span><span class="p">),</span> <span class="n">BigInteger</span><span class="o">.</span><span class="n">ZERO</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+
+ <span class="k">for</span> <span class="p">(</span><span class="n">ObjectInFolderData</span> <span class="n">object</span> <span class="p">:</span> <span class="n">childrenList</span><span class="o">.</span><span class="n">getObjects</span><span class="p">())</span> <span class="p">{</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;---------------------------------&quot;</span><span class="p">);</span>
+
+     <span class="n">PropertyString</span> <span class="n">nameProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span> <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="n">NAME</span><span class="p">);</span>
+     <span class="n">PropertyString</span> <span class="n">blaProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyString</span><span class="p">)</span> <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">&quot;bla&quot;</span><span class="p">);</span>
+     <span class="n">PropertyId</span> <span class="n">typeProperty</span> <span class="o">=</span> <span class="p">(</span><span class="n">PropertyId</span><span class="p">)</span> <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">getProperties</span><span class="p">()</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="n">OBJECT_TYPE_ID</span><span class="p">);</span>
+
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Id:             &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Name:             &quot;</span> <span class="o">+</span> <span class="n">nameProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">());</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Base Type:        &quot;</span> <span class="o">+</span> <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">());</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Property &#39;bla&#39;:   &quot;</span> <span class="o">+</span> <span class="p">(</span><span class="n">blaProperty</span> <span class="o">==</span> <span class="n">null</span> <span class="p">?</span> <span class="n">null</span> <span class="p">:</span> <span class="n">blaProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">()));</span>
+
+     <span class="n">TypeDefinition</span> <span class="n">type</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getRepositoryService</span><span class="p">()</span><span class="o">.</span><span class="n">getTypeDefinition</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">typeProperty</span><span class="o">.</span><span class="n">getFirstValue</span><span class="p">(),</span> <span class="n">null</span><span class="p">);</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Id:          &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getId</span><span class="p">());</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Name:        &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getDisplayName</span><span class="p">());</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  Type Query Name:  &quot;</span> <span class="o">+</span> <span class="n">type</span><span class="o">.</span><span class="n">getQueryName</span><span class="p">());</span>
+
+     <span class="n">AllowableActions</span> <span class="n">actions</span> <span class="o">=</span> <span class="n">object</span><span class="o">.</span><span class="n">getObject</span><span class="p">()</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">();</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  canGetProperties: &quot;</span> <span class="o">+</span> <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_GET_PROPERTIES</span><span class="p">));</span>
+     <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;  canDeleteObject:  &quot;</span> <span class="o">+</span> <span class="n">actions</span><span class="o">.</span><span class="n">getAllowableActions</span><span class="p">()</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">Action</span><span class="o">.</span><span class="n">CAN_DELETE_OBJECT</span><span class="p">));</span>
+ <span class="p">}</span>
+
+ <span class="sr">//</span> <span class="n">get</span> <span class="n">an</span> <span class="n">object</span>
+ <span class="n">String</span> <span class="n">objectId</span> <span class="o">=</span> <span class="s">&quot;100&quot;</span><span class="p">;</span>
+
+ <span class="n">ObjectData</span> <span class="n">object</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getObjectService</span><span class="p">()</span><span class="o">.</span><span class="n">getObject</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">objectId</span><span class="p">,</span> <span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span>
+     <span class="n">IncludeRelationships</span><span class="o">.</span><span class="n">NONE</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">false</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">object</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">()</span> <span class="o">==</span> <span class="n">BaseTypeId</span><span class="o">.</span><span class="n">CMIS_FOLDER</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Is root folder: &quot;</span> <span class="o">+</span> <span class="p">(</span><span class="n">repInfo</span><span class="o">.</span><span class="n">getRootFolderId</span><span class="p">()</span><span class="o">.</span><span class="n">equals</span><span class="p">(</span><span class="n">object</span><span class="o">.</span><span class="n">getId</span><span class="p">())));</span>
+  <span class="p">}</span>
+
+  <span class="k">if</span> <span class="p">(</span><span class="n">object</span><span class="o">.</span><span class="n">getBaseTypeId</span><span class="p">()</span> <span class="o">==</span> <span class="n">BaseTypeId</span><span class="o">.</span><span class="n">CMIS_DOCUMENT</span><span class="p">)</span> <span class="p">{</span>
+      <span class="n">ContentStream</span> <span class="n">content</span> <span class="o">=</span> <span class="n">binding</span><span class="o">.</span><span class="n">getObjectService</span><span class="p">()</span><span class="o">.</span><span class="n">getContentStream</span><span class="p">(</span><span class="n">repositoryId</span><span class="p">,</span> <span class="n">objectId</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">null</span><span class="p">,</span> <span class="n">null</span><span class="p">);</span>
+      <span class="n">System</span><span class="o">.</span><span class="n">out</span><span class="o">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;Document MIME type: &quot;</span> <span class="o">+</span> <span class="n">content</span><span class="o">.</span><span class="n">getMimeType</span><span class="p">());</span>
+ <span class="p">}</span>
 </pre></div></div>
              <!-- Content -->
            </td>

Modified: websites/production/chemistry/content/java/developing/dev-session-parameters.html
==============================================================================
--- websites/production/chemistry/content/java/developing/dev-session-parameters.html (original)
+++ websites/production/chemistry/content/java/developing/dev-session-parameters.html Fri Mar 25 17:28:11 2011
@@ -224,7 +224,7 @@ Apache Chemistry - OpenCMIS Session Para
 <tr>
 <td>org.apache.chemistry.opencmis.user</td>
 <td>USER</td>
-<td>User name<br/>(used by standard authentication provider)</td>
+<td>User name<br/>(used by the standard authentication provider)</td>
 <td>string</td>
 <td />
 <td />
@@ -232,7 +232,7 @@ Apache Chemistry - OpenCMIS Session Para
 <tr>
 <td>org.apache.chemistry.opencmis.password</td>
 <td>PASSWORD</td>
-<td>Password<br/>(used by standard authentication provider)</td>
+<td>Password<br/>(used by the standard authentication provider)</td>
 <td>string</td>
 <td />
 <td />

Modified: websites/production/chemistry/content/java/developing/index.html
==============================================================================
--- websites/production/chemistry/content/java/developing/index.html (original)
+++ websites/production/chemistry/content/java/developing/index.html Fri Mar 25 17:28:11 2011
@@ -184,7 +184,7 @@ Apache Chemistry - Developing with OpenC
            <td height="100%">
              <!-- Content -->
              <div class="wiki-content"><h1 id="developing_with_opencmis">Developing with OpenCMIS</h1>
-<p>General guidelines you should know when developing with OpenCMIS</p>
+<p>General guidelines you should know when developing with OpenCMIS.</p>
 <ul>
 <li>Developing using the client APIs<ul>
 <li><a href="client/dev-client-overview.html">Overview</a></li>

Modified: websites/production/chemistry/content/java/examples/example-create-session.html
==============================================================================
--- websites/production/chemistry/content/java/examples/example-create-session.html (original)
+++ websites/production/chemistry/content/java/examples/example-create-session.html Fri Mar 25 17:28:11 2011
@@ -250,6 +250,14 @@ How to create a session and connect to a
 
 <span class="c1">// create session</span>
 <span class="n">Session</span> <span class="n">session</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="na">createSession</span><span class="o">(</span><span class="n">parameter</span><span class="o">);</span>
+</pre></div>
+
+
+<h2 id="connect_to_the_first_repository">Connect to the first repository</h2>
+<p>Some CMIS endpoints only provide one repository. In this case it is not necessary to provide its repository id.<br />
+The following code snippet gets the list of all available repositories and connects to the first one.</p>
+<div class="codehilite"><pre><span class="n">List</span><span class="o">&lt;</span><span class="n">Repository</span><span class="o">&gt;</span> <span class="n">repositories</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="na">getRepositories</span><span class="o">(</span><span class="n">parameter</span><span class="o">);</span>
+<span class="n">Session</span> <span class="n">session</span> <span class="o">=</span> <span class="n">repositories</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="mi">0</span><span class="o">).</span><span class="na">createSession</span><span class="o">();</span>
 </pre></div></div>
              <!-- Content -->
            </td>

Modified: websites/production/chemistry/content/java/opencmis.html
==============================================================================
--- websites/production/chemistry/content/java/opencmis.html (original)
+++ websites/production/chemistry/content/java/opencmis.html Fri Mar 25 17:28:11 2011
@@ -192,7 +192,7 @@ developers. It hides the binding details
 different abstraction levels. It also includes test tools for content
 repository developers and client application developers.</p>
 <h1 id="getting_opencmis">Getting OpenCMIS</h1>
-<p>You can get OpenCMIS from the <a href="download.html">Download page</a>.</p>
+<p>You can get OpenCMIS from the <a href="download.html">download page</a>.</p>
 <h2 id="opencmis_releases">OpenCMIS releases</h2>
 <table>
 <thead>



Mime
View raw message