You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by bu...@apache.org on 2016/06/24 10:34:45 UTC

svn commit: r991308 [7/14] - in /websites/staging/chemistry/trunk/content: ./ docs/ docs/cmis-samples/ docs/cmis-samples/about/ docs/cmis-samples/css/ docs/cmis-samples/fonts/ docs/cmis-samples/img/ docs/cmis-samples/js/ docs/cmis-samples/mkdocs/ docs/...

Added: websites/staging/chemistry/trunk/content/docs/cmis-samples/mkdocs/search_index.json
==============================================================================
--- websites/staging/chemistry/trunk/content/docs/cmis-samples/mkdocs/search_index.json (added)
+++ websites/staging/chemistry/trunk/content/docs/cmis-samples/mkdocs/search_index.json Fri Jun 24 10:34:43 2016
@@ -0,0 +1,749 @@
+{
+    "docs": [
+        {
+            "location": "/index.html", 
+            "text": "Apache Chemistry CMIS Code Samples\n\n\n\n\n\n\nCMIS (Content Management Interoperability Services)\n is an OASIS standard enabling information sharing between different Content Management Systems.\n\n\n\n\n\n\n\nThis is a collection of code samples for \n\n\n\n\n\n\nApache Chemistry OpenCMIS\n - a CMIS library for Java\n\n\nApache Chemistry PortCMIS\n - a CMIS library for.Net\n\n\n\n\n\n\nUnder Development\n\n\nThis sample collection is under development. Some areas are only sparely covered or not covered at all, yet.\nAlso some code samples lack a meaningful description. If you want help, please see the \nabout page\n.\n\n\n\n\n\n\nApache Chemistry\n\n\nApache Chemistry\n provides open source client and server implementations of \nCMIS 1.0\n and \nCMIS 1.1\n for multiple programming languages (Java, .Net, Python, PHP, Objective-C, JavaScript, \n).  \n\n\n\n\nDo you want to know more about CMIS and Apache Chemistry?\n\n\n\n\nThe book \nCMIS and Apache Chemistry
  in Action\n is a comprehensive guide to the CMIS standard and related ECM concepts. In it, you\nll tackle hands-on examples for building applications on CMIS repositories from both the client and the server sides. You\nll find working examples using the Apache Chemistry APIs for Java, Python, C#, Objective-C, and PHP, but you can use the techniques you\nll learn in this book to work with CMIS repositories using any language that can speak HTTP - including JavaScript.\n\n\n\n\n\n\n\nOpenCMIS\n\n\nOpenCMIS\n is a CMIS client library and a CMIS server framework for Java. It also provides developer tools such as the \nCMIS Workbench\n and the \nInMemory Repository\n. OpenCMIS runs on servers, desktops, and Android.\n\n\nThe code samples in this documentation cover the OpenCMIS client API. If you want to build a CMIS server with OpenCMIS, refer to the \nOpenCMIS Server Development Guide\n.\n\n\nTo get started with OpenCMIS, download the \nOpenCMIS client libraries\n or use Maven or Grad
 le to get the client libraries.\n\n\nMaven\n\n\nReplace \n[OpenCMIS version]\n with the latest version number, e.g. \n0.14.0\n.\n\n\ndependency\n\n    \ngroupId\norg.apache.chemistry.opencmis\n/groupId\n\n    \nartifactId\nchemistry-opencmis-client-impl\n/artifactId\n\n    \nversion\n[OpenCMIS version]\n/version\n\n\n/dependency\n\n\n\n\n\nFor Android:\n\n\ndependency\n\n    \ngroupId\norg.apache.chemistry.opencmis\n/groupId\n\n    \nartifactId\nchemistry-opencmis-android-client\n/artifactId\n\n    \nversion\n[OpenCMIS version]\n/version\n\n\n/dependency\n\n\n\n\n\nGradle\n\n\nReplace \n[OpenCMIS version]\n with the latest version number, e.g. \n0.14.0\n.\n\n\ncompile group: 'org.apache.chemistry.opencmis', name: 'chemistry-opencmis-client-impl', version: '[OpenCMIS version]'\n\n\n\n\nFor Android:\n\n\ncompile group: 'org.apache.chemistry.opencmis', name: 'chemistry-opencmis-android-client', version: '[OpenCMIS version]'\n\n\n\n\nPortCMIS\n\n\nPortCMIS\n is a CMIS client library for
  .Net. It is a Portable Class Library that runs on servers, desktops, and Windows Mobile.\n\n\nTo get started with PortCMIS, download the \nPortCMIS client binaries\n. You have the choice of either plain DLLs or NUPGK packages. It is also availabe on \nnuget\n:\n\n\nPM\n Install-Package PortCMIS \n\n\n\n\nDotCMIS\n\n\nDotCMIS\n is the predecessor of \nPortCMIS\n.\nThe APIs are very similar and most of the PortCMIS samples should also work with DotCMIS.\n\n\nThe high-level differences between DotCMIS and PortCMIS are described on \nthis page\n.\nFor new projects it is recommend to use PortCMIS.", 
+            "title": "Home"
+        }, 
+        {
+            "location": "/index.html#apache-chemistry-cmis-code-samples", 
+            "text": "CMIS (Content Management Interoperability Services)  is an OASIS standard enabling information sharing between different Content Management Systems.    This is a collection of code samples for     Apache Chemistry OpenCMIS  - a CMIS library for Java  Apache Chemistry PortCMIS  - a CMIS library for.Net    Under Development  This sample collection is under development. Some areas are only sparely covered or not covered at all, yet.\nAlso some code samples lack a meaningful description. If you want help, please see the  about page .", 
+            "title": "Apache Chemistry CMIS Code Samples"
+        }, 
+        {
+            "location": "/index.html#apache-chemistry", 
+            "text": "Apache Chemistry  provides open source client and server implementations of  CMIS 1.0  and  CMIS 1.1  for multiple programming languages (Java, .Net, Python, PHP, Objective-C, JavaScript,  ).     Do you want to know more about CMIS and Apache Chemistry?   The book  CMIS and Apache Chemistry in Action  is a comprehensive guide to the CMIS standard and related ECM concepts. In it, you ll tackle hands-on examples for building applications on CMIS repositories from both the client and the server sides. You ll find working examples using the Apache Chemistry APIs for Java, Python, C#, Objective-C, and PHP, but you can use the techniques you ll learn in this book to work with CMIS repositories using any language that can speak HTTP - including JavaScript.", 
+            "title": "Apache Chemistry™"
+        }, 
+        {
+            "location": "/index.html#opencmis", 
+            "text": "OpenCMIS  is a CMIS client library and a CMIS server framework for Java. It also provides developer tools such as the  CMIS Workbench  and the  InMemory Repository . OpenCMIS runs on servers, desktops, and Android.  The code samples in this documentation cover the OpenCMIS client API. If you want to build a CMIS server with OpenCMIS, refer to the  OpenCMIS Server Development Guide .  To get started with OpenCMIS, download the  OpenCMIS client libraries  or use Maven or Gradle to get the client libraries.", 
+            "title": "OpenCMIS"
+        }, 
+        {
+            "location": "/index.html#maven", 
+            "text": "Replace  [OpenCMIS version]  with the latest version number, e.g.  0.14.0 .  dependency \n     groupId org.apache.chemistry.opencmis /groupId \n     artifactId chemistry-opencmis-client-impl /artifactId \n     version [OpenCMIS version] /version  /dependency   For Android:  dependency \n     groupId org.apache.chemistry.opencmis /groupId \n     artifactId chemistry-opencmis-android-client /artifactId \n     version [OpenCMIS version] /version  /dependency", 
+            "title": "Maven"
+        }, 
+        {
+            "location": "/index.html#gradle", 
+            "text": "Replace  [OpenCMIS version]  with the latest version number, e.g.  0.14.0 .  compile group: 'org.apache.chemistry.opencmis', name: 'chemistry-opencmis-client-impl', version: '[OpenCMIS version]'  For Android:  compile group: 'org.apache.chemistry.opencmis', name: 'chemistry-opencmis-android-client', version: '[OpenCMIS version]'", 
+            "title": "Gradle"
+        }, 
+        {
+            "location": "/index.html#portcmis", 
+            "text": "PortCMIS  is a CMIS client library for .Net. It is a Portable Class Library that runs on servers, desktops, and Windows Mobile.  To get started with PortCMIS, download the  PortCMIS client binaries . You have the choice of either plain DLLs or NUPGK packages. It is also availabe on  nuget :  PM  Install-Package PortCMIS", 
+            "title": "PortCMIS"
+        }, 
+        {
+            "location": "/index.html#dotcmis", 
+            "text": "DotCMIS  is the predecessor of  PortCMIS .\nThe APIs are very similar and most of the PortCMIS samples should also work with DotCMIS.  The high-level differences between DotCMIS and PortCMIS are described on  this page .\nFor new projects it is recommend to use PortCMIS.", 
+            "title": "DotCMIS"
+        }, 
+        {
+            "location": "/samples/create-session/index.html", 
+            "text": "Creating a Session\n\n\nA session is the entry point to the content repository. Creating a session is the first thing an application has to do to interact with the repository.\n\n\nA few details such as the URL of the repository endpoint, the user name and the user\ns credentials are necessary to establish a session.\nBeyond that more details might be required, depending on the repository and the environment. Those details are controlled by session parameters.\n\n\nA complete list of all session parameters for OpenCMIS can be found in the JavaDoc. For PortCMIS, please refer to the help file that is contained in the binary packages.\n\n\n\n\nWhich binding should I use?\n\n\nThe \nBrowser Binding\n is the fastest binding and is recommended for \nCMIS 1.1\n repositories.\n\nChoose the \nAtomPub Binding\n for \nCMIS 1.0\n repositories.\n\nThe Web Services Binding is the last resort and should be avoided. It is the slowest binding and is the most complex to set up.\n
 \n\n\n\nAtomPub Binding\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nOpenCMIS (Java)\n\n\n// default factory implementation\nSessionFactory factory = SessionFactoryImpl.newInstance();\nMap\nString, String\n parameters = new HashMap\nString, String\n();\n\n// user credentials\nparameters.put(SessionParameter.USER, \nOtto\n);\nparameters.put(SessionParameter.PASSWORD, \n****\n);\n\n// connection settings\nparameters.put(SessionParameter.ATOMPUB_URL, \nhttp://\nhost\n:\nport\n/cmis/atom\n);\nparameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());\nparameters.put(SessionParameter.REPOSITORY_ID, \nmyRepository\n);\n\n// create session\nSession session = factory.createSession(parameters);\n\n\n\n\nPortCMIS (C#)\n\n\n// default factory implementation\nSessionFactory factory = SessionFactory.NewInstance();\nDictionary\nstring, string\n parameters = new Dictionary\nstring, string\n();\n\n// user credentials\nparameters[SessionParameter.User] = \nOtto\n;\nparameters[SessionParameter.P
 assword] = \n****\n;\n\n// connection settings\nparameters[SessionParameter.AtomPubUrl] = \nhttp://\nhost\n:\nport\n/cmis/atom\n;\nparameters[SessionParameter.BindingType] = BindingType.AtomPub;\nparameters[SessionParameter.RepositoryId] = \nmyRepository\n;\n\n// create session\nISession session = factory.CreateSession(parameters);\n\n\n\n\nBrowser Binding\n\n\nCMIS 1.1\n\n\nOpenCMIS (Java)\n\n\n// default factory implementation\nSessionFactory factory = SessionFactoryImpl.newInstance();\nMap\nString, String\n parameters = new HashMap\nString, String\n();\n\n// user credentials\nparameters.put(SessionParameter.USER, \nOtto\n);\nparameters.put(SessionParameter.PASSWORD, \n****\n);\n\n// connection settings\nparameters.put(SessionParameter.BROWSER_URL, \nhttp://\nhost\n:\nport\n/cmis/browser\n);\nparameters.put(SessionParameter.BINDING_TYPE, BindingType.BROWSER.value());\nparameters.put(SessionParameter.REPOSITORY_ID, \nmyRepository\n);\n\n// create session\nSession session = factory.
 createSession(parameters);\n\n\n\n\nPortCMIS (C#)\n\n\n// default factory implementation\nSessionFactory factory = SessionFactory.NewInstance();\nDictionary\nstring, string\n parameters = new Dictionary\nstring, string\n();\n\n// user credentials\nparameters[SessionParameter.User] = \nOtto\n;\nparameters[SessionParameter.Password] = \n****\n;\n\n// connection settings\nparameters[SessionParameter.BrowserUrl] = \nhttp://\nhost\n:\nport\n/cmis/browser\n;\nparameters[SessionParameter.BindingType] = BindingType.Browser;\nparameters[SessionParameter.RepositoryId] = \nmyRepository\n;\n\n// create session\nISession session = factory.CreateSession(parameters);\n\n\n\n\nWeb Services Binding\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nPortCMIS does not support the Web Service binding.\n\n\nOpenCMIS (Java)\n\n\n// default factory implementation\nSessionFactory factory = SessionFactoryImpl.newInstance();\nMap\nString, String\n parameters = new HashMap\nString, String\n();\n\n// user credentials\nparameter
 s.put(SessionParameter.USER, \nOtto\n);\nparameters.put(SessionParameter.PASSWORD, \n****\n);\n\n// connection settings\nparameters.put(SessionParameter.BINDING_TYPE, BindingType.WEBSERVICES.value());\nparameters.put(SessionParameter.WEBSERVICES_ACL_SERVICE, \nhttp://\nhost\n:\nport\n/cmis/services/ACLService?wsdl\n);\nparameters.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, \nhttp://\nhost\n:\nport\n/cmis/services/DiscoveryService?wsdl\n);\nparameters.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, \nhttp://\nhost\n:\nport\n/cmis/services/MultiFilingService?wsdl\n);\nparameters.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, \nhttp://\nhost\n:\nport\n/cmis/services/NavigationService?wsdl\n);\nparameters.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, \nhttp://\nhost\n:\nport\n/cmis/services/ObjectService?wsdl\n);\nparameters.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, \nhttp://\nhost\n:\nport\n/cmis/services/PolicyService?wsdl\n);\nparameters.put(SessionParam
 eter.WEBSERVICES_RELATIONSHIP_SERVICE, \nhttp://\nhost\n:\nport\n/cmis/services/RelationshipService?wsdl\n);\nparameters.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, \nhttp://\nhost\n:\nport\n/cmis/services/RepositoryService?wsdl\n);\nparameters.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, \nhttp://\nhost\n:\nport\n/cmis/services/VersioningService?wsdl\n);\nparameters.put(SessionParameter.REPOSITORY_ID, \nmyRepository\n);\n\n// create session\nSession session = factory.createSession(parameters);\n\n\n\n\nLocal Binding\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nThe local binding is specific to OpenCMIS. It lets an OpenCMIS client connect to an OpenCMIS server in the same JVM.\nThere is no PortCMIS equivalent.\n\n\nOpenCMIS (Java)\n\n\n// default factory implementation\nSessionFactory factory = SessionFactoryImpl.newInstance();\nMap\nString, String\n parameters = new HashMap\nString, String\n();\n\n// user credentials\nparameters.put(SessionParameter.USER, \nOtto\n);\nparameters
 .put(SessionParameter.PASSWORD, \n****\n);\n\n// connection settings\nparameters.put(SessionParameter.BINDING_TYPE, BindingType.LOCAL.value());\nparameters.put(SessionParameter.LOCAL_FACTORY, \nmy.local.factory\n);\nparameters.put(SessionParameter.REPOSITORY_ID, \nmyRepository\n);\n\n// create session\nSession session = factory.createSession(parameters);\n\n\n\n\nConnecting to the First Repository\n\n\nSome CMIS endpoints only provide one repository. In this case it is not necessary to provide its repository ID.\nThe following code snippet gets the list of all available repositories and connects to the first one.\n\n\nOpenCMIS (Java)\n\n\nSessionFactory factory = SessionFactoryImpl.newInstance();\nList\nRepository\n repositories = factory.getRepositories(parameters);\nSession session = repositories.get(0).createSession();\n\n\n\n\nPortCMIS (C#)\n\n\nSessionFactory factory = SessionFactory.NewInstance();\nISession session = factory.GetRepositories(parameters)[0].CreateSession();", 
+            "title": "Creating a Session"
+        }, 
+        {
+            "location": "/samples/create-session/index.html#creating-a-session", 
+            "text": "A session is the entry point to the content repository. Creating a session is the first thing an application has to do to interact with the repository.  A few details such as the URL of the repository endpoint, the user name and the user s credentials are necessary to establish a session.\nBeyond that more details might be required, depending on the repository and the environment. Those details are controlled by session parameters.  A complete list of all session parameters for OpenCMIS can be found in the JavaDoc. For PortCMIS, please refer to the help file that is contained in the binary packages.   Which binding should I use?  The  Browser Binding  is the fastest binding and is recommended for  CMIS 1.1  repositories. \nChoose the  AtomPub Binding  for  CMIS 1.0  repositories. \nThe Web Services Binding is the last resort and should be avoided. It is the slowest binding and is the most complex to set up.", 
+            "title": "Creating a Session"
+        }, 
+        {
+            "location": "/samples/create-session/index.html#atompub-binding", 
+            "text": "CMIS 1.0  CMIS 1.1  OpenCMIS (Java)  // default factory implementation\nSessionFactory factory = SessionFactoryImpl.newInstance();\nMap String, String  parameters = new HashMap String, String ();\n\n// user credentials\nparameters.put(SessionParameter.USER,  Otto );\nparameters.put(SessionParameter.PASSWORD,  **** );\n\n// connection settings\nparameters.put(SessionParameter.ATOMPUB_URL,  http:// host : port /cmis/atom );\nparameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());\nparameters.put(SessionParameter.REPOSITORY_ID,  myRepository );\n\n// create session\nSession session = factory.createSession(parameters);  PortCMIS (C#)  // default factory implementation\nSessionFactory factory = SessionFactory.NewInstance();\nDictionary string, string  parameters = new Dictionary string, string ();\n\n// user credentials\nparameters[SessionParameter.User] =  Otto ;\nparameters[SessionParameter.Password] =  **** ;\n\n// connection settings\nparamete
 rs[SessionParameter.AtomPubUrl] =  http:// host : port /cmis/atom ;\nparameters[SessionParameter.BindingType] = BindingType.AtomPub;\nparameters[SessionParameter.RepositoryId] =  myRepository ;\n\n// create session\nISession session = factory.CreateSession(parameters);", 
+            "title": "AtomPub Binding"
+        }, 
+        {
+            "location": "/samples/create-session/index.html#browser-binding", 
+            "text": "CMIS 1.1  OpenCMIS (Java)  // default factory implementation\nSessionFactory factory = SessionFactoryImpl.newInstance();\nMap String, String  parameters = new HashMap String, String ();\n\n// user credentials\nparameters.put(SessionParameter.USER,  Otto );\nparameters.put(SessionParameter.PASSWORD,  **** );\n\n// connection settings\nparameters.put(SessionParameter.BROWSER_URL,  http:// host : port /cmis/browser );\nparameters.put(SessionParameter.BINDING_TYPE, BindingType.BROWSER.value());\nparameters.put(SessionParameter.REPOSITORY_ID,  myRepository );\n\n// create session\nSession session = factory.createSession(parameters);  PortCMIS (C#)  // default factory implementation\nSessionFactory factory = SessionFactory.NewInstance();\nDictionary string, string  parameters = new Dictionary string, string ();\n\n// user credentials\nparameters[SessionParameter.User] =  Otto ;\nparameters[SessionParameter.Password] =  **** ;\n\n// connection settings\nparameters[Sess
 ionParameter.BrowserUrl] =  http:// host : port /cmis/browser ;\nparameters[SessionParameter.BindingType] = BindingType.Browser;\nparameters[SessionParameter.RepositoryId] =  myRepository ;\n\n// create session\nISession session = factory.CreateSession(parameters);", 
+            "title": "Browser Binding"
+        }, 
+        {
+            "location": "/samples/create-session/index.html#web-services-binding", 
+            "text": "CMIS 1.0  CMIS 1.1  PortCMIS does not support the Web Service binding.  OpenCMIS (Java)  // default factory implementation\nSessionFactory factory = SessionFactoryImpl.newInstance();\nMap String, String  parameters = new HashMap String, String ();\n\n// user credentials\nparameters.put(SessionParameter.USER,  Otto );\nparameters.put(SessionParameter.PASSWORD,  **** );\n\n// connection settings\nparameters.put(SessionParameter.BINDING_TYPE, BindingType.WEBSERVICES.value());\nparameters.put(SessionParameter.WEBSERVICES_ACL_SERVICE,  http:// host : port /cmis/services/ACLService?wsdl );\nparameters.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE,  http:// host : port /cmis/services/DiscoveryService?wsdl );\nparameters.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE,  http:// host : port /cmis/services/MultiFilingService?wsdl );\nparameters.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE,  http:// host : port /cmis/services/NavigationService?wsdl );\npar
 ameters.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE,  http:// host : port /cmis/services/ObjectService?wsdl );\nparameters.put(SessionParameter.WEBSERVICES_POLICY_SERVICE,  http:// host : port /cmis/services/PolicyService?wsdl );\nparameters.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE,  http:// host : port /cmis/services/RelationshipService?wsdl );\nparameters.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE,  http:// host : port /cmis/services/RepositoryService?wsdl );\nparameters.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE,  http:// host : port /cmis/services/VersioningService?wsdl );\nparameters.put(SessionParameter.REPOSITORY_ID,  myRepository );\n\n// create session\nSession session = factory.createSession(parameters);", 
+            "title": "Web Services Binding"
+        }, 
+        {
+            "location": "/samples/create-session/index.html#local-binding", 
+            "text": "CMIS 1.0  CMIS 1.1  The local binding is specific to OpenCMIS. It lets an OpenCMIS client connect to an OpenCMIS server in the same JVM.\nThere is no PortCMIS equivalent.  OpenCMIS (Java)  // default factory implementation\nSessionFactory factory = SessionFactoryImpl.newInstance();\nMap String, String  parameters = new HashMap String, String ();\n\n// user credentials\nparameters.put(SessionParameter.USER,  Otto );\nparameters.put(SessionParameter.PASSWORD,  **** );\n\n// connection settings\nparameters.put(SessionParameter.BINDING_TYPE, BindingType.LOCAL.value());\nparameters.put(SessionParameter.LOCAL_FACTORY,  my.local.factory );\nparameters.put(SessionParameter.REPOSITORY_ID,  myRepository );\n\n// create session\nSession session = factory.createSession(parameters);", 
+            "title": "Local Binding"
+        }, 
+        {
+            "location": "/samples/create-session/index.html#connecting-to-the-first-repository", 
+            "text": "Some CMIS endpoints only provide one repository. In this case it is not necessary to provide its repository ID.\nThe following code snippet gets the list of all available repositories and connects to the first one.  OpenCMIS (Java)  SessionFactory factory = SessionFactoryImpl.newInstance();\nList Repository  repositories = factory.getRepositories(parameters);\nSession session = repositories.get(0).createSession();  PortCMIS (C#)  SessionFactory factory = SessionFactory.NewInstance();\nISession session = factory.GetRepositories(parameters)[0].CreateSession();", 
+            "title": "Connecting to the First Repository"
+        }, 
+        {
+            "location": "/samples/capabilities/index.html", 
+            "text": "Getting Repository Capabilities\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nSpec 2.1.1.1\n\n\nQuery Capability\n\n\nCheck whether the repository supports queries or not.\n\n\nOpenCMIS (Java)\n\n\nRepositoryInfo info = session.getRepositoryInfo();\n\nCapabilityQuery capabilityQuery = info.getCapabilities().getQueryCapability(); \nboolean supportsQuery = capabilityQuery != null \n capabilityQuery != CapabilityQuery.NONE;\n\n\n\n\nACL Capability\n\n\nCheck whether the repository supports ACLs or not.\n\n\nOpenCMIS (Java)\n\n\nRepositoryInfo info = session.getRepositoryInfo();\n\nCapabilityAcl capabilityAcl = info.getCapabilities().getAclCapability();\nboolean supportsAcls = capabilityAcl != null \n capabilityAcl != CapabilityAcl.NONE;\nboolean manageAcls = capabilityAcl == CapabilityAcl.MANAGE; // supports applyACL()\n\n\n\n\nMulti-Filing Capability\n\n\nCheck whether the repository supports multi-filing or not.\n\n\nOpenCMIS (Java)\n\n\nRepositoryInfo info = session.getRepos
 itoryInfo();\n\nboolean supportsMultiFiling = Boolean.TRUE.equals(info.getCapabilities().isMultifilingSupported());\n\n\n\n\nUnfiling Capability\n\n\nCheck whether the repository supports unfiling or not.\n\n\nOpenCMIS (Java)\n\n\nRepositoryInfo info = session.getRepositoryInfo();\n\nboolean supportsUnfiling = Boolean.TRUE.equals(info.getCapabilities().isUnfilingSupported());", 
+            "title": "Getting Repository Capabilities"
+        }, 
+        {
+            "location": "/samples/capabilities/index.html#getting-repository-capabilities", 
+            "text": "CMIS 1.0  CMIS 1.1  Spec 2.1.1.1", 
+            "title": "Getting Repository Capabilities"
+        }, 
+        {
+            "location": "/samples/capabilities/index.html#query-capability", 
+            "text": "Check whether the repository supports queries or not.  OpenCMIS (Java)  RepositoryInfo info = session.getRepositoryInfo();\n\nCapabilityQuery capabilityQuery = info.getCapabilities().getQueryCapability(); \nboolean supportsQuery = capabilityQuery != null   capabilityQuery != CapabilityQuery.NONE;", 
+            "title": "Query Capability"
+        }, 
+        {
+            "location": "/samples/capabilities/index.html#acl-capability", 
+            "text": "Check whether the repository supports ACLs or not.  OpenCMIS (Java)  RepositoryInfo info = session.getRepositoryInfo();\n\nCapabilityAcl capabilityAcl = info.getCapabilities().getAclCapability();\nboolean supportsAcls = capabilityAcl != null   capabilityAcl != CapabilityAcl.NONE;\nboolean manageAcls = capabilityAcl == CapabilityAcl.MANAGE; // supports applyACL()", 
+            "title": "ACL Capability"
+        }, 
+        {
+            "location": "/samples/capabilities/index.html#multi-filing-capability", 
+            "text": "Check whether the repository supports multi-filing or not.  OpenCMIS (Java)  RepositoryInfo info = session.getRepositoryInfo();\n\nboolean supportsMultiFiling = Boolean.TRUE.equals(info.getCapabilities().isMultifilingSupported());", 
+            "title": "Multi-Filing Capability"
+        }, 
+        {
+            "location": "/samples/capabilities/index.html#unfiling-capability", 
+            "text": "Check whether the repository supports unfiling or not.  OpenCMIS (Java)  RepositoryInfo info = session.getRepositoryInfo();\n\nboolean supportsUnfiling = Boolean.TRUE.equals(info.getCapabilities().isUnfilingSupported());", 
+            "title": "Unfiling Capability"
+        }, 
+        {
+            "location": "/samples/types/index.html", 
+            "text": "Working with Types\n\n\nGetting Type Definitions\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nSpec 2.1.3\n\n\nGetting a Specific Type Definition\n\n\nOpenCMIS (Java)\n\n\nObjectType type = session.getTypeDefinition(\ncmis:document\n);\n\nif (type instanceof DocumentType) {\n    DocumentType docType = (DocumentType) type;\n    boolean isVersionable = docType.isVersionable();\n} else if (type instanceof RelationshipType) {\n    RelationshipType relType = (RelationshipType) type;\n} else {\n    ...\n}\n\n\n\n\nPortCMIS (C#)\n\n\nIObjectType type = session.GetTypeDefinition(\ncmis:document\n);\n\nif (type is IDocumentType) {\n    IDocumentType docType = type as IDocumentType;\n    bool isVersionable = docType.Versionable;\n} else if (type is IRelationshipType) {\n    IRelationshipType relType = type as IRelationshipType;\n} else {\n    ...\n}\n\n\n\n\nChecking whether a Specific Type Definition Exists\n\n\nOpenCMIS (Java)\n\n\nboolean typeExists = true;\n\ntry {\n    session.ge
 tTypeDefinition(\nmy:Type\n);\n}\ncatch (CmisObjectNotFoundException e) {\n    typeExists = false;\n}\n\n\n\n\nPortCMIS (C#)\n\n\nbool typeExists = true;\n\ntry {\n    session.GetTypeDefinition(\nmy:Type\n);\n}\ncatch (CmisObjectNotFoundException) {\n    typeExists = false;\n}\n\n\n\n\nBrowsing Type Definitions\n\n\nCreating, Updating, and Deleting Types\n\n\nCMIS 1.1\n\n\nSpec 2.1.10\n\n\n\n\nReading and Writing Type Definitions\n\n\nThe class \nTypeUtils\n in OpenCMIS provides methods to read and write\ntype defintions from XML and JSON. It also offers methods to check whether\na type defintion is valid and complete.\n\n\n\n\nCreating a Type\n\n\nOpenCMIS (Java)\n\n\nTypeDefinition typeDef = ...\n\nObjectType createdType = session.createType(typeDef);\n\n\n\n\nPortCMIS (C#)\n\n\nITypeDefinition typeDef = ...\n\nIObjectType createdType = session.CreateType(typeDef);\n\n\n\n\nUpdating a Type\n\n\nOpenCMIS (Java)\n\n\nTypeDefinition typeDef = ...\n\nObjectType updatedType = session.u
 pdateType(typeDef);\n\n\n\n\nPortCMIS (C#)\n\n\nITypeDefinition typeDef = ...\n\nIObjectType updatedType = session.UpdateType(typeDef);\n\n\n\n\nDeleting a Type\n\n\nA type can only be deleted if no object of that type exists in the repository.\n\n\nOpenCMIS (Java)\n\n\nsession.deleteType(\nmy:uselessType\n);\n\n\n\n\nPortCMIS (C#)\n\n\nsession.DeleteType(\nmy:uselessType\n);", 
+            "title": "Working with Types"
+        }, 
+        {
+            "location": "/samples/types/index.html#working-with-types", 
+            "text": "", 
+            "title": "Working with Types"
+        }, 
+        {
+            "location": "/samples/types/index.html#getting-type-definitions", 
+            "text": "CMIS 1.0  CMIS 1.1  Spec 2.1.3", 
+            "title": "Getting Type Definitions"
+        }, 
+        {
+            "location": "/samples/types/index.html#getting-a-specific-type-definition", 
+            "text": "OpenCMIS (Java)  ObjectType type = session.getTypeDefinition( cmis:document );\n\nif (type instanceof DocumentType) {\n    DocumentType docType = (DocumentType) type;\n    boolean isVersionable = docType.isVersionable();\n} else if (type instanceof RelationshipType) {\n    RelationshipType relType = (RelationshipType) type;\n} else {\n    ...\n}  PortCMIS (C#)  IObjectType type = session.GetTypeDefinition( cmis:document );\n\nif (type is IDocumentType) {\n    IDocumentType docType = type as IDocumentType;\n    bool isVersionable = docType.Versionable;\n} else if (type is IRelationshipType) {\n    IRelationshipType relType = type as IRelationshipType;\n} else {\n    ...\n}", 
+            "title": "Getting a Specific Type Definition"
+        }, 
+        {
+            "location": "/samples/types/index.html#checking-whether-a-specific-type-definition-exists", 
+            "text": "OpenCMIS (Java)  boolean typeExists = true;\n\ntry {\n    session.getTypeDefinition( my:Type );\n}\ncatch (CmisObjectNotFoundException e) {\n    typeExists = false;\n}  PortCMIS (C#)  bool typeExists = true;\n\ntry {\n    session.GetTypeDefinition( my:Type );\n}\ncatch (CmisObjectNotFoundException) {\n    typeExists = false;\n}", 
+            "title": "Checking whether a Specific Type Definition Exists"
+        }, 
+        {
+            "location": "/samples/types/index.html#browsing-type-definitions", 
+            "text": "", 
+            "title": "Browsing Type Definitions"
+        }, 
+        {
+            "location": "/samples/types/index.html#creating-updating-and-deleting-types", 
+            "text": "CMIS 1.1  Spec 2.1.10   Reading and Writing Type Definitions  The class  TypeUtils  in OpenCMIS provides methods to read and write\ntype defintions from XML and JSON. It also offers methods to check whether\na type defintion is valid and complete.", 
+            "title": "Creating, Updating, and Deleting Types"
+        }, 
+        {
+            "location": "/samples/types/index.html#creating-a-type", 
+            "text": "OpenCMIS (Java)  TypeDefinition typeDef = ...\n\nObjectType createdType = session.createType(typeDef);  PortCMIS (C#)  ITypeDefinition typeDef = ...\n\nIObjectType createdType = session.CreateType(typeDef);", 
+            "title": "Creating a Type"
+        }, 
+        {
+            "location": "/samples/types/index.html#updating-a-type", 
+            "text": "OpenCMIS (Java)  TypeDefinition typeDef = ...\n\nObjectType updatedType = session.updateType(typeDef);  PortCMIS (C#)  ITypeDefinition typeDef = ...\n\nIObjectType updatedType = session.UpdateType(typeDef);", 
+            "title": "Updating a Type"
+        }, 
+        {
+            "location": "/samples/types/index.html#deleting-a-type", 
+            "text": "A type can only be deleted if no object of that type exists in the repository.  OpenCMIS (Java)  session.deleteType( my:uselessType );  PortCMIS (C#)  session.DeleteType( my:uselessType );", 
+            "title": "Deleting a Type"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html", 
+            "text": "Exceptions\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nSpec 2.2.1.4\n\n\nExceptions are divided into three groups: general exceptions, specific exceptions, and implementation exceptions.\n\nGeneral exceptions and specific exceptions are defined in the CMIS specification.\nImplementation exceptions are exceptions introduced by OpenCMIS and PortCMIS. Those exceptions handle connection and authentication problems.\n\n\nGeneral Exceptions\n\n\nGeneral exceptions may be returned by a repository in response to any CMIS service method call.\n\n\ninvalidArgument\n\n\nOne or more of the input parameters is missing or invalid.\n\n\nnotSupported\n\n\nThe CMIS operation is not supported by the repository.\n\n\nobjectNotFound\n\n\nThe object, or object type, or repository does not exist or the current user has no permission to see it.\n\n\npermissionDenied\n\n\nThe user does not have sufficient permissions to perform the operation.\n\n\nruntime\n\n\nAny other cause not expressible by a
 nother CMIS exception.\n\n\nSpecific Exceptions\n\n\nThe following exceptions may be returned by a repository in response to one or more CMIS service methods\ncalls.\n\n\nconstraint\n\n\nThe operation violates a repository- or object-level constraint defined in the CMIS domain model.\n\n\ncontentAlreadyExists\n\n\nThe operation attempts to set the content stream for a document that already has a content stream without explicitly specifying the \noverwriteFlag\n parameter.\n\n\nfilterNotValid\n\n\nThe property filter or rendition filter input to the operation is not valid.\n\n\nnameConstraintViolation\n\n\nThe repository is not able to store the object that the user is creating/updating due to a name constraint violation.\nThere could already be an object with the same name or the name contains a character that is not allowed.\n\n\nstorage\n\n\nThe repository is not able to store the object that the user is creating/updating due to an internal storage problem.\n\n\nstreamNotSupported
 \n\n\nThe operation is attempting to get or set a content stream for a document whose object type specifies that a content stream\nis not allowed for documents of that type.\n\n\nupdateConflict\n\n\nThe operation is attempting to update an object that is no longer current (as determined by the repository).\n\n\nversioning\n\n\nThe operation is attempting to perform an action on a non-current version of a document that cannot be performed on a non-current version.\n\n\nImplementation Exceptions\n\n\nbase\n\n\nThe OpenCMIS and PortCMIS exceptions are all derived from the CMIS base exception. If you want handle all CMIS exceptions at once, catch the \nCmisBaseException\n.\n\n\nconnection\n\n\nThe client could not connect to the repository for some reason. Check if you need to configure a proxy server.\n\n\nunauthorized\n\n\nUser authentication failed.\n\n\nproxyAuthentication\n\n\nProxy authentication failed.\n\n\nserviceUnavailable\n\n\nThe server reported that the CMIS service is cur
 rently not available.", 
+            "title": "CMIS Exceptions"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#exceptions", 
+            "text": "CMIS 1.0  CMIS 1.1  Spec 2.2.1.4  Exceptions are divided into three groups: general exceptions, specific exceptions, and implementation exceptions. \nGeneral exceptions and specific exceptions are defined in the CMIS specification.\nImplementation exceptions are exceptions introduced by OpenCMIS and PortCMIS. Those exceptions handle connection and authentication problems.", 
+            "title": "Exceptions"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#general-exceptions", 
+            "text": "General exceptions may be returned by a repository in response to any CMIS service method call.", 
+            "title": "General Exceptions"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#invalidargument", 
+            "text": "One or more of the input parameters is missing or invalid.", 
+            "title": "invalidArgument"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#notsupported", 
+            "text": "The CMIS operation is not supported by the repository.", 
+            "title": "notSupported"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#objectnotfound", 
+            "text": "The object, or object type, or repository does not exist or the current user has no permission to see it.", 
+            "title": "objectNotFound"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#permissiondenied", 
+            "text": "The user does not have sufficient permissions to perform the operation.", 
+            "title": "permissionDenied"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#runtime", 
+            "text": "Any other cause not expressible by another CMIS exception.", 
+            "title": "runtime"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#specific-exceptions", 
+            "text": "The following exceptions may be returned by a repository in response to one or more CMIS service methods\ncalls.", 
+            "title": "Specific Exceptions"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#constraint", 
+            "text": "The operation violates a repository- or object-level constraint defined in the CMIS domain model.", 
+            "title": "constraint"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#contentalreadyexists", 
+            "text": "The operation attempts to set the content stream for a document that already has a content stream without explicitly specifying the  overwriteFlag  parameter.", 
+            "title": "contentAlreadyExists"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#filternotvalid", 
+            "text": "The property filter or rendition filter input to the operation is not valid.", 
+            "title": "filterNotValid"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#nameconstraintviolation", 
+            "text": "The repository is not able to store the object that the user is creating/updating due to a name constraint violation.\nThere could already be an object with the same name or the name contains a character that is not allowed.", 
+            "title": "nameConstraintViolation"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#storage", 
+            "text": "The repository is not able to store the object that the user is creating/updating due to an internal storage problem.", 
+            "title": "storage"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#streamnotsupported", 
+            "text": "The operation is attempting to get or set a content stream for a document whose object type specifies that a content stream\nis not allowed for documents of that type.", 
+            "title": "streamNotSupported"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#updateconflict", 
+            "text": "The operation is attempting to update an object that is no longer current (as determined by the repository).", 
+            "title": "updateConflict"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#versioning", 
+            "text": "The operation is attempting to perform an action on a non-current version of a document that cannot be performed on a non-current version.", 
+            "title": "versioning"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#implementation-exceptions", 
+            "text": "", 
+            "title": "Implementation Exceptions"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#base", 
+            "text": "The OpenCMIS and PortCMIS exceptions are all derived from the CMIS base exception. If you want handle all CMIS exceptions at once, catch the  CmisBaseException .", 
+            "title": "base"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#connection", 
+            "text": "The client could not connect to the repository for some reason. Check if you need to configure a proxy server.", 
+            "title": "connection"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#unauthorized", 
+            "text": "User authentication failed.", 
+            "title": "unauthorized"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#proxyauthentication", 
+            "text": "Proxy authentication failed.", 
+            "title": "proxyAuthentication"
+        }, 
+        {
+            "location": "/samples/exceptions/index.html#serviceunavailable", 
+            "text": "The server reported that the CMIS service is currently not available.", 
+            "title": "serviceUnavailable"
+        }, 
+        {
+            "location": "/samples/retrieve-objects/index.html", 
+            "text": "Retrieving Objects\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nGetting the Root Folder\n\n\nAll repositories have to provide a root folder. It\ns the entry point for \nbrowsing\n the repository content. The root folder might be completely empty and useless for repositories that only support \nunfiled\n objects.\n\n\nOpenCMIS (Java)\n\n\nFolder rootFolder = session.getRootFolder();\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder rootFolder = Session.GetRootFolder();\n\n\n\n\nGetting Objects by ID\n\n\nAll objects in a repository must have a unique object ID and can be retrieved by this ID. If the user has no permissions to see the object, an \nobjectNotFound\n exception is thrown.\n\n\nUse an \nOperation Context\n to define which details of the object should be returned.\n\n\nOpenCMIS (Java)\n\n\nCmisObject cmisObject = session.getObject(id);\n\nif (cmisObject instanceof Document) {\n    Document document = (Document) cmisObject;\n} else if (cmisObject instanceof Folder) {\n    Folder 
 folder = (Folder) cmisDocument;\n} else {\n    ...\n}\n\n\n\n\nPortCMIS (C#)\n\n\nICmisObject cmisObject = Session.GetObject(id);\n\nif (cmisObject is IDocument) {\n    IDocument document = cmisObject as IDocument;\n} else if (cmisObject is IFolder) {\n    IFolder folder = cmisDocument as IFolder;\n} else {\n    ...\n}\n\n\n\n\nGetting Objects by Path\n\n\nA \nfiled\n object has one or more paths and can be retrieved by this path. If the user has no permissions to see the object, an \nobjectNotFound\n exception is thrown.\n\n\nMost repositories use the \ncmis:name\n property of the folders and the object to assemble the path. But it is possible that the path segments don\u2019t match the names.\n\n\nUse an \nOperation Context\n to define which details of the object should be returned.\n\n\nOpenCMIS (Java)\n\n\nString path = \n/User Homes/customer1/document.odt\n;\nCmisObject cmisObject = session.getObjectByPath(path);\n\n// get the object ID\nString id = cmisObject.getId();\n\n// we
  know it is a filable object, we just retrieved it by path\nFileableCmisObject fileableCmisObject = (FileableCmisObject) cmisObject;\n\n// get all paths, there must be at least one\nList\nString\n paths = fileableCmisObject.getPaths();\n\n// get all parent folders, there must be at least one\nList\nFolder\n parents = fileableCmisObject.getParents();\n\n\n\n\nPortCMIS (C#)\n\n\nstring path = \n/User Homes/customer1/document.odt\n;\nICmisObject cmisObject = Session.GetObjectByPath(path);\n\n// get the object ID\nstring id = cmisObject.Id;\n\n// we know it is a filable object, we just retrieved it by path\nIFileableCmisObject fileableCmisObject = cmisObject as IFileableCmisObject;\n\n// get all paths, there must be at least one\nIList\nstring\n paths = fileableCmisObject.Paths;\n\n// get all parent folders, there must be at least one\nIList\nIFolder\n parents = fileableCmisObject.Parents;\n\n\n\n\nGetting Folder Children\n\n\nThe page about \nlists\n explains how paging works.\n\n\nUse
  an \nOperation Context\n to define which details of the objects should be returned.\n\n\nOpenCMIS (Java)\n\n\nFolder folder = ...\n\nfor (CmisObject child: folder.getChildren()) {\n    System.out.println(child.getName());\n}\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder folder = ...\n\nforeach (ICmisObject child in folder.GetChildren()) {\n    Console.WriteLine(child.Name);\n}\n\n\n\n\nUnderstanding the Object Cache\n\n\nBy default, OpenCMIS and PortCMIS cache objects. That is, the object returned by \ngetObject()\n or \ngetObjectbyPath()\n\ncan be stale. There are multiple ways to deal with that.\n\n\nRefresh the object data that is returned from \ngetObject()\n\n\nOpenCMIS (Java)\n\n\nCmisObject cmisObject = session.getObject(id);\ncmisObject.refresh(); // contacts the repository and refreshes the object\ncmisObject.refreshIfOld(60 * 1000); // ... or refreshes the object only if the data is older than a minute\n\n\n\n\nPortCMIS (C#)\n\n\nICmisObject cmisObject = Session.GetObject(id);\ncmi
 sObject.Refresh(); // contacts the repository and refreshes the object\ncmisObject.RefreshIfOld(60 * 1000); // ... or refreshes the object only if the data is older than a minute\n\n\n\n\nTurn off the session cache completely\n\n\nOpenCMIS (Java)\n\n\nsession.getDefaultContext().setCacheEnabled(false);\n\n\n\n\nPortCMIS (C#)\n\n\nSession.DefaultContext.CacheEnabled = false;\n\n\n\n\nTurn off caching for this \ngetObject()\n call\n\n\nSee also the page about the \nOperation Context\n.\n\n\nOpenCMIS (Java)\n\n\nOperationContext oc = session.createOperationContext();\noc.setCacheEnabled(false);\n\nCmisObject cmisObject = session.getObject(id, oc);\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc = session.CreateOperationContext();\noc.CacheEnabled = false;\n\nICmisObject cmisObject = Session.GetObject(id, oc);\n\n\n\n\nClear the session cache\n\n\nThis is not recommended!\n\n\nOpenCMIS (Java)\n\n\nsession.clear();\n\n\n\n\nPortCMIS (C#)\n\n\nSession.Clear();", 
+            "title": "Retrieving Objects"
+        }, 
+        {
+            "location": "/samples/retrieve-objects/index.html#retrieving-objects", 
+            "text": "CMIS 1.0  CMIS 1.1", 
+            "title": "Retrieving Objects"
+        }, 
+        {
+            "location": "/samples/retrieve-objects/index.html#getting-the-root-folder", 
+            "text": "All repositories have to provide a root folder. It s the entry point for  browsing  the repository content. The root folder might be completely empty and useless for repositories that only support  unfiled  objects.  OpenCMIS (Java)  Folder rootFolder = session.getRootFolder();  PortCMIS (C#)  IFolder rootFolder = Session.GetRootFolder();", 
+            "title": "Getting the Root Folder"
+        }, 
+        {
+            "location": "/samples/retrieve-objects/index.html#getting-objects-by-id", 
+            "text": "All objects in a repository must have a unique object ID and can be retrieved by this ID. If the user has no permissions to see the object, an  objectNotFound  exception is thrown.  Use an  Operation Context  to define which details of the object should be returned.  OpenCMIS (Java)  CmisObject cmisObject = session.getObject(id);\n\nif (cmisObject instanceof Document) {\n    Document document = (Document) cmisObject;\n} else if (cmisObject instanceof Folder) {\n    Folder folder = (Folder) cmisDocument;\n} else {\n    ...\n}  PortCMIS (C#)  ICmisObject cmisObject = Session.GetObject(id);\n\nif (cmisObject is IDocument) {\n    IDocument document = cmisObject as IDocument;\n} else if (cmisObject is IFolder) {\n    IFolder folder = cmisDocument as IFolder;\n} else {\n    ...\n}", 
+            "title": "Getting Objects by ID"
+        }, 
+        {
+            "location": "/samples/retrieve-objects/index.html#getting-objects-by-path", 
+            "text": "A  filed  object has one or more paths and can be retrieved by this path. If the user has no permissions to see the object, an  objectNotFound  exception is thrown.  Most repositories use the  cmis:name  property of the folders and the object to assemble the path. But it is possible that the path segments don\u2019t match the names.  Use an  Operation Context  to define which details of the object should be returned.  OpenCMIS (Java)  String path =  /User Homes/customer1/document.odt ;\nCmisObject cmisObject = session.getObjectByPath(path);\n\n// get the object ID\nString id = cmisObject.getId();\n\n// we know it is a filable object, we just retrieved it by path\nFileableCmisObject fileableCmisObject = (FileableCmisObject) cmisObject;\n\n// get all paths, there must be at least one\nList String  paths = fileableCmisObject.getPaths();\n\n// get all parent folders, there must be at least one\nList Folder  parents = fileableCmisObject.getParents();  PortCMIS (C#)  
 string path =  /User Homes/customer1/document.odt ;\nICmisObject cmisObject = Session.GetObjectByPath(path);\n\n// get the object ID\nstring id = cmisObject.Id;\n\n// we know it is a filable object, we just retrieved it by path\nIFileableCmisObject fileableCmisObject = cmisObject as IFileableCmisObject;\n\n// get all paths, there must be at least one\nIList string  paths = fileableCmisObject.Paths;\n\n// get all parent folders, there must be at least one\nIList IFolder  parents = fileableCmisObject.Parents;", 
+            "title": "Getting Objects by Path"
+        }, 
+        {
+            "location": "/samples/retrieve-objects/index.html#getting-folder-children", 
+            "text": "The page about  lists  explains how paging works.  Use an  Operation Context  to define which details of the objects should be returned.  OpenCMIS (Java)  Folder folder = ...\n\nfor (CmisObject child: folder.getChildren()) {\n    System.out.println(child.getName());\n}  PortCMIS (C#)  IFolder folder = ...\n\nforeach (ICmisObject child in folder.GetChildren()) {\n    Console.WriteLine(child.Name);\n}", 
+            "title": "Getting Folder Children"
+        }, 
+        {
+            "location": "/samples/retrieve-objects/index.html#understanding-the-object-cache", 
+            "text": "By default, OpenCMIS and PortCMIS cache objects. That is, the object returned by  getObject()  or  getObjectbyPath() \ncan be stale. There are multiple ways to deal with that.", 
+            "title": "Understanding the Object Cache"
+        }, 
+        {
+            "location": "/samples/retrieve-objects/index.html#refresh-the-object-data-that-is-returned-from-getobject", 
+            "text": "OpenCMIS (Java)  CmisObject cmisObject = session.getObject(id);\ncmisObject.refresh(); // contacts the repository and refreshes the object\ncmisObject.refreshIfOld(60 * 1000); // ... or refreshes the object only if the data is older than a minute  PortCMIS (C#)  ICmisObject cmisObject = Session.GetObject(id);\ncmisObject.Refresh(); // contacts the repository and refreshes the object\ncmisObject.RefreshIfOld(60 * 1000); // ... or refreshes the object only if the data is older than a minute", 
+            "title": "Refresh the object data that is returned from getObject()"
+        }, 
+        {
+            "location": "/samples/retrieve-objects/index.html#turn-off-the-session-cache-completely", 
+            "text": "OpenCMIS (Java)  session.getDefaultContext().setCacheEnabled(false);  PortCMIS (C#)  Session.DefaultContext.CacheEnabled = false;", 
+            "title": "Turn off the session cache completely"
+        }, 
+        {
+            "location": "/samples/retrieve-objects/index.html#turn-off-caching-for-this-getobject-call", 
+            "text": "See also the page about the  Operation Context .  OpenCMIS (Java)  OperationContext oc = session.createOperationContext();\noc.setCacheEnabled(false);\n\nCmisObject cmisObject = session.getObject(id, oc);  PortCMIS (C#)  IOperationContext oc = session.CreateOperationContext();\noc.CacheEnabled = false;\n\nICmisObject cmisObject = Session.GetObject(id, oc);", 
+            "title": "Turn off caching for this getObject() call"
+        }, 
+        {
+            "location": "/samples/retrieve-objects/index.html#clear-the-session-cache", 
+            "text": "This is not recommended!  OpenCMIS (Java)  session.clear();  PortCMIS (C#)  Session.Clear();", 
+            "title": "Clear the session cache"
+        }, 
+        {
+            "location": "/samples/create-objects/index.html", 
+            "text": "Creating Objects\n\n\nTo create an object a client has to provide a least the two properties \ncmis:name\n and \ncmis:objectTypeId\n.\n\n\ncmis:name\n sets the name of the object and \ncmis:objectTypeId\n sets its object type.\n\nDepending on the object type, more properties can be set or must be set. See also the page about \nproperties\n.\n\n\nCreating a Folder\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nSpec 2.1.5\n\n\nA folder is always a \nfiled\n object. That is, you always need a parent folder.\n\n\nOpenCMIS (Java)\n\n\nFolder parent = ....\n\n// prepare properties\nMap\nString, Object\n properties = new HashMap\nString, Object\n();\nproperties.put(PropertyIds.NAME, \na new folder\n);\nproperties.put(PropertyIds.OBJECT_TYPE_ID, \ncmis:folder\n);\n\n// create the folder\nFolder newFolder = parent.createFolder(properties);\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder parent = ....\n\n// prepare properties\nIDictionary\nstring, object\n properties = new Dictionary\nstring, obje
 ct\n();\nproperties[PropertyIds.Name] = \na new folder\n;\nproperties[PropertyIds.ObjectTypeId] = \ncmis:folder\n;\n\n// create the folder\nIFolder newFolder = parent.CreateFolder(properties);\n\n\n\n\nCreating a Document\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nSpec 2.1.4\n\n\nDocuments can be \nfiled\n and \nunfiled\n. The following samples show how to create a \nfiled\n document. Use the session object to create an \nunfiled\n document.\n\n\nSee also the \npage about content\n how to work with content streams.\n\n\nOpenCMIS (Java)\n\n\nFolder parent = ....\n\nString textFileName = \ntest.txt\n;\n\n// prepare content - a simple text file\nString content = \nHello World!\n;\n\nString filename = textFileName;\nString mimetype = \ntext/plain; charset=UTF-8\n;\n\nbyte[] contentBytes = content.getBytes(\nUTF-8\n);\nByteArrayInputStream stream = new ByteArrayInputStream(contentBytes);\n\nContentStream contentStream = session.getObjectFactory().createContentStream(filename, contentBytes.length, 
 mimetype, stream);\n\n// prepare properties\nMap\nString, Object\n properties = new HashMap\nString, Object\n();\nproperties.put(PropertyIds.NAME, textFileName);\nproperties.put(PropertyIds.OBJECT_TYPE_ID, \ncmis:document\n);\n\n// create the document\nDocument newDoc = parent.createDocument(properties, contentStream, VersioningState.NONE);\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder parent = ....\n\nstring textFileName = \ntest.txt\n;\n\n// prepare content - a simple text file\nstring content = \nHello World!\n;\n\nstring filename = textFileName;\nstring mimetype = \ntext/plain; charset=UTF-8\n;\n\nbyte[] contentBytes = Encoding.UTF8.GetBytes(content);\nStream stream = new MemoryStream(contentBytes);\n\nIContentStream contentStream = session.ObjectFactory.CreateContentStream(filename, contentBytes.length, mimetype, stream);\n\n// prepare properties\nIDictionary\nstring, object\n properties = new Dictionary\nstring, object\n();\nproperties[PropertyIds.Name] = textFileName;\nproperties[Prope
 rtyIds.ObjectTypeId] = \ncmis:document\n;\n\n// create the document\nIDocument newDoc = parent.CreateDocument(properties, contentStream, VersioningState.None);\n\n\n\n\nCreating a Documet from Source (Copy Content)\n\n\nOpenCMIS (Java)\n\n\nFolder folder = ...\nDocument doc = ...\n\ndoc.copy(folder); // create a copy of the document in this folder\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder folder = ...\nIDocument doc = ...\n\ndoc.Copy(folder); // create a copy of the document in this folder\n\n\n\n\nCreating a Relationship\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nSpec 2.1.6\n\n\nRelationships are always \nunfiled\n objects. The ID of the source object and the ID of the target object must be provided.\nSee the \npage about types\n how to discover relationship types and their properties.\n\n\nOpenCMIS (Java)\n\n\nString sourceId = ...\nString targetId = ...\n\nMap\nString, Object\n properties = new HashMap\nString, Object\n();\nproperties.put(PropertyIds.NAME, \na new relationship\n);\nproperties.pu
 t(PropertyIds.OBJECT_TYPE_ID, \nmy:relationsip\n);\nproperties.put(PropertyIds.SOURCE_ID, sourceId);\nproperties.put(PropertyIds.TARGET_ID, targetId);\n\nObjectId newRelId = session.createRelationship(properties);\n\n\n\n\nPortCMIS (C#)\n\n\nstring sourceId = ...\nstring targetId = ...\n\nIDictionary\nstring, object\n properties = new Dictionary\nstring, object\n();\nproperties[PropertyIds.Name] = \na new relationship\n;\nproperties[PropertyIds.ObjectTypeId] = \nmy:relationsip\n;\nproperties[PropertyIds.SourceId] = sourceId;\nproperties[PropertyIds.TargetId] = targetId;\n\nIObjectId newRelId = session.CreateRelationship(properties);\n\n\n\n\nCreating a Policy\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nSpec 2.1.7\n\n\nPolicies can be \nfiled\n and \nunfiled\n. The following samples show how to create a \nfiled\n policy. Use the session object to create an \nunfiled\n policy.\n\n\nIn most cases it doesn\nt make sense to create an policies of the type \ncmis:policy\n because it has no semantics.
  Usually, the repository provides specific policy types with or without additional properties. See the \npage about types\n how to discover policy types and their properties.\n\n\nOpenCMIS (Java)\n\n\nFolder parent = ....\n\n// prepare properties\nMap\nString, Object\n properties = new HashMap\nString, Object\n();\nproperties.put(PropertyIds.NAME, \na new policy\n);\nproperties.put(PropertyIds.OBJECT_TYPE_ID, \nmy:policy\n);\nproperties.put(PropertyIds.POLICY_TEXT, \nmy policy description\n);\n\n// create the policy\nPolicy newPolicy = parent.createPolicy(properties);\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder parent = ....\n\n// prepare properties\nIDictionary\nstring, object\n properties = new Dictionary\nstring, object\n();\nproperties[PropertyIds.Name] = \na new policy\n;\nproperties[PropertyIds.ObjectTypeId] = \nmy:policy\n;\nproperties[PropertyIds.PolicyText] = \nmy policy description\n;\n\n// create the policy\nIPolicy newPolicy = parent.CreatePolicy(properties);\n\n\n\n\nCreating a
 n Item\n\n\nCMIS 1.1\n\n\nSpec 2.1.8\n\n\nItems can be \nfiled\n and \nunfiled\n. The following samples show how to create a \nfiled\n item. Use the session object to create an \nunfiled\n item.\n\n\nIn most cases it doesn\nt make sense to create an item of the type \ncmis:item\n. Usually, the repository provides specific item types with or without additional properties. See the \npage about types\n how to discover item types and their properties.\n\n\nOpenCMIS (Java)\n\n\nFolder parent = ....\n\n// prepare properties\nMap\nString, Object\n properties = new HashMap\nString, Object\n();\nproperties.put(PropertyIds.NAME, \na new item\n);\nproperties.put(PropertyIds.OBJECT_TYPE_ID, \nmy:item\n);\n\n// create the item\nItem newItem = parent.createItem(properties);\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder parent = ....\n\n// prepare properties\nIDictionary\nstring, object\n properties = new Dictionary\nstring, object\n();\nproperties[PropertyIds.Name] = \na new item\n;\nproperties[PropertyIds
 .ObjectTypeId] = \ncmis:item\n;\n\n// create the item\nIItem newItem = parent.CreateItem(properties);\n\n\n\n\nCreating object with a Folder Object vs Creating object with the Session Object\n\n\nOpenCMIS and PortCMIS provide two ways to create objects.\nThe code samples above create objects in a folder. It is also possible to create an object with the session object\nand without getting the parent folder first.\n\n\nOpenCMIS (Java)\n\n\nMap\nString, Object\n properties = new HashMap\nString, Object\n();\nproperties.put(PropertyIds.OBJECT_TYPE_ID, \ncmis:folder\n);\nproperties.put(PropertyIds.NAME, \na new folder\n);\n\nObjectId newFolderId = session.createFolder(properties, parentId);\n\n\n\n\nBoth approaches have advantages and disadvantages.\n\n\nCreating an object with a folder object is more convenient. The create methods return the newly created object.\n\n\nCreating an object with the session object is faster because it only needs one round-trip to the server. But it only ret
 urns the ID of the newly created object.\n\n\nUnfiled objects can only be created with the session object.", 
+            "title": "Creating Objects"
+        }, 
+        {
+            "location": "/samples/create-objects/index.html#creating-objects", 
+            "text": "To create an object a client has to provide a least the two properties  cmis:name  and  cmis:objectTypeId .  cmis:name  sets the name of the object and  cmis:objectTypeId  sets its object type. \nDepending on the object type, more properties can be set or must be set. See also the page about  properties .", 
+            "title": "Creating Objects"
+        }, 
+        {
+            "location": "/samples/create-objects/index.html#creating-a-folder", 
+            "text": "CMIS 1.0  CMIS 1.1  Spec 2.1.5  A folder is always a  filed  object. That is, you always need a parent folder.  OpenCMIS (Java)  Folder parent = ....\n\n// prepare properties\nMap String, Object  properties = new HashMap String, Object ();\nproperties.put(PropertyIds.NAME,  a new folder );\nproperties.put(PropertyIds.OBJECT_TYPE_ID,  cmis:folder );\n\n// create the folder\nFolder newFolder = parent.createFolder(properties);  PortCMIS (C#)  IFolder parent = ....\n\n// prepare properties\nIDictionary string, object  properties = new Dictionary string, object ();\nproperties[PropertyIds.Name] =  a new folder ;\nproperties[PropertyIds.ObjectTypeId] =  cmis:folder ;\n\n// create the folder\nIFolder newFolder = parent.CreateFolder(properties);", 
+            "title": "Creating a Folder"
+        }, 
+        {
+            "location": "/samples/create-objects/index.html#creating-a-document", 
+            "text": "CMIS 1.0  CMIS 1.1  Spec 2.1.4  Documents can be  filed  and  unfiled . The following samples show how to create a  filed  document. Use the session object to create an  unfiled  document.  See also the  page about content  how to work with content streams.  OpenCMIS (Java)  Folder parent = ....\n\nString textFileName =  test.txt ;\n\n// prepare content - a simple text file\nString content =  Hello World! ;\n\nString filename = textFileName;\nString mimetype =  text/plain; charset=UTF-8 ;\n\nbyte[] contentBytes = content.getBytes( UTF-8 );\nByteArrayInputStream stream = new ByteArrayInputStream(contentBytes);\n\nContentStream contentStream = session.getObjectFactory().createContentStream(filename, contentBytes.length, mimetype, stream);\n\n// prepare properties\nMap String, Object  properties = new HashMap String, Object ();\nproperties.put(PropertyIds.NAME, textFileName);\nproperties.put(PropertyIds.OBJECT_TYPE_ID,  cmis:document );\n\n// create the document\nD
 ocument newDoc = parent.createDocument(properties, contentStream, VersioningState.NONE);  PortCMIS (C#)  IFolder parent = ....\n\nstring textFileName =  test.txt ;\n\n// prepare content - a simple text file\nstring content =  Hello World! ;\n\nstring filename = textFileName;\nstring mimetype =  text/plain; charset=UTF-8 ;\n\nbyte[] contentBytes = Encoding.UTF8.GetBytes(content);\nStream stream = new MemoryStream(contentBytes);\n\nIContentStream contentStream = session.ObjectFactory.CreateContentStream(filename, contentBytes.length, mimetype, stream);\n\n// prepare properties\nIDictionary string, object  properties = new Dictionary string, object ();\nproperties[PropertyIds.Name] = textFileName;\nproperties[PropertyIds.ObjectTypeId] =  cmis:document ;\n\n// create the document\nIDocument newDoc = parent.CreateDocument(properties, contentStream, VersioningState.None);", 
+            "title": "Creating a Document"
+        }, 
+        {
+            "location": "/samples/create-objects/index.html#creating-a-documet-from-source-copy-content", 
+            "text": "OpenCMIS (Java)  Folder folder = ...\nDocument doc = ...\n\ndoc.copy(folder); // create a copy of the document in this folder  PortCMIS (C#)  IFolder folder = ...\nIDocument doc = ...\n\ndoc.Copy(folder); // create a copy of the document in this folder", 
+            "title": "Creating a Documet from Source (Copy Content)"
+        }, 
+        {
+            "location": "/samples/create-objects/index.html#creating-a-relationship", 
+            "text": "CMIS 1.0  CMIS 1.1  Spec 2.1.6  Relationships are always  unfiled  objects. The ID of the source object and the ID of the target object must be provided.\nSee the  page about types  how to discover relationship types and their properties.  OpenCMIS (Java)  String sourceId = ...\nString targetId = ...\n\nMap String, Object  properties = new HashMap String, Object ();\nproperties.put(PropertyIds.NAME,  a new relationship );\nproperties.put(PropertyIds.OBJECT_TYPE_ID,  my:relationsip );\nproperties.put(PropertyIds.SOURCE_ID, sourceId);\nproperties.put(PropertyIds.TARGET_ID, targetId);\n\nObjectId newRelId = session.createRelationship(properties);  PortCMIS (C#)  string sourceId = ...\nstring targetId = ...\n\nIDictionary string, object  properties = new Dictionary string, object ();\nproperties[PropertyIds.Name] =  a new relationship ;\nproperties[PropertyIds.ObjectTypeId] =  my:relationsip ;\nproperties[PropertyIds.SourceId] = sourceId;\nproperties[PropertyIds.Tar
 getId] = targetId;\n\nIObjectId newRelId = session.CreateRelationship(properties);", 
+            "title": "Creating a Relationship"
+        }, 
+        {
+            "location": "/samples/create-objects/index.html#creating-a-policy", 
+            "text": "CMIS 1.0  CMIS 1.1  Spec 2.1.7  Policies can be  filed  and  unfiled . The following samples show how to create a  filed  policy. Use the session object to create an  unfiled  policy.  In most cases it doesn t make sense to create an policies of the type  cmis:policy  because it has no semantics. Usually, the repository provides specific policy types with or without additional properties. See the  page about types  how to discover policy types and their properties.  OpenCMIS (Java)  Folder parent = ....\n\n// prepare properties\nMap String, Object  properties = new HashMap String, Object ();\nproperties.put(PropertyIds.NAME,  a new policy );\nproperties.put(PropertyIds.OBJECT_TYPE_ID,  my:policy );\nproperties.put(PropertyIds.POLICY_TEXT,  my policy description );\n\n// create the policy\nPolicy newPolicy = parent.createPolicy(properties);  PortCMIS (C#)  IFolder parent = ....\n\n// prepare properties\nIDictionary string, object  properties = new Dictionary stri
 ng, object ();\nproperties[PropertyIds.Name] =  a new policy ;\nproperties[PropertyIds.ObjectTypeId] =  my:policy ;\nproperties[PropertyIds.PolicyText] =  my policy description ;\n\n// create the policy\nIPolicy newPolicy = parent.CreatePolicy(properties);", 
+            "title": "Creating a Policy"
+        }, 
+        {
+            "location": "/samples/create-objects/index.html#creating-an-item", 
+            "text": "CMIS 1.1  Spec 2.1.8  Items can be  filed  and  unfiled . The following samples show how to create a  filed  item. Use the session object to create an  unfiled  item.  In most cases it doesn t make sense to create an item of the type  cmis:item . Usually, the repository provides specific item types with or without additional properties. See the  page about types  how to discover item types and their properties.  OpenCMIS (Java)  Folder parent = ....\n\n// prepare properties\nMap String, Object  properties = new HashMap String, Object ();\nproperties.put(PropertyIds.NAME,  a new item );\nproperties.put(PropertyIds.OBJECT_TYPE_ID,  my:item );\n\n// create the item\nItem newItem = parent.createItem(properties);  PortCMIS (C#)  IFolder parent = ....\n\n// prepare properties\nIDictionary string, object  properties = new Dictionary string, object ();\nproperties[PropertyIds.Name] =  a new item ;\nproperties[PropertyIds.ObjectTypeId] =  cmis:item ;\n\n// create the ite
 m\nIItem newItem = parent.CreateItem(properties);", 
+            "title": "Creating an Item"
+        }, 
+        {
+            "location": "/samples/create-objects/index.html#creating-object-with-a-folder-object-vs-creating-object-with-the-session-object", 
+            "text": "OpenCMIS and PortCMIS provide two ways to create objects.\nThe code samples above create objects in a folder. It is also possible to create an object with the session object\nand without getting the parent folder first.  OpenCMIS (Java)  Map String, Object  properties = new HashMap String, Object ();\nproperties.put(PropertyIds.OBJECT_TYPE_ID,  cmis:folder );\nproperties.put(PropertyIds.NAME,  a new folder );\n\nObjectId newFolderId = session.createFolder(properties, parentId);  Both approaches have advantages and disadvantages.  Creating an object with a folder object is more convenient. The create methods return the newly created object.  Creating an object with the session object is faster because it only needs one round-trip to the server. But it only returns the ID of the newly created object.  Unfiled objects can only be created with the session object.", 
+            "title": "Creating object with a Folder Object vs Creating object with the Session Object"
+        }, 
+        {
+            "location": "/samples/update-objects/index.html", 
+            "text": "Updating Objects\n\n\nUpdating Properties\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nThe page about \nproperties\n explains how Java and C# data types are map to CMIS data types.\n\n\nOpenCMIS (Java)\n\n\nCmisObject cmisObject = ...\n\nMap\nString, Object\n properties = new HashMap\nString, Object\n();\n\nproperties.put(\nmy:property\n, \nnew value\n); // single-value property\nproperties.put(\nmy:int.property\n, 42);\nproperties.put(\nmy:date.property\n, new GregorianCalendar());\nproperties.put(\nmy:bool.property\n, true);\n\nList\nString\n shoppingList = new ArrayList\nString\n();\nshoppingList.add(\nmilk\n);\nshoppingList.add(\nbread\n);\nshoppingList.add(\ncheese\n);\nproperties.put(\nmy:shopping.list\n, shoppingList); // multi-value property\n\ncmisObject.updateProperties(properties);\n\n\n\n\nPortCMIS (C#)\n\n\nICmisObject cmisObject = ...\n\nIDictonary\nstring, object\n properties = new Dictonary\nstring, object\n();\n\nproperties.Add(\nmy:property\n, \nnew value\
 n); // single-value property\nproperties.Add(\nmy:int.property\n, 42);\nproperties.Add(\nmy:date.property\n, DateTime.Now);\nproperties.Add(\nmy:bool.property\n, true);\n\nIList\nstring\n shoppingList = new List\nstring\n();\nshoppingList.Add(\nmilk\n);\nshoppingList.Add(\nbread\n);\nshoppingList.Add(\ncheese\n);\nproperties.Add(\nmy:shopping.list\n, shoppingList); // multi-value property\n\ncmisObject.UpdateProperties(properties);\n\n\n\n\nRenaming an Object\n\n\nIf you just want to change the \ncmis:name\n property, there is a shortcut.\n\n\nOpenCMIS (Java)\n\n\nCmisObject cmisObject = ....\ncmisObject.rename(\nnew name\n);\n\n\n\n\nPortCMIS (C#)\n\n\nICmisObject cmisObject = ....\ncmisObject.Rename(\nnew name\n);\n\n\n\n\nBulk Update\n\n\nCMIS 1.1\n\n\nOpenCMIS (Java)\n\n\n// collect all objects to be updated\nList\nCmisObject\n objectList = new ArrayList\nCmisObject\n();\nobjectList.add(doc1);\nobjectList.add(doc2);\nobjectList.add(doc3);\n\n// prepare properties\nMap\nString, O
 bject\n properties = new HashMap\nString, Object\n();\nproperties.put(\nmy:project\n, \n123456\n);\nproperties.put(\nmy:priority\n, 10);\n\nList\nBulkUpdateObjectIdAndChangeToken\n updatedIds = session.bulkUpdateProperties(objectList, properties, null, null);\n\n\n\n\nUpdating Content\n\n\nSee \nWorking with Content\n.", 
+            "title": "Updating Objects"
+        }, 
+        {
+            "location": "/samples/update-objects/index.html#updating-objects", 
+            "text": "", 
+            "title": "Updating Objects"
+        }, 
+        {
+            "location": "/samples/update-objects/index.html#updating-properties", 
+            "text": "CMIS 1.0  CMIS 1.1  The page about  properties  explains how Java and C# data types are map to CMIS data types.  OpenCMIS (Java)  CmisObject cmisObject = ...\n\nMap String, Object  properties = new HashMap String, Object ();\n\nproperties.put( my:property ,  new value ); // single-value property\nproperties.put( my:int.property , 42);\nproperties.put( my:date.property , new GregorianCalendar());\nproperties.put( my:bool.property , true);\n\nList String  shoppingList = new ArrayList String ();\nshoppingList.add( milk );\nshoppingList.add( bread );\nshoppingList.add( cheese );\nproperties.put( my:shopping.list , shoppingList); // multi-value property\n\ncmisObject.updateProperties(properties);  PortCMIS (C#)  ICmisObject cmisObject = ...\n\nIDictonary string, object  properties = new Dictonary string, object ();\n\nproperties.Add( my:property ,  new value ); // single-value property\nproperties.Add( my:int.property , 42);\nproperties.Add( my:date.property , DateTi
 me.Now);\nproperties.Add( my:bool.property , true);\n\nIList string  shoppingList = new List string ();\nshoppingList.Add( milk );\nshoppingList.Add( bread );\nshoppingList.Add( cheese );\nproperties.Add( my:shopping.list , shoppingList); // multi-value property\n\ncmisObject.UpdateProperties(properties);", 
