chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r785873 - /websites/staging/chemistry/trunk/content/java/opencmis-client-api.html
Date Mon, 21 Feb 2011 14:54:38 GMT
Author: buildbot
Date: Mon Feb 21 14:54:38 2011
New Revision: 785873

Log:
Staging update by buildbot

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

Modified: websites/staging/chemistry/trunk/content/java/opencmis-client-api.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/opencmis-client-api.html (original)
+++ websites/staging/chemistry/trunk/content/java/opencmis-client-api.html Mon Feb 21 14:54:38
2011
@@ -350,52 +350,35 @@ In order to create a session, the Sessio
 </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="k">this</span><span
class="o">.</span><span class="na">session</span><span class="o">.</span><span
class="na">createObjectId</span><span class="o">(</span><span class="s">&quot;4711&quot;</span><span
class="o">);</span>
+<span class="n">Document</span> <span class="n">document</span> <span
class="o">=</span> <span class="o">(</span><span class="n">Document</span><span
class="o">)</span> <span class="k">this</span><span class="o">.</span><span
class="na">session</span><span class="o">.</span><span class="na">getObject</span><span
class="o">(</span><span class="n">id</span><span class="o">);</span>
+<span class="n">Property</span><span class="o">&lt;</span><span
class="n">String</span><span class="o">&gt;</span> <span class="n">p</span>
<span class="o">=</span> <span class="n">document</span><span class="o">.</span><span
class="na">getProperty</span><span class="o">(</span><span class="n">PropertyIds</span><span
class="o">.</span><span class="na">OBJECT_ID</span><span class="o">);</span>
 
-<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>
+<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="na">getValue</span><span
class="o">();</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>
+<p><strong>Reading all Properties</strong>
+    :::java
+    ObjectId id = this.session.createObjectId("4711");
+    Document document = (Document) this.session.getObject(id);
+    List<Property<?>&gt; l = document.getProperties();
+    Iterator<Property<?>&gt; i = l.iterator();
+    while (i.hasNext()) {
+      Property&lt;?&gt; p = i.next();
+      Object value = p.getValue();
+      PropertyType t = p.getType();</p>
+<div class="codehilite"><pre>  <span class="n">switch</span> <span
class="p">(</span><span class="n">t</span><span class="p">)</span>
<span class="p">{</span>
+    <span class="k">case</span> <span class="n">INTEGER:</span>
+      <span class="n">Integer</span> <span class="n">n</span> <span
class="o">=</span> <span class="p">(</span><span class="n">Integer</span><span
class="p">)</span> <span class="n">value</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">p</span><span class="o">.</span><span
class="n">getName</span><span class="p">()</span> <span class="o">+</span>
<span class="s">&quot; = &quot;</span> <span class="o">+</span>
<span class="n">n</span><span class="p">);</span>
+      <span class="n">break</span><span class="p">;</span>
+    <span class="k">case</span> <span class="n">STRING:</span>
  <span class="p">[</span><span class="o">...</span><span class="p">]</span>
 <span class="p">}</span>
-</pre></div>
-
-
-<p></DIV>
-</DIV></p></div>
+</pre></div></div>
              <!-- Content -->
            </td>
           </tr>



Mime
View raw message