chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r785753 - /websites/staging/chemistry/trunk/content/opencmis-client-api.html
Date Sun, 20 Feb 2011 12:59:54 GMT
Author: buildbot
Date: Sun Feb 20 12:59:54 2011
New Revision: 785753

Log:
Staging update by buildbot

Modified:
    websites/staging/chemistry/trunk/content/opencmis-client-api.html

Modified: websites/staging/chemistry/trunk/content/opencmis-client-api.html
==============================================================================
--- websites/staging/chemistry/trunk/content/opencmis-client-api.html (original)
+++ websites/staging/chemistry/trunk/content/opencmis-client-api.html Sun Feb 20 12:59:54
2011
@@ -162,15 +162,18 @@ Apache Chemistry - OpenCMIS Client API
              <!-- Content -->
              <div class="wiki-content"><p><a name="OpenCMISClientAPI-OpenCMISClientAPI"></a></p>
 <h1 id="opencmis_client_api">OpenCMIS Client API</h1>
-<p>{info:title=Table of Content}
-<em> <a href="#OpenCMISClientAPI-Sessions">Sessions</a>
-</em> <a href="#OpenCMISClientAPI-ExampleCode">Example Code</a>
-   * <a href="#OpenCMISClientAPI-SessionCreation-AtomPubBinding">Session Creation -
AtomPub Binding</a>
-   * <a href="#OpenCMISClientAPI-SessionCreation-WebServicesBinding">Session Creation
- Web Services Binding</a>
-   * <a href="#OpenCMISClientAPI-ReadingObjects-RootCollection">Reading Objects - Root
Collection</a>
-   * <a href="#OpenCMISClientAPI-ReadingProperties-SingleProperty">Reading Properties
- Single Property</a>
-   * <a href="#OpenCMISClientAPI-ReadingProperties-AllProperties">Reading Properties
- All Properties</a>
-{info}</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>
+<hr />
+<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
@@ -181,43 +184,55 @@ runtime implementation. The runtime maps
 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>
+<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>!OpenCMIS Client API Class Diagram.png!</p>
+<img src="data/OpenCMIS Client API Class Diagram.png">
+
 <ul>
-<li><em>SessionFactory</em> This interface provides the entry point into
the client
+<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><em>Session</em> This is the main interface an application has to work
with. A
+<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><em>Repository</em> Wrapper interface for the CMIS RepositoryInfo service.</li>
-<li><em>CmisObject</em> The CmisObject interface represents the CMIS domain
object.</li>
-<li><em>ObjectType</em> This interface is base for all CMIS domain types
like
+<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><em>Folder</em> This interface represents the CMIS folder object.</li>
-<li><em>Document</em> This interface represents the CMIS document object.</li>
-<li><em>ContentStream</em> this interface wraps the content stream of a
CMIS
+<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><em>Policy</em> This interface represents the CMIS policy object.</li>
-<li><em>Relationship</em> This interface represents the CMIS relationship
object.</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>
-<h1 id="sessions">Sessions</h1>
+<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.
@@ -225,27 +240,29 @@ In order to create a session, the Sessio
 (see <a href="opencmis-session-parameters.html">OpenCMIS Session Parameters</a>
 ).</p>
 <p><a name="OpenCMISClientAPI-ExampleCode"></a></p>
-<h1 id="example_code">Example Code</h1>
+<h2 id="example_code">Example Code</h2>
 <p><a name="OpenCMISClientAPI-SessionCreation-AtomPubBinding"></a></p>
-<h2 id="session_creation_-_atompub_binding">Session Creation - AtomPub Binding</h2>
-<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">
-    // default factory implementation of client runtime
-    SessionFactory f = SessionFactoryImpl.newInstance();
-    Map<String, String> parameter = new HashMap<String, String>();
-
-// user credentials
-    parameter.put(SessionParameter.USER, "Otto");
-    parameter.put(SessionParameter.PASSWORD, "****");
-
-<div class="codehilite"><pre><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>
-</pre></div>
-
+<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>
 
