Modified:
websites/staging/chemistry/trunk/content/docs/cmis-samples/mkdocs/search_index.json
==============================================================================
---
websites/staging/chemistry/trunk/content/docs/cmis-samples/mkdocs/search_index.json
(original)
+++
websites/staging/chemistry/trunk/content/docs/cmis-samples/mkdocs/search_index.json
Mon Jul 31 12:54:37 2017
@@ -2,7 +2,7 @@
"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\nWe assume that you have
a rough understanding of CMIS. This is not a CMIS introduction
course.\n\n\nMany code samples are marked with \nCMIS 1.0\n or \nCMIS 1.1\n.
Those tags indicate the CMIS specification version that the server has to
support to use the feature.\n\n\nThroughout the code samples you will find
references to sections in the \nCMIS 1.1 specification\n; tags like \nSpec
1.5\n. We recommend that you have the specification document ready to hand.
\n\n\n\n\nUnder Development\n\n\nThis sample collection is under development.
Some areas are only sparely covered or not c
overed 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 cli
ent 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 Gradle to get the client libraries.\n\n\nMaven\n\n\nReplace \n[OpenCMIS
version]\n with the latest version number, e.g. \n1.0.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 ve
rsion]\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. \n1.0.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 descri
bed on \nthis page\n.\nFor new projects it is recommend to use PortCMIS.",
+ "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\nWe assume that you have
a rough understanding of CMIS. This is not a CMIS introduction
course.\n\n\nMany code samples are marked with \nCMIS 1.0\n or \nCMIS 1.1\n.
Those tags indicate the CMIS specification version that the server has to
support to use the feature.\n\n\nThroughout the code samples you will find
references to sections in the \nCMIS 1.1 specification\n; tags like \nSpec
1.5\n. We recommend that you have the specification document ready to hand.
\n\n\n\n\nUnder Development\n\n\nThis sample collection is under development.
Some areas are only sparely covered or not c
overed 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 cli
ent 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 Gradle to get the client libraries.\n\n\nMaven\n\n\nReplace \n[OpenCMIS
version]\n with the latest version number, e.g. \n1.1.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 ve
rsion]\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. \n1.1.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 descri
bed on \nthis page\n.\nFor new projects it is recommend to use PortCMIS.",
"title": "Home"
},
{
@@ -22,12 +22,12 @@
},
{
"location": "/index.html#maven",
- "text": "Replace [OpenCMIS version] with the latest version
number, e.g. 1.0.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",
+ "text": "Replace [OpenCMIS version] with the latest version
number, e.g. 1.1.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. 1.0.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]'",
+ "text": "Replace [OpenCMIS version] with the latest version
number, e.g. 1.1.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"
},
{
@@ -537,7 +537,7 @@
},
{
"location": "/samples/versions/index.html",
- "text": "Working with Versions\n\n\nCMIS 1.0\n\n\nCMIS
1.1\n\n\nSpec 2.1.13\n\n\nOnly documents can be versioned and only if the type
of the document is marked as versionable.\n\n\nTo check whether a document type
is verionable or not, use the following code.\n\n\nOpenCMIS
(Java)\n\n\nDocumentType documentType = (DocumentType)
session.getTypeDefinition(\nmy:documentType\n);\nboolean isVersionable =
Boolean.TRUE.equals(documentType.isVersionable());\n\n\n\n\nPortCMIS
(C#)\n\n\nIDocumentType documentType =
session.GetTypeDefinition(\nmy:documentType\n) as IDocumentType;\nbool
isVersionable = documentType.Versionable == true;\n\n\n\n\nRetrieving the
Version History\n\n\nThe code snippets below show how to retrieve the version
history of a document.\nThe returned list is ordered by creation date
(\ncmis:creationDate\n). The newest version is on the top of the list, the
first version on the bottom.\nIf the version series is checked-out, a \nPWC\n
exists and the user is allowe
d to see the \nPWC\n, then this \nPWC\n is the first entry in the
list.\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\n\nfor (Document
version: document.getAllVersions())\n{\n
System.out.println(child.getVersionLabel());\n}\n\n\n\n\nPortCMIS
(C#)\n\n\nIDocument document = ...\n\nforeach (IDocument version in
document.GetAllVersions())\n{\n
Console.WriteLine(child.VersionLabel);\n}\n\n\n\n\nGetting the Latest
Version\n\n\nThe version that has the most recent last modification date
(\ncmis:lastModificationDate\n) is called the latest version of the version
series.\n\n\nIf you already have a version document object from a version
series, you can test if it is the latest version and if not, get the latest
version.\n\n\n\n\nNote\n\n\nThe test if the document is the latest verion
depends on the property \ncmis:isLatestVersion\n.\nThe property has to loaded
with document object to make this check work. See the page about the
\nOperation Context\n to learn how to accomplish that.\
n\n\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\nDocument latest;\n\nif
(Boolean.TRUE.equals(document.isLatestVersion())) {\n latest = document;\n}
else {\n latest = document.getObjectOfLatestVersion(false); // major =
false\n}\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\nIDocument
latest;\n\nif (document.LatestVersion == true) {\n latest = document;\n}
else {\n latest = document.GetObjectOfLatestVersion(false); // major =
false\n}\n\n\n\n\nIf you only have a document ID, you can use the following
code to get latest version.\n\n\nOpenCMIS (Java)\n\n\nDocument latest =
session.getLatestDocumentVersion(docId);\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument
latest = Session.GetLatestDocumentVersion(docId);\n\n\n\n\nCreating
Versions\n\n\nTo create a new version, the version series has to be checked
out, updated and checked in.\nMany repositories allow a check out only on the
latest version.\n\n\nThe check-out creates a \nPWC\n (Private Working Copy).
The \nPWC\n can (
usually) only be seen and updated by the user who checked out the version
series. There can be only one \nPWC\n per version series, which means that
version series is locked while it is checked out.\n\n\nTo check if a version
series is already checked out, use this snippet.\n\n\nOpenCMIS
(Java)\n\n\nDocument document = ...\n\nboolean isCheckedOut =
Boolean.TRUE.equals(document.isVersionSeriesCheckedOut());\nString checkedOutBy
= document.getVersionSeriesCheckedOutBy(); // not all repositories provide
this\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\n\nbool isCheckedOut
= document.IsVersionSeriesCheckedOut == true;\nstring checkedOutBy =
document.VersionSeriesCheckedOutBy; // not all repositories provide
this\n\n\n\n\nCheck-out\n\n\nOpenCMIS (Java)\n\n\nDocument document =
...\n\nObjectId pwcId = document.checkOut();\nDocument pwc =
session.getObject(pwcId); // get PWC document\n\n\n\n\nPortCMIS
(C#)\n\n\nIDocument document = ...\n\nIObjectId pwcId = document.CheckOut();\nID
ocument pwc = session.GetObject(pwcId); // get PWC document\n\n\n\n\nCancel
Check-out\n\n\nOpenCMIS (Java)\n\n\nDocument pwc =
...\n\npwc.cancelCheckOut();\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument pwc =
...\n\npwc.CancelCheckOut();\n\n\n\n\nCheck-in\n\n\nOpenCMIS
(Java)\n\n\nDocument pwc = ...\n\nObjectId newVersionId = pwc.checkIn(true,
null, null, \nnew version\n);\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument pwc =
...\n\nIObjectId newVersionId = pwc.CheckIn(true, null, null, \nnew
version\n);",
+ "text": "Working with Versions\n\n\nCMIS 1.0\n\n\nCMIS
1.1\n\n\nSpec 2.1.13\n\n\nOnly documents can be versioned and only if the type
of the document is marked as versionable.\n\n\nTo check whether a document type
is verionable or not, use the following code.\n\n\nOpenCMIS
(Java)\n\n\nDocumentType documentType = (DocumentType)
session.getTypeDefinition(\nmy:documentType\n);\nboolean isVersionable =
Boolean.TRUE.equals(documentType.isVersionable());\n\n\n\n\nPortCMIS
(C#)\n\n\nIDocumentType documentType =
session.GetTypeDefinition(\nmy:documentType\n) as IDocumentType;\nbool
isVersionable = documentType.Versionable == true;\n\n\n\n\nRetrieving the
Version History\n\n\nThe code snippets below show how to retrieve the version
history of a document.\nThe returned list is ordered by creation date
(\ncmis:creationDate\n). The newest version is on the top of the list, the
first version on the bottom.\nIf the version series is checked-out, a \nPWC\n
exists and the user is allowe
d to see the \nPWC\n, then this \nPWC\n is the first entry in the
list.\n\n\nUse an \nOperation Context\n to define which details of the version
objects should be returned. \ngetAllVersions\n does not support paging. Only
the complete version history can be requested.\n\n\nOpenCMIS
(Java)\n\n\nDocument document = ...\n\nfor (Document version:
document.getAllVersions())\n{\n
System.out.println(child.getVersionLabel());\n}\n\n\n\n\nPortCMIS
(C#)\n\n\nIDocument document = ...\n\nforeach (IDocument version in
document.GetAllVersions())\n{\n
Console.WriteLine(child.VersionLabel);\n}\n\n\n\n\nGetting the Latest
Version\n\n\nThe version that has the most recent last modification date
(\ncmis:lastModificationDate\n) is called the latest version of the version
series.\n\n\nIf you already have a version document object from a version
series, you can test if it is the latest version and if not, get the latest
version.\n\n\n\n\nNote\n\n\nThe test if the document is the latest verion depen
ds on the property \ncmis:isLatestVersion\n.\nThe property has to loaded with
document object to make this check work. See the page about the \nOperation
Context\n to learn how to accomplish that.\n\n\n\n\nOpenCMIS
(Java)\n\n\nDocument document = ...\nDocument latest;\n\nif
(Boolean.TRUE.equals(document.isLatestVersion())) {\n latest = document;\n}
else {\n latest = document.getObjectOfLatestVersion(false); // major =
false\n}\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\nIDocument
latest;\n\nif (document.LatestVersion == true) {\n latest = document;\n}
else {\n latest = document.GetObjectOfLatestVersion(false); // major =
false\n}\n\n\n\n\nIf you only have a document ID, you can use the following
code to get latest version.\n\n\nOpenCMIS (Java)\n\n\nDocument latest =
session.getLatestDocumentVersion(docId);\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument
latest = Session.GetLatestDocumentVersion(docId);\n\n\n\n\nCreating
Versions\n\n\nTo create a new version, the version
series has to be checked out, updated and checked in.\nMany repositories allow
a check out only on the latest version.\n\n\nThe check-out creates a \nPWC\n
(Private Working Copy). The \nPWC\n can (usually) only be seen and updated by
the user who checked out the version series. There can be only one \nPWC\n per
version series, which means that version series is locked while it is checked
out.\n\n\nTo check if a version series is already checked out, use this
snippet.\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\n\nboolean
isCheckedOut =
Boolean.TRUE.equals(document.isVersionSeriesCheckedOut());\nString checkedOutBy
= document.getVersionSeriesCheckedOutBy(); // not all repositories provide
this\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document = ...\n\nbool isCheckedOut
= document.IsVersionSeriesCheckedOut == true;\nstring checkedOutBy =
document.VersionSeriesCheckedOutBy; // not all repositories provide
this\n\n\n\n\nCheck-out\n\n\nOpenCMIS (Java)\n\n\nDocument document = ...\n\nO
bjectId pwcId = document.checkOut();\nDocument pwc = session.getObject(pwcId);
// get PWC document\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument document =
...\n\nIObjectId pwcId = document.CheckOut();\nIDocument pwc =
session.GetObject(pwcId); // get PWC document\n\n\n\n\nCancel
Check-out\n\n\nOpenCMIS (Java)\n\n\nDocument pwc =
...\n\npwc.cancelCheckOut();\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument pwc =
...\n\npwc.CancelCheckOut();\n\n\n\n\nCheck-in\n\n\nOpenCMIS
(Java)\n\n\nDocument pwc = ...\n\nObjectId newVersionId = pwc.checkIn(true,
null, null, \nnew version\n);\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument pwc =
...\n\nIObjectId newVersionId = pwc.CheckIn(true, null, null, \nnew
version\n);",
"title": "Working with Versions"
},
{
@@ -547,7 +547,7 @@
},
{
"location":
"/samples/versions/index.html#retrieving-the-version-history",
- "text": "The code snippets below show how to retrieve the version
history of a document.\nThe 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.\nIf 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. OpenCMIS (Java) Document document = ...\n\nfor (Document version:
document.getAllVersions())\n{\n
System.out.println(child.getVersionLabel());\n} PortCMIS (C#) IDocument
document = ...\n\nforeach (IDocument version in document.GetAllVersions())\n{\n
Console.WriteLine(child.VersionLabel);\n}",
+ "text": "The code snippets below show how to retrieve the version
history of a document.\nThe 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.\nIf 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
= ...\n\nfor (Document version: document.getAllVersions())\n{\n
System.out.println(child.getVersionLabel());\n} PortCMIS (C#) IDocument
document = ...\n\nforeach (IDocument version in document.GetAllVersions())\n{\n
Console.WriteLine(child.VersionLabel);\n}",
"title": "Retrieving the Version History"
},
{
@@ -577,7 +577,7 @@
},
{
"location": "/samples/properties/index.html",
- "text": "Working with Properties and Secondary Types\n\n\nData
Types\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nThe table below shows how the CMIS data
types are mapped to Java and C# data types.\nMulti-value property values are
set and returned as lists of these data types.\n\n\n\n\n\n\n\n\nCMIS Data
Type\n\n\nOpenCMIS (Java)\n\n\nPortCMIS
(C#)\n\n\n\n\n\n\n\n\n\n\nstring\n\n\nString\n\n\nstring\n\n\n\n\n\n\nboolean\n\n\nBoolean\n\n\nbool\n\n\n\n\n\n\ndecimal\n\n\nBigDecimal\n,
float, double, byte, short, int, long\n\n\ndecimal\n, float,
double\n\n\n\n\n\n\ninteger\n\n\nBigInteger\n, byte, short, int,
long\n\n\nBigInteger\n, sbyte, byte, short, ushort, int, uint,
long\n\n\n\n\n\n\ndatetime\n\n\nGregorianCalendar\n,
Date\n\n\nDateTime\n\n\n\n\n\n\nuri\n\n\nString\n\n\nstring\n\n\n\n\n\n\nid\n\n\nString\n\n\nstring\n\n\n\n\n\n\nhtml\n\n\nString\n\n\nstring\n\n\n\n\n\n\n\n\nProperties\n\n\nRetrieving
Properties\n\n\n\n\nNote\n\n\nOnly the properties that have been requested are
avai
lable. Use an \nOperation Context\n to define, which properties should be
provided by the repository.\n\n\n\n\nThe value of a property that is not set,
has not been provided by the repository, or of a property that does not exits
is \nnull\n.\n\n\nOpenCMIS (Java)\n\n\nDocument doc = ...\n\n// properties
defined in the CMIS specification have getters (here are just a few
examples)\nString id = doc.getId();\nString name = doc.getName();\nString
creator = doc.getCreatedBy();\nGregorianCalendar lastModification =
doc.getLastModificationDate();\n\n\n// all property values can be accessed by
their property ID\nString name2 =
doc.getPropertyValue(\ncmis:name\n);\nBigInteger projectNumber =
doc.getPropertyValue(\nproject:number\n);\n\n// multi value property values are
always returned as lists\nList\nString\n colors =
doc.getPropertyValue(\nproject:colors\n);\n\n\n// there is detailed information
about a property available for generic clients\nProperty\nString\n nameProp =
doc.getProperty(\
ncmis:name\n);\nPropertyType namePropType = nameProp.getType();\nboolean
nameMultiValued = nameProp.isMultiValued();\nString name3 =
nameProp.getValue();\n\nProperty\nBoolean\n lightsProp =
doc.getProperty(\nlights:on\n);\nPropertyType lightsPropType =
lightsProp.getType();\nboolean lightsMultiValued =
lightsProp.isMultiValued();\nBoolean lightsValue =
lightsProp.getValue();\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument doc = ...\n\n//
properties defined in the CMIS specification have getters (here are just a few
examples)\nstring id = doc.Id;\nstring name = doc.Name;\nstring creator =
doc.CreatedBy;\nDateTime? lastModification = doc.LastModificationDate;\n\n//
all property values can be accessed by their property ID\nstring name2 =
doc.GetPropertyAsStringValue(\ncmis:name\n);\nBigInteger projectNumber =
(BigInteger)doc.GetPropertyValue(\nproject:number\n);\n\n// multi value
property values are always returned as lists\nIList\nstring\n colors =
(IList\nstring\n)doc.GetPropertyValue(\nprojec
t:colors\n);\n\n// there is detailed information about a property available
for generic clients\nIProperty nameProp = doc[\ncmis:name\n];\nPropertyType?
namePropType = nameProp.PropertyType;\nbool nameMultiValued =
nameProp.IsMultiValued;\nstring name3 = (string)nameProp.Value;\n\nIProperty
lightsProp = doc[\nlights:on\n];\nPropertyType? lightsPropType =
lightsProp.PropertyType;\nbool lightsMultiValued =
lightsProp.IsMultiValued;\nbool? lightsValue =
(bool?)lightsProp.Value;\n\n\n\n\n\nSetting Properties\n\n\nBefore OpenCMIS or
PortCMIS sends properties to a repository, it checks the type definition
whether the properties exist or not, if the data types match, and if
multi-value properties contain \nnull\n values. If it detects a problem, it
throws an exception before it sends anything to the repository.\n\n\nIf a
property cannot be set, for example because it is a read-only property,
OpenCMIS or PortCMIS silently filters out the property. The value is not sent
to the repository.\n\
n\nOpenCMIS (Java)\n\n\nMap\nString, Object\n properties = new
HashMap\nString, Object\n();\n\n// adding single value
properties\nproperties.put(PropertyIds.NAME,
\nthe-tower\n);\nproperties.put(\nproject:number\n,
1234);\nproperties.put(\nproject:now\n, new
GregorianCalendar());\nproperties.put(\nproject:onTime\n,
true);\nproperties.put(\nproject:budget\n, new
BigDecimal(\n654321.98\n));\n\n// adding a multi value property\nList\nString\n
colors = new
ArrayList\nString\n();\ncolors.add(\nred\n);\ncolors.add(\ngreen\n);\ncolors.add(\nblue\n);\n\nproperties.put(\nproject:colors\n,
colors); \n\n// unsetting a property\nproperties.put(\nproject:something\n,
null);\n\n// call create... or update...\n\n\n\n\nPortCMIS
(C#)\n\n\nIDictionary\nstring, object\n properties = new Dictionary\nstring,
object\n();\n\n// adding single value properties\nproperties[PropertyIds.Name]
= \nthe-tower\n;\nproperties[\nproject:number\n] =
1234;\nproperties[\nproject:now\n] = DateTime.Now;\nproperties[\npro
ject:onTime\n] = true;\nproperties[\nproject:budget\n] = 654321.98M;\n\n//
adding a multi value property\nIList\nstring\n colors = new
List\nstring\n();\ncolors.Add(\nred\n);\ncolors.Add(\ngreen\n);\ncolors.Add(\nblue\n);\n\nproperties[\nproject:colors\n]
= colors; \n\n// unsetting a property\nproperties[\nproject:something\n] =
null;\n\n// call Create... or Update...\n\n\n\n\nSecondary Types\n\n\nCMIS
1.1\n\n\nSpec 2.1.19\n\n\nSecondary types can be added during creation of an
object and later added and removed by updating its properties.\n\n\nIn general,
secondary types can be added and removed at any time.\nBut a repository may
have rules and constraints that prevents a client from making those
changes.\n\n\nSetting Secondary Types\n\n\nOpenCMIS (Java)\n\n\nFolder parent =
...\n\nMap\nString, Object\n properties = new HashMap\nString,
Object\n();\n\n// set standard CMIS
properties\nproperties.put(PropertyIds.NAME,
\nMyNewDocument\n);\nproperties.put(PropertyIds.OBJECT_TYPE_ID, \n
cmis:document\n);\n\n// add two secondary types\nList\nString\n secondaryTypes
= new
ArrayList\nString\n();\nsecondaryTypes.add(\ncustom:classifictaion\n);\nsecondaryTypes.add(\ncustom:draft\n);\n\nproperties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
secondaryTypes);\n\n// set secondary type
properties\nproperties.put(\nclassifictaion\n,
\nconfidential\n);\nproperties.put(\ndraftState\n, \nearly\n);\n\nContentStream
contentStream = ...\n\n// create the document\nDocument newDoc =
parent.createDocument(properties, contentStream,
VersioningState.NONE);\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder parent =
...\n\nIDictionary\nstring, object\n properties = new Dictionary\nstring,
object\n();\n\n// set standard CMIS properties\nproperties[PropertyIds.Name] =
\nMyNewDocument\n;\nproperties[PropertyIds.ObjectTypeId] =
\ncmis:document\n;\n\n// add two secondary types\nIList\nstring\n
secondaryTypes = new
List\nstring\n();\nsecondaryTypes.Add(\ncustom:classifictaion\n);\nsecondaryTypes.Add(\ncustom:
draft\n);\n\nproperties[PropertyIds.SecondaryObjectTypeIds] =
secondaryTypes;\n\n// set secondary type
properties\nproperties[\nclassifictaion\n] =
\nconfidential\n;\nproperties[\ndraftState\n] = \nearly\n;\n\nContentStream
contentStream = ...\n\n// create the document\nIDocument newDoc =
parent.CreateDocument(properties, contentStream,
VersioningState.None);\n\n\n\n\nAdding Secondary Types\n\n\nOpenCMIS
(Java)\n\n\nCmisObject cmisObject = ...\n\n// get current list of secondary
types\nList\nString\n secondaryTypes =
doc.getPropertyValue(PropertyIds.SECONDARY_OBJECT_TYPE_IDS);\nif
(secondaryTypes == null) {\n secondaryTypes = new
ArrayList\nString\n();\n}\n\nMap\nString, Object\n properties = new
HashMap\nString, Object\n();\n\n// add the new secondary
type\nsecondaryTypes.add(\ncustom:classifictaion\n);\nproperties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
secondaryTypes);\n\n// set secondary type
property\nproperties.put(\nclassifictaion\n, \npublic\n);\n\n//
update\ncmisObjec
t.updateProperties(properties);\n\n\n\n\n\nPortCMIS (C#)\n\n\nICmisObject
cmisObject = ...\n\n// get current list of secondary types\nIList\nstring\n
secondaryTypes =
(IList\nstring\n)doc.GetPropertyValue(PropertyIds.SecondaryObjectTypeIds);\nif
(secondaryTypes == null) {\n secondaryTypes = new
List\nstring\n();\n}\n\nIDictonary\nstring, object\n properties = new
Dictonary\nstring, object\n();\n\n// add the new secondary
type\nsecondaryTypes.Add(\ncustom:classifictaion\n);\nproperties[PropertyIds.SecondaryObjectTypeIds]
= secondaryTypes;\n\n// set secondary type
property\nproperties[\nclassifictaion\n] = \npublic\n;\n\n//
update\ncmisObject.UpdateProperties(properties);\n\n\n\n\nRemoving Secondary
Types\n\n\nOpenCMIS (Java)\n\n\nCmisObject cmisObject = ...\n\n// get the
current list of secondary types\nList\nString\n secondaryTypes =
doc.getPropertyValue(PropertyIds.SECONDARY_OBJECT_TYPE_IDS);\nif
(secondaryTypes == null || !secondaryTypes.contains(\ncustom:classifictaion\n))
{\n
// there is nothing to remove\n return;\n}\n\nMap\nString, Object\n
properties = new HashMap\nString, Object\n();\n\n// remove the new secondary
type\nsecondaryTypes.remove(\ncustom:classifictaion\n);\nproperties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
secondaryTypes);\n\n//
update\ncmisObject.updateProperties(properties);\n\n\n\n\nPortCMIS
(C#)\n\n\nICmisObject cmisObject = ...\n\n// get current list of secondary
types\nIList\nstring\n secondaryTypes =
(IList\nstring\n)doc.GetPropertyValue(PropertyIds.SecondaryObjectTypeIds);\nif
(secondaryTypes == null || !secondaryTypes.Contains(\ncustom:classifictaion\n))
{\n // there is nothing to remove\n return;\n}\n\nIDictionary\nstring,
object\n properties = new Dictionary\nstring, object\n();\n\n// remove the
secondary
type\nsecondaryTypes.Remove(\ncustom:classifictaion\n);\nproperties[PropertyIds.SecondaryObjectTypeIds]
= secondaryTypes;\n\n// update\ncmisObject.UpdateProperties(properties);",
+ "text": "Working with Properties and Secondary Types\n\n\nData
Types\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nThe table below shows how the CMIS data
types are mapped to Java and C# data types.\nMulti-value property values are
set and returned as lists of these data types.\n\n\n\n\n\n\n\n\nCMIS Data
Type\n\n\nOpenCMIS (Java)\n\n\nPortCMIS
(C#)\n\n\n\n\n\n\n\n\n\n\nstring\n\n\nString\n\n\nstring\n\n\n\n\n\n\nboolean\n\n\nBoolean\n\n\nbool\n\n\n\n\n\n\ndecimal\n\n\nBigDecimal\n,
float, double, byte, short, int, long\n\n\ndecimal\n, float,
double\n\n\n\n\n\n\ninteger\n\n\nBigInteger\n, byte, short, int,
long\n\n\nBigInteger\n, sbyte, byte, short, ushort, int, uint,
long\n\n\n\n\n\n\ndatetime\n\n\nGregorianCalendar\n,
Date\n\n\nDateTime\n\n\n\n\n\n\nuri\n\n\nString\n\n\nstring\n\n\n\n\n\n\nid\n\n\nString\n\n\nstring\n\n\n\n\n\n\nhtml\n\n\nString\n\n\nstring\n\n\n\n\n\n\n\n\nProperties\n\n\nRetrieving
Properties\n\n\n\n\nNote\n\n\nOnly the properties that have been requested are
avai
lable. Use an \nOperation Context\n to define, which properties should be
provided by the repository.\n\n\n\n\nThe value of a property that is not set,
has not been provided by the repository, or of a property that does not exits
is \nnull\n.\n\n\nOpenCMIS (Java)\n\n\nDocument doc = ...\n\n// properties
defined in the CMIS specification have getters (here are just a few
examples)\nString id = doc.getId();\nString name = doc.getName();\nString
creator = doc.getCreatedBy();\nGregorianCalendar lastModification =
doc.getLastModificationDate();\n\n\n// all property values can be accessed by
their property ID\nString name2 =
doc.getPropertyValue(\ncmis:name\n);\nBigInteger projectNumber =
doc.getPropertyValue(\nproject:number\n);\n\n// multi value property values are
always returned as lists\nList\nString\n colors =
doc.getPropertyValue(\nproject:colors\n);\n\n// there is detailed information
about a property available for generic clients\nProperty\nString\n nameProp =
doc.getProperty(\nc
mis:name\n);\nPropertyType namePropType = nameProp.getType();\nboolean
nameMultiValued = nameProp.isMultiValued();\nString name3 =
nameProp.getValue();\n\nProperty\nBoolean\n lightsProp =
doc.getProperty(\nlights:on\n);\nPropertyType lightsPropType =
lightsProp.getType();\nboolean lightsMultiValued =
lightsProp.isMultiValued();\nBoolean lightsValue =
lightsProp.getValue();\n\n\n\n\nPortCMIS (C#)\n\n\nIDocument doc = ...\n\n//
properties defined in the CMIS specification have getters (here are just a few
examples)\nstring id = doc.Id;\nstring name = doc.Name;\nstring creator =
doc.CreatedBy;\nDateTime? lastModification = doc.LastModificationDate;\n\n//
all property values can be accessed by their property ID\nstring name2 =
doc.GetPropertyAsStringValue(\ncmis:name\n);\nBigInteger projectNumber =
(BigInteger)doc.GetPropertyValue(\nproject:number\n);\n\n// multi value
property values are always returned as lists\nIList\nstring\n colors =
(IList\nstring\n)doc.GetPropertyValue(\nproject:
colors\n);\n\n// there is detailed information about a property available for
generic clients\nIProperty nameProp = doc[\ncmis:name\n];\nPropertyType?
namePropType = nameProp.PropertyType;\nbool nameMultiValued =
nameProp.IsMultiValued;\nstring name3 = (string)nameProp.Value;\n\nIProperty
lightsProp = doc[\nlights:on\n];\nPropertyType? lightsPropType =
lightsProp.PropertyType;\nbool lightsMultiValued =
lightsProp.IsMultiValued;\nbool? lightsValue =
(bool?)lightsProp.Value;\n\n\n\n\n\nSetting Properties\n\n\nBefore OpenCMIS or
PortCMIS sends properties to a repository, it checks the type definition
whether the properties exist or not, if the data types match, and if
multi-value properties contain \nnull\n values. If it detects a problem, it
throws an exception before it sends anything to the repository.\n\n\nIf a
property cannot be set, for example because it is a read-only property,
OpenCMIS or PortCMIS silently filters out the property. The value is not sent
to the repository.\n\n\
nOpenCMIS (Java)\n\n\nMap\nString, Object\n properties = new HashMap\nString,
Object\n();\n\n// adding single value
properties\nproperties.put(PropertyIds.NAME,
\nthe-tower\n);\nproperties.put(\nproject:number\n,
1234);\nproperties.put(\nproject:now\n, new
GregorianCalendar());\nproperties.put(\nproject:onTime\n,
true);\nproperties.put(\nproject:budget\n, new
BigDecimal(\n654321.98\n));\n\n// adding a multi value property\nList\nString\n
colors = new
ArrayList\nString\n();\ncolors.add(\nred\n);\ncolors.add(\ngreen\n);\ncolors.add(\nblue\n);\n\nproperties.put(\nproject:colors\n,
colors); \n\n// unsetting a property\nproperties.put(\nproject:something\n,
null);\n\n// call create... or update...\n\n\n\n\nPortCMIS
(C#)\n\n\nIDictionary\nstring, object\n properties = new Dictionary\nstring,
object\n();\n\n// adding single value properties\nproperties[PropertyIds.Name]
= \nthe-tower\n;\nproperties[\nproject:number\n] =
1234;\nproperties[\nproject:now\n] = DateTime.Now;\nproperties[\nproje
ct:onTime\n] = true;\nproperties[\nproject:budget\n] = 654321.98M;\n\n//
adding a multi value property\nIList\nstring\n colors = new
List\nstring\n();\ncolors.Add(\nred\n);\ncolors.Add(\ngreen\n);\ncolors.Add(\nblue\n);\n\nproperties[\nproject:colors\n]
= colors; \n\n// unsetting a property\nproperties[\nproject:something\n] =
null;\n\n// call Create... or Update...\n\n\n\n\nSecondary Types\n\n\nCMIS
1.1\n\n\nSpec 2.1.19\n\n\nSecondary types can be added during creation of an
object and later added and removed by updating its properties.\n\n\nIn general,
secondary types can be added and removed at any time.\nBut a repository may
have rules and constraints that prevents a client from making those
changes.\n\n\nSetting Secondary Types\n\n\nOpenCMIS (Java)\n\n\nFolder parent =
...\n\nMap\nString, Object\n properties = new HashMap\nString,
Object\n();\n\n// set standard CMIS
properties\nproperties.put(PropertyIds.NAME,
\nMyNewDocument\n);\nproperties.put(PropertyIds.OBJECT_TYPE_ID, \ncm
is:document\n);\n\n// add two secondary types\nList\nString\n secondaryTypes =
new
ArrayList\nString\n();\nsecondaryTypes.add(\ncustom:classifictaion\n);\nsecondaryTypes.add(\ncustom:draft\n);\n\nproperties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
secondaryTypes);\n\n// set secondary type
properties\nproperties.put(\nclassifictaion\n,
\nconfidential\n);\nproperties.put(\ndraftState\n, \nearly\n);\n\nContentStream
contentStream = ...\n\n// create the document\nDocument newDoc =
parent.createDocument(properties, contentStream,
VersioningState.NONE);\n\n\n\n\nPortCMIS (C#)\n\n\nIFolder parent =
...\n\nIDictionary\nstring, object\n properties = new Dictionary\nstring,
object\n();\n\n// set standard CMIS properties\nproperties[PropertyIds.Name] =
\nMyNewDocument\n;\nproperties[PropertyIds.ObjectTypeId] =
\ncmis:document\n;\n\n// add two secondary types\nIList\nstring\n
secondaryTypes = new
List\nstring\n();\nsecondaryTypes.Add(\ncustom:classifictaion\n);\nsecondaryTypes.Add(\ncustom:dr
aft\n);\n\nproperties[PropertyIds.SecondaryObjectTypeIds] =
secondaryTypes;\n\n// set secondary type
properties\nproperties[\nclassifictaion\n] =
\nconfidential\n;\nproperties[\ndraftState\n] = \nearly\n;\n\nContentStream
contentStream = ...\n\n// create the document\nIDocument newDoc =
parent.CreateDocument(properties, contentStream,
VersioningState.None);\n\n\n\n\nAdding Secondary Types\n\n\nOpenCMIS
(Java)\n\n\nCmisObject cmisObject = ...\n\n// get current list of secondary
types\nList\nString\n secondaryTypes =
doc.getPropertyValue(PropertyIds.SECONDARY_OBJECT_TYPE_IDS);\nif
(secondaryTypes == null) {\n secondaryTypes = new
ArrayList\nString\n();\n}\n\nMap\nString, Object\n properties = new
HashMap\nString, Object\n();\n\n// add the new secondary
type\nsecondaryTypes.add(\ncustom:classifictaion\n);\nproperties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
secondaryTypes);\n\n// set secondary type
property\nproperties.put(\nclassifictaion\n, \npublic\n);\n\n//
update\ncmisObject.
updateProperties(properties);\n\n\n\n\nOpenCMIS (Java)\n\n\n// the convenient
way...\n\nCmisObject cmisObject = ...\n\n// set secondary type
property\nMap\nString, Object\n properties = new HashMap\nString,
Object\n();\nproperties.put(\nclassifictaion\n, \npublic\n);\n\n// update with
secondary type\ncmisObject.updateProperties(properties,
Collections.singletonList(\ncustom:classifictaion\n),
null);\n\n\n\n\n\nPortCMIS (C#)\n\n\nICmisObject cmisObject = ...\n\n// get
current list of secondary types\nIList\nstring\n secondaryTypes =
(IList\nstring\n)doc.GetPropertyValue(PropertyIds.SecondaryObjectTypeIds);\nif
(secondaryTypes == null) {\n secondaryTypes = new
List\nstring\n();\n}\n\nIDictonary\nstring, object\n properties = new
Dictonary\nstring, object\n();\n\n// add the new secondary
type\nsecondaryTypes.Add(\ncustom:classifictaion\n);\nproperties[PropertyIds.SecondaryObjectTypeIds]
= secondaryTypes;\n\n// set secondary type
property\nproperties[\nclassifictaion\n] = \npublic\n;
\n\n// update\ncmisObject.UpdateProperties(properties);\n\n\n\n\nRemoving
Secondary Types\n\n\nOpenCMIS (Java)\n\n\nCmisObject cmisObject = ...\n\n// get
the current list of secondary types\nList\nString\n secondaryTypes =
doc.getPropertyValue(PropertyIds.SECONDARY_OBJECT_TYPE_IDS);\nif
(secondaryTypes == null || !secondaryTypes.contains(\ncustom:classifictaion\n))
{\n // there is nothing to remove\n return;\n}\n\nMap\nString, Object\n
properties = new HashMap\nString, Object\n();\n\n// remove the new secondary
type\nsecondaryTypes.remove(\ncustom:classifictaion\n);\nproperties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
secondaryTypes);\n\n//
update\ncmisObject.updateProperties(properties);\n\n\n\n\nOpenCMIS
(Java)\n\n\n// the convenient way...\n\nCmisObject cmisObject = ...\n\n//
remove secondary type\ncmisObject.updateProperties(null, null,
Collections.singletonList(\ncustom:classifictaion\n));\n\n\n\n\n\nPortCMIS
(C#)\n\n\nICmisObject cmisObject = ...\n\n// get current list
of secondary types\nIList\nstring\n secondaryTypes =
(IList\nstring\n)doc.GetPropertyValue(PropertyIds.SecondaryObjectTypeIds);\nif
(secondaryTypes == null || !secondaryTypes.Contains(\ncustom:classifictaion\n))
{\n // there is nothing to remove\n return;\n}\n\nIDictionary\nstring,
object\n properties = new Dictionary\nstring, object\n();\n\n// remove the
secondary
type\nsecondaryTypes.Remove(\ncustom:classifictaion\n);\nproperties[PropertyIds.SecondaryObjectTypeIds]
= secondaryTypes;\n\n// update\ncmisObject.UpdateProperties(properties);",
"title": "Working with Properties and Secondary Types"
},
{
@@ -597,7 +597,7 @@
},
{
"location":
"/samples/properties/index.html#retrieving-properties",
- "text": "Note Only the properties that have been requested are
available. Use an Operation Context to define, which properties should be
provided by the repository. The value of a property that is not set, has not
been provided by the repository, or of a property that does not exits is null
. OpenCMIS (Java) Document doc = ...\n\n// properties defined in the CMIS
specification have getters (here are just a few examples)\nString id =
doc.getId();\nString name = doc.getName();\nString creator =
doc.getCreatedBy();\nGregorianCalendar lastModification =
doc.getLastModificationDate();\n\n\n// all property values can be accessed by
their property ID\nString name2 = doc.getPropertyValue( cmis:name
);\nBigInteger projectNumber = doc.getPropertyValue( project:number );\n\n//
multi value property values are always returned as lists\nList String colors =
doc.getPropertyValue( project:colors );\n\n\n// there is detailed information
about a property available for generic cli
ents\nProperty String nameProp = doc.getProperty( cmis:name );\nPropertyType
namePropType = nameProp.getType();\nboolean nameMultiValued =
nameProp.isMultiValued();\nString name3 = nameProp.getValue();\n\nProperty
Boolean lightsProp = doc.getProperty( lights:on );\nPropertyType
lightsPropType = lightsProp.getType();\nboolean lightsMultiValued =
lightsProp.isMultiValued();\nBoolean lightsValue = lightsProp.getValue();
PortCMIS (C#) IDocument doc = ...\n\n// properties defined in the CMIS
specification have getters (here are just a few examples)\nstring id =
doc.Id;\nstring name = doc.Name;\nstring creator = doc.CreatedBy;\nDateTime?
lastModification = doc.LastModificationDate;\n\n// all property values can be
accessed by their property ID\nstring name2 = doc.GetPropertyAsStringValue(
cmis:name );\nBigInteger projectNumber = (BigInteger)doc.GetPropertyValue(
project:number );\n\n// multi value property values are always returned as
lists\nIList string colors = (IList string )doc.
GetPropertyValue( project:colors );\n\n// there is detailed information about
a property available for generic clients\nIProperty nameProp = doc[ cmis:name
];\nPropertyType? namePropType = nameProp.PropertyType;\nbool nameMultiValued =
nameProp.IsMultiValued;\nstring name3 = (string)nameProp.Value;\n\nIProperty
lightsProp = doc[ lights:on ];\nPropertyType? lightsPropType =
lightsProp.PropertyType;\nbool lightsMultiValued =
lightsProp.IsMultiValued;\nbool? lightsValue = (bool?)lightsProp.Value;",
+ "text": "Note Only the properties that have been requested are
available. Use an Operation Context to define, which properties should be
provided by the repository. The value of a property that is not set, has not
been provided by the repository, or of a property that does not exits is null
. OpenCMIS (Java) Document doc = ...\n\n// properties defined in the CMIS
specification have getters (here are just a few examples)\nString id =
doc.getId();\nString name = doc.getName();\nString creator =
doc.getCreatedBy();\nGregorianCalendar lastModification =
doc.getLastModificationDate();\n\n\n// all property values can be accessed by
their property ID\nString name2 = doc.getPropertyValue( cmis:name
);\nBigInteger projectNumber = doc.getPropertyValue( project:number );\n\n//
multi value property values are always returned as lists\nList String colors =
doc.getPropertyValue( project:colors );\n\n// there is detailed information
about a property available for generic clien
ts\nProperty String nameProp = doc.getProperty( cmis:name );\nPropertyType
namePropType = nameProp.getType();\nboolean nameMultiValued =
nameProp.isMultiValued();\nString name3 = nameProp.getValue();\n\nProperty
Boolean lightsProp = doc.getProperty( lights:on );\nPropertyType
lightsPropType = lightsProp.getType();\nboolean lightsMultiValued =
lightsProp.isMultiValued();\nBoolean lightsValue = lightsProp.getValue();
PortCMIS (C#) IDocument doc = ...\n\n// properties defined in the CMIS
specification have getters (here are just a few examples)\nstring id =
doc.Id;\nstring name = doc.Name;\nstring creator = doc.CreatedBy;\nDateTime?
lastModification = doc.LastModificationDate;\n\n// all property values can be
accessed by their property ID\nstring name2 = doc.GetPropertyAsStringValue(
cmis:name );\nBigInteger projectNumber = (BigInteger)doc.GetPropertyValue(
project:number );\n\n// multi value property values are always returned as
lists\nIList string colors = (IList string )doc.Ge
tPropertyValue( project:colors );\n\n// there is detailed information about a
property available for generic clients\nIProperty nameProp = doc[ cmis:name
];\nPropertyType? namePropType = nameProp.PropertyType;\nbool nameMultiValued =
nameProp.IsMultiValued;\nstring name3 = (string)nameProp.Value;\n\nIProperty
lightsProp = doc[ lights:on ];\nPropertyType? lightsPropType =
lightsProp.PropertyType;\nbool lightsMultiValued =
lightsProp.IsMultiValued;\nbool? lightsValue = (bool?)lightsProp.Value;",
"title": "Retrieving Properties"
},
{
@@ -617,17 +617,17 @@
},
{
"location":
"/samples/properties/index.html#adding-secondary-types",
- "text": "OpenCMIS (Java) CmisObject cmisObject = ...\n\n// get
current list of secondary types\nList String secondaryTypes =
doc.getPropertyValue(PropertyIds.SECONDARY_OBJECT_TYPE_IDS);\nif
(secondaryTypes == null) {\n secondaryTypes = new ArrayList String
();\n}\n\nMap String, Object properties = new HashMap String, Object ();\n\n//
add the new secondary type\nsecondaryTypes.add( custom:classifictaion
);\nproperties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
secondaryTypes);\n\n// set secondary type property\nproperties.put(
classifictaion , public );\n\n//
update\ncmisObject.updateProperties(properties); PortCMIS (C#) ICmisObject
cmisObject = ...\n\n// get current list of secondary types\nIList string
secondaryTypes = (IList string
)doc.GetPropertyValue(PropertyIds.SecondaryObjectTypeIds);\nif (secondaryTypes
== null) {\n secondaryTypes = new List string ();\n}\n\nIDictonary string,
object properties = new Dictonary string, object ();\n\n// add the new se
condary type\nsecondaryTypes.Add( custom:classifictaion
);\nproperties[PropertyIds.SecondaryObjectTypeIds] = secondaryTypes;\n\n// set
secondary type property\nproperties[ classifictaion ] = public ;\n\n//
update\ncmisObject.UpdateProperties(properties);",
+ "text": "OpenCMIS (Java) CmisObject cmisObject = ...\n\n// get
current list of secondary types\nList String secondaryTypes =
doc.getPropertyValue(PropertyIds.SECONDARY_OBJECT_TYPE_IDS);\nif
(secondaryTypes == null) {\n secondaryTypes = new ArrayList String
();\n}\n\nMap String, Object properties = new HashMap String, Object ();\n\n//
add the new secondary type\nsecondaryTypes.add( custom:classifictaion
);\nproperties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
secondaryTypes);\n\n// set secondary type property\nproperties.put(
classifictaion , public );\n\n//
update\ncmisObject.updateProperties(properties); OpenCMIS (Java) // the
convenient way...\n\nCmisObject cmisObject = ...\n\n// set secondary type
property\nMap String, Object properties = new HashMap String, Object
();\nproperties.put( classifictaion , public );\n\n// update with secondary
type\ncmisObject.updateProperties(properties, Collections.singletonList(
custom:classifictaion ), null); PortCMIS (C#
) ICmisObject cmisObject = ...\n\n// get current list of secondary
types\nIList string secondaryTypes = (IList string
)doc.GetPropertyValue(PropertyIds.SecondaryObjectTypeIds);\nif (secondaryTypes
== null) {\n secondaryTypes = new List string ();\n}\n\nIDictonary string,
object properties = new Dictonary string, object ();\n\n// add the new
secondary type\nsecondaryTypes.Add( custom:classifictaion
);\nproperties[PropertyIds.SecondaryObjectTypeIds] = secondaryTypes;\n\n// set
secondary type property\nproperties[ classifictaion ] = public ;\n\n//
update\ncmisObject.UpdateProperties(properties);",
"title": "Adding Secondary Types"
},
{
"location":
"/samples/properties/index.html#removing-secondary-types",
- "text": "OpenCMIS (Java) CmisObject cmisObject = ...\n\n// get
the current list of secondary types\nList String secondaryTypes =
doc.getPropertyValue(PropertyIds.SECONDARY_OBJECT_TYPE_IDS);\nif
(secondaryTypes == null || !secondaryTypes.contains( custom:classifictaion ))
{\n // there is nothing to remove\n return;\n}\n\nMap String, Object
properties = new HashMap String, Object ();\n\n// remove the new secondary
type\nsecondaryTypes.remove( custom:classifictaion
);\nproperties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
secondaryTypes);\n\n// update\ncmisObject.updateProperties(properties);
PortCMIS (C#) ICmisObject cmisObject = ...\n\n// get current list of secondary
types\nIList string secondaryTypes = (IList string
)doc.GetPropertyValue(PropertyIds.SecondaryObjectTypeIds);\nif (secondaryTypes
== null || !secondaryTypes.Contains( custom:classifictaion )) {\n // there
is nothing to remove\n return;\n}\n\nIDictionary string, object properties
= new Dict
ionary string, object ();\n\n// remove the secondary
type\nsecondaryTypes.Remove( custom:classifictaion
);\nproperties[PropertyIds.SecondaryObjectTypeIds] = secondaryTypes;\n\n//
update\ncmisObject.UpdateProperties(properties);",
+ "text": "OpenCMIS (Java) CmisObject cmisObject = ...\n\n// get
the current list of secondary types\nList String secondaryTypes =
doc.getPropertyValue(PropertyIds.SECONDARY_OBJECT_TYPE_IDS);\nif
(secondaryTypes == null || !secondaryTypes.contains( custom:classifictaion ))
{\n // there is nothing to remove\n return;\n}\n\nMap String, Object
properties = new HashMap String, Object ();\n\n// remove the new secondary
type\nsecondaryTypes.remove( custom:classifictaion
);\nproperties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
secondaryTypes);\n\n// update\ncmisObject.updateProperties(properties);
OpenCMIS (Java) // the convenient way...\n\nCmisObject cmisObject = ...\n\n//
remove secondary type\ncmisObject.updateProperties(null, null,
Collections.singletonList( custom:classifictaion )); PortCMIS (C#)
ICmisObject cmisObject = ...\n\n// get current list of secondary types\nIList
string secondaryTypes = (IList string
)doc.GetPropertyValue(PropertyIds.SecondaryObjectT
ypeIds);\nif (secondaryTypes == null || !secondaryTypes.Contains(
custom:classifictaion )) {\n // there is nothing to remove\n
return;\n}\n\nIDictionary string, object properties = new Dictionary string,
object ();\n\n// remove the secondary type\nsecondaryTypes.Remove(
custom:classifictaion );\nproperties[PropertyIds.SecondaryObjectTypeIds] =
secondaryTypes;\n\n// update\ncmisObject.UpdateProperties(properties);",
"title": "Removing Secondary Types"
},
{
"location": "/samples/operation-context/index.html",
- "text": "Understanding the Operation Context\n\n\nThe amount of
metadata and associated information retrieved during an OpenCMIS or PortCMIS
operation could be large, so certain methods return a sensible subset of the
information by default, and provide additional methods that take an
OperationContext. An OperationContext allows you to tune the amount of
information returned by setting property filters, rendition filters, or by
setting flags to include path segments, ACLs, Allowable Actions, Policies, and
Relationships. The OperationContext is also used to control paging and caching
in an operation.\n\n\nProperty Filter\n\n\nSpec 2.2.1.2.1\n\n\nThe property
filter defines which properties the repository must return. Only select the
properties you really need to keep the transferred data as small as possible.
The repository may return more properties than specified.\n\n\n\n\nQuery
Names\n\n\nThe property filter is a collection of query names, not property
IDs. The query n
ames and property IDs of all properties defined in the CMIS specifation are
same and therefore interchangeable. That might not be the case for custom
types. \n\n\n\n\n\n\nMinimal Property Filter\n\n\nOpenCMIS and PortCMIS need at
least the properties \ncmis:objectId\n, \ncmis:baseTypeId\n, and
\ncmis:objectTypeId\n to create objects.\nThe default operation context
implementation adds these properties automatically if they are missing in the
property filter.\n\n\n\n\nOpenCMIS (Java)\n\n\nOperationContext oc =
...\noc.setFilterString(\ncmis:objectId,cmis:name,cmis:createdBy\n);\n\n\n\n\nPortCMIS
(C#)\n\n\nIOperationContext oc = ...\noc.FilterString =
\ncmis:objectId,cmis:name,cmis:createdBy\n;\n\n\n\n\nAllowable
Actions\n\n\nSpec 2.2.1.2.6\n\n\nCalculating the Allowable Actions of an object
can be very expensive for a repository. Don\nt request them if you don\nt need
them.\n\n\nOpenCMIS (Java)\n\n\nOperationContext oc =
...\noc.setIncludeAllowableActions(false); // don't request Allo
wable Actions\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc =
...\noc.IncludeAllowableActions = false; // don't request Allowable
Actions\n\n\n\n\nACLs\n\n\nSpec 2.2.1.2.5\n\n\nOpenCMIS
(Java)\n\n\nOperationContext oc = ...\noc.setIncludeAcls(true); // request
ACLs\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc = ...\noc.IncludeAcls =
true; // request ACLs\n\n\n\n\nRelationships\n\n\nSpec 2.2.1.2.2\n\n\nOpenCMIS
(Java)\n\n\nOperationContext oc =
...\noc.setIncludeRelationships(IncludeRelationships.BOTH); // request source
and target relationships\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc =
...\noc.IncludeRelationships = IncludeRelationships.Both; // request source and
target relationships\n\n\n\n\nPolicies\n\n\nSpec 2.2.1.2.3\n\n\nOpenCMIS
(Java)\n\n\nOperationContext oc = ...\noc.setIncludePolicies(true); // request
policies\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc =
...\noc.IncludePolicies = true; // request policies\n\n\n\n\nRendition
Filter\n\n\nSpec 2.2.1.2.
4\n\n\nThe rendition filter defines which rendition details should be returned
by the repository. This filter is a comma separated list of rendition kinds
(e.g. \ncmis:thumbnail\n) and MIME types. \n\n\nOpenCMIS
(Java)\n\n\nOperationContext oc =
...\noc.setRenditionFilterString(\ncmis:thumbnail,image/*\n);\n\n\n\n\nPortCMIS
(C#)\n\n\nIOperationContext oc = ...\noc.RenditionFilterString =
\ncmis:thumbnail,image/*\n;\n\n\n\n\nRendition filer examples:\n\n\n\n\n*\n
(include all renditions)\n\n\ncmis:thumbnail\n (include only
thumbnails)\n\n\nimage/*\n (include all image
renditions)\n\n\napplication/pdf,application/x-shockwave-flash\n (include web
ready renditions)\n\n\ncmis:none\n (exclude all renditions)\n\n\n\n\nOrder
By\n\n\nSpec 2.2.1.2.7\n\n\nThe list of objects returned by \ngetChildren\n,
\ngetCheckedOutDocs\n, and \nqueryObjects\n can be ordered. This is a comma
separated list of query names, followed by an optional ascending modifier
\nASC\n or descending modifier \nDESC\n for
each query name. If the modifier is not stated, \nASC\n is
assumed.\n\n\n\n\nQuery Names\n\n\nSimilar to the property filter this is a
collection of query names, not property IDs.\n\n\n\n\nOpenCMIS
(Java)\n\n\nOperationContext oc = ...\noc.setOrderBy(\ncmis:createdBy
DESC,cmis:name ASC\n);\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc =
...\noc.OrderBy(\ncmis:createdBy DESC,cmis:name
ASC\n);\n\n\n\n\nCaching\n\n\nAll objects retrieved by \ngetObject\n and
\ngetObjectByPath\n 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.\n\n\nSee also the section about the
\nobject cache\n.\n\n\nOpenCMIS (Java)\n\n\nOperationContext oc =
...\noc.setCacheEnabled(false); // no caching please\n\n\n\n\nPortCMIS
(C#)\n\n\nIOperationContext oc = ...\noc.CacheEnabled = false; // no caching
please\n\n\n\n\n
Creating Operation Context Objects\n\n\nOpenCMIS (Java)\n\n\n// create the
default operation context\nOperationContext oc1 =
session.createOperationContext();\n\n// create an operation context that
selects nothing except the provided properties\nOperationContext oc2 =
OperationContextUtils.createMinimumOperationContext(\ncmis:objectId\n,
\ncmis:name\n, \ncmis:createdBy\n);\n\n// create an operation context that
selects everything\nOperationContext oc3 =
OperationContextUtils.createMaximumOperationContext();\n\n\n\n\nPortCMIS
(C#)\n\n\n// create the default operation context\nIOperationContext oc1 =
Session.CreateOperationContext();\n\n// create an operation context that
selects nothing except the provided properties\nIOperationContext oc2 =
OperationContextUtils.CreateMinimumOperationContext(\ncmis:objectId\n,
\ncmis:name\n, \ncmis:createdBy\n);\n\n// create an operation context that
selects everything\nIOperationContext oc3 =
OperationContextUtils.CreateMaximumOperationContext();\n
\n\n\n\nUsing an Operation Context\n\n\nMany methods that retrieve objects or
data accept an Operation Context object as an additional parameter.\nIf no
Operation Context object is provided, a default Operation Context object
defines what should be requested.\n\n\nOpenCMIS (Java)\n\n\nOperationContext oc
= ...\n\nCmisObject cmisObject1 = session.getObject(id, oc);\nCmisObject
cmisObject2 = session.getObjectByPath(path, oc);\nItemIterable\nCmisObject\n
children = folder.getChildren(oc);\nList\nDocument\n versions =
doc.getAllVersions(oc);\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc =
...\n\nICmisObject cmisObject1 = session.GetObject(id, oc);\nICmisObject
cmisObject2 = session.GetObjectByPath(path,
oc);\nIItemEnumerable\nICmisObject\n children =
folder.GetChildren(oc);\nIList\nIDocument\n versions =
doc.GetAllVersions(oc);",
+ "text": "Understanding the Operation Context\n\n\nThe amount of
metadata and associated information retrieved during an OpenCMIS or PortCMIS
operation could be large, so certain methods return a sensible subset of the
information by default, and provide additional methods that take an
OperationContext. An OperationContext allows you to tune the amount of
information returned by setting property filters, rendition filters, or by
setting flags to include path segments, ACLs, Allowable Actions, Policies, and
Relationships. The OperationContext is also used to control paging and caching
in an operation.\n\n\nProperty Filter\n\n\nSpec 2.2.1.2.1\n\n\nThe property
filter defines which properties the repository must return. Only select the
properties you really need to keep the transferred data as small as possible.
The repository may return more properties than specified.\n\n\n\n\nQuery
Names\n\n\nThe property filter is a collection of query names, not property
IDs. The query n
ames and property IDs of all properties defined in the CMIS specifation are
same and therefore interchangeable. That might not be the case for custom
types. \n\n\n\n\n\n\nMinimal Property Filter\n\n\nOpenCMIS and PortCMIS need at
least the properties \ncmis:objectId\n, \ncmis:baseTypeId\n, and
\ncmis:objectTypeId\n to create objects.\nThe default operation context
implementation adds these properties automatically if they are missing in the
property filter.\n\n\n\n\nOpenCMIS (Java)\n\n\nOperationContext oc =
...\noc.setFilterString(\ncmis:objectId,cmis:name,cmis:createdBy\n);\n\n\n\n\nPortCMIS
(C#)\n\n\nIOperationContext oc = ...\noc.FilterString =
\ncmis:objectId,cmis:name,cmis:createdBy\n;\n\n\n\n\nAllowable
Actions\n\n\nSpec 2.2.1.2.6\n\n\nCalculating the Allowable Actions of an object
can be very expensive for a repository. Don\nt request them if you don\nt need
them.\n\n\nOpenCMIS (Java)\n\n\nOperationContext oc =
...\noc.setIncludeAllowableActions(false); // don't request Allo
wable Actions\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc =
...\noc.IncludeAllowableActions = false; // don't request Allowable
Actions\n\n\n\n\nACLs\n\n\nSpec 2.2.1.2.5\n\n\nOpenCMIS
(Java)\n\n\nOperationContext oc = ...\noc.setIncludeAcls(true); // request
ACLs\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc = ...\noc.IncludeAcls =
true; // request ACLs\n\n\n\n\nRelationships\n\n\nSpec 2.2.1.2.2\n\n\nOpenCMIS
(Java)\n\n\nOperationContext oc =
...\noc.setIncludeRelationships(IncludeRelationships.BOTH); // request source
and target relationships\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc =
...\noc.IncludeRelationships = IncludeRelationships.Both; // request source and
target relationships\n\n\n\n\nPolicies\n\n\nSpec 2.2.1.2.3\n\n\nOpenCMIS
(Java)\n\n\nOperationContext oc = ...\noc.setIncludePolicies(true); // request
policies\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc =
...\noc.IncludePolicies = true; // request policies\n\n\n\n\nRendition
Filter\n\n\nSpec 2.2.1.2.
4\n\n\nThe rendition filter defines which rendition details should be returned
by the repository. This filter is a comma separated list of rendition kinds
(e.g. \ncmis:thumbnail\n) and MIME types. \n\n\nOpenCMIS
(Java)\n\n\nOperationContext oc =
...\noc.setRenditionFilterString(\ncmis:thumbnail,image/*\n);\n\n\n\n\nPortCMIS
(C#)\n\n\nIOperationContext oc = ...\noc.RenditionFilterString =
\ncmis:thumbnail,image/*\n;\n\n\n\n\nRendition filer examples:\n\n\n\n\n*\n
(include all renditions)\n\n\ncmis:thumbnail\n (include only
thumbnails)\n\n\nimage/*\n (include all image
renditions)\n\n\napplication/pdf,application/x-shockwave-flash\n (include web
ready renditions)\n\n\ncmis:none\n (exclude all renditions)\n\n\n\n\nOrder
By\n\n\nSpec 2.2.1.2.7\n\n\nThe list of objects returned by \ngetChildren\n,
\ngetCheckedOutDocs\n, and \nqueryObjects\n can be ordered. This is a comma
separated list of query names, followed by an optional ascending modifier
\nASC\n or descending modifier \nDESC\n for
each query name. If the modifier is not stated, \nASC\n is
assumed.\n\n\n\n\nQuery Names\n\n\nSimilar to the property filter this is a
collection of query names, not property IDs.\n\n\n\n\nOpenCMIS
(Java)\n\n\nOperationContext oc = ...\noc.setOrderBy(\ncmis:createdBy
DESC,cmis:name ASC\n);\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc =
...\noc.OrderBy(\ncmis:createdBy DESC,cmis:name ASC\n);\n\n\n\n\nList Batch
Size\n\n\nLists returned by, for instances, \ngetChildren\n and \nquery\n 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 \ngetChildren\n calls
to the server while looping over the children.\n\n\n\n\nOptimal Batch
Size\n\n\nThe 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.\n\n\n\n\nOpenCMIS (Java)\n\n\nOperationContext oc
= ...\noc.setMaxItemsPerPage(10000); // 10,000 items per
batch\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc =
...\noc.MaxItemsPerPage = 10000; // 10,000 items per
batch\n\n\n\n\nCaching\n\n\nAll objects retrieved by \ngetObject\n and
\ngetObjectByPath\n 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.\n\n\nSee also the section about the
\nobject cache\n.\n\n\nOpenCMIS (Java)\n\n\nOperationContext oc =
...\noc.setCacheEnabled(false); // no caching please\n\n\n\n\nPortCMIS
(C#)\n\n\nIOperationContext oc = ...\noc.CacheEnabled = false; // no caching
please\n\n\n\n\nCreating Operation Context Objects\n\n\nOpenCMIS (Java)\n\n\n//
create
the default operation context\nOperationContext oc1 =
session.createOperationContext();\n\n// create an operation context that
selects nothing except the provided properties\nOperationContext oc2 =
OperationContextUtils.createMinimumOperationContext(\ncmis:objectId\n,
\ncmis:name\n, \ncmis:createdBy\n);\n\n// create an operation context that
selects everything\nOperationContext oc3 =
OperationContextUtils.createMaximumOperationContext();\n\n\n\n\nPortCMIS
(C#)\n\n\n// create the default operation context\nIOperationContext oc1 =
Session.CreateOperationContext();\n\n// create an operation context that
selects nothing except the provided properties\nIOperationContext oc2 =
OperationContextUtils.CreateMinimumOperationContext(\ncmis:objectId\n,
\ncmis:name\n, \ncmis:createdBy\n);\n\n// create an operation context that
selects everything\nIOperationContext oc3 =
OperationContextUtils.CreateMaximumOperationContext();\n\n\n\n\nUsing an
Operation Context\n\n\nMany methods that retrieve obje
cts or data accept an Operation Context object as an additional parameter.\nIf
no Operation Context object is provided, a default Operation Context object
defines what should be requested.\n\n\nOpenCMIS (Java)\n\n\nOperationContext oc
= ...\n\nCmisObject cmisObject1 = session.getObject(id, oc);\nCmisObject
cmisObject2 = session.getObjectByPath(path, oc);\nItemIterable\nCmisObject\n
children = folder.getChildren(oc);\nList\nDocument\n versions =
doc.getAllVersions(oc);\n\n\n\n\nPortCMIS (C#)\n\n\nIOperationContext oc =
...\n\nICmisObject cmisObject1 = session.GetObject(id, oc);\nICmisObject
cmisObject2 = session.GetObjectByPath(path,
oc);\nIItemEnumerable\nICmisObject\n children =
folder.GetChildren(oc);\nIList\nIDocument\n versions =
doc.GetAllVersions(oc);",
"title": "Understanding the Operation Context"
},
{
@@ -671,6 +671,11 @@
"title": "Order By"
},
{
+ "location":
"/samples/operation-context/index.html#list-batch-size",
+ "text": "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 = ...\noc.setMaxItemsPerPage(10000); //
10,000 items per batch PortCMIS (C#) IOperationContext oc =
...\noc.MaxItemsPerPage = 10000; // 10,000 items per batch",
+ "title": "List Batch Size"
+ },
+ {
"location": "/samples/operation-context/index.html#caching",
"text": "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 . OpenCMIS
(Java) OperationContext oc = ...\noc.setCacheEnabled(false); // no caching
please PortCMIS (C#) IOperationContext oc = ...\noc.CacheEnabled = false; //
no caching please",
"title": "Caching"
@@ -687,7 +692,7 @@
},
{
"location": "/samples/lists/index.html",
- "text": "Working with Lists, Paging and Skipping\n\n\nIterating
over a List\n\n\nOpenCMIS (Java)\n\n\nItemIterable\nSomething\n somethingList =
...\n\nfor (Something something : somethingList) {\n
...\n}\n\n\n\n\nPortCMIS (C#)\n\n\nIItemEnumerable\nSomething\n somethingList =
...\n\nforeach (Something something in somethingList) {\n
...\n}\n\n\n\n\nPaging and Skipping\n\n\nOpenCMIS
(Java)\n\n\nItemIterable\nSomething\n somethingList = ...\n\n// get a page of 5
items\nItemIterable\nSomething\n firstFive = somethingList.getPage(5);\n\n//
get a list starting with the 10th item\nItemIterable\nSomething\n skipTen =
somethingList.skipTo(10);\n\n// get a page of 20 items starting at the 100th
item of the orignal list\nItemIterable\nSomething\n skipAndPage =
somethingList.skipTo(100).getPage(20);\n\n\n\n\nPortCMIS
(C#)\n\n\nIItemEnumerable\nSomething\n somethingList = ...\n\n// get a page of
5 items\nIItemEnumerable\nSomething\n firstFive =
somethingList.GetPage(5);\n\n//
get a list starting with the 10th item\nIItemEnumerable\nSomething\n skipTen =
somethingList.SkipTo(10);\n\n// get a page of 20 items starting at the 100th
item of the orignal list\nIItemEnumerable\nSomething\n skipAndPage =
somethingList.SkipTo(100).GetPage(20);",
+ "text": "Working with Lists, Paging and Skipping\n\n\nIterating
over a List\n\n\nThe following code snippets iterate over the complete list.
Please note, that OpenCMIS and PortCMIS may make multiple calls to the
repository.\n\n\nOpenCMIS (Java)\n\n\nItemIterable\nSomething\n somethingList =
...\n\nfor (Something something : somethingList) {\n
...\n}\n\n\n\n\nPortCMIS (C#)\n\n\nIItemEnumerable\nSomething\n somethingList =
...\n\nforeach (Something something in somethingList) {\n
...\n}\n\n\n\n\nPaging and Skipping\n\n\nClients can request only an excerpt of
a list by defining an offset and/or a page size.\n\n\n\n\nNote\n\n\nFor the
best performance adjust the list batch size with an \nOperation
Context\n.\n\n\n\n\nOpenCMIS (Java)\n\n\nItemIterable\nSomething\n
somethingList = ...\n\n// get a page of 5 items\nItemIterable\nSomething\n
firstFive = somethingList.getPage(5);\n\n// get a list starting with the 10th
item\nItemIterable\nSomething\n skipTen = somethingList.
skipTo(10);\n\n// get a page of 20 items starting at the 100th item of the
orignal list\nItemIterable\nSomething\n skipAndPage =
somethingList.skipTo(100).getPage(20);\n\n\n\n\nPortCMIS
(C#)\n\n\nIItemEnumerable\nSomething\n somethingList = ...\n\n// get a page of
5 items\nIItemEnumerable\nSomething\n firstFive =
somethingList.GetPage(5);\n\n// get a list starting with the 10th
item\nIItemEnumerable\nSomething\n skipTen = somethingList.SkipTo(10);\n\n//
get a page of 20 items starting at the 100th item of the orignal
list\nIItemEnumerable\nSomething\n skipAndPage =
somethingList.SkipTo(100).GetPage(20);",
"title": "Working with Lists, Paging and Skipping"
},
{
@@ -697,12 +702,12 @@
},
{
"location": "/samples/lists/index.html#iterating-over-a-list",
- "text": "OpenCMIS (Java) ItemIterable Something somethingList =
...\n\nfor (Something something : somethingList) {\n ...\n} PortCMIS (C#)
IItemEnumerable Something somethingList = ...\n\nforeach (Something something
in somethingList) {\n ...\n}",
+ "text": "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 =
...\n\nfor (Something something : somethingList) {\n ...\n} PortCMIS (C#)
IItemEnumerable Something somethingList = ...\n\nforeach (Something something
in somethingList) {\n ...\n}",
"title": "Iterating over a List"
},
{
"location": "/samples/lists/index.html#paging-and-skipping",
- "text": "OpenCMIS (Java) ItemIterable Something somethingList =
...\n\n// get a page of 5 items\nItemIterable Something firstFive =
somethingList.getPage(5);\n\n// get a list starting with the 10th
item\nItemIterable Something skipTen = somethingList.skipTo(10);\n\n// get a
page of 20 items starting at the 100th item of the orignal list\nItemIterable
Something skipAndPage = somethingList.skipTo(100).getPage(20); PortCMIS (C#)
IItemEnumerable Something somethingList = ...\n\n// get a page of 5
items\nIItemEnumerable Something firstFive = somethingList.GetPage(5);\n\n//
get a list starting with the 10th item\nIItemEnumerable Something skipTen =
somethingList.SkipTo(10);\n\n// get a page of 20 items starting at the 100th
item of the orignal list\nIItemEnumerable Something skipAndPage =
somethingList.SkipTo(100).GetPage(20);",
+ "text": "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 = ...\n\n// get a page of 5 items\nItemIterable
Something firstFive = somethingList.getPage(5);\n\n// get a list starting with
the 10th item\nItemIterable Something skipTen =
somethingList.skipTo(10);\n\n// get a page of 20 items starting at the 100th
item of the orignal list\nItemIterable Something skipAndPage =
somethingList.skipTo(100).getPage(20); PortCMIS (C#) IItemEnumerable
Something somethingList = ...\n\n// get a page of 5 items\nIItemEnumerable
Something firstFive = somethingList.GetPage(5);\n\n// get a list starting with
the 10th item\nIItemEnumerable Something skipTen =
somethingList.SkipTo(10);\n\n// get a page of 20 items starting at the 100th
item of the orignal list\nIItemEnumerable Something skipAndPage = s
omethingList.SkipTo(100).GetPage(20);",
"title": "Paging and Skipping"
},
{
@@ -717,12 +722,12 @@
},
{
"location": "/samples/queries/index.html",
- "text": "Executing Queries\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nSpec
2.1.14\n\n\nOpenCMIS (Java)\n\n\nItemIterable\nQueryResult\n results =
session.query(\nSELECT * FROM cmis:document\n, false);\n\nfor(QueryResult hit:
results) { \n for(PropertyData\n?\n property: hit.getProperties()) {\n\n
String queryName = property.getQueryName();\n Object value =
property.getFirstValue();\n\n System.out.println(queryName + \n: \n +
value);\n }\n
System.out.println(\n--------------------------------------\n);\n}\n\n\n\n\nQuerying
Objects\n\n\nOpenCMIS (Java)\n\n\nOperationContext oc = ...\n\n// find all
folders starting with 'a' or 'A'\nItemIterable\nCmisObject\n results =\n
session.queryObjects(\ncmis:folder\n, \ncmis:name LIKE 'a%' OR cmis:name LIKE
'A%'\n, false, oc);\n\nfor (CmisObject cmisObject : results) {\n Folder
folder = (Folder) cmisObject; // it can only be a folder\n
System.out.println(folder.getName());\n}\n\n\n\n\nUsing a Query Statem
ent\n\n\nQuery statements are very similar to \nprepared
statements\n.\n\n\nOpenCMIS (Java)\n\n\nCalendar cal = ...\nFolder folder =
...\n\nQueryStatement qs = session.createQueryStatement(\nSELECT ?, ? FROM ?
WHERE ? \n TIMESTAMP ? AND IN_FOLDER(?) OR ? IN (?)\n);\n\nqs.setProperty(1,
\ncmis:document\n, \ncmis:name\n);\nqs.setProperty(2, \ncmis:document\n,
\ncmis:objectId\n);\nqs.setType(3, \ncmis:document\n);\n\nqs.setProperty(4,
\ncmis:document\n, \ncmis:creationDate\n);\nqs.setDateTime(5,
cal);\n\nqs.setId(6, folder);\n\nqs.setProperty(7, \ncmis:document\n,
\ncmis:createdBy\n);\nqs.setString(8, \nbob\n, \ntom\n, \nlisa\n); \n\n// get
the compiled query statement\nString statement = qs.toQueryString();\n\n// ...
or execute the query directly\nItemIterable\nQueryResult\n results =
qs.query(false);",
+ "text": "Executing Queries\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nSpec
2.1.14\n\n\nOpenCMIS (Java)\n\n\nItemIterable\nQueryResult\n results =
session.query(\nSELECT * FROM cmis:document\n, false);\n\nfor(QueryResult hit:
results) { \n for(PropertyData\n?\n property: hit.getProperties()) {\n\n
String queryName = property.getQueryName();\n Object value =
property.getFirstValue();\n\n System.out.println(queryName + \n: \n +
value);\n }\n
System.out.println(\n--------------------------------------\n);\n}\n\n\n\n\nPortCMIS
(C#)\n\n\nIItemEnumerable\nIQueryResult\n results = Session.Query(\nSELECT *
FROM cmis:document\n, false);\n\nforeach (IQueryResult hit in results) {\n
foreach (PropertyData property in hit.Properties) {\n\n string queryName
= property.QueryName;\n object value = property.FirstValue;\n\n
Console.WriteLine(queryName + \n: \n + value);\n }\n
Console.WriteLine(\n--------------------------------------\n);\n
}\n\n\n\n\nQuerying Objects\n\n\nOpenCMIS (Java)\n\n\nOperationContext oc =
...\n\n// find all folders starting with 'a' or 'A'\nItemIterable\nCmisObject\n
results =\n session.queryObjects(\ncmis:folder\n, \ncmis:name LIKE 'a%' OR
cmis:name LIKE 'A%'\n, false, oc);\n\nfor (CmisObject cmisObject : results) {\n
Folder folder = (Folder) cmisObject; // it can only be a folder\n
System.out.println(folder.getName());\n}\n\n\n\n\nUsing a Query
Statement\n\n\nQuery statements are very similar to \nprepared
statements\n.\n\n\nOpenCMIS (Java)\n\n\nCalendar cal = ...\nFolder folder =
...\n\nQueryStatement qs = session.createQueryStatement(\nSELECT ?, ? FROM ?
WHERE ? \n TIMESTAMP ? AND IN_FOLDER(?) OR ? IN (?)\n);\n\nqs.setProperty(1,
\ncmis:document\n, \ncmis:name\n);\nqs.setProperty(2, \ncmis:document\n,
\ncmis:objectId\n);\nqs.setType(3, \ncmis:document\n);\n\nqs.setProperty(4,
\ncmis:document\n, \ncmis:creationDate\n);\nqs.setDateTime(5,
cal);\n\nqs.setId(6, folder);\n\nqs.setProp
erty(7, \ncmis:document\n, \ncmis:createdBy\n);\nqs.setString(8, \nbob\n,
\ntom\n, \nlisa\n); \n\n// get the compiled query statement\nString statement =
qs.toQueryString();\n\n// ... or execute the query
directly\nItemIterable\nQueryResult\n results = qs.query(false);\n\n\n\n\nQuery
Performance\n\n\nMany 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.\n\n\n\n\nOnly
select the properties you really need. A query should never start with
\nSELECT *\n . Some properties are more expensive than others. For instances,
some repositories compile the \ncmis:path\n property on demand, which takes
longer than returning a normal property such as \ncmis:name\n.\n\n\nDo not
order if it isn\nt required. Sorting the result set in the application may be
faster.\n\n\nUse an Operation context that disables \nrelationships\n
(IncludeRelationships.NONE), \nre
nditions\n (\ncmis:none\n), and \nallowable actions\n.\n\n\nIf you are using
paging, use an Operation Context with a \nbatch size that matches the page
size\n.\n\n\nIf you have to process all query results, use an Operation Context
with a \nbig batch size\n.",
"title": "Executing Queries"
},
{
"location": "/samples/queries/index.html#executing-queries",
- "text": "CMIS 1.0 CMIS 1.1 Spec 2.1.14 OpenCMIS (Java)
ItemIterable QueryResult results = session.query( SELECT * FROM cmis:document
, false);\n\nfor(QueryResult hit: results) { \n for(PropertyData ?
property: hit.getProperties()) {\n\n String queryName =
property.getQueryName();\n Object value = property.getFirstValue();\n\n
System.out.println(queryName + : + value);\n }\n
System.out.println( -------------------------------------- );\n}",
+ "text": "CMIS 1.0 CMIS 1.1 Spec 2.1.14 OpenCMIS (Java)
ItemIterable QueryResult results = session.query( SELECT * FROM cmis:document
, false);\n\nfor(QueryResult hit: results) { \n for(PropertyData ?
property: hit.getProperties()) {\n\n String queryName =
property.getQueryName();\n Object value = property.getFirstValue();\n\n
System.out.println(queryName + : + value);\n }\n
System.out.println( -------------------------------------- );\n} PortCMIS (C#)
IItemEnumerable IQueryResult results = Session.Query( SELECT * FROM
cmis:document , false);\n\nforeach (IQueryResult hit in results) {\n foreach
(PropertyData property in hit.Properties) {\n\n string queryName =
property.QueryName;\n object value = property.FirstValue;\n\n
Console.WriteLine(queryName + : + value);\n }\n Console.WriteLine(
-------------------------------------- );\n}",
"title": "Executing Queries"
},
{
@@ -736,6 +741,11 @@
"title": "Using a Query Statement"
},
{
+ "location": "/samples/queries/index.html#query-performance",
+ "text": "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 .",
+ "title": "Query Performance"
+ },
+ {
"location": "/samples/query-examples/index.html",
"text": "Common Query Examples\n\n\nCMIS 1.0\n\n\nCMIS 1.1\n\n\nA
collection of typical query use cases.\n\n\nSimple Query\n\n\nFind all
documents in the repository that are named \nhello world\n.\n\n\nSELECT *
\nFROM cmis:document\nWHERE cmis:name = 'hello world'\n\n\n\n\nComplex query
with JOINS\n\n\nJoin types \nPOLICY\n with \nCLAIM\n on property \nPOLICY_NUM\n
and \nRISK\n with \nPOLICY\n on \ncmis:objectId\n.\n\n\n(Note: Not all
repositories support JOIN)\n\n\nSELECT Y.CLAIM_NUM, X.PROPERTY_ADDRESS,
Y.DAMAGE_ESTIMATES, Z.BAND\nFROM (POLICY AS X JOIN CLAIMS AS Y ON
X.POLICY_NUM = Y.POLICY_NUM)\n JOIN RISK AS Z ON X.cmis:objectId =
Z.cmis:objectId\nWHERE (100000 = ANY Y.DAMAGE_ESTIMATES) AND Z.BAND \n
3\n\n\n\n\nText search query\n\n\nFind all documents that have at least one of
the words \npresident\n, \nchancellor\n or \ndirectory\n in the content.
Depending on the repository and the repository configuration, also property
values are included.\n\n\nSELE
CT cmis:objectId, cmis:name, SCORE() AS score\nFROM cmis:document\nWHERE
CONTAINS('president chancellor directory')\n\n\n\n\nQuery for multi-value
property\n\n\nFind all objects of type \nmy:cars\n that have a radio or airbag
as feature (\nmy:features\n is a multi-value property).\n\n\nSELECT
cmis:objectId, cmis:name, my:features\nFROM my:cars\nWHERE ANY my:features
IN ('radio', 'airbag')\n\n\n\n\nQuery for secondary types\n\n\nCMIS
1.1\n\n\nFind all documents that have a destruction date of 2015-12-31
(midnight UTC) in the secondary type
\ncmis:rm_destructionRetention\n.\n\n\n(Note: Repository does not have to
support JOIN)\n\n\nSELECT cmis:objectId, cmis:name\nFROM cmis:document JOIN
cmis:rm_destructionRetention\n ON cmis:objectId =
cmis:rm_destructionRetention:objectId\nWHERE cmis:rm_destructionDate =
TIMESTAMP '2015-12-31T00:00:00.000Z'",
"title": "Query Examples"
Modified:
websites/staging/chemistry/trunk/content/docs/cmis-samples/samples/access-control/index.html
==============================================================================
---
websites/staging/chemistry/trunk/content/docs/cmis-samples/samples/access-control/index.html
(original)
+++
websites/staging/chemistry/trunk/content/docs/cmis-samples/samples/access-control/index.html
Mon Jul 31 12:54:37 2017
@@ -23,7 +23,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="author" content="Apache Chemistry">
+ <meta name="author" content="Apache Chemistry">
<link rel="shortcut icon" href="../../img/favicon.ico">
<title>Managing Access Control - Apache Chemistry Samples</title>
@@ -352,4 +352,4 @@
</body>
</html>
-<!-- last update: 2016-12-02 19:20:55 -->
\ No newline at end of file
+<!-- last update: 2017-07-31 12:45:43 -->
\ No newline at end of file
Modified:
websites/staging/chemistry/trunk/content/docs/cmis-samples/samples/allowable-actions/index.html
==============================================================================
---
websites/staging/chemistry/trunk/content/docs/cmis-samples/samples/allowable-actions/index.html
(original)
+++
websites/staging/chemistry/trunk/content/docs/cmis-samples/samples/allowable-actions/index.html
Mon Jul 31 12:54:37 2017
@@ -23,7 +23,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="author" content="Apache Chemistry">
+ <meta name="author" content="Apache Chemistry">
<link rel="shortcut icon" href="../../img/favicon.ico">
<title>Checking Allowable Actions - Apache Chemistry Samples</title>
@@ -362,4 +362,4 @@ if (cmisObject.HasAllowableAction(PortCM
</body>
</html>
-<!-- last update: 2016-12-02 19:20:54 -->
\ No newline at end of file
+<!-- last update: 2017-07-31 12:45:43 -->
\ No newline at end of file
Modified:
websites/staging/chemistry/trunk/content/docs/cmis-samples/samples/capabilities/index.html
==============================================================================
---
websites/staging/chemistry/trunk/content/docs/cmis-samples/samples/capabilities/index.html
(original)
+++
websites/staging/chemistry/trunk/content/docs/cmis-samples/samples/capabilities/index.html
Mon Jul 31 12:54:37 2017
@@ -23,7 +23,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="author" content="Apache Chemistry">
+ <meta name="author" content="Apache Chemistry">
<link rel="shortcut icon" href="../../img/favicon.ico">
<title>Getting Repository Capabilities - Apache Chemistry Samples</title>
@@ -389,4 +389,4 @@ boolean supportsUnfiling = Boolean.TRUE.
</body>
</html>
-<!-- last update: 2016-12-02 19:20:43 -->
\ No newline at end of file
+<!-- last update: 2017-07-31 12:45:42 -->
\ No newline at end of file