chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r785787 - /websites/staging/chemistry/trunk/content/getting-started-with-dotcmis.html
Date Sun, 20 Feb 2011 20:33:29 GMT
Author: buildbot
Date: Sun Feb 20 20:33:29 2011
New Revision: 785787

Log:
Staging update by buildbot

Modified:
    websites/staging/chemistry/trunk/content/getting-started-with-dotcmis.html

Modified: websites/staging/chemistry/trunk/content/getting-started-with-dotcmis.html
==============================================================================
--- websites/staging/chemistry/trunk/content/getting-started-with-dotcmis.html (original)
+++ websites/staging/chemistry/trunk/content/getting-started-with-dotcmis.html Sun Feb 20
20:33:29 2011
@@ -178,41 +178,27 @@ Apache Chemistry - Getting started with 
 <h3 id="connecting_to_the_first_repository">Connecting to the first repository</h3>
 <div class="codehilite"><pre><span class="n">Dictionary</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">Dictionary</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="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">BindingType</span><span
class="p">]</span>
-</pre></div>
-
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">BindingType</span><span
class="p">]</span> <span class="o">=</span> <span class="n">BindingType</span><span
class="o">.</span><span class="n">AtomPub</span><span class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">AtomPubUrl</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;serviceDocumentPath&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</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="o">=</span> <span class="s">&quot;&lt;username&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</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="o">=</span> <span class="s">&quot;&lt;password&gt;&quot;</span><span
class="p">;</span>
 
-<p>= BindingType.AtomPub;
-    parameters[SessionParameter.AtomPubUrl]
- = "http://<host>/<serviceDocumentPath>";
-    parameters[SessionParameter.User]
- = "<username>";
-    parameters[SessionParameter.Password]
- = "<password>";</p>
-<div class="codehilite"><pre><span class="n">SessionFactory</span>
<span class="n">factory</span> <span class="o">=</span> <span class="n">SessionFactory</span><span
class="o">.</span><span class="n">NewInstance</span><span class="p">();</span>
-<span class="n">ISession</span> <span class="n">session</span> <span
class="o">=</span> <span class="n">factory</span><span class="o">.</span><span
class="n">GetRepositories</span><span class="p">(</span><span class="n">parameters</span><span
class="p">)[</span><span class="mi">0</span><span class="p">]</span>
+<span class="n">SessionFactory</span> <span class="n">factory</span>
<span class="o">=</span> <span class="n">SessionFactory</span><span
class="o">.</span><span class="n">NewInstance</span><span class="p">();</span>
+<span class="n">ISession</span> <span class="n">session</span> <span
class="o">=</span> <span class="n">factory</span><span class="o">.</span><span
class="n">GetRepositories</span><span class="p">(</span><span class="n">parameters</span><span
class="p">)[</span><span class="mi">0</span><span class="p">]</span><span
class="o">.</span><span class="n">CreateSession</span><span class="p">();</span>
 </pre></div>
 
 
-<p>.CreateSession();</p>
 <p><a name="GettingstartedwithDotCMIS-Connectingtoaspecificrepository"></a></p>
 <h3 id="connecting_to_a_specific_repository">Connecting to a specific repository</h3>
 <div class="codehilite"><pre><span class="n">Dictionary</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">Dictionary</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="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">BindingType</span><span
class="p">]</span>
-</pre></div>
-
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">BindingType</span><span
class="p">]</span> <span class="o">=</span> <span class="n">BindingType</span><span
class="o">.</span><span class="n">AtomPub</span><span class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">AtomPubUrl</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;serviceDocumentPath&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</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="o">=</span> <span class="s">&quot;&lt;username&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</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="o">=</span> <span class="s">&quot;&lt;password&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">RepositoryId</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;&lt;repositoryId&gt;&quot;</span><span
class="p">;</span>
 