+            "title": "Updating Properties"
+        }, 
+        {
+            "location": "/samples/update-objects/index.html#renaming-an-object", 
+            "text": "If you just want to change the  cmis:name  property, there is a shortcut.  OpenCMIS (Java)  CmisObject cmisObject = ....\ncmisObject.rename( new name );  PortCMIS (C#)  ICmisObject cmisObject = ....\ncmisObject.Rename( new name );", 
+            "title": "Renaming an Object"
+        }, 
+        {
+            "location": "/samples/update-objects/index.html#bulk-update", 
+            "text": "CMIS 1.1  OpenCMIS (Java)  // collect all objects to be updated\nList CmisObject  objectList = new ArrayList CmisObject ();\nobjectList.add(doc1);\nobjectList.add(doc2);\nobjectList.add(doc3);\n\n// prepare properties\nMap String, Object  properties = new HashMap String, Object ();\nproperties.put( my:project ,  123456 );\nproperties.put( my:priority , 10);\n\nList BulkUpdateObjectIdAndChangeToken  updatedIds = session.bulkUpdateProperties(objectList, properties, null, null);", 
+            "title": "Bulk Update"
+        }, 
+        {
+            "location": "/samples/update-objects/index.html#updating-content", 
+            "text": "See  Working with Content .", 
+            "title": "Updating Content"
+        }, 
+        {
+            "location": "/samples/move-objects/index.html", 
+            "text": "Moving Objects\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nMoving Between Folders\n\n\nOpenCMIS (Java)\n\n\nFolder sourceFolder = ...\nFolder targetFolder = ...\nDocument doc = ...\n\ndoc.move(sourceFolder, targetFolder);\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder sourceFolder = ...\nIFolder targetFolder = ...\nIDocument doc = ...\n\ndoc.Move(sourceFolder, targetFolder);\n\n\n\n\nAdding and Removing from Folder\n\n\nAdding to Folder\n\n\nOpenCMIS (Java)\n\n\nFolder folder = ...\nDocument doc = ...\n\ndoc.addToFolder(folder, true); // add all versions to folder\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder folder = ...\nIDocument doc = ...\n\ndoc.AddToFolder(folder, true); // add all versions to folder\n\n\n\n\nRemoving from Folder\n\n\nOpenCMIS (Java)\n\n\nFolder folder = ...\nDocument doc = ...\n\ndoc.removeFromFolder(folder);\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder folder = ...\nIDocument doc = ...\n\ndoc.RemoveFromFolder(folder);", 
+            "title": "Moving Object"
+        }, 
+        {
+            "location": "/samples/move-objects/index.html#moving-objects", 
+            "text": "CMIS 1.0  CMIS 1.1", 
+            "title": "Moving Objects"
+        }, 
+        {
+            "location": "/samples/move-objects/index.html#moving-between-folders", 
+            "text": "OpenCMIS (Java)  Folder sourceFolder = ...\nFolder targetFolder = ...\nDocument doc = ...\n\ndoc.move(sourceFolder, targetFolder);  PortCMIS (C#)  IFolder sourceFolder = ...\nIFolder targetFolder = ...\nIDocument doc = ...\n\ndoc.Move(sourceFolder, targetFolder);", 
+            "title": "Moving Between Folders"
+        }, 
+        {
+            "location": "/samples/move-objects/index.html#adding-and-removing-from-folder", 
+            "text": "", 
+            "title": "Adding and Removing from Folder"
+        }, 
+        {
+            "location": "/samples/move-objects/index.html#adding-to-folder", 
+            "text": "OpenCMIS (Java)  Folder folder = ...\nDocument doc = ...\n\ndoc.addToFolder(folder, true); // add all versions to folder  PortCMIS (C#)  IFolder folder = ...\nIDocument doc = ...\n\ndoc.AddToFolder(folder, true); // add all versions to folder", 
+            "title": "Adding to Folder"
+        }, 
+        {
+            "location": "/samples/move-objects/index.html#removing-from-folder", 
+            "text": "OpenCMIS (Java)  Folder folder = ...\nDocument doc = ...\n\ndoc.removeFromFolder(folder);  PortCMIS (C#)  IFolder folder = ...\nIDocument doc = ...\n\ndoc.RemoveFromFolder(folder);", 
+            "title": "Removing from Folder"
+        }, 
+        {
+            "location": "/samples/delete-objects/index.html", 
+            "text": "Deleting Objects\n\n\n\n\nAllowable Actions\n\n\nBefore you delete an object, check the \nAllowable Actions\n to determine if the\ncurrent user is allowed to delete the object.\n\n\n\n\nDeleting Objects\n\n\nThe following snippet deletes an object.\nIf the object is a document, all versions of the document are deleted.\nIf the object is a folder and it is not empty, a \nconstraint\n exception is thrown.\n\n\nOpenCMIS (Java)\n\n\nCmisObject cmisObject = ...\ncmisObject.delete();\n\n\n\n\nPortCMIS (C#)\n\n\nICmisObject cmisObject = ...\ncmisObject.Delete();\n\n\n\n\nDeleting Documents and Versions\n\n\nIf a document is versioned, the whole version series can be deleted or just a single version. This is controlled with the \nallVersions\n parameter.\n\n\nFor documents that are not versioned it doesn\nt matter if the \nallVersions\n parameter is set to \ntrue\n or \nfalse\n.\n\n\nDeleting a Document and All Versions\n\n\nTo delete a whole version series, set the \na
 llVersions\n to \ntrue\n.\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\ndocument.delete(true); // allVersions = true\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\ndocument.Delete(true); // allVersions = true\n\n\n\n\nDeleting a Single Version\n\n\nTo delete one version with a version series, set the \nallVersions\n to \nfalse\n.\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\ndocument.delete(false); // allVersions = false\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\ndocument.Delete(false); // allVersions = false\n\n\n\n\nDeleting a Folder Hierarchy\n\n\nOpenCMIS (Java)\n\n\nFolder folder = ...\nfolder.deleteTree(true, UnfileObject.DELETE, true);\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder folder = ...\nfolder.DeleteTree(true, UnfileObject.Delete, true);", 
+            "title": "Deleting Objects"
+        }, 
+        {
+            "location": "/samples/delete-objects/index.html#deleting-objects", 
+            "text": "Allowable Actions  Before you delete an object, check the  Allowable Actions  to determine if the\ncurrent user is allowed to delete the object.", 
+            "title": "Deleting Objects"
+        }, 
+        {
+            "location": "/samples/delete-objects/index.html#deleting-objects_1", 
+            "text": "The following snippet deletes an object.\nIf the object is a document, all versions of the document are deleted.\nIf the object is a folder and it is not empty, a  constraint  exception is thrown.  OpenCMIS (Java)  CmisObject cmisObject = ...\ncmisObject.delete();  PortCMIS (C#)  ICmisObject cmisObject = ...\ncmisObject.Delete();", 
+            "title": "Deleting Objects"
+        }, 
+        {
+            "location": "/samples/delete-objects/index.html#deleting-documents-and-versions", 
+            "text": "If a document is versioned, the whole version series can be deleted or just a single version. This is controlled with the  allVersions  parameter.  For documents that are not versioned it doesn t matter if the  allVersions  parameter is set to  true  or  false .", 
+            "title": "Deleting Documents and Versions"
+        }, 
+        {
+            "location": "/samples/delete-objects/index.html#deleting-a-document-and-all-versions", 
+            "text": "To delete a whole version series, set the  allVersions  to  true .  OpenCMIS (Java)  Document document = ...\ndocument.delete(true); // allVersions = true  PortCMIS (C#)  IDocument document = ...\ndocument.Delete(true); // allVersions = true", 
+            "title": "Deleting a Document and All Versions"
+        }, 
+        {
+            "location": "/samples/delete-objects/index.html#deleting-a-single-version", 
+            "text": "To delete one version with a version series, set the  allVersions  to  false .  OpenCMIS (Java)  Document document = ...\ndocument.delete(false); // allVersions = false  PortCMIS (C#)  IDocument document = ...\ndocument.Delete(false); // allVersions = false", 
+            "title": "Deleting a Single Version"
+        }, 
+        {
+            "location": "/samples/delete-objects/index.html#deleting-a-folder-hierarchy", 
+            "text": "OpenCMIS (Java)  Folder folder = ...\nfolder.deleteTree(true, UnfileObject.DELETE, true);  PortCMIS (C#)  IFolder folder = ...\nfolder.DeleteTree(true, UnfileObject.Delete, true);", 
+            "title": "Deleting a Folder Hierarchy"
+        }, 
+        {
+            "location": "/samples/content/index.html", 
+            "text": "Working with Content\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nSpec 2.1.4.2\n\n\nContent Streams\n\n\nContent Stream objects are used to send and fetch content. They contain a file name, a \nMIME type\n, the stream length, and the stream.\n\n\nIn some cases, the stream length is unknown (\nnull\n). OpenCMIS and PortCMIS don\u2019t rely on it and your application shouldn\nt either. \n\n\nYou can create content stream objects manually or implement the interface yourself, but OpenCMIS and PortCMIS provide some convenience methods for this.\n\n\nOpenCMIS (Java)\n\n\n// create a simple ContentStream object\nContentStream cs1 = session.getObjectFactory().createContentStream(filename, length, mimeType, stream);\n\n// create a ContentStream object from a byte array\nContentStream cs2 = ContentStreamUtils.createByteArrayContentStream(filename, bytes, mimeType);\n\n// create a ContentStream object from a string\nContentStream cs3 = ContentStreamUtils.createTextContentStream(filena
 me, content);\n\n// create a ContentStream object from file\nContentStream cs4 = ContentStreamUtils.createFileContentStream(file);\n\n\n\n\nPortCMIS (C#)\n\n\n// create a simple IContentStream object\nIContentStream cs1 = Session.ObjectFactory.CreateContentStream(filename, length, mimeType, stream);\n\n// create a IContentStream object from a byte array\nIContentStream cs2 = ContentStreamUtils.CreateByteArrayContentStream(filename, bytes, mimeType);\n\n// create a IContentStream object from a string\nIContentStream cs3 = ContentStreamUtils.CreateTextContentStream(filename, content);\n\n\n\n\nMIME Types\n\n\nWhen you create a new document or update the content of a document, you have to provide a MIME type.\nIf you don\nt know the MIME type, use \napplication/octet-stream\n.\n\n\nOpenCMIS can guess the MIME type based on the file extension.\nIf you need a more thorough MIME type detection, have a look at \nApache Tika\n.\n\n\nOpenCMIS (Java)\n\n\nString mimeType = MimeTypes.getMIMETy
 pe(\ntxt\n); // MIME type for a .txt file\n\n\n\n\nFor .Net 4.5+ you can use \nSystem.Web.MimeMapping.GetMimeMapping\n.\n\n\nPortCMIS (C#)\n\n\nstring mimeType = MimeMapping.GetMimeMapping(\ntext.txt\n);\n\n\n\n\nGetting Content\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nThe code snippets below show how to get the content of document. If a document has no content, \ngetContentStream()\n returns \nnull\n.\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\nContentStream contentStream = document.getContentStream();\nInputStream stream = contentStream.getStream();\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\nIContentStream contentStream = document.GetContentStream();\nStream stream = contentStream.Stream;\n\n\n\n\nGetting Partial Content\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nIt\ns also possible to get only a part of the content.\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\n\n// skip the first 100 bytes\n// use null to start from the beginning\nBigInteger offset = BigInteger.valueOf(100)
 ;\n\n// only read 200 bytes\n// use null to read to the end of the stream\nBigInteger length = BigInteger.valueOf(200); \n\nContentStream contentStream = document.getContentStream(offset, length);\nInputStream stream = contentStream.getStream();\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\n\n// skip the first 100 bytes\n// use null to start from the beginning\nlong? offset = 100;\n\n// only read 200 bytes\n// use null to read to the end of the stream\nlong? length = 200;\n\nIContentStream contentStream = document.GetContentStream(offset, length);\nStream stream = contentStream.Stream;\n\n\n\n\nUpdating Content\n\n\nOverwriting Content\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\n\nContentStream contentStream = ...\n\ndocument.setContentStream(contentStream, true);\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\n\nIContentStream contentStream = ...\n\ndocument.SetContentStream(contentStream, true);\n\n\n\n\nDeleting Content\n\n\nCMIS 1
 .0\n\n\nCMIS 1.1\n\n\n\n\nWarning\n\n\nSome repositories  don\nt support documents without content. Check the \nrepository capabilities\n if that\ns the case or check the\n\nAllowable Actions\n of the document.\n\n\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\ndocument.deleteContentStream();\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\ndocument.DeleteContentStream();\n\n\n\n\nAppending Content\n\n\nCMIS 1.1\n\n\n\n\nWarning\n\n\nNot all repositories support appending content. It is not possible to discover wheter a repository supports it or not.\nIf you append content be prepared to catch a \nnotSupported\n exception. \n\n\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\n\nContentStream contentStream = ...\nboolean isLastChunk = true; // indicates that this is the last part of the content \n\ndocument.appendContentStream(contentStream, isLastChunk);\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\n\nIContentStream contentStream = ...\nbool isLastChunk = true; //
  indicates that this is the last part of the content \n\ndocument.AppendContentStream(contentStream, isLastChunk);\n\n\n\n\nWorking with Renditions\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nSpec 2.1.4.2\n\n\nRenditions are alternative versions of a document. For example, a rendition could be a PDF of an Office document. Thumbnails are a special kind of renditions and could also exist for non-document objects.\n\nCMIS only supports server managed renditions. A CMIS client cannot upload, modify, or delete a rendition.\n\n\nGetting the List of Renditions\n\n\n\n\nNote\n\n\nThe list of renditions is only available if it has been requested with an \nOperation Context\n.\n\n\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\n\nfor (Rendition rendition: document.getRenditions()) {\n    System.out.println(rendition.getTitle() + \n: \n + rendition.getStreamId());\n}\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\n\nforeach (IRendition rendition in folder.Renditions) {\n    Console.WriteLine(ren
 dition.Title + \n: \n + rendition.StreamId);\n}\n\n\n\n\nGetting Rendition Content\n\n\nThe rendition content can be retrieved either for an Rendition object (see above) or directly from the document with a stream ID.\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\nRendition rendition = ...\n\nContentStream cs1 = document.getContentStream(rendition.getStreamId());\n\nContentStream cs2 = rendition.getContentStream();\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\nIRendition rendition = ...\n\nIContentStream cs1 = document.GetContentStream(rendition.StreamId);\n\nIContentStream cs2 = rendition.GetContentStream();", 
+            "title": "Working with Content"
+        }, 
+        {
+            "location": "/samples/content/index.html#working-with-content", 
+            "text": "CMIS 1.0  CMIS 1.1  Spec 2.1.4.2", 
+            "title": "Working with Content"
+        }, 
+        {
+            "location": "/samples/content/index.html#content-streams", 

[... 272 lines stripped ...]