Author: fmui
Date: Fri Dec 2 17:43:49 2016
New Revision: 1772392
URL: http://svn.apache.org/viewvc?rev=1772392&view=rev
Log:
samples: update to MkDocs 0.16.0 + a few small changes
Added:
chemistry/docs/cmis-samples/trunk/cinder-chemistry/main.html (with props)
chemistry/docs/cmis-samples/trunk/docs/samples/query-examples.md (with
props)
Modified:
chemistry/docs/cmis-samples/trunk/cinder-chemistry/base.html
chemistry/docs/cmis-samples/trunk/cinder-chemistry/content.html
chemistry/docs/cmis-samples/trunk/cinder-chemistry/nav.html
chemistry/docs/cmis-samples/trunk/cinder-chemistry/toc.html
chemistry/docs/cmis-samples/trunk/docs/index.md
chemistry/docs/cmis-samples/trunk/docs/samples/create-session.md
chemistry/docs/cmis-samples/trunk/mkdocs.yml
Modified: chemistry/docs/cmis-samples/trunk/cinder-chemistry/base.html
URL:
http://svn.apache.org/viewvc/chemistry/docs/cmis-samples/trunk/cinder-chemistry/base.html?rev=1772392&r1=1772391&r2=1772392&view=diff
==============================================================================
--- chemistry/docs/cmis-samples/trunk/cinder-chemistry/base.html (original)
+++ chemistry/docs/cmis-samples/trunk/cinder-chemistry/base.html Fri Dec 2
17:43:49 2016
@@ -22,14 +22,13 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">{%
if page_description %}
- <meta name="description" content="{{ page_description }}">{% endif %} {%
if site_author %}
- <meta name="author" content="{{ site_author }}">{% endif %} {% if
canonical_url %}
- <link rel="canonical" href="{{ canonical_url }}">{% endif %} {% if favicon
%}
- <link rel="shortcut icon" href="{{ base_url }}/{{ favicon }}">{% else %}
- <link rel="shortcut icon" href="{{ base_url }}/img/favicon.ico">{% endif %}
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">{%
if config.site_description %}
+ <meta name="description" content="{{ config.site_description }}">{% endif
%} {% if config.site_author %}
+ <meta name="author" content="{{ config.site_author }}">{% endif %} {% if
page.canonical_url %}
+ <link rel="canonical" href="{{ page.canonical_url }}">{% endif %}
+ <link rel="shortcut icon" href="{{ base_url }}/img/favicon.ico">
- <title>{% if page_title %}{{ page_title }} - {% endif %}{{ site_name
}}</title>
+ <title>{% if page.title %}{{ page.title }} - {% endif %}{{
config.site_name }}</title>
<link href="{{ base_url }}/css/bootstrap-custom.min.css" rel="stylesheet">
<link
href="//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"
rel="stylesheet">
@@ -46,7 +45,7 @@
<script
src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
- {% if google_analytics %}
+ {% if config.google_analytics %}
<script>
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
@@ -60,13 +59,13 @@
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js',
'ga');
- ga('create', '{{ google_analytics[0] }}', '{{ google_analytics[1] }}');
+ ga('create', '{{ config.google_analytics[0] }}', '{{
config.google_analytics[1] }}');
ga('send', 'pageview');
</script>
{% endif %}
</head>
-<body{% if current_page and current_page.is_homepage %} class="homepage" {%
endif %}>
+<body{% if page and page.is_homepage %} class="homepage" {% endif %}>
{% include "nav.html" %}
@@ -79,8 +78,8 @@
<footer class="col-md-12 text-center">
<hr>
- <p>{% if copyright %}
- <small>{{ copyright }}<br></small>
+ <p>{% if config.copyright %}
+ <small>{{ config.copyright }}<br></small>
{% endif %}
</footer>
Modified: chemistry/docs/cmis-samples/trunk/cinder-chemistry/content.html
URL:
http://svn.apache.org/viewvc/chemistry/docs/cmis-samples/trunk/cinder-chemistry/content.html?rev=1772392&r1=1772391&r2=1772392&view=diff
==============================================================================
--- chemistry/docs/cmis-samples/trunk/cinder-chemistry/content.html (original)
+++ chemistry/docs/cmis-samples/trunk/cinder-chemistry/content.html Fri Dec 2
17:43:49 2016
@@ -1,9 +1,9 @@
-{% if meta.source %}
+{% if page.meta.source %}
<div class="source-links">
-{% for filename in meta.source %}
+{% for filename in page.meta.source %}
<span class="label label-primary">{{ filename }}</span>
{% endfor %}
</div>
{% endif %}
-{{ content }}
+{{ page.content }}
Added: chemistry/docs/cmis-samples/trunk/cinder-chemistry/main.html
URL:
http://svn.apache.org/viewvc/chemistry/docs/cmis-samples/trunk/cinder-chemistry/main.html?rev=1772392&view=auto
==============================================================================
--- chemistry/docs/cmis-samples/trunk/cinder-chemistry/main.html (added)
+++ chemistry/docs/cmis-samples/trunk/cinder-chemistry/main.html Fri Dec 2
17:43:49 2016
@@ -0,0 +1 @@
+{% extends "base.html" %}
\ No newline at end of file
Propchange: chemistry/docs/cmis-samples/trunk/cinder-chemistry/main.html
------------------------------------------------------------------------------
svn:eol-style = native
Modified: chemistry/docs/cmis-samples/trunk/cinder-chemistry/nav.html
URL:
http://svn.apache.org/viewvc/chemistry/docs/cmis-samples/trunk/cinder-chemistry/nav.html?rev=1772392&r1=1772391&r2=1772392&view=diff
==============================================================================
--- chemistry/docs/cmis-samples/trunk/cinder-chemistry/nav.html (original)
+++ chemistry/docs/cmis-samples/trunk/cinder-chemistry/nav.html Fri Dec 2
17:43:49 2016
@@ -3,7 +3,7 @@
<!-- Collapsed navigation -->
<div class="navbar-header">
- {% if include_nav or include_next_prev or repo_url %}
+ {% if nav|length>1 or (page.next_page or page.previous_page) or
config.repo_url %}
<!-- Expander button -->
<button type="button" class="navbar-toggle" data-toggle="collapse"
data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
@@ -14,12 +14,12 @@
{% endif %}
<!-- Main title -->
- <a class="navbar-brand" href="{{ homepage_url }}">{{ site_name
}}</a>
+ <a class="navbar-brand" href="{{ nav.homepage_url }}">{{
config.site_name }}</a>
</div>
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
- {% if include_nav %}
+ {% if nav|length>1 %}
<!-- Main navigation -->
<ul class="nav navbar-nav">
{% for nav_item in nav %}
@@ -47,14 +47,14 @@
<i class="fa fa-search" aria-hidden="true"></i> Search
</a>
</li>
- {% if include_next_prev %}
- <li {% if not previous_page %}class="disabled"{% endif %}>
- <a rel="next" {% if previous_page %}href="{{
previous_page.url }}"{% endif %}>
+ {% if (page.next_page or page.previous_page) %}
+ <li {% if not page.previous_page %}class="disabled"{%
endif %}>
+ <a rel="next" {% if page.previous_page %}href="{{
page.previous_page.url }}"{% endif %}>
<i class="fa fa-arrow-left"
aria-hidden="true"></i> Previous
</a>
</li>
- <li {% if not next_page %}class="disabled"{% endif %}>
- <a rel="prev" {% if next_page %}href="{{ next_page.url
}}"{% endif %}>
+ <li {% if not page.next_page %}class="disabled"{% endif %}>
+ <a rel="prev" {% if page.next_page %}href="{{
page.next_page.url }}"{% endif %}>
Next <i class="fa fa-arrow-right"
aria-hidden="true"></i>
</a>
</li>
Modified: chemistry/docs/cmis-samples/trunk/cinder-chemistry/toc.html
URL:
http://svn.apache.org/viewvc/chemistry/docs/cmis-samples/trunk/cinder-chemistry/toc.html?rev=1772392&r1=1772391&r2=1772392&view=diff
==============================================================================
--- chemistry/docs/cmis-samples/trunk/cinder-chemistry/toc.html (original)
+++ chemistry/docs/cmis-samples/trunk/cinder-chemistry/toc.html Fri Dec 2
17:43:49 2016
@@ -1,6 +1,6 @@
<div class="bs-sidebar hidden-print affix well" role="complementary">
<ul class="nav bs-sidenav">
- {% for toc_item in toc %}
+ {% for toc_item in page.toc %}
<li class="first-level {% if toc_item.active %}active{% endif %}"><a
href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
{% for toc_item in toc_item.children %}
<li class="second-level"><a href="{{ toc_item.url }}">{{
toc_item.title }}</a></li>
Modified: chemistry/docs/cmis-samples/trunk/docs/index.md
URL:
http://svn.apache.org/viewvc/chemistry/docs/cmis-samples/trunk/docs/index.md?rev=1772392&r1=1772391&r2=1772392&view=diff
==============================================================================
--- chemistry/docs/cmis-samples/trunk/docs/index.md (original)
+++ chemistry/docs/cmis-samples/trunk/docs/index.md Fri Dec 2 17:43:49 2016
@@ -53,7 +53,7 @@ To get started with OpenCMIS, download t
#### Maven
-Replace `[OpenCMIS version]` with the latest version number, e.g. `0.14.0`.
+Replace `[OpenCMIS version]` with the latest version number, e.g. `1.0.0`.
```xml
<dependency>
@@ -76,7 +76,7 @@ For Android:
#### Gradle
-Replace `[OpenCMIS version]` with the latest version number, e.g. `0.14.0`.
+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]'
Modified: chemistry/docs/cmis-samples/trunk/docs/samples/create-session.md
URL:
http://svn.apache.org/viewvc/chemistry/docs/cmis-samples/trunk/docs/samples/create-session.md?rev=1772392&r1=1772391&r2=1772392&view=diff
==============================================================================
--- chemistry/docs/cmis-samples/trunk/docs/samples/create-session.md (original)
+++ chemistry/docs/cmis-samples/trunk/docs/samples/create-session.md Fri Dec 2
17:43:49 2016
@@ -3,9 +3,17 @@
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.
-Beyond that more details might be required, depending on the repository and
the environment. Those details are controlled by session parameters.
+Beyond 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](https://chemistry.apache.org/java/javadoc/org/apache/chemistry/opencmis/commons/SessionParameter.html).
For PortCMIS, please refer to the help file that is contained in the binary
packages.
+
+Session objects can be expensive to create and should be kept as long as
possible. Most OpenCMIS and PortCMIS objects, including session objects, are
**thread safe**. They can and should be reused across threads to reduce the
number of calls to the repository.
+
+A session object manages a **set of caches** that keeps object metadata
(properties values, Allowable Actions, ACL, etc.), paths information, and type
metadata in memory. There is no content cache.
+
+There is **no fixed lifetime** of a session object. It can be used for a long
time. Only if the repository requires cookies that expire it may have to be
recreated from time to time.
+There is **no need to close a session** or clean its caches if you don't need
it anymore. Just let the GC deal with it.
-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.
!!! note "Which binding should I use?"
The **Browser Binding** is the fastest binding and is recommended for
**CMIS 1.1** repositories.
Added: chemistry/docs/cmis-samples/trunk/docs/samples/query-examples.md
URL:
http://svn.apache.org/viewvc/chemistry/docs/cmis-samples/trunk/docs/samples/query-examples.md?rev=1772392&view=auto
==============================================================================
--- chemistry/docs/cmis-samples/trunk/docs/samples/query-examples.md (added)
+++ chemistry/docs/cmis-samples/trunk/docs/samples/query-examples.md Fri Dec 2
17:43:49 2016
@@ -0,0 +1,67 @@
+# Common Query Examples
+
+<span class="cmis">CMIS 1.0</span>
+<span class="cmis">CMIS 1.1</span>
+
+A collection of typical query use cases.
+
+## Simple Query
+
+Find all documents in the repository that are named "hello world".
+
+```sql
+SELECT *
+FROM cmis:document
+WHERE cmis:name = 'hello world'
+```
+
+
+## Complex query with JOINS
+
+Join types **POLICY** with **CLAIM** on property **POLICY_NUM** and **RISK**
with **POLICY** on **cmis:objectId**.
+
+*(Note: Not all repositories support JOIN)*
+
+```sql
+SELECT Y.CLAIM_NUM, X.PROPERTY_ADDRESS, Y.DAMAGE_ESTIMATES, Z.BAND
+FROM (POLICY AS X JOIN CLAIMS AS Y ON X.POLICY_NUM = Y.POLICY_NUM)
+ JOIN RISK AS Z ON X.cmis:objectId = Z.cmis:objectId
+WHERE (100000 = ANY Y.DAMAGE_ESTIMATES) AND Z.BAND > 3
+```
+
+## Text search query
+
+Find all documents that have at least one of the words "president",
"chancellor" or "directory" in the content. Depending on the repository and the
repository configuration, also property values are included.
+
+```sql
+SELECT cmis:objectId, cmis:name, SCORE() AS score
+FROM cmis:document
+WHERE CONTAINS('president chancellor directory')
+```
+
+
+## Query for multi-value property
+
+Find all objects of type **my:cars** that have a radio or airbag as feature
(**my:features** is a multi-value property).
+
+```sql
+SELECT cmis:objectId, cmis:name, my:features
+FROM my:cars
+WHERE ANY my:features IN ('radio', 'airbag')
+```
+
+
+## Query for secondary types
+
+<span class="cmis">CMIS 1.1</span>
+
+Find all documents that have a destruction date of 2015-12-31 (midnight UTC)
in the secondary type **cmis:rm_destructionRetention**.
+
+*(Note: Repository does not have to support JOIN)*
+
+```sql
+SELECT cmis:objectId, cmis:name
+FROM cmis:document JOIN cmis:rm_destructionRetention
+ ON cmis:objectId = cmis:rm_destructionRetention:objectId
+WHERE cmis:rm_destructionDate = TIMESTAMP '2015-12-31T00:00:00.000Z'
+```
\ No newline at end of file
Propchange: chemistry/docs/cmis-samples/trunk/docs/samples/query-examples.md
------------------------------------------------------------------------------
svn:eol-style = native
Modified: chemistry/docs/cmis-samples/trunk/mkdocs.yml
URL:
http://svn.apache.org/viewvc/chemistry/docs/cmis-samples/trunk/mkdocs.yml?rev=1772392&r1=1772391&r2=1772392&view=diff
==============================================================================
--- chemistry/docs/cmis-samples/trunk/mkdocs.yml (original)
+++ chemistry/docs/cmis-samples/trunk/mkdocs.yml Fri Dec 2 17:43:49 2016
@@ -32,6 +32,7 @@ pages:
- 'Getting Extensions': 'samples/extensions.md'
- Query:
- 'Executing Queries': 'samples/queries.md'
+ - 'Query Examples': 'samples/query-examples.md'
- 'Retrieving the Change Log': 'samples/changelog.md'
- Access Control:
- 'Checking Allowable Actions': 'samples/allowable-actions.md'