chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r785867 [3/7] - in /websites/staging/chemistry/trunk/content: ./ dotnet/ java/ php/ python/
Date Mon, 21 Feb 2011 14:22:50 GMT
Added: websites/staging/chemistry/trunk/content/java/opencmis-api-examples.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/opencmis-api-examples.html (added)
+++ websites/staging/chemistry/trunk/content/java/opencmis-api-examples.html Mon Feb 21 14:22:49 2011
@@ -0,0 +1,383 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="/resources/site.css"></link>
+    <script src="/resources/space.js" type="text/javascript"></script>
+    <meta name="keywords" content="CMIS, Content Management Interoperability Service, ECM, Enterprise Content Management, OASIS, integration standards, Chemistry, OpenCMIS"/>
+    <meta name="description" content="Apache Chemistry, CMIS Implementation" />
+    <title>
+Apache Chemistry - OpenCMIS API Examples
+    </title>
+  </head>
+<body onload="init()">
+  <table width="100%" cellpadding="0" cellspacing="0">
+    <tr width="100%">
+      <td id="cell-0-0">&nbsp;</td>
+      <td id="cell-0-1">&nbsp;</td>
+      <td id="cell-0-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-1-0">&nbsp;</td>
+      <td id="cell-1-1">
+        <div style="padding: 5px;">
+          <div id="banner">
+          <!-- Banner -->
+<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+<TR>
+<TD align="left" class="topbardiv" nowrap="">
+  <A href="http://chemistry.apache.org/" title="Apache Chemistry">
+    <IMG border="0" src="/images/chemistry_tm_logo_small.png"/>
+  </A>
+</TD>
+<TD align="right" nowrap="">
+  <A href="http://www.apache.org/" title="The Apache Software Foundation">
+    <IMG border="0" src="/images/asf-logo.png"/>
+  </A>
+</TD>
+</TR>
+</TABLE>
+          <!-- Banner -->
+          </div>
+        </div>
+        <div id="top-menu">
+          <table border="0" cellpadding="1" cellspacing="0" width="100%">
+            <tr>
+              <td>
+                <div align="left">
+                <!-- Breadcrumbs -->
+<a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/java">Java</a>&nbsp;&raquo&nbsp;<a href="/java/opencmis.html">OpenCMIS</a>&nbsp;&raquo&nbsp;<a href="/java/opencmis-api-examples.html">OpenCMIS API Examples</a>
+                <!-- Breadcrumbs -->
+                </div>
+              </td>
+              <td>
+                <div align="right">
+                <!-- Quicklinks -->
+<P>
+<A href="http://www.apache.org/" class="external-link" rel="nofollow">Apache</A>
+|
+<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A>
+|
+<A href="sitemap.html" title="SiteMap">Site Map</A>
+</P>
+                <!-- Quicklinks -->
+                </div>
+              </td>
+            </tr>
+          </table>
+        </div>
+      </td>
+      <td id="cell-1-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-2-0">&nbsp;</td>
+      <td id="cell-2-1">
+        <table>
+          <tr height="100%" valign="top">
+            <td height="100%">
+              <div id="wrapper-menu-page-right">
+                <div id="wrapper-menu-page-top">
+                  <div id="wrapper-menu-page-bottom">
+                    <div id="menu-page">
+                    <!-- NavigationBar -->
+                    <H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A></LI>
+   <LI><A href="sitemap.html" title="SiteMap">Site Map</A></LI>
+   <LI><A href="http://mail-archives.apache.org/mod_mbox/incubator-chemistry-dev/" class="external-link" rel="nofollow">Mailing List</A></LI>
+   <LI><A href="https://issues.apache.org/jira/browse/CMIS" class="external-link" rel="nofollow">Issue Tracking</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Search"></A>Search</H3>
+
+<DIV style="padding: 0px 0px 0px 20px;">
+<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+  <INPUT maxlength="255" name="q" size="12" type="text" value=""></INPUT>
+  <INPUT name="btnG" type="submit" value="Search"></INPUT>
+  <INPUT name="domains" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+  <INPUT name="sitesearch" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+</FORM>
+</DIV>
+
+
+<H3><A name="Navigation-CMISforJava"></A>CMIS for Java</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="opencmis.html" title="OpenCMIS">OpenCMIS</A></LI>
+   <LI><A href="opencmis-modules.html" title="OpenCMIS Modules">Overview</A></LI>
+   <LI><A href="opencmis-client-api.html" title="OpenCMIS Client API">Client API</A></LI>
+   <LI><A href="https://svn.apache.org/repos/asf/chemistry/opencmis/trunk" class="external-link" rel="nofollow">Source Code</A></LI>
+   <LI><A href="http://incubator.apache.org/chemistry/javadoc/index.html" class="external-link" rel="nofollow">JavaDoc</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPython"></A>CMIS for Python</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="cmislib.html" title="cmislib">cmislib</A></LI>
+   <LI><A href="http://incubator.apache.org/chemistry/cmislib-doc/" class="external-link" rel="nofollow">cmislib Documentation</A></LI>
+   <LI><A href="https://svn.apache.org/repos/asf/chemistry/cmislib/trunk" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPHP"></A>CMIS for PHP</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="phpclient.html" title="phpclient">CMIS PHP Client</A></LI>
+   <LI><A href="https://svn.apache.org/repos/asf/chemistry/phpclient/trunk" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISfor.NET"></A>CMIS for .NET</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="dotcmis.html" title="DotCMIS">DotCMIS</A></LI>
+   <LI><A href="https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Sponsorship"></A>Sponsorship</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A></LI>
+   <LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Sponsoring Apache</A></LI>
+</UL>
+
+                    <!-- NavigationBar -->
+                    </div>
+                </div>
+              </div>
+            </div>
+           </td>
+           <td height="100%">
+             <!-- Content -->
+             <div class="wiki-content"><h1 id="opencmis_api_examples">OpenCMIS API Examples</h1>
+<p><a name="OpenCMISAPIExamples-OpenCMISAPIExamples"></a></p>
+<p>Here are two code snippets performing the same operations. The first
+snippet uses the client API; the second snippet uses the provider API. As
+you can see the provider API is clunkier and more difficult to use but it
+gives you access to all CMIS extension points and provides more
+fine-grained control.</p>
+<p><a name="OpenCMISAPIExamples-ClientAPI"></a></p>
+<h5 id="client_api">Client API</h5>
+<p><a href="http://hudson.zones.apache.org/hudson/job/Chemistry%20-%20OpenCMIS%20-%20site/javadoc/org/apache/opencmis/client/api/package-summary.html">Client API JavaDoc</a>.
+See also <a href="opencmis-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">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="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>
+<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">Folder</span> <span class="n">rootFolder</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="n">getRootFolder</span><span class="p">();</span>
+<span class="n">String</span> <span class="n">path</span> <span class="o">=</span> <span class="n">rootFolder</span><span class="o">.</span><span class="n">getPath</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">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="p">}</span>
+
+<span class="sr">//</span> <span class="n">get</span> <span class="n">an</span> <span class="n">object</span>
+<span class="n">ObjectId</span> <span class="n">objectId</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="n">createObjectId</span><span class="p">(</span><span class="s">&quot;100&quot;</span><span class="p">);</span>
+<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="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="p">}</span>
+</pre></div>
+
+
+<p><a name="OpenCMISAPIExamples-ClientBindingAPI"></a></p>
+<h5 id="client_binding_api">Client Binding API</h5>
+<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 [OpenCMIS Client Binding API|OpenCMIS Client Bindings]
+.</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>
+</pre></div></div>
+             <!-- Content -->
+           </td>
+          </tr>
+        </table>
+     </td>
+     <td id="cell-2-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-3-0">&nbsp;</td>
+      <td id="cell-3-1">&nbsp;</td>
+      <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+     <td id="cell-3-0">&nbsp;</td>
+     <td id="cell-3-1">
+       <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+          
+          Apache Chemistry, Apache, the Apache feather logo, and the Apache 
+          Chemistry project logo are trademarks of The Apache Software 
+          Foundation.
+          <BR />
+          Content Management Interoperability Services (CMIS) is an
+          <a href="http://www.oasis-open.org/committees/cmis/">OASIS</a>
+          specification.
+          
+       </div>
+       <!-- Footer -->
+       </div>
+     </td>
+     <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-4-0">&nbsp;</td>
+      <td id="cell-4-1">&nbsp;</td>
+      <td id="cell-4-2">&nbsp;</td>
+    </tr>
+  </table>
+</body>
+</html>

