Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 454D9200CD6 for ; Mon, 31 Jul 2017 14:53:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 43B1F1652AD; Mon, 31 Jul 2017 12:53:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B6CC01652AB for ; Mon, 31 Jul 2017 14:53:35 +0200 (CEST) Received: (qmail 52535 invoked by uid 500); 31 Jul 2017 12:53:34 -0000 Mailing-List: contact commits-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list commits@chemistry.apache.org Received: (qmail 52523 invoked by uid 99); 31 Jul 2017 12:53:34 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Jul 2017 12:53:34 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 69D063A2655 for ; Mon, 31 Jul 2017 12:53:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1803531 [3/3] - in /chemistry/site/trunk/content/docs/cmis-samples: ./ about/ css/ mkdocs/ samples/access-control/ samples/allowable-actions/ samples/capabilities/ samples/changelog/ samples/content/ samples/create-objects/ samples/create-... Date: Mon, 31 Jul 2017 12:53:29 -0000 To: commits@chemistry.apache.org From: fmui@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170731125332.69D063A2655@svn01-us-west.apache.org> archived-at: Mon, 31 Jul 2017 12:53:37 -0000 Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/changelog/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/changelog/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/changelog/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/changelog/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Retrieving the Change Log - Apache Chemistry Samples @@ -358,4 +358,4 @@ if (events != null && events.get - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/content/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/content/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/content/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/content/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Working with Content - Apache Chemistry Samples @@ -587,4 +587,4 @@ IContentStream cs2 = rendition.GetConten - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/create-objects/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/create-objects/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/create-objects/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/create-objects/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Creating Objects - Apache Chemistry Samples @@ -572,4 +572,4 @@ ObjectId newFolderId = session.createFol - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/create-session/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/create-session/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/create-session/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/create-session/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Creating a Session - Apache Chemistry Samples @@ -512,4 +512,4 @@ ISession session = factory.GetRepositori - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/delete-objects/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/delete-objects/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/delete-objects/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/delete-objects/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Deleting Objects - Apache Chemistry Samples @@ -409,4 +409,4 @@ folder.DeleteTree(true, UnfileObject.Del - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/exceptions/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/exceptions/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/exceptions/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/exceptions/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + CMIS Exceptions - Apache Chemistry Samples @@ -435,4 +435,4 @@ is not allowed for documents of that typ - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/extensions/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/extensions/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/extensions/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/extensions/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Getting Extensions - Apache Chemistry Samples @@ -378,4 +378,4 @@ if (extensions != null) { - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/lists/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/lists/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/lists/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/lists/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Working with Lists, Paging and Skipping - Apache Chemistry Samples @@ -298,6 +298,7 @@

Working with Lists, Paging and Skipping

Iterating over a List

+

The following code snippets iterate over the complete list. Please note, that OpenCMIS and PortCMIS may make multiple calls to the repository.

OpenCMIS (Java)

ItemIterable<Something> somethingList = ...
 
@@ -315,6 +316,11 @@ foreach (Something something in somethin
 

Paging and Skipping

+

Clients can request only an excerpt of a list by defining an offset and/or a page size.

+
+

Note

+

For the best performance adjust the list batch size with an Operation Context.

+

OpenCMIS (Java)

ItemIterable<Something> somethingList = ...
 
@@ -389,4 +395,4 @@ IItemEnumerable<Something> skipAnd
     
 
 
-
\ No newline at end of file
+
\ No newline at end of file

Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/move-objects/index.html
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/move-objects/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff
==============================================================================
--- chemistry/site/trunk/content/docs/cmis-samples/samples/move-objects/index.html (original)
+++ chemistry/site/trunk/content/docs/cmis-samples/samples/move-objects/index.html Mon Jul 31 12:53:29 2017
@@ -23,7 +23,7 @@
     
     
      
-     
+    
     
 
     Moving Object - Apache Chemistry Samples
@@ -399,4 +399,4 @@ doc.RemoveFromFolder(folder);
     
 
 
-
\ No newline at end of file
+
\ No newline at end of file

Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/operation-context/index.html
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/operation-context/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff
==============================================================================
--- chemistry/site/trunk/content/docs/cmis-samples/samples/operation-context/index.html (original)
+++ chemistry/site/trunk/content/docs/cmis-samples/samples/operation-context/index.html Mon Jul 31 12:53:29 2017
@@ -23,7 +23,7 @@
     
     
      
-     
+    
     
 
     Understanding the Operation Context - Apache Chemistry Samples
@@ -306,6 +306,9 @@
             
  • Order By
  • +
  • List Batch Size
  • + +
  • Caching
  • @@ -431,6 +434,22 @@ oc.setOrderBy("cmis:createdBy DESC, oc.OrderBy("cmis:createdBy DESC,cmis:name ASC");
    +

    List Batch Size

    +

    Lists returned by, for instances, getChildren and query are requested by OpenCMIS and PortCMIS in batches. The default batch size is 100. If a folder has 1,000 children, the client will make 10 getChildren calls to the server while looping over the children.

    +
    +

    Optimal Batch Size

    +

    The optimal batch size depends on the use case. For applications that are using paging, the batch size should match the page size for the best performance. For applications that are processing all list items, the batch size should be as big as possible. The batch size maximum depends on the size of the list items (all items are loaded in main memory) and the server.

    +
    +

    OpenCMIS (Java)

    +
    OperationContext oc = ...
    +oc.setMaxItemsPerPage(10000); // 10,000 items per batch
    +
    + +

    PortCMIS (C#)

    +
    IOperationContext oc = ...
    +oc.MaxItemsPerPage = 10000; // 10,000 items per batch
    +
    +

    Caching

    All objects retrieved by getObject and getObjectByPath are cached by default. If caching is turned off by an Operation Context, objects are not looked up in the cache and are not put into the cache. The methods getObject and getObjectByPath make a round-trip to the repository and get up-to-date data.

    See also the section about the object cache.

    @@ -536,4 +555,4 @@ IList<IDocument> versions = doc.Ge - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/properties/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/properties/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/properties/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/properties/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Working with Properties and Secondary Types - Apache Chemistry Samples @@ -390,7 +390,6 @@ BigInteger projectNumber = doc.getProper // multi value property values are always returned as lists List<String> colors = doc.getPropertyValue("project:colors"); - // there is detailed information about a property available for generic clients Property<String> nameProp = doc.getProperty("cmis:name"); PropertyType namePropType = nameProp.getType(); @@ -563,6 +562,19 @@ properties.put("classifictaion" // update cmisObject.updateProperties(properties); + + +

    OpenCMIS (Java)

    +
    // the convenient way...
    +
    +CmisObject cmisObject = ...
    +
    +// set secondary type property
    +Map<String, Object> properties = new HashMap<String, Object>();
    +properties.put("classifictaion", "public");
    +
    +// update with secondary type
    +cmisObject.updateProperties(properties, Collections.singletonList("custom:classifictaion"), null);
     
     
    @@ -609,6 +621,16 @@ properties.put(PropertyIds.SECONDARY_OBJ cmisObject.updateProperties(properties); +

    OpenCMIS (Java)

    +
    // the convenient way...
    +
    +CmisObject cmisObject = ...
    +
    +// remove secondary type
    +cmisObject.updateProperties(null, null, Collections.singletonList("custom:classifictaion"));
    +
    +
    +

    PortCMIS (C#)

    ICmisObject cmisObject = ...
     
    @@ -677,4 +699,4 @@ cmisObject.UpdateProperties(properties);
         
     
     
    -
    \ No newline at end of file
    +
    \ No newline at end of file
    
    Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/queries/index.html
    URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/queries/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff
    ==============================================================================
    --- chemistry/site/trunk/content/docs/cmis-samples/samples/queries/index.html (original)
    +++ chemistry/site/trunk/content/docs/cmis-samples/samples/queries/index.html Mon Jul 31 12:53:29 2017
    @@ -23,7 +23,7 @@
         
         
          
    -     
    +    
         
     
         Executing Queries - Apache Chemistry Samples
    @@ -291,6 +291,9 @@
                 
  • Using a Query Statement
  • +
  • Query Performance
  • + + @@ -315,6 +318,21 @@ for(QueryResult hit: results) { }
    +

    PortCMIS (C#)

    +
    IItemEnumerable<IQueryResult> results = Session.Query("SELECT * FROM cmis:document", false);
    +
    +foreach (IQueryResult hit in results) {
    +    foreach (PropertyData property in hit.Properties) {
    +
    +        string queryName = property.QueryName;
    +        object value = property.FirstValue;
    +
    +        Console.WriteLine(queryName + ": " + value);
    +    }
    +    Console.WriteLine("--------------------------------------");
    +}
    +
    +

    Querying Objects

    OpenCMIS (Java)

    OperationContext oc = ...
    @@ -354,7 +372,17 @@ String statement = qs.toQueryString();
     
     // ... or execute the query directly
     ItemIterable<QueryResult> results = qs.query(false);
    -
    + + +

    Query Performance

    +

    Many aspects influence the query performance. Most of them are related to the server implementation and the server setup. Here are some generic hints how clients can influence the query performance.

    +
      +
    • Only select the properties you really need. A query should never start with SELECT * . Some properties are more expensive than others. For instances, some repositories compile the cmis:path property on demand, which takes longer than returning a normal property such as cmis:name.
    • +
    • Do not order if it isn’t required. Sorting the result set in the application may be faster.
    • +
    • Use an Operation context that disables relationships (IncludeRelationships.NONE), renditions (“cmis:none”), and allowable actions.
    • +
    • If you are using paging, use an Operation Context with a batch size that matches the page size.
    • +
    • If you have to process all query results, use an Operation Context with a big batch size.
    • +
    @@ -404,4 +432,4 @@ ItemIterable<QueryResult> results - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/query-examples/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/query-examples/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/query-examples/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/query-examples/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Query Examples - Apache Chemistry Samples @@ -397,4 +397,4 @@ WHERE cmis:rm_destructionDate = TIMESTA - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/retention/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/retention/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/retention/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/retention/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Retention and Holds - Apache Chemistry Samples @@ -353,4 +353,4 @@ - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/retrieve-objects/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/retrieve-objects/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/retrieve-objects/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/retrieve-objects/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Retrieving Objects - Apache Chemistry Samples @@ -509,4 +509,4 @@ ICmisObject cmisObject = Session.GetObje - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/types/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/types/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/types/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/types/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Working with Types - Apache Chemistry Samples @@ -457,4 +457,4 @@ IObjectType updatedType = session.Update - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/update-objects/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/update-objects/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/update-objects/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/update-objects/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Updating Objects - Apache Chemistry Samples @@ -424,4 +424,4 @@ List<BulkUpdateObjectIdAndChangeToken - \ No newline at end of file + \ No newline at end of file Modified: chemistry/site/trunk/content/docs/cmis-samples/samples/versions/index.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/samples/versions/index.html?rev=1803531&r1=1803530&r2=1803531&view=diff ============================================================================== --- chemistry/site/trunk/content/docs/cmis-samples/samples/versions/index.html (original) +++ chemistry/site/trunk/content/docs/cmis-samples/samples/versions/index.html Mon Jul 31 12:53:29 2017 @@ -23,7 +23,7 @@ - + Working with Versions - Apache Chemistry Samples @@ -325,6 +325,7 @@ bool isVersionable = documentType.Versio

    The code snippets below show how to retrieve the version history of a document. The returned list is ordered by creation date (cmis:creationDate). The newest version is on the top of the list, the first version on the bottom. If the version series is checked-out, a PWC exists and the user is allowed to see the PWC, then this PWC is the first entry in the list.

    +

    Use an Operation Context to define which details of the version objects should be returned. getAllVersions does not support paging. Only the complete version history can be requested.

    OpenCMIS (Java)

    Document document = ...
     
    @@ -490,4 +491,4 @@ IObjectId newVersionId = pwc.CheckIn(tru
         
     
     
    -
    \ No newline at end of file
    +
    \ No newline at end of file
    
    Modified: chemistry/site/trunk/content/docs/cmis-samples/sitemap.xml
    URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/docs/cmis-samples/sitemap.xml?rev=1803531&r1=1803530&r2=1803531&view=diff
    ==============================================================================
    --- chemistry/site/trunk/content/docs/cmis-samples/sitemap.xml (original)
    +++ chemistry/site/trunk/content/docs/cmis-samples/sitemap.xml Mon Jul 31 12:53:29 2017
    @@ -4,7 +4,7 @@
         
         
          /index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
         
    @@ -13,25 +13,25 @@
             
         
          /samples/create-session/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/capabilities/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/types/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/exceptions/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
    @@ -41,67 +41,67 @@
             
         
          /samples/retrieve-objects/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/create-objects/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/update-objects/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/move-objects/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/delete-objects/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/content/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/versions/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/properties/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/operation-context/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/lists/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/extensions/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
    @@ -111,19 +111,19 @@
             
         
          /samples/queries/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/query-examples/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/changelog/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
    @@ -133,19 +133,19 @@
             
         
          /samples/allowable-actions/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/access-control/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
         
          /samples/retention/index.html
    -     2016-12-02
    +     2017-07-31
          daily
         
             
    @@ -154,7 +154,7 @@
         
         
          /about/index.html
    -     2016-12-02
    +     2017-07-31
          daily