chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r785855 - in /websites/staging/chemistry/trunk/content: getting-started-with-dotcmis.html index.html
Date Mon, 21 Feb 2011 09:34:49 GMT
Author: buildbot
Date: Mon Feb 21 09:34:48 2011
New Revision: 785855

Log:
Staging update by buildbot

Modified:
    websites/staging/chemistry/trunk/content/getting-started-with-dotcmis.html
    websites/staging/chemistry/trunk/content/index.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 Mon Feb 21
09:34:48 2011
@@ -176,9 +176,9 @@ Apache Chemistry - Getting started with 
 <h2 id="connecting_to_a_cmis_atompub_endpoint">Connecting to a CMIS AtomPub endpoint</h2>
 <p><a name="GettingstartedwithDotCMIS-Connectingtothefirstrepository"></a></p>
 <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> <span class="o">=</span> <span class="n">BindingType</span><span
class="o">.</span><span class="n">AtomPub</span><span class="p">;</span>
+<p>:::C#
+    Dictionary<string, string> parameters = new Dictionary<string, string>();</p>
+<div class="codehilite"><pre><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>
@@ -190,9 +190,9 @@ Apache Chemistry - Getting started with 
 
 <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> <span class="o">=</span> <span class="n">BindingType</span><span
class="o">.</span><span class="n">AtomPub</span><span class="p">;</span>
+<p>:::C#
+    Dictionary<string, string> parameters = new Dictionary<string, string>();</p>
+<div class="codehilite"><pre><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>
@@ -207,9 +207,9 @@ Apache Chemistry - Getting started with 
 <h2 id="connecting_to_a_cmis_web_services_endpoint">Connecting to a CMIS Web Services
endpoint</h2>
 <p><a name="GettingstartedwithDotCMIS-Connectingtothefirstrepository"></a></p>
 <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> <span class="o">=</span> <span class="n">BindingType</span><span
class="o">.</span><span class="n">WebServices</span><span class="p">;</span>
+<p>:::C#
+    Dictionary<string, string> parameters = new Dictionary<string, string>();</p>
+<div class="codehilite"><pre><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>
@@ -229,9 +229,9 @@ Apache Chemistry - Getting started with 
 
 <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> <span class="o">=</span> <span class="n">BindingType</span><span
class="o">.</span><span class="n">WebServices</span><span class="p">;</span>
+<p>:::C#
+    Dictionary<string, string> parameters = new Dictionary<string, string>();</p>
+<div class="codehilite"><pre><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>
@@ -252,10 +252,10 @@ Apache Chemistry - Getting started with 
 
 <p><a name="GettingstartedwithDotCMIS-Listingfolderchildren"></a></p>
 <h2 id="listing_folder_children">Listing folder children</h2>
-<div class="codehilite"><pre><span class="sr">//</span><span class="o">/</span>
<span class="n">get</span> <span class="n">the</span> <span class="n">root</span>
<span class="n">folder</span>
-<span class="n">IFolder</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="sr">//</span> <span class="n">list</span> <span class="n">all</span>
<span class="n">children</span>
+<p>:::C#
+    /// get the root folder
+    IFolder rootFolder = session.GetRootFolder();</p>
+<div class="codehilite"><pre><span class="sr">//</span> <span
class="n">list</span> <span class="n">all</span> <span class="n">children</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">rootFolder</span><span class="o">.</span><span class="n">GetChildren</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>
@@ -274,10 +274,10 @@ Apache Chemistry - Getting started with 
 
 <p><a name="GettingstartedwithDotCMIS-Fetchingadocument"></a></p>
 <h2 id="fetching_a_document">Fetching a document</h2>
-<div class="codehilite"><pre><span class="n">IObjectId</span> <span
class="n">id</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;12345678&quot;</span><span class="p">);</span>
-<span class="n">IDocument</span> <span class="n">doc</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">as</span> <span class="n">IDocument</span><span
class="p">;</span>
-
-<span class="sr">//</span> <span class="n">properties</span>
+<p>:::C#
+    IObjectId id = session.CreateObjectId("12345678");
+    IDocument doc = session.GetObject(id) as IDocument;</p>
+<div class="codehilite"><pre><span class="sr">//</span> <span
class="n">properties</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">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>
 
@@ -296,9 +296,9 @@ Apache Chemistry - Getting started with 
 
 <p><a name="GettingstartedwithDotCMIS-Creatingadocument"></a></p>
 <h2 id="creating_a_document">Creating a document</h2>
-<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>
+<p>:::C#
+    IFolder folder = ...</p>
+<div class="codehilite"><pre><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> <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>
 
@@ -316,9 +316,9 @@ Apache Chemistry - Getting started with 
 
 <p><a name="GettingstartedwithDotCMIS-Updatingproperties"></a></p>
 <h2 id="updating_properties">Updating properties</h2>
-<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>
+<p>:::C#
+    ICmisObject cmisObject = ...</p>
+<div class="codehilite"><pre><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>
<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>
@@ -340,18 +340,18 @@ Apache Chemistry - Getting started with 
 
 <p><a name="GettingstartedwithDotCMIS-Deletinganobject"></a></p>
 <h2 id="deleting_an_object">Deleting an object</h2>
-<div class="codehilite"><pre><span class="n">IObjectId</span> <span
class="n">newId</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;12345678&quot;</span><span class="p">):</span>
-<span class="n">ICmisObject</span> <span class="n">cmisObject</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">newId</span><span
class="p">);</span>
-
-<span class="n">cmisObject</span><span class="o">.</span><span
class="n">Delete</span><span class="p">(</span><span class="n">true</span><span
class="p">);</span>
+<p>:::C#
+    IObjectId newId = session.CreateObjectId("12345678"):
+    ICmisObject cmisObject = session.GetObject(newId);</p>
+<div class="codehilite"><pre><span class="n">cmisObject</span><span
class="o">.</span><span class="n">Delete</span><span class="p">(</span><span
class="n">true</span><span class="p">);</span>
 </pre></div>
 
 
 <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="s">&quot;SELECT * FROM cmis:document&quot;</span><span
class="p">,</span> <span class="n">false</span><span class="p">);</span>
-
-<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>
+<p>:::C#
+    IItemEnumerable<IQueryResult> qr = session.Query("SELECT * FROM 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="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>

Modified: websites/staging/chemistry/trunk/content/index.html
==============================================================================
--- websites/staging/chemistry/trunk/content/index.html (original)
+++ websites/staging/chemistry/trunk/content/index.html Mon Feb 21 09:34:48 2011
@@ -196,7 +196,7 @@ inclusion of the C.M.I.S. letters, "CheM
 <li>2011-02-16 Project graduates to Top Level Project!</li>
 <li>2011-02-07 First Apache release of the cmislib Python client, <a href="cmislib.html#cmislib-0.4FullDownloadpage">cmislib
0.4-incubating</a></li>
 <li>2011-01-21 Second release of the OpenCMIS Java client and server, <a href="opencmis.html#OpenCMIS-0.2.0FullDownloadpage">OpenCMIS
0.2.0-incubating</a></li>
-<li>2011-01-18 <a href="dotcmis.html">CMIS.net</a> implementation in .Net
started</li>
+<li>2011-01-18 <a href="dotcmis.html">DotCMIS</a> implementation in .Net
started</li>
 <li>2010-09-17 First release of the OpenCMIS Java client and server, <a href="opencmis.html#OpenCMIS-0.1.0FullDownloadpage">OpenCMIS
0.1.0-incubating</a></li>
 <li>2010-06-08 php-cmis-lib contribution accepted</li>
 <li>2010-02-10 cmislib contribution accepted</li>



Mime
View raw message