Added: websites/staging/chemistry/trunk/content/java/opencmis-browser.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/opencmis-browser.html (added)
+++ websites/staging/chemistry/trunk/content/java/opencmis-browser.html Mon Feb 21 14:22:49 2011
@@ -0,0 +1,233 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="/resources/site.css"></link>
+    <script src="/resources/space.js" type="text/javascript"></script>
+    <meta name="keywords" content="CMIS, Content Management Interoperability Service, ECM, Enterprise Content Management, OASIS, integration standards, Chemistry, OpenCMIS"/>
+    <meta name="description" content="Apache Chemistry, CMIS Implementation" />
+    <title>
+Apache Chemistry - OpenCMIS Browser
+    </title>
+  </head>
+<body onload="init()">
+  <table width="100%" cellpadding="0" cellspacing="0">
+    <tr width="100%">
+      <td id="cell-0-0">&nbsp;</td>
+      <td id="cell-0-1">&nbsp;</td>
+      <td id="cell-0-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-1-0">&nbsp;</td>
+      <td id="cell-1-1">
+        <div style="padding: 5px;">
+          <div id="banner">
+          <!-- Banner -->
+<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+<TR>
+<TD align="left" class="topbardiv" nowrap="">
+  <A href="http://chemistry.apache.org/" title="Apache Chemistry">
+    <IMG border="0" src="/images/chemistry_tm_logo_small.png"/>
+  </A>
+</TD>
+<TD align="right" nowrap="">
+  <A href="http://www.apache.org/" title="The Apache Software Foundation">
+    <IMG border="0" src="/images/asf-logo.png"/>
+  </A>
+</TD>
+</TR>
+</TABLE>
+          <!-- Banner -->
+          </div>
+        </div>
+        <div id="top-menu">
+          <table border="0" cellpadding="1" cellspacing="0" width="100%">
+            <tr>
+              <td>
+                <div align="left">
+                <!-- Breadcrumbs -->
+<a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/java">Java</a>&nbsp;&raquo&nbsp;<a href="/java/opencmis.html">OpenCMIS</a>&nbsp;&raquo&nbsp;<a href="/java/opencmis-browser.html">OpenCMIS Browser</a>
+                <!-- Breadcrumbs -->
+                </div>
+              </td>
+              <td>
+                <div align="right">
+                <!-- Quicklinks -->
+<P>
+<A href="http://www.apache.org/" class="external-link" rel="nofollow">Apache</A>
+|
+<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A>
+|
+<A href="sitemap.html" title="SiteMap">Site Map</A>
+</P>
+                <!-- Quicklinks -->
+                </div>
+              </td>
+            </tr>
+          </table>
+        </div>
+      </td>
+      <td id="cell-1-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-2-0">&nbsp;</td>
+      <td id="cell-2-1">
+        <table>
+          <tr height="100%" valign="top">
+            <td height="100%">
+              <div id="wrapper-menu-page-right">
+                <div id="wrapper-menu-page-top">
+                  <div id="wrapper-menu-page-bottom">
+                    <div id="menu-page">
+                    <!-- NavigationBar -->
+                    <H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A></LI>
+   <LI><A href="sitemap.html" title="SiteMap">Site Map</A></LI>
+   <LI><A href="http://mail-archives.apache.org/mod_mbox/incubator-chemistry-dev/" class="external-link" rel="nofollow">Mailing List</A></LI>
+   <LI><A href="https://issues.apache.org/jira/browse/CMIS" class="external-link" rel="nofollow">Issue Tracking</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Search"></A>Search</H3>
+
+<DIV style="padding: 0px 0px 0px 20px;">
+<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+  <INPUT maxlength="255" name="q" size="12" type="text" value=""></INPUT>
+  <INPUT name="btnG" type="submit" value="Search"></INPUT>
+  <INPUT name="domains" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+  <INPUT name="sitesearch" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+</FORM>
+</DIV>
+
+
+<H3><A name="Navigation-CMISforJava"></A>CMIS for Java</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="opencmis.html" title="OpenCMIS">OpenCMIS</A></LI>
+   <LI><A href="opencmis-modules.html" title="OpenCMIS Modules">Overview</A></LI>
+   <LI><A href="opencmis-client-api.html" title="OpenCMIS Client API">Client API</A></LI>
+   <LI><A href="https://svn.apache.org/repos/asf/chemistry/opencmis/trunk" class="external-link" rel="nofollow">Source Code</A></LI>
+   <LI><A href="http://incubator.apache.org/chemistry/javadoc/index.html" class="external-link" rel="nofollow">JavaDoc</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPython"></A>CMIS for Python</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="cmislib.html" title="cmislib">cmislib</A></LI>
+   <LI><A href="http://incubator.apache.org/chemistry/cmislib-doc/" class="external-link" rel="nofollow">cmislib Documentation</A></LI>
+   <LI><A href="https://svn.apache.org/repos/asf/chemistry/cmislib/trunk" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPHP"></A>CMIS for PHP</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="phpclient.html" title="phpclient">CMIS PHP Client</A></LI>
+   <LI><A href="https://svn.apache.org/repos/asf/chemistry/phpclient/trunk" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISfor.NET"></A>CMIS for .NET</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="dotcmis.html" title="DotCMIS">DotCMIS</A></LI>
+   <LI><A href="https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Sponsorship"></A>Sponsorship</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A></LI>
+   <LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Sponsoring Apache</A></LI>
+</UL>
+
+                    <!-- NavigationBar -->
+                    </div>
+                </div>
+              </div>
+            </div>
+           </td>
+           <td height="100%">
+             <!-- Content -->
+             <div class="wiki-content"><h1 id="opencmis_browser">OpenCMIS Browser</h1>
+<p><a name="OpenCMISBrowser-OpenCMISBrowser"></a></p>
+<p>The CMIS Browser is a simple web based tool to browse CMIS enabled
+repositories that support the AtomPub binding. It sits between the web
+browser of the end-user and the CMIS repository. It applies stylesheets to
+the Atom entries and feeds that repository returns and creates HTML pages
+that enable the end-user to navigate through the repository.</p>
+<p>The CMIS Browser consists of a small WAR file that doesn't require any
+configuration. Deploy it to a servlet engine and type
+<code>http://&lt;host&gt;/&lt;context&gt;/browse</code> in your web browser. Enter the URL of
+the AtomPub service document into the input box and start browsing.</p>
+<p><a name="OpenCMISBrowser-BuildandDeploytheCMISBrowser"></a></p>
+<h2 id="build_and_deploy_the_cmis_browser">Build and Deploy the CMIS Browser</h2>
+<ol>
+<li><a href="opencmis-how-to-build.html">Build OpenCMIS</a>.</li>
+<li>A ready-to-use WAR file should now exist in <code>/chemistry-opencmis-test/chemistry-opencmis-test-browser-app/target</code>.</li>
+<li>Deploy the WAR file to your favorite servlet engine.</li>
+</ol></div>
+             <!-- Content -->
+           </td>
+          </tr>
+        </table>
+     </td>
+     <td id="cell-2-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-3-0">&nbsp;</td>
+      <td id="cell-3-1">&nbsp;</td>
+      <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+     <td id="cell-3-0">&nbsp;</td>
+     <td id="cell-3-1">
+       <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+          
+          Apache Chemistry, Apache, the Apache feather logo, and the Apache 
+          Chemistry project logo are trademarks of The Apache Software 
+          Foundation.
+          <BR />
+          Content Management Interoperability Services (CMIS) is an
+          <a href="http://www.oasis-open.org/committees/cmis/">OASIS</a>
+          specification.
+          
+       </div>
+       <!-- Footer -->
+       </div>
+     </td>
+     <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-4-0">&nbsp;</td>
+      <td id="cell-4-1">&nbsp;</td>
+      <td id="cell-4-2">&nbsp;</td>
+    </tr>
+  </table>
+</body>
+</html>

Added: websites/staging/chemistry/trunk/content/java/opencmis-client-api-class-diagram.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/chemistry/trunk/content/java/opencmis-client-api-class-diagram.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: websites/staging/chemistry/trunk/content/java/opencmis-client-api.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/opencmis-client-api.html (added)
+++ websites/staging/chemistry/trunk/content/java/opencmis-client-api.html Mon Feb 21 14:22:49 2011
@@ -0,0 +1,436 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="/resources/site.css"></link>
+    <script src="/resources/space.js" type="text/javascript"></script>
+    <meta name="keywords" content="CMIS, Content Management Interoperability Service, ECM, Enterprise Content Management, OASIS, integration standards, Chemistry, OpenCMIS"/>
+    <meta name="description" content="Apache Chemistry, CMIS Implementation" />
+    <title>
+Apache Chemistry - OpenCMIS Client API
+    </title>
+  </head>
+<body onload="init()">
+  <table width="100%" cellpadding="0" cellspacing="0">
+    <tr width="100%">
+      <td id="cell-0-0">&nbsp;</td>
+      <td id="cell-0-1">&nbsp;</td>
+      <td id="cell-0-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-1-0">&nbsp;</td>
+      <td id="cell-1-1">
+        <div style="padding: 5px;">
+          <div id="banner">
+          <!-- Banner -->
+<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+<TR>
+<TD align="left" class="topbardiv" nowrap="">
+  <A href="http://chemistry.apache.org/" title="Apache Chemistry">
+    <IMG border="0" src="/images/chemistry_tm_logo_small.png"/>
+  </A>
+</TD>
+<TD align="right" nowrap="">
+  <A href="http://www.apache.org/" title="The Apache Software Foundation">
+    <IMG border="0" src="/images/asf-logo.png"/>
+  </A>
+</TD>
+</TR>
+</TABLE>
+          <!-- Banner -->
+          </div>
+        </div>
+        <div id="top-menu">
+          <table border="0" cellpadding="1" cellspacing="0" width="100%">
+            <tr>
+              <td>
+                <div align="left">
+                <!-- Breadcrumbs -->
+<a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/java">Java</a>&nbsp;&raquo&nbsp;<a href="/java/opencmis.html">OpenCMIS</a>&nbsp;&raquo&nbsp;<a href="/java/opencmis-client-api.html">OpenCMIS Client API</a>
+                <!-- Breadcrumbs -->
+                </div>
+              </td>
+              <td>
+                <div align="right">
+                <!-- Quicklinks -->
+<P>
+<A href="http://www.apache.org/" class="external-link" rel="nofollow">Apache</A>
+|
+<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A>
+|
+<A href="sitemap.html" title="SiteMap">Site Map</A>
+</P>
+                <!-- Quicklinks -->
+                </div>
+              </td>
+            </tr>
+          </table>
+        </div>
+      </td>
+      <td id="cell-1-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-2-0">&nbsp;</td>
+      <td id="cell-2-1">
+        <table>
+          <tr height="100%" valign="top">
+            <td height="100%">
+              <div id="wrapper-menu-page-right">
+                <div id="wrapper-menu-page-top">
+                  <div id="wrapper-menu-page-bottom">
+                    <div id="menu-page">
+                    <!-- NavigationBar -->
+                    <H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A></LI>
+   <LI><A href="sitemap.html" title="SiteMap">Site Map</A></LI>
+   <LI><A href="http://mail-archives.apache.org/mod_mbox/incubator-chemistry-dev/" class="external-link" rel="nofollow">Mailing List</A></LI>
+   <LI><A href="https://issues.apache.org/jira/browse/CMIS" class="external-link" rel="nofollow">Issue Tracking</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Search"></A>Search</H3>
+
+<DIV style="padding: 0px 0px 0px 20px;">
+<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+  <INPUT maxlength="255" name="q" size="12" type="text" value=""></INPUT>
+  <INPUT name="btnG" type="submit" value="Search"></INPUT>
+  <INPUT name="domains" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+  <INPUT name="sitesearch" type="hidden" value="incubator.apache.org/chemistry"></INPUT>
+</FORM>
+</DIV>
+
+
+<H3><A name="Navigation-CMISforJava"></A>CMIS for Java</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="opencmis.html" title="OpenCMIS">OpenCMIS</A></LI>
+   <LI><A href="opencmis-modules.html" title="OpenCMIS Modules">Overview</A></LI>
+   <LI><A href="opencmis-client-api.html" title="OpenCMIS Client API">Client API</A></LI>
+   <LI><A href="https://svn.apache.org/repos/asf/chemistry/opencmis/trunk" class="external-link" rel="nofollow">Source Code</A></LI>
+   <LI><A href="http://incubator.apache.org/chemistry/javadoc/index.html" class="external-link" rel="nofollow">JavaDoc</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPython"></A>CMIS for Python</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="cmislib.html" title="cmislib">cmislib</A></LI>
+   <LI><A href="http://incubator.apache.org/chemistry/cmislib-doc/" class="external-link" rel="nofollow">cmislib Documentation</A></LI>
+   <LI><A href="https://svn.apache.org/repos/asf/chemistry/cmislib/trunk" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPHP"></A>CMIS for PHP</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="phpclient.html" title="phpclient">CMIS PHP Client</A></LI>
+   <LI><A href="https://svn.apache.org/repos/asf/chemistry/phpclient/trunk" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISfor.NET"></A>CMIS for .NET</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="dotcmis.html" title="DotCMIS">DotCMIS</A></LI>
+   <LI><A href="https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Sponsorship"></A>Sponsorship</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A></LI>
+   <LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Sponsoring Apache</A></LI>
+</UL>
+
+                    <!-- NavigationBar -->
+                    </div>
+                </div>
+              </div>
+            </div>
+           </td>
+           <td height="100%">
+             <!-- Content -->
+             <div class="wiki-content"><h1 id="opencmis_client_api">OpenCMIS Client API</h1>
+<p><a name="OpenCMISClientAPI-OpenCMISClientAPI"></a></p>
+<p>Table of Content</p>
+<ul>
+<li><a href="#OpenCMISClientAPI-Sessions">Sessions</a></li>
+<li><a href="#OpenCMISClientAPI-ExampleCode">Example Code</a></li>
+<li><a href="#OpenCMISClientAPI-SessionCreation-AtomPubBinding">Session Creation - AtomPub Binding</a></li>
+<li><a href="#OpenCMISClientAPI-SessionCreation-WebServicesBinding">Session Creation - Web Services Binding</a></li>
+<li><a href="#OpenCMISClientAPI-ReadingObjects-RootCollection">Reading Objects - Root Collection</a></li>
+<li><a href="#OpenCMISClientAPI-ReadingProperties-SingleProperty">Reading Properties - Single Property</a></li>
+<li><a href="#OpenCMISClientAPI-ReadingProperties-AllProperties">Reading Properties - All Properties</a></li>
+</ul>
+<h2 id="overview">Overview</h2>
+<p>The OpenCMIS client layer provides an object oriented interface for easy
+consumption of the underlying CMIS related layers. In addition to the CMIS
+specification the OpenCMIS client layer introduces a session concept which
+easily enables applications to get control on the client side cache
+behavior.</p>
+<p>The client layer consists of a client interface, common interfaces and a
+runtime implementation. The runtime maps the client interface to the
+bindings layer and implements the session cache. All parts are exposed by
+following packages:</p>
+<table>
+<tr>
+ <th> Package </th>
+ <th> Artifact </th>
+ <th> Description </th>
+</tr>
+<tr>
+ <td> org.apache.chemistry.opencmis.client.api </td>
+ <td> chemistry-opencmis-client-api </td>
+ <td> Main interfaces of the client API </td>
+</tr>
+<tr>
+ <td> org.apache.chemistry.opencmis.commons.api </td>
+ <td> chemistry-opencmis-commons-api </td>
+ <td> Interfaces and classes shared by client and client bindings API </td>
+</tr>
+<tr>
+ <td> org.apache.chemistry.opencmis.client.runtime </td>
+ <td> chemistry-opencmis-client-impl </td>
+ <td> Implementation classes of client API including a default implementation of the SessionFactory </td>
+</tr>
+</table>
+
+<p>The following UML diagram illustrates the main classes of the client API:</p>
+<p><img src="data/OpenCMIS Client API Class Diagram.png">
+<br/></p>
+<ul>
+<li><strong>SessionFactory</strong> This interface provides the entry point into the client
+API and is responsible to create a session object. Additionally it gives
+access to all repository info exposed by a CMIS client binding. The runtime
+provides a default implementation for the SessionFactory interface.</li>
+<li><strong>Session</strong> This is the main interface an application has to work with. A
+session object is related to a CMIS service client binding and is attached
+to exact one repository. All data that is received through the session
+interface can be cached in the session object in dependency of the concrete
+implementation which is behind.</li>
+<li><strong>Repository</strong> Wrapper interface for the CMIS RepositoryInfo service.</li>
+<li><strong>CmisObject</strong> The CmisObject interface represents the CMIS domain object.</li>
+<li><strong>ObjectType</strong> This interface is base for all CMIS domain types like
+FolderType, DocumentType, PolicyType and RelationshipType. The derived
+interfaces are not shown in the diagram.</li>
+<li><strong>Folder</strong> This interface represents the CMIS folder object.</li>
+<li><strong>Document</strong> This interface represents the CMIS document object.</li>
+<li><strong>ContentStream</strong> this interface wraps the content stream of a CMIS
+document.</li>
+<li><strong>Policy</strong> This interface represents the CMIS policy object.</li>
+<li><strong>Relationship</strong> This interface represents the CMIS relationship object.</li>
+</ul>
+<p><a name="OpenCMISClientAPI-Sessions"></a></p>
+<h2 id="sessions">Sessions</h2>
+<p>OpenCMIS' central entry point to a CMIS repository is a session. A session
+controls settings and caches that used across multiple calls and provides
+access to all CMIS operations and objects.
+In order to create a session, the SessionFactory needs a set parameters
+(see <a href="opencmis-session-parameters.html">OpenCMIS Session Parameters</a>
+).</p>
+<p><a name="OpenCMISClientAPI-ExampleCode"></a></p>
+<h2 id="example_code">Example Code</h2>
+<p><a name="OpenCMISClientAPI-SessionCreation-AtomPubBinding"></a></p>
+<h3 id="session_creation_-_atompub_binding">Session Creation - AtomPub Binding</h3>
+<DIV class="code panel" style="border-style: solid;border-width: 1px;">
+<DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;">
+<B>Opening a Atom Pub Connection</B>
+</DIV>
+<DIV class="codeContent panelContent">
+
+<div class="codehilite"><pre><span class="sr">//</span> <span class="n">default</span> <span class="n">factory</span> <span class="n">implementation</span> <span class="n">of</span> <span class="n">client</span> <span class="n">runtime</span>
+<span class="n">SessionFactory</span> <span class="n">f</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="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">parameter</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="sr">//</span> <span class="n">user</span> <span class="n">credentials</span>
+<span class="n">parameter</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;Otto&quot;</span><span class="p">);</span>
+<span class="n">parameter</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;****&quot;</span><span class="p">);</span>
+
+<span class="sr">//</span> <span class="n">connection</span> <span class="n">settings</span>
+<span class="n">parameter</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://&lt;host&gt;:&lt;port&gt;/cmis/atom&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">parameter</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;myRepository&quot;</span><span class="p">);</span>
+
+<span class="sr">//</span> <span class="n">session</span> <span class="n">locale</span>
+<span class="n">parameter</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">LOCALE_ISO3166_COUNTRY</span><span class="p">,</span> <span class="s">&quot;&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">LOCALE_ISO639_LANGUAGE</span><span class="p">,</span> <span class="s">&quot;de&quot;</span><span class="p">);</span>
+
+<span class="sr">//</span> <span class="n">create</span> <span class="n">session</span>
+<span class="n">Session</span> <span class="n">s</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createSession</span><span class="p">(</span><span class="n">parameter</span><span class="p">);</span>
+</pre></div>
+
+
+<p></DIV>
+</DIV></p>
+<p><a name="OpenCMISClientAPI-SessionCreation-WebServicesBinding"></a></p>
+<h3 id="session_creation_-_web_services_binding">Session Creation - Web Services Binding</h3>
+<DIV class="code panel" style="border-style: solid;border-width: 1px;">
+<DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;">
+<B>Opening a Web Services Connection</B>
+</DIV>
+<DIV class="codeContent panelContent">
+
+<div class="codehilite"><pre><span class="sr">//</span> <span class="n">default</span> <span class="n">factory</span> <span class="n">implementation</span> <span class="n">of</span> <span class="n">client</span> <span class="n">runtime</span>
+<span class="n">SessionFactory</span> <span class="n">f</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="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">parameter</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="sr">//</span> <span class="n">user</span> <span class="n">credentials</span>
+<span class="n">parameter</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;Otto&quot;</span><span class="p">);</span>
+<span class="n">parameter</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;****&quot;</span><span class="p">);</span>
+
+<span class="sr">//</span> <span class="n">connection</span> <span class="n">settings</span>
+<span class="n">parameter</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">WEBSERVICES</span><span class="o">.</span><span class="n">value</span><span class="p">());</span>
+<span class="n">parameter</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;myRepository&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">WEBSERVICES_ACL_SERVICE</span><span class="p">,</span> <span class="s">&quot;http://&lt;host&gt;:&lt;port&gt;/cmis/services/ACLService?wsdl&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">WEBSERVICES_DISCOVERY_SERVICE</span><span class="p">,</span> <span class="s">&quot;http://&lt;host&gt;:&lt;port&gt;/cmis/services/DiscoveryService?wsdl&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">WEBSERVICES_MULTIFILING_SERVICE</span><span class="p">,</span> <span class="s">&quot;http://&lt;host&gt;:&lt;port&gt;/cmis/services/MultiFilingService?wsdl&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">WEBSERVICES_NAVIGATION_SERVICE</span><span class="p">,</span> <span class="s">&quot;http://&lt;host&gt;:&lt;port&gt;/cmis/services/NavigationService?wsdl&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">WEBSERVICES_OBJECT_SERVICE</span><span class="p">,</span> <span class="s">&quot;http://&lt;host&gt;:&lt;port&gt;/cmis/services/ObjectService?wsdl&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">WEBSERVICES_POLICY_SERVICE</span><span class="p">,</span> <span class="s">&quot;http://&lt;host&gt;:&lt;port&gt;/cmis/services/PolicyService?wsdl&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">WEBSERVICES_RELATIONSHIP_SERVICE</span><span class="p">,</span> <span class="s">&quot;http://&lt;host&gt;:&lt;port&gt;/cmis/services/RelationshipService?wsdl&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">WEBSERVICES_REPOSITORY_SERVICE</span><span class="p">,</span> <span class="s">&quot;http://&lt;host&gt;:&lt;port&gt;/cmis/services/RepositoryService?wsdl&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">WEBSERVICES_VERSIONING_SERVICE</span><span class="p">,</span> <span class="s">&quot;http://&lt;host&gt;:&lt;port&gt;/cmis/services/VersioningService?wsdl&quot;</span><span class="p">);</span>
+
+<span class="sr">//</span> <span class="n">session</span> <span class="n">locale</span>
+<span class="n">parameter</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">LOCALE_ISO3166_COUNTRY</span><span class="p">,</span> <span class="s">&quot;&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">LOCALE_ISO639_LANGUAGE</span><span class="p">,</span> <span class="s">&quot;de&quot;</span><span class="p">);</span>
+<span class="n">parameter</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">LOCALE_VARIANT</span><span class="p">,</span> <span class="s">&quot;&quot;</span><span class="p">);</span>
+
+<span class="sr">//</span> <span class="n">create</span> <span class="n">session</span>
+<span class="n">Session</span> <span class="n">s</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">createSession</span><span class="p">(</span><span class="n">parameter</span><span class="p">);</span>
+</pre></div>
+
+
+<p></DIV>
+</DIV></p>
+<p><a name="OpenCMISClientAPI-ReadingObjects-RootCollection"></a></p>
+<h3 id="reading_objects_-_root_collection">Reading Objects - Root Collection</h3>
+<DIV class="code panel" style="border-style: solid;border-width: 1px;">
+<DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;">
+<B>Reading the Root Collection</B>
+</DIV>
+<DIV class="codeContent panelContent">
+
+<div class="codehilite"><pre><span class="n">Folder</span> <span class="n">root</span> <span class="o">=</span> <span class="n">this</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">getRootFolder</span><span class="p">();</span>
+
+<span class="n">ItemIterable</span><span class="sr">&lt;CmisObject&gt;</span> <span class="n">pl</span> <span class="o">=</span> <span class="n">root</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">o</span> <span class="p">:</span> <span class="n">pl</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="n">o</span><span class="o">.</span><span class="n">getName</span><span class="p">());</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p></DIV>
+</DIV></p>
+<p><a name="OpenCMISClientAPI-ReadingProperties-SingleProperty"></a></p>
+<h3 id="reading_properties_-_single_property">Reading Properties - Single Property</h3>
+<DIV class="code panel" style="border-style: solid;border-width: 1px;">
+<DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;">
+<B>Reading a Single Property</B>
+</DIV>
+<DIV class="codeContent panelContent">
+
+<div class="codehilite"><pre><span class="n">ObjectId</span> <span class="n">id</span> <span class="o">=</span> <span class="n">this</span><span class="o">.</span><span class="n">session</span><span class="o">.</span><span class="n">createObjectId</span><span class="p">(</span><span class="s">&quot;4711&quot;</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">this</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">id</span><span class="p">);</span>
+<span class="n">Property</span><span class="sr">&lt;String&gt;</span> <span class="n">p</span> <span class="o">=</span> <span class="n">document</span><span class="o">.</span><span class="n">getProperty</span><span class="p">(</span><span class="n">PropertyIds</span><span class="o">.</span><span class="n">OBJECT_ID</span><span class="p">);</span>
+
+<span class="n">String</span> <span class="n">s</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">getValue</span><span class="p">();</span>
+</pre></div>
+
+
+<p></DIV>
+</DIV></p>
+<p><a name="OpenCMISClientAPI-ReadingProperties-AllProperties"></a></p>
+<h3 id="reading_properties_-_all_properties">Reading Properties - All Properties</h3>
+<DIV class="code panel" style="border-style: solid;border-width: 1px;">
+<DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;">
+<B>Reading all Properties</B>
+</DIV>
+<DIV class="codeContent panelContent">
+
+<div class="codehilite"><pre><span class="x">ObjectId id = this.session.createObjectId(&quot;4711&quot;);</span>
+<span class="x">Document document = (Document) this.session.getObject(id);</span>
+<span class="x">List&lt;Property</span><span class="cp">&lt;?</span><span class="o">&gt;&gt;</span> <span class="nx">l</span> <span class="o">=</span> <span class="nx">document</span><span class="o">.</span><span class="nx">getProperties</span><span class="p">();</span>
+<span class="nx">Iterator</span><span class="o">&lt;</span><span class="nx">Property</span><span class="o">&lt;?&gt;&gt;</span> <span class="nx">i</span> <span class="o">=</span> <span class="nx">l</span><span class="o">.</span><span class="nx">iterator</span><span class="p">();</span>
+<span class="k">while</span> <span class="p">(</span><span class="nx">i</span><span class="o">.</span><span class="nx">hasNext</span><span class="p">())</span> <span class="p">{</span>
+  <span class="nx">Property</span><span class="o">&lt;?&gt;</span> <span class="nx">p</span> <span class="o">=</span> <span class="nx">i</span><span class="o">.</span><span class="nb">next</span><span class="p">();</span>
+  <span class="nx">Object</span> <span class="nx">value</span> <span class="o">=</span> <span class="nx">p</span><span class="o">.</span><span class="nx">getValue</span><span class="p">();</span>
+  <span class="nx">PropertyType</span> <span class="nx">t</span> <span class="o">=</span> <span class="nx">p</span><span class="o">.</span><span class="nx">getType</span><span class="p">();</span>
+
+  <span class="k">switch</span> <span class="p">(</span><span class="nx">t</span><span class="p">)</span> <span class="p">{</span>
+    <span class="k">case</span> <span class="nx">INTEGER</span><span class="o">:</span>
+      <span class="nx">Integer</span> <span class="nx">n</span> <span class="o">=</span> <span class="p">(</span><span class="nx">Integer</span><span class="p">)</span> <span class="nx">value</span><span class="p">;</span>
+      <span class="nx">System</span><span class="o">.</span><span class="nx">out</span><span class="o">.</span><span class="nx">println</span><span class="p">(</span><span class="nx">p</span><span class="o">.</span><span class="nx">getName</span><span class="p">()</span> <span class="o">+</span> <span class="s2">&quot; = &quot;</span> <span class="o">+</span> <span class="nx">n</span><span class="p">);</span>
+      <span class="k">break</span><span class="p">;</span>
+    <span class="k">case</span> <span class="nx">STRING</span><span class="o">:</span>
+ <span class="p">[</span><span class="o">...</span><span class="p">]</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p></DIV>
+</DIV></p></div>
+             <!-- Content -->
+           </td>
+          </tr>
+        </table>
+     </td>
+     <td id="cell-2-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-3-0">&nbsp;</td>
+      <td id="cell-3-1">&nbsp;</td>
+      <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+     <td id="cell-3-0">&nbsp;</td>
+     <td id="cell-3-1">
+       <div id="footer">
+       <!-- Footer -->
+       <div id="site-footer">
+          
+          Apache Chemistry, Apache, the Apache feather logo, and the Apache 
+          Chemistry project logo are trademarks of The Apache Software 
+          Foundation.
+          <BR />
+          Content Management Interoperability Services (CMIS) is an
+          <a href="http://www.oasis-open.org/committees/cmis/">OASIS</a>
+          specification.
+          
+       </div>
+       <!-- Footer -->
+       </div>
+     </td>
+     <td id="cell-3-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-4-0">&nbsp;</td>
+      <td id="cell-4-1">&nbsp;</td>
+      <td id="cell-4-2">&nbsp;</td>
+    </tr>
+  </table>
+</body>
+</html>



Mime
View raw message