-<p>= BindingType.AtomPub;
-    parameters[SessionParameter.AtomPubUrl]
- = "http://<host>/<serviceDocumentPath>";
-    parameters[SessionParameter.User]
- = "<username>";
-    parameters[SessionParameter.Password]
- = "<password>";
-    parameters[SessionParameter.RepositoryId]
- = "<repositoryId>";</p>
-<div class="codehilite"><pre><span class="n">SessionFactory</span>
<span class="n">factory</span> <span class="o">=</span> <span class="n">SessionFactory</span><span
class="o">.</span><span class="n">NewInstance</span><span class="p">();</span>
+<span class="n">SessionFactory</span> <span class="n">factory</span>
<span class="o">=</span> <span class="n">SessionFactory</span><span
class="o">.</span><span class="n">NewInstance</span><span class="p">();</span>
 <span class="n">ISession</span> <span class="n">session</span> <span
class="o">=</span> <span class="n">factory</span><span class="o">.</span><span
class="n">CreateSession</span><span class="p">(</span><span class="n">parameters</span><span
class="p">);</span>
 </pre></div>
 
@@ -223,73 +209,43 @@ Apache Chemistry - Getting started with 
 <h3 id="connecting_to_the_first_repository_1">Connecting to the first repository</h3>
 <div class="codehilite"><pre><span class="n">Dictionary</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">Dictionary</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="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">BindingType</span><span
class="p">]</span>
-</pre></div>
-
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">BindingType</span><span
class="p">]</span> <span class="o">=</span> <span class="n">BindingType</span><span
class="o">.</span><span class="n">WebServices</span><span class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesRepositoryService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;RepositoryServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesAclService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;AclServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesDiscoveryService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;DiscoveryServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesMultifilingService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;MultifilingServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesNavigationService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;NavigationServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesObjectService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;ObjectServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesPolicyService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;PolicyServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesRelationshipService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;RelationshipServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesVersioningService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;VersioningServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</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="o">=</span> <span class="s">&quot;&lt;username&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</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="o">=</span> <span class="s">&quot;&lt;password&gt;&quot;</span><span
class="p">;</span>
 
-<p>= BindingType.WebServices;
-    parameters[SessionParameter.WebServicesRepositoryService]
- = "http://<host>/<RepositoryServiceWSDL>";
-    parameters[SessionParameter.WebServicesAclService]
- = "http://<host>/<AclServiceWSDL>";
-    parameters[SessionParameter.WebServicesDiscoveryService]
- = "http://<host>/<DiscoveryServiceWSDL>";
-    parameters[SessionParameter.WebServicesMultifilingService]
- = "http://<host>/<MultifilingServiceWSDL>";
-    parameters[SessionParameter.WebServicesNavigationService]
- = "http://<host>/<NavigationServiceWSDL>";
-    parameters[SessionParameter.WebServicesObjectService]
- = "http://<host>/<ObjectServiceWSDL>";
-    parameters[SessionParameter.WebServicesPolicyService]
- = "http://<host>/<PolicyServiceWSDL>";
-    parameters[SessionParameter.WebServicesRelationshipService]
- = "http://<host>/<RelationshipServiceWSDL>";
-    parameters[SessionParameter.WebServicesVersioningService]
- = "http://<host>/<VersioningServiceWSDL>";
-    parameters[SessionParameter.User]
- = "<username>";
-    parameters[SessionParameter.Password]
- = "<password>";</p>
-<div class="codehilite"><pre><span class="n">SessionFactory</span>
<span class="n">factory</span> <span class="o">=</span> <span class="n">SessionFactory</span><span
class="o">.</span><span class="n">NewInstance</span><span class="p">();</span>
-<span class="n">ISession</span> <span class="n">session</span> <span
class="o">=</span> <span class="n">factory</span><span class="o">.</span><span
class="n">GetRepositories</span><span class="p">(</span><span class="n">parameters</span><span
class="p">)[</span><span class="mi">0</span><span class="p">]</span>
+<span class="n">SessionFactory</span> <span class="n">factory</span>
<span class="o">=</span> <span class="n">SessionFactory</span><span
class="o">.</span><span class="n">NewInstance</span><span class="p">();</span>
+<span class="n">ISession</span> <span class="n">session</span> <span
class="o">=</span> <span class="n">factory</span><span class="o">.</span><span
class="n">GetRepositories</span><span class="p">(</span><span class="n">parameters</span><span
class="p">)[</span><span class="mi">0</span><span class="p">]</span><span
class="o">.</span><span class="n">CreateSession</span><span class="p">();</span>
 </pre></div>
 
 