-<p>"http://<host>:<port>/cmis/atom");
-    parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
-    parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");</p>
-<div class="codehilite"><pre><span class="sr">//</span> <span
class="n">session</span> <span class="n">locale</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>
 
@@ -254,43 +271,38 @@ In order to create a session, the Sessio
 </pre></div>
 
 
+<p></DIV>
+</DIV></p>
 <p><a name="OpenCMISClientAPI-SessionCreation-WebServicesBinding"></a></p>
 <h2 id="session_creation_-_web_services_binding">Session Creation - Web Services Binding</h2>
-<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">
-    // default factory implementation of client runtime
-    SessionFactory f = SessionFactoryImpl.newInstance();
-    Map<String, String> parameter = new HashMap<String, String>();
-
-// user credentials
-    parameter.put(SessionParameter.USER, "Otto");
-    parameter.put(SessionParameter.PASSWORD, "****");
-
-<div class="codehilite"><pre><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>
-</pre></div>
+<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>
 
-
-<p>BindingType.WEBSERVICES.value());
-    parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
-    parameter.put(SessionParameter.WEBSERVICES_ACL_SERVICE,
-"http://<host>:<port>/cmis/services/ACLService?wsdl");
-    parameter.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE,
-"http://<host>:<port>/cmis/services/DiscoveryService?wsdl");
-    parameter.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE,
-"http://<host>:<port>/cmis/services/MultiFilingService?wsdl");
-    parameter.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE,
-"http://<host>:<port>/cmis/services/NavigationService?wsdl");
-    parameter.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE,
-"http://<host>:<port>/cmis/services/ObjectService?wsdl");
-    parameter.put(SessionParameter.WEBSERVICES_POLICY_SERVICE,
-"http://<host>:<port>/cmis/services/PolicyService?wsdl");
-    parameter.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE,
-"http://<host>:<port>/cmis/services/RelationshipService?wsdl");
-    parameter.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE,
-"http://<host>:<port>/cmis/services/RepositoryService?wsdl");
-    parameter.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE,
-"http://<host>:<port>/cmis/services/VersioningService?wsdl");</p>
-<div class="codehilite"><pre><span class="sr">//</span> <span
class="n">session</span> <span class="n">locale</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>
@@ -300,48 +312,76 @@ In order to create a session, the Sessio
 </pre></div>
 
 
+<p></DIV>
+</DIV></p>
 <p><a name="OpenCMISClientAPI-ReadingObjects-RootCollection"></a></p>
 <h2 id="reading_objects_-_root_collection">Reading Objects - Root Collection</h2>
-<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">
-    Folder root = this.session.getRootFolder();
+<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>
 
-ItemIterable<CmisObject> pl = root.getChildren();
+<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>
 
-<div class="codehilite"><pre><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="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>
 <h2 id="reading_properties_-_single_property">Reading Properties - Single Property</h2>
-<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">
-    ObjectId id = this.session.createObjectId("4711");
-    Document document = (Document) this.session.getObject(id);
-    Property<String> p = document.getProperty(PropertyIds.OBJECT_ID);
+<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>
 
-String s = p.getValue();
 
+<p></DIV>
+</DIV></p>
 <p><a name="OpenCMISClientAPI-ReadingProperties-AllProperties"></a></p>
 <h2 id="reading_properties_-_all_properties">Reading Properties - All Properties</h2>
-<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">
-    ObjectId id = this.session.createObjectId("4711");
-    Document document = (Document) this.session.getObject(id);
-    List<Property<?>> l = document.getProperties();
-    Iterator<Property<?>> i = l.iterator();
-    while (i.hasNext()) {
-      Property<?> p = i.next();
-      Object value = p.getValue();
-      PropertyType t = p.getType();
-
-switch (t) {
-        case INTEGER:
-          Integer n = (Integer) value;
-          System.out.println(p.getName() + " = " + n);
-          break;
-        case STRING:
-     [...]
-    }</div>
+<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>



Mime
View raw message