-<p>.CreateSession();</p>
 <p><a name="GettingstartedwithDotCMIS-Connectingtoaspecificrepository"></a></p>
 <h3 id="connecting_to_a_specific_repository_1">Connecting to a specific repository</h3>
 <div class="codehilite"><pre><span class="n">Dictionary</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">Dictionary</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="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">BindingType</span><span
class="p">]</span>
-</pre></div>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">BindingType</span><span
class="p">]</span> <span class="o">=</span> <span class="n">BindingType</span><span
class="o">.</span><span class="n">WebServices</span><span class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesRepositoryService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;RepositoryServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesAclService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;AclServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesDiscoveryService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;DiscoveryServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesMultifilingService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;MultifilingServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesNavigationService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;NavigationServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesObjectService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;ObjectServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesPolicyService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;PolicyServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesRelationshipService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;RelationshipServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">WebServicesVersioningService</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;http://&lt;host&gt;/&lt;VersioningServiceWSDL&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</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="o">=</span> <span class="s">&quot;&lt;username&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</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="o">=</span> <span class="s">&quot;&lt;password&gt;&quot;</span><span
class="p">;</span>
+<span class="n">parameters</span><span class="p">[</span><span
class="n">SessionParameter</span><span class="o">.</span><span class="n">RepositoryId</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;&lt;repositoryId&gt;&quot;</span><span
class="p">;</span>
 
-
-<p>= BindingType.WebServices;
-    parameters[SessionParameter.WebServicesRepositoryService]
- = "http://<host>/<RepositoryServiceWSDL>";
-    parameters[SessionParameter.WebServicesAclService]
- = "http://<host>/<AclServiceWSDL>";
-    parameters[SessionParameter.WebServicesDiscoveryService]
- = "http://<host>/<DiscoveryServiceWSDL>";
-    parameters[SessionParameter.WebServicesMultifilingService]
- = "http://<host>/<MultifilingServiceWSDL>";
-    parameters[SessionParameter.WebServicesNavigationService]
- = "http://<host>/<NavigationServiceWSDL>";
-    parameters[SessionParameter.WebServicesObjectService]
- = "http://<host>/<ObjectServiceWSDL>";
-    parameters[SessionParameter.WebServicesPolicyService]
- = "http://<host>/<PolicyServiceWSDL>";
-    parameters[SessionParameter.WebServicesRelationshipService]
- = "http://<host>/<RelationshipServiceWSDL>";
-    parameters[SessionParameter.WebServicesVersioningService]
- = "http://<host>/<VersioningServiceWSDL>";
-    parameters[SessionParameter.User]
- = "<username>";
-    parameters[SessionParameter.Password]
- = "<password>";
-    parameters[SessionParameter.RepositoryId]
- = "<repositoryId>";</p>
-<div class="codehilite"><pre><span class="n">SessionFactory</span>
<span class="n">factory</span> <span class="o">=</span> <span class="n">SessionFactory</span><span
class="o">.</span><span class="n">NewInstance</span><span class="p">();</span>
+<span class="n">SessionFactory</span> <span class="n">factory</span>
<span class="o">=</span> <span class="n">SessionFactory</span><span
class="o">.</span><span class="n">NewInstance</span><span class="p">();</span>
 <span class="n">ISession</span> <span class="n">session</span> <span
class="o">=</span> <span class="n">factory</span><span class="o">.</span><span
class="n">CreateSession</span><span class="p">(</span><span class="n">parameters</span><span
class="p">);</span>
 </pre></div>
 
@@ -307,12 +263,9 @@ Apache Chemistry - Getting started with 
 
 <span class="sr">//</span> <span class="n">get</span> <span class="n">a</span>
<span class="n">page</span>
 <span class="n">IItemEnumerable</span><span class="sr">&lt;ICmisObject&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="n">IItemEnumerable</span><span class="sr">&lt;ICmisObject&gt;</span>
<span class="n">page</span> <span class="o">=</span> <span class="n">children</span><span
class="o">.</span><span class="n">SkipTo</span><span class="p">(</span><span
class="mi">20</span><span class="p">)</span><span class="o">.</span><span
class="n">GetPage</span><span class="p">(</span><span class="mi">10</span><span
class="p">);</span> <span class="sr">//</span>
-</pre></div>
-
+<span class="n">IItemEnumerable</span><span class="sr">&lt;ICmisObject&gt;</span>
<span class="n">page</span> <span class="o">=</span> <span class="n">children</span><span
class="o">.</span><span class="n">SkipTo</span><span class="p">(</span><span
class="mi">20</span><span class="p">)</span><span class="o">.</span><span
class="n">GetPage</span><span class="p">(</span><span class="mi">10</span><span
class="p">);</span> <span class="sr">//</span> <span class="n">children</span>
<span class="mi">20</span> <span class="n">to</span> <span class="mi">30</span>
 
-<p>children 20 to 30</p>
-<div class="codehilite"><pre><span class="k">foreach</span> <span
class="p">(</span><span class="n">ICmisObject</span> <span class="n">cmisObject</span>
<span class="n">in</span> <span class="n">page</span><span class="p">)</span>
+<span class="k">foreach</span> <span class="p">(</span><span class="n">ICmisObject</span>
<span class="n">cmisObject</span> <span class="n">in</span> <span
class="n">page</span><span class="p">)</span>
 <span class="p">{</span>
     <span class="n">Console</span><span class="o">.</span><span
class="n">WriteLine</span><span class="p">(</span><span class="n">cmisObject</span><span
class="o">.</span><span class="n">Name</span><span class="p">);</span>
 <span class="p">}</span>
@@ -328,15 +281,12 @@ Apache Chemistry - Getting started with 
 <span class="n">Console</span><span class="o">.</span><span class="n">WriteLine</span><span
class="p">(</span><span class="n">doc</span><span class="o">.</span><span
class="n">Name</span><span class="p">);</span>
 <span class="n">Console</span><span class="o">.</span><span class="n">WriteLine</span><span
class="p">(</span><span class="n">doc</span><span class="o">.</span><span
class="n">GetPropertyValue</span><span class="p">(</span><span class="s">&quot;my:property&quot;</span><span
class="p">));</span>
 
-<span class="n">IProperty</span> <span class="n">myProperty</span>
<span class="o">=</span> <span class="n">doc</span><span class="p">[</span><span
class="s">&quot;my:property&quot;</span><span class="p">]</span>
-</pre></div>
-
+<span class="n">IProperty</span> <span class="n">myProperty</span>
<span class="o">=</span> <span class="n">doc</span><span class="p">[</span><span
class="s">&quot;my:property&quot;</span><span class="p">];</span>
+<span class="n">Console</span><span class="o">.</span><span class="n">WriteLine</span><span
class="p">(</span><span class="s">&quot;Id:    &quot;</span>
<span class="o">+</span> <span class="n">myProperty</span><span
class="o">.</span><span class="n">Id</span><span class="p">);</span>
+<span class="n">Console</span><span class="o">.</span><span class="n">WriteLine</span><span
class="p">(</span><span class="s">&quot;Value: &quot;</span>
<span class="o">+</span> <span class="n">myProperty</span><span
class="o">.</span><span class="n">Value</span><span class="p">);</span>
+<span class="n">Console</span><span class="o">.</span><span class="n">WriteLine</span><span
class="p">(</span><span class="s">&quot;Type:  &quot;</span>
<span class="o">+</span> <span class="n">myProperty</span><span
class="o">.</span><span class="n">PropertyType</span><span class="p">);</span>
 
-<p>;
-    Console.WriteLine("Id:    " + myProperty.Id);
-    Console.WriteLine("Value: " + myProperty.Value);
-    Console.WriteLine("Type:  " + myProperty.PropertyType);</p>
-<div class="codehilite"><pre><span class="sr">//</span> <span
class="n">content</span>
+<span class="sr">//</span> <span class="n">content</span>
 <span class="n">IContentStream</span> <span class="n">contentStream</span>
<span class="o">=</span> <span class="n">doc</span><span class="o">.</span><span
class="n">GetContentStream</span><span class="p">();</span>
 <span class="n">Console</span><span class="o">.</span><span class="n">WriteLine</span><span
class="p">(</span><span class="s">&quot;Filename:   &quot;</span>
<span class="o">+</span> <span class="n">contentStream</span><span
class="o">.</span><span class="n">FileName</span><span class="p">);</span>
 <span class="n">Console</span><span class="o">.</span><span class="n">WriteLine</span><span
class="p">(</span><span class="s">&quot;MIME type:  &quot;</span>
<span class="o">+</span> <span class="n">contentStream</span><span
class="o">.</span><span class="n">MimeType</span><span class="p">);</span>
@@ -349,19 +299,12 @@ Apache Chemistry - Getting started with 
 <div class="codehilite"><pre><span class="n">IFolder</span> <span
class="n">folder</span> <span class="o">=</span> <span class="o">...</span>
 
 <span class="n">IDictionary</span><span class="o">&lt;</span><span
class="n">string</span><span class="p">,</span> <span class="n">object</span><span
class="o">&gt;</span> <span class="n">properties</span> <span
class="o">=</span> <span class="k">new</span> <span class="n">Dictionary</span><span
class="o">&lt;</span><span class="n">string</span><span class="p">,</span>
<span class="n">object</span><span class="o">&gt;</span><span
class="p">();</span>
-<span class="n">properties</span><span class="p">[</span><span
class="n">PropertyIds</span><span class="o">.</span><span class="n">Name</span><span
class="p">]</span>
-</pre></div>
+<span class="n">properties</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="o">=</span> <span class="s">&quot;Hello
World Document&quot;</span><span class="p">;</span>
+<span class="n">properties</span><span class="p">[</span><span
class="n">PropertyIds</span><span class="o">.</span><span class="n">ObjectTypeId</span><span
class="p">]</span> <span class="o">=</span> <span class="s">&quot;cmis:document&quot;</span><span
class="p">;</span>
 
+<span class="n">byte</span><span class="o">[]</span> <span class="n">content</span>
<span class="o">=</span> <span class="n">UTF8Encoding</span><span
class="o">.</span><span class="n">UTF8</span><span class="o">.</span><span
class="n">GetBytes</span><span class="p">(</span><span class="s">&quot;Hello
World!&quot;</span><span class="p">);</span>
 
-<p>= "Hello World Document";
-    properties[PropertyIds.ObjectTypeId]
- = "cmis:document";</p>
-<div class="codehilite"><pre><span class="n">byte</span><span
class="o">[]</span>
-</pre></div>
-
-
-<p>content = UTF8Encoding.UTF8.GetBytes("Hello World!");</p>
-<div class="codehilite"><pre><span class="n">ContentStream</span>
<span class="n">contentStream</span> <span class="o">=</span> <span
class="k">new</span> <span class="n">ContentStream</span><span class="p">();</span>
+<span class="n">ContentStream</span> <span class="n">contentStream</span>
<span class="o">=</span> <span class="k">new</span> <span class="n">ContentStream</span><span
class="p">();</span>
 <span class="n">contentStream</span><span class="o">.</span><span
class="n">FileName</span> <span class="o">=</span> <span class="s">&quot;hello-world.txt&quot;</span><span
class="p">;</span>
 <span class="n">contentStream</span><span class="o">.</span><span
class="n">MimeType</span> <span class="o">=</span> <span class="s">&quot;text/plain&quot;</span><span
class="p">;</span>
 <span class="n">contentStream</span><span class="o">.</span><span
class="n">Length</span> <span class="o">=</span> <span class="n">content</span><span
class="o">.</span><span class="n">Length</span><span class="p">;</span>
@@ -376,16 +319,11 @@ Apache Chemistry - Getting started with 
 <div class="codehilite"><pre><span class="n">ICmisObject</span> <span
class="n">cmisObject</span> <span class="o">=</span> <span class="o">...</span>
 
 <span class="n">IDictionary</span><span class="o">&lt;</span><span
class="n">string</span><span class="p">,</span> <span class="n">object</span><span
class="o">&gt;</span> <span class="n">properties</span> <span
class="o">=</span> <span class="k">new</span> <span class="n">Dictionary</span><span
class="o">&lt;</span><span class="n">string</span><span class="p">,</span>
<span class="n">object</span><span class="o">&gt;</span><span
class="p">();</span>
-<span class="n">properties</span><span class="p">[</span><span
class="s">&quot;my:string&quot;</span><span class="p">]</span>
-</pre></div>
-
+<span class="n">properties</span><span class="p">[</span><span
class="s">&quot;my:string&quot;</span><span class="p">]</span>
<span class="o">=</span> <span class="s">&quot;a string&quot;</span><span
class="p">;</span>
+<span class="n">properties</span><span class="p">[</span><span
class="s">&quot;my:int&quot;</span><span class="p">]</span> <span
class="o">=</span> <span class="mi">42</span><span class="p">;</span>
+<span class="n">properties</span><span class="p">[</span><span
class="s">&quot;my:date&quot;</span><span class="p">]</span>
<span class="o">=</span> <span class="n">DateTime</span><span class="o">.</span><span
class="n">Now</span><span class="p">;</span>
 
-<p>= "a string";
-    properties["my:int"]
- = 42;
-    properties["my:date"]
- = DateTime.Now;</p>
-<div class="codehilite"><pre><span class="n">IObjectId</span> <span
class="n">newId</span> <span class="o">=</span> <span class="n">cmisObject</span><span
class="o">.</span><span class="n">UpdateProperties</span><span class="p">(</span><span
class="n">properties</span><span class="p">);</span>
+<span class="n">IObjectId</span> <span class="n">newId</span> <span
class="o">=</span> <span class="n">cmisObject</span><span class="o">.</span><span
class="n">UpdateProperties</span><span class="p">(</span><span class="n">properties</span><span
class="p">);</span>
 
 <span class="k">if</span> <span class="p">(</span><span class="n">newId</span><span
class="o">.</span><span class="n">Id</span> <span class="o">==</span>
<span class="n">cmisObject</span><span class="o">.</span><span
class="n">Id</span><span class="p">)</span> 
 <span class="p">{</span>
@@ -411,19 +349,13 @@ Apache Chemistry - Getting started with 
 
 <p><a name="GettingstartedwithDotCMIS-Performingaquery"></a></p>
 <h2 id="performing_a_query">Performing a query</h2>
-<div class="codehilite"><pre><span class="n">IItemEnumerable</span><span
class="sr">&lt;IQueryResult&gt;</span> <span class="sx">qr = </span><span
class="n">session</span><span class="o">.</span><span class="n">Query</span><span
class="p">(</span><span class="err">&quot;</span><span class="n">SELECT</span>
<span class="o">*</span> <span class="n">FROM</span>
-</pre></div>
+<div class="codehilite"><pre><span class="n">IItemEnumerable</span><span
class="sr">&lt;IQueryResult&gt;</span> <span class="sx">qr = </span><span
class="n">session</span><span class="o">.</span><span class="n">Query</span><span
class="p">(</span><span class="s">&quot;SELECT * FROM cmis:document&quot;</span><span
class="p">,</span> <span class="n">false</span><span class="p">);</span>
 
-
-<p>cmis:document", false);</p>
-<div class="codehilite"><pre><span class="k">foreach</span> <span
class="p">(</span><span class="n">IQueryResult</span> <span class="n">hit</span>
<span class="n">in</span> <span class="n">qr</span><span class="p">)</span>
-<span class="p">{</span>
-    <span class="n">Console</span><span class="o">.</span><span
class="n">WriteLine</span><span class="p">(</span><span class="n">hit</span><span
class="p">[</span><span class="s">&quot;cmis:name&quot;</span><span
class="p">]</span>
-</pre></div>
-
-
-<p>.FirstValue + " (" + hit["cmis:objectId"].FirstValue + ")");
-    }</p></div>
+<span class="k">foreach</span> <span class="p">(</span><span class="n">IQueryResult</span>
<span class="n">hit</span> <span class="n">in</span> <span class="sx">qr)</span>
+<span class="sx">{</span>
+<span class="sx">    Console.WriteLine(hit[&quot;cmis:name&quot;].FirstValue
+ &quot; (&quot; + hit[&quot;cmis:objectId&quot;].FirstValue + &quot;)</span><span
class="err">&quot;</span><span class="p">);</span>
+<span class="p">}</span>
+</pre></div></div>
              <!-- Content -->
            </td>
           </tr>



Mime
View raw message