Commit 84e37a56 authored by Marco Mariani's avatar Marco Mariani

minor style and grammar tweaks

parent 1c422fd3
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
### Getting Started ### Getting Started
To set up jIO include jio.js, dependencies and the connectors for the storages To setup you should jIO include jio.js, dependencies and the connectors for the storages
you want to use in your page header (note that more dependencies may be required you want to use in the HTML page header (note that more dependencies may be required
depending on type of storages being used): depending on type of storages being used):
<!-- jio + dependency --> <!-- jio + dependency -->
...@@ -31,7 +31,7 @@ Then create your jIO instance like this: ...@@ -31,7 +31,7 @@ Then create your jIO instance like this:
### Documents and Methods ### Documents and Methods
Documents are JSON strings that contain *meta-data* (properties, like a filename) Documents are JSON strings that contain *metadata* (properties, like a filename)
and *attachments* (optional content, for example *image.jpg*). and *attachments* (optional content, for example *image.jpg*).
jIO exposes the following methods to *create*, *read*, *update* and *delete* documents jIO exposes the following methods to *create*, *read*, *update* and *delete* documents
...@@ -41,7 +41,7 @@ each method, please refer to the documentation): ...@@ -41,7 +41,7 @@ each method, please refer to the documentation):
// create and store new document // create and store new document
jio_instance.post({"title": "some title"}). jio_instance.post({"title": "some title"}).
then(function (response) { then(function (response) {
// console.log(response): // console.log(response);
// { // {
// "result": "success", // "result": "success",
// "id": "404aef5e-22cc-4a64-a292-37776c6464a3" // Generated id // "id": "404aef5e-22cc-4a64-a292-37776c6464a3" // Generated id
...@@ -52,7 +52,7 @@ each method, please refer to the documentation): ...@@ -52,7 +52,7 @@ each method, please refer to the documentation):
// create or update an existing document // create or update an existing document
jio_instance.put({"_id": "my_document", "title": "New Title"}). jio_instance.put({"_id": "my_document", "title": "New Title"}).
then(function (response) { then(function (response) {
// console.log(response): // console.log(response);
// { // {
// "result": "success", // "result": "success",
// "id": "my_document", // "id": "my_document",
...@@ -64,7 +64,7 @@ each method, please refer to the documentation): ...@@ -64,7 +64,7 @@ each method, please refer to the documentation):
jio_instance.putAttachment({"_id": "my_document", "_attachment": "its_attachment", jio_instance.putAttachment({"_id": "my_document", "_attachment": "its_attachment",
"_data": "abc", "_mimetype": "text/plain"}). "_data": "abc", "_mimetype": "text/plain"}).
then(function (response) { then(function (response) {
// console.log(response): // console.log(response);
// { // {
// "result": "success", // "result": "success",
// "id": "my_document", // "id": "my_document",
...@@ -106,7 +106,7 @@ each method, please refer to the documentation): ...@@ -106,7 +106,7 @@ each method, please refer to the documentation):
// delete a document and its attachment(s) // delete a document and its attachment(s)
jio_instance.remove({"_id": "my_document"}). jio_instance.remove({"_id": "my_document"}).
then(function (response) { then(function (response) {
// console.log(response): // console.log(response);
// { // {
// "result": "success", // "result": "success",
// "id": "my_document" // "id": "my_document"
...@@ -116,7 +116,7 @@ each method, please refer to the documentation): ...@@ -116,7 +116,7 @@ each method, please refer to the documentation):
// delete an attachement // delete an attachement
jio_instance.removeAttachment({"_id": "my_document", "_attachment": "its_attachment"}). jio_instance.removeAttachment({"_id": "my_document", "_attachment": "its_attachment"}).
then(function (response) { then(function (response) {
// console.log(response): // console.log(response);
// { // {
// "result": "success", // "result": "success",
// "id": "my_document", // "id": "my_document",
...@@ -126,7 +126,7 @@ each method, please refer to the documentation): ...@@ -126,7 +126,7 @@ each method, please refer to the documentation):
// get all documents // get all documents
jio_instance.allDocs().then(function (response) { jio_instance.allDocs().then(function (response) {
// console.log(response): // console.log(response);
// { // {
// "data": { // "data": {
// "total_rows": 1, // "total_rows": 1,
...@@ -301,7 +301,7 @@ create your own connector, please also refer to the [documentation](https://www. ...@@ -301,7 +301,7 @@ create your own connector, please also refer to the [documentation](https://www.
jIO uses complex-queries manager, which can be run on top of the allDocs() jIO uses complex-queries manager, which can be run on top of the allDocs()
method to query documents in the storage tree. A sample query would look like method to query documents in the storage tree. A sample query would look like
this (note, that allDocs and complex queries cannot be run on every storage and this (note that not all storages support allDocs and complex queries, and
that pre-querying of documents on distant storages should best be done that pre-querying of documents on distant storages should best be done
server-side): server-side):
...@@ -315,7 +315,7 @@ server-side): ...@@ -315,7 +315,7 @@ server-side):
// fields to return in response // fields to return in response
"select_list": [<string A>, <string B>] "select_list": [<string A>, <string B>]
}).then(function (response) { }).then(function (response) {
// console.log(response): // console.log(response);
// { // {
// "total_rows": 1, // "total_rows": 1,
// "rows": [{ // "rows": [{
...@@ -328,22 +328,22 @@ server-side): ...@@ -328,22 +328,22 @@ server-side):
// } // }
}); });
To find out more about complex queries, please refer to the documentation To find out more about complex queries, please refer to the documentation.
### Task Management ### Task Management
jIO is running a task queue manager in the background which processes incoming jIO is running a task queue manager in the background which processes incoming
tasks according to set of defined rules. To find out more and including how to tasks according to a set of defined rules. To find out more including how to
define your own execution rules, please refer to the documentation. define your own execution rules, please refer to the documentation.
### Conflict Management ### Conflict Management
As jIO allows to manage and share documents across multiple storage locactions As jIO allows to manage and share documents across multiple storage locactions,
it is likely for conflicts to occur (= multiple versions of a single document conflicts may happen (i.e. multiple versions of a single document
existing in the storage tree). jIO manages conflicts by ensuring that every existing in the storage tree). jIO manages conflicts by ensuring that every
version of a document is available on every storage and that conflicts are version of a document is available on every storage and that conflicts are
accessible (and solvable) using the *conflicts: true* option when using the accessible (and solvable) using the *conflicts: true* option when using the
respective jIO methods. For more info on conflicts and available options, please related jIO methods. For more info on conflicts and available options, please
refer to the documentation. refer to the documentation.
### Crash-Proof ### Crash-Proof
......
# Sphinx build info version 1 # Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: c600a8b2cb226583bf95768a6560ff9e config: b5eff715ffe3e787813e3b29d0dd7b1f
tags: fbb0d17656682115ca4d033fb2f83ba1 tags: fbb0d17656682115ca4d033fb2f83ba1
.. role:: js(code) .. role:: js(code)
:language: javascript :language: javascript
.. _list-of-available-storages: .. _list-of-available-storages:
List of Available Storages List of Available Storages
========================== ==========================
JIO saves his job queue in a workspace which is localStorage by default. jIO saves his job queue in a workspace which is localStorage by default.
Provided storage descriptions are also stored, and it can be dangerous to Provided storage descriptions are also stored, and it can be dangerous to
store passwords. store passwords.
The best way to create a storage description is to use the (often) provided The best way to create a storage description is to use the (often) provided
tool given by the storage library. The returned description is secured to avoid tool given by the storage library. The returned description is secured to avoid
clear readable password. (encrypted password for instance) cleartext, readable passwords (as opposed to encrypted passwords for instance).
When building storage trees, there is no limit on the number of storages you When building storage trees, there is no limit on the number of storages you
can use. The only thing you have to be aware of is compatability of simple and can use. The only thing you have to be aware of is compatibility of simple and
revision based storages. revision based storages.
...@@ -28,12 +26,11 @@ Connectors ...@@ -28,12 +26,11 @@ Connectors
LocalStorage LocalStorage
^^^^^^^^^^^^ ^^^^^^^^^^^^
Three methods are provided: Three methods are provided:
* :js:`createDescription(username, [application_name], [mode="localStorage"])` * :js:`createDescription(username, [application_name], [mode="localStorage"])`
* :js:`createLocalDescription(username, [application_name])` * :js:`createLocalDescription(username, [application_name])`
* :js:`createMemoryDescription(username, [application_name])` * :js:`createMemoryDescription(username, [application_name])`
All parameters are strings. All parameters are strings.
...@@ -51,8 +48,10 @@ Examples: ...@@ -51,8 +48,10 @@ Examples:
DavStorage DavStorage
^^^^^^^^^^ ^^^^^^^^^^
The tool dav_storage.createDescription generates a dav storage description for The method ``dav_storage.createDescription()`` generates a DAV storage description for
*no*, *basic* or *digest* authentication (*digest* is not implemented yet). *none*, *basic* or *digest* authentication.
NB: digest **is not implemented yet**.
.. code-block:: javascript .. code-block:: javascript
...@@ -60,16 +59,19 @@ The tool dav_storage.createDescription generates a dav storage description for ...@@ -60,16 +59,19 @@ The tool dav_storage.createDescription generates a dav storage description for
All parameters are strings. All parameters are strings.
.. XXX simplify here ============= ========================
parameter required?
Only ``url`` and ``auth_type`` are required. If ``auth_type`` is equal to "none", ============= ========================
then ``realm``, ``username`` and ``password`` are useless. ``username`` and ``password`` become ``url`` yes
required if ``auth_type`` is equal to "basic". And ``realm`` also becomes required if ``auth_type`` yes
``auth_type`` is equal to "digest". ``realm`` if auth_type == 'digest'
``username`` if auth_type != 'none'
``password`` if auth-type != 'none'
============= ========================
digest **is not implemented yet** If ``auth_type`` is "none", then ``realm``, ``username`` and ``password`` are never used.
**Be careful**: The generated description never contains readable password, but **Be careful**: The generated description never contains a readable password, but
for basic authentication, the password will just be base64 encoded. for basic authentication, the password will just be base64 encoded.
S3Storage S3Storage
...@@ -89,7 +91,7 @@ IndexStorage ...@@ -89,7 +91,7 @@ IndexStorage
^^^^^^^^^^^^ ^^^^^^^^^^^^
This handler indexes documents metadata into a database (which is a simple This handler indexes documents metadata into a database (which is a simple
document) to increase the speed of allDocs requests. However, it is not able to document) to increase the speed of ``allDocs()`` requests. However, it is not able to
manage the ``include_docs`` option. manage the ``include_docs`` option.
The sub storages have to manage ``query`` and ``include_docs`` options. The sub storages have to manage ``query`` and ``include_docs`` options.
...@@ -144,8 +146,8 @@ Revision Based Handlers ...@@ -144,8 +146,8 @@ Revision Based Handlers
A revision based handler is a storage which is able to do some document A revision based handler is a storage which is able to do some document
versioning using simple storages listed above. versioning using simple storages listed above.
On JIO command parameter, ``_id`` is still used to identify a document, but On jIO command parameter, ``_id`` is still used to identify a document, but
another id ``_rev`` must be defined to use a specific revision of this document. another id ``_rev`` must be defined to use a specific revision of that document.
On command responses, you will find another field ``rev`` which will represent the On command responses, you will find another field ``rev`` which will represent the
new revision produced by your action. All the document history is kept unless new revision produced by your action. All the document history is kept unless
......
JIO Complex Queries jIO Complex Queries
=================== ===================
What are Complex Queries? What are Complex Queries?
------------------------- -------------------------
In jIO, a complex query can tell a storage server to select, filter, sort, or In jIO, a complex query can ask a storage server to select, filter, sort, or
limit a document list before sending it back. If the server is not able to do limit a document list before sending it back. If the server is not able to do
so, the complex query tool can act on the retreived list by itself. Only the so, the complex query tool can act on the retreived list by itself. Only the
allDocs method can use complex queries. ``allDocs()`` method can use complex queries.
A query can either be a string (using a specific language useful for writing A query can either be a string (using a specific language useful for writing
queries), or it can be a tree of objects (useful to browse queries). To handle queries), or it can be a tree of objects (useful to browse queries). To handle
...@@ -16,12 +16,12 @@ complex queries, jIO uses a parsed grammar file which is compiled using `JSCC <h ...@@ -16,12 +16,12 @@ complex queries, jIO uses a parsed grammar file which is compiled using `JSCC <h
Why use Complex Queries? Why use Complex Queries?
------------------------ ------------------------
Complex queries can be used similar to database queries. So they are useful to: Complex queries can be used like database queries, for tasks such as:
* search a specific document * search a specific document
* sort a list of documents in a certain order * sort a list of documents in a certain order
* avoid retrieving a list of ten thousand documents * avoid retrieving a list of ten thousand documents
* limit the list to show only xy documents by page * limit the list to show only N documents per page
For some storages (like localStorage), complex queries can be a powerful tool For some storages (like localStorage), complex queries can be a powerful tool
to query accessible documents. When querying documents on a distant storage, to query accessible documents. When querying documents on a distant storage,
...@@ -34,7 +34,9 @@ itself. ...@@ -34,7 +34,9 @@ itself.
How to use Complex Queries with jIO? How to use Complex Queries with jIO?
------------------------------------ ------------------------------------
Complex queries can be triggered by including the option named query in the allDocs method call. An example would be: Complex queries can be triggered by including the option named query in the ``allDocs()`` method call.
Example:
.. code-block:: javascript .. code-block:: javascript
...@@ -74,11 +76,11 @@ Complex queries can be triggered by including the option named query in the allD ...@@ -74,11 +76,11 @@ Complex queries can be triggered by including the option named query in the allD
How to use Complex Queries outside jIO? How to use Complex Queries outside jIO?
--------------------------------------- ---------------------------------------
.. XXX 404 on complex_example.html .. XXX 404 page missing on complex_example.html
Complex Queries provides an API - which namespace is complex_queries. Please Complex Queries provides an API - which namespace is complex_queries.
also refer to the `Complex Queries sample page <http://git.erp5.org/gitweb/jio.git/blob/HEAD:/examples/complex_example.html?js=1>`_ Refer to the `Complex Queries sample page <http://git.erp5.org/gitweb/jio.git/blob/HEAD:/examples/complex_example.html?js=1>`_
on how to use these methods in- and outside jIO. The module provides: for how to use these methods, in and outside jIO. The module provides:
.. code-block:: javascript .. code-block:: javascript
...@@ -168,7 +170,7 @@ Default search types should be defined in the application's user interface ...@@ -168,7 +170,7 @@ Default search types should be defined in the application's user interface
components because criteria like filters will be changed frequently by the components because criteria like filters will be changed frequently by the
component (change ``limit: [0, 10]`` to ``limit: [10, 10]`` or ``sort_on: [['title', component (change ``limit: [0, 10]`` to ``limit: [10, 10]`` or ``sort_on: [['title',
'ascending']]`` to ``sort_on: [['creator', 'ascending']]``) and each component must 'ascending']]`` to ``sort_on: [['creator', 'ascending']]``) and each component must
have their own default properties to keep their own behavior. have its own default properties to keep their own behavior.
Convert Complex Queries into another type Convert Complex Queries into another type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......
...@@ -76,26 +76,26 @@ Create 10 methods: ``post``, ``put``, ``putAttachment``, ``get``, ``getAttachmen ...@@ -76,26 +76,26 @@ Create 10 methods: ``post``, ``put``, ``putAttachment``, ``get``, ``getAttachmen
(To help you design your methods, some tools are provided by jIO.util.) (To help you design your methods, some tools are provided by jIO.util.)
The first parameter command provides some methods to act on the JIO job: The first parameter command provides some methods to act on the jIO job:
* ``success``, to tell JIO that the job is successfully terminated * ``success``, to tell jIO that the job is successfully terminated
``command.success(status[Text], [{custom key to add to the response}]);`` ``command.success(status[Text], [{custom key to add to the response}]);``
* ``resolve``, is equal to success * ``resolve``, is equal to success
* ``error``, to tell JIO that the job cannot be done * ``error``, to tell jIO that the job cannot be done
``command.error(status[Text], [reason], [message], [{custom key to add to the response}])`` ``command.error(status[Text], [reason], [message], [{custom key to add to the response}])``
* ``retry``, to tell JIO that the job cannot be done now, but can be retried later. (same API than error) * ``retry``, to tell jIO that the job cannot be done now, but can be retried later. (same API than error)
* ``reject``, to tell JIO that the job cannot be done, let JIO to decide whether to retry or not. (same API than error) * ``reject``, to tell jIO that the job cannot be done, let jIO to decide whether to retry or not. (same API than error)
The second parameter ``metadata`` or ``param`` is the first parameter provided by the JIO user. The second parameter ``metadata`` or ``param`` is the first parameter provided by the jIO user.
The third parameter ``option`` is the option parameter provided by the JIO user. The third parameter ``option`` is the option parameter provided by the jIO user.
Methods should return the following objects: Methods should return the following objects:
......
...@@ -4,21 +4,26 @@ ...@@ -4,21 +4,26 @@
Downloads Downloads
========= =========
Core: Core
^^^^
* `[sha256.amd.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js>`_ * `sha256.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js>`_
* `[rsvp-custom.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/rsvp/rsvp-custom.js>`_, AMD only version [`rsvp-custom.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/rsvp/rsvp-custom.amd.js>`_] * `rsvp-custom.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/rsvp/rsvp-custom.js>`_, AMD only version: `rsvp-custom.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/rsvp/rsvp-custom.amd.js>`_
* jIO, `[jio.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/jio.js>`_ * `jio.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/jio.js>`_
* complex_queries, `[complex_queries.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/complex_queries.js>`_ * `complex_queries.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/complex_queries.js>`_
Storage dependencies: Storage dependencies
^^^^^^^^^^^^^^^^^^^^
* `jQuery <http://jquery.com/>`_, `[jquery.js] <http://code.jquery.com/jquery.js>`_ .. XXX this is a little confusing. Also, the link to sha1.js is broken (404)
* `sjcl <https://crypto.stanford.edu/sjcl/>`_, `[sjcl.zip] <https://crypto.stanford.edu/sjcl/sjcl.zip>`_
* `sha1 <http://pajhome.org.uk/crypt/md5/sha1.html>`_, `[sha1.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/jsSha1/sha1.js>`_, AMD compatible version [`sha1.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha1.amd.js>`_]
* `sha2, sha256 <http://anmar.eu.org/projects/jssha2/>`_, `[jssha2.zip] <http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip>`_, AMD compatible versions `[sha2.amd.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha2.amd.js>`_ `[sha256.amd.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js>`_
Storage connectors: * `jquery.js <http://code.jquery.com/jquery.js>`_
* `sjcl <https://crypto.stanford.edu/sjcl/>`_, [`sjcl.zip <https://crypto.stanford.edu/sjcl/sjcl.zip>`_]
* `sha1 <http://pajhome.org.uk/crypt/md5/sha1.html>`_, [`sha1.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/jsSha1/sha1.js>`_], AMD compatible version: `sha1.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha1.amd.js>`_
* `sha2, sha256 <http://anmar.eu.org/projects/jssha2/>`_, `jssha2.zip <http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip>`_, AMD compatible versions: `sha2.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha2.amd.js>`_, `sha256.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js>`_
Storage connectors
^^^^^^^^^^^^^^^^^^
* `localstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/localstorage.js>`_ * `localstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/localstorage.js>`_
* `davstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/davstorage.js>`_ * `davstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/davstorage.js>`_
...@@ -28,27 +33,29 @@ Storage connectors: ...@@ -28,27 +33,29 @@ Storage connectors:
* restsqlstorage.js (depends on jQuery) (WIP) * restsqlstorage.js (depends on jQuery) (WIP)
* mioga2storage.js (depends on jQuery) (WIP) * mioga2storage.js (depends on jQuery) (WIP)
Storage handlers: Storage handlers
^^^^^^^^^^^^^^^^
* `indexstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/indexstorage.js>`_ (WIP) * `indexstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/indexstorage.js>`_ (WIP)
* `gidstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/gidstorage.js>`_ (WIP) * `gidstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/gidstorage.js>`_ (WIP)
* `splitstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/splitstorage.js>`_ (WIP) * `splitstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/splitstorage.js>`_ (WIP)
* replicatestorage.js (WIP) * replicatestorage.js (WIP)
Revision based storage handlers: Revision based storage handlers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* `revisionstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/revisionstorage.js>`_ (depends on sha256) (WIP) * `revisionstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/revisionstorage.js>`_ (depends on sha256) (WIP)
* `replicaterevisionstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/replicatestorage.js>`_ (WIP) * `replicaterevisionstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/replicatestorage.js>`_ (WIP)
Minified version Minified version
---------------- ^^^^^^^^^^^^^^^^
.. XXX this sounds harsh. Can we provide it or at least be more explicit? .. XXX this sounds harsh. Can we provide it or at least be more explicit?
To get the minified version of the jIO library, you have to build it yourself. See documentation. To get the minified version of the jIO library, you have to build it yourself. See documentation.
Fork Fork
---- ^^^^
jIO source code jIO source code
......
.. _gid-storage: .. _gid-storage:
JIO GIDStorage jIO GIDStorage
============== ==============
A storage to enable interoperability between all kind of storages. A storage to enable interoperability between all kind of storages.
A global ID (GID) is a document id which represents a unique document. This ID A global ID (GID) is a document id which represents a unique document. This ID
will be used to find this unique document on all kind of backends. is then used to find this unique document on all types of backends.
This storage uses sub storage allDocs and complex queries to find unique documents, and converts their ids to gids. This storage uses sub storage allDocs and complex queries to find unique documents, and converts their ids to gids.
...@@ -43,7 +43,7 @@ Example: ...@@ -43,7 +43,7 @@ Example:
} }
This description tells the *GIDStorage* to use 2 metadata (``type``, ``title``) to define a This description tells the *GIDStorage* to use 2 metadata attributes (``type``, ``title``) to define a
document as unique in the default case. If the document is of type ``Text``, then document as unique in the default case. If the document is of type ``Text``, then
the handler will use 3 metadata (``type``, ``title``, ``language``). the handler will use 3 metadata (``type``, ``title``, ``language``).
If these constraints are not respected, then the storage returns an error telling us to If these constraints are not respected, then the storage returns an error telling us to
...@@ -72,6 +72,7 @@ constraints: ...@@ -72,6 +72,7 @@ constraints:
Available metadata types are: Available metadata types are:
* ``"json"`` - The json value of the metadata. * ``"json"`` - The json value of the metadata.
* ``"string"`` - The value as string if it is not a list. * ``"string"`` - The value as string if it is not a list.
* ``"list"`` - The value as list. * ``"list"`` - The value as list.
...@@ -86,9 +87,9 @@ Available metadata types are: ...@@ -86,9 +87,9 @@ Available metadata types are:
Document Requirements Document Requirements
--------------------- ---------------------
A metadata value must be a string. This string can be placed in an object which A metadata value must be a string. This string can be placed in an attribute within
key is 'content'. The object can contains custom keys with string values. A a ``"content"`` key. The object can contains custom keys with string values. A
metadata can contain several values. Example: metadata object can contain several values. Example:
.. code-block:: javascript .. code-block:: javascript
...@@ -109,7 +110,7 @@ metadata can contain several values. Example: ...@@ -109,7 +110,7 @@ metadata can contain several values. Example:
} }
Metadata which name begin with an underscore can contain anything. Metadata attributes which names begin with an underscore can contain anything.
.. code-block:: javascript .. code-block:: javascript
...@@ -121,7 +122,8 @@ Storage Requirements ...@@ -121,7 +122,8 @@ Storage Requirements
-------------------- --------------------
* This storage is not compatible with *RevisionStorage* and *ReplicateRevisionStorage*. * This storage is not compatible with *RevisionStorage* and *ReplicateRevisionStorage*.
* Sub storage have to support complex queries options and ``include_docs`` option. * Sub storages have to support options for ``complex queries`` and ``include_docs``.
Dependencies Dependencies
------------ ------------
...@@ -131,7 +133,7 @@ No dependency. ...@@ -131,7 +133,7 @@ No dependency.
Suggested storage tree Suggested storage tree
---------------------- ----------------------
Replication Between Storage:: Replication between storages::
Replicate Storage Replicate Storage
+-- GID Storage +-- GID Storage
...@@ -143,7 +145,7 @@ Replication Between Storage:: ...@@ -143,7 +145,7 @@ Replication Between Storage::
**CAUTION: All gid storage must have the same description!** **CAUTION: All gid storage must have the same description!**
Offline Application Usage:: Offline application usage::
Replicate Storage Replicate Storage
+-- Index Storage with DB in Local Storage +-- Index Storage with DB in Local Storage
......
.. JIO documentation master file, created by .. jIO documentation master file, created by
sphinx-quickstart on Fri Nov 15 11:55:08 2013. sphinx-quickstart on Fri Nov 15 11:55:08 2013.
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
Welcome to JIO's documentation! Welcome to jIO's documentation!
=============================== ===============================
Contents: Contents:
...@@ -24,11 +24,5 @@ Contents: ...@@ -24,11 +24,5 @@ Contents:
authors authors
license license
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search` * :ref:`search`
...@@ -8,7 +8,7 @@ Introduction ...@@ -8,7 +8,7 @@ Introduction
What is jIO? What is jIO?
------------ ------------
JIO is a JavaScript library that allows to manage JSON documents on local or jIO is a JavaScript library that allows to manage JSON documents on local or
remote storages in asynchronous fashion. jIO is an abstracted API mapped after remote storages in asynchronous fashion. jIO is an abstracted API mapped after
CouchDB, that offers connectors to multiple storages, special handlers to CouchDB, that offers connectors to multiple storages, special handlers to
enhance functionality (replication, revisions, indexing) and a query module to enhance functionality (replication, revisions, indexing) and a query module to
...@@ -17,17 +17,15 @@ retrieve documents and specific information across storage trees. ...@@ -17,17 +17,15 @@ retrieve documents and specific information across storage trees.
How does it work? How does it work?
----------------- -----------------
.. XXX three parts? jIO is composed of two parts - jIO core and storage library(ies). The core
JIO is separated into three parts - jIO core and storage library(ies). The core
is using storage libraries (connectors) to interact with the associated remote is using storage libraries (connectors) to interact with the associated remote
storage servers. Some queries can be used on top of the jIO allDocs method to storage servers. Some queries can be used on top of the jIO ``allDocs()`` method to
query documents based on defined criteria. query documents based on defined criteria.
JIO uses a job management system, so every method called adds a job into a jIO uses a job management system, so every method call adds a job into a
queue. The queue is copied in the browser's local storage (by default), so it queue. The queue is copied in the browser's local storage (by default), so it
can be restored in case of a browser crash. Jobs are being invoked can be restored in case of browser crash. Jobs are invoked
asynchronously with ongoing jobs not being able to re-trigger to prevent asynchronously and ongoing jobs are not able to re-trigger to prevent
conflicts. conflicts.
Getting started Getting started
...@@ -36,7 +34,7 @@ Getting started ...@@ -36,7 +34,7 @@ Getting started
This walkthrough is designed to get you started using a basic jIO instance. This walkthrough is designed to get you started using a basic jIO instance.
#. Download jIO core, the storages you want to use as well as the #. Download jIO core, the storages you want to use as well as the
complex-queries scripts as well as the dependencies required for the storages complex-queries scripts and the dependencies required for the storages
you intend to use. :ref:`[Download & Fork] <download-fork>` you intend to use. :ref:`[Download & Fork] <download-fork>`
#. Add the scripts to your HTML page in the following order: #. Add the scripts to your HTML page in the following order:
...@@ -56,7 +54,7 @@ This walkthrough is designed to get you started using a basic jIO instance. ...@@ -56,7 +54,7 @@ This walkthrough is designed to get you started using a basic jIO instance.
<script ...> <script ...>
With require js, the main.js will be like this: With `RequireJS <http://requirejs.org/>`_, the main.js will look like:
.. code-block:: javascript .. code-block:: javascript
:linenos: :linenos:
...@@ -77,7 +75,7 @@ This walkthrough is designed to get you started using a basic jIO instance. ...@@ -77,7 +75,7 @@ This walkthrough is designed to get you started using a basic jIO instance.
}); });
#. jIO connects to a number of storages and allows to add handlers (or #. jIO connects to a number of storages and allows adding handlers (or
functions) to specifc storages. functions) to specifc storages.
You can use both handlers and available storages to build a storage You can use both handlers and available storages to build a storage
tree across which all documents will be maintained and managed by jIO. tree across which all documents will be maintained and managed by jIO.
...@@ -89,23 +87,21 @@ This walkthrough is designed to get you started using a basic jIO instance. ...@@ -89,23 +87,21 @@ This walkthrough is designed to get you started using a basic jIO instance.
// create your jio instance // create your jio instance
var my_jio = jIO.createJIO(storage_description); var my_jio = jIO.createJIO(storage_description);
.. XXX 6 methods or 10? #. The jIO API provides ten main methods to manage documents across the storage(s) specified in your jIO storage tree.
#. The jIO API provides six main methods to manage documents across the storage(s) specified in your jIO storage tree. ====================== ===================================================== ========================================
Method Example call Description
================== ===================================================== ======================================== ====================== ===================================================== ========================================
Method Sample Call Description ``post()`` :js:`my_jio.post(document, [options]);` Creates a new document
================== ===================================================== ======================================== ``put()`` :js:`my_jio.put(document, [options]);` Creates/Updates a document
`post` :js:`my_jio.post(document, [options]);` Creates a new document ``putAttachment()`` :js:`my_jio.putAttachement(attachment, [options]);` Updates/Adds an attachment to a document
`put` :js:`my_jio.put(document, [options]);` Creates/Updates a document ``get()`` :js:`my_jio.get(document, [options]);` Reads a document
`putAttachment` :js:`my_jio.putAttachement(attachment, [options]);` Updates/Adds an attachment to a document ``getAttachment()`` :js:`my_jio.getAttachment(attachment, [options]);` Reads a document attachment
`get` :js:`my_jio.get(document, [options]);` Reads a document ``remove()`` :js:`my_jio.remove(document, [options]);` Deletes a document and its attachments
`getAttachment` :js:`my_jio.getAttachment(attachment, [options]);` Reads a document attachment ``removeAttachment()`` :js:`my_jio.removeAttachment(attachment, [options]);` Deletes a document attachment
`remove` :js:`my_jio.remove(document, [options]);` Deletes a document and its attachments ``allDocs()`` :js:`my_jio.allDocs([options]);` Retrieves a list of existing documents
`removeAttachment` :js:`my_jio.removeAttachment(attachment, [options]);` Deletes a document attachment ``check()`` :js:`my_jio.check(document, [options]);` Check the document state
`allDocs` :js:`my_jio.allDocs([options]);` Retrieves a list of existing documents ``repair()`` :js:`my_jio.repair(document, [options]);` Repair the document
`check` :js:`my_jio.check(document, [options]);` Check the document state ====================== ===================================================== ========================================
`repair` :js:`my_jio.repair(document, [options]);` Repair the document
================== ===================================================== ========================================
How to manage documents? How to manage documents?
======================== ========================
JIO is mapped after the CouchDB API and extends them to provide unified, scalable jIO is mapped after the CouchDB APIs and extends them to provide unified, scalable
and high performance access via Javascript to a wide variety of different and high performance access via JavaScript to a wide variety of different
storage backends. storage backends.
If you are unfamiliar with `Apache CouchDB <http://couchdb.apache.org/>`_: If you are not familiar with `Apache CouchDB <http://couchdb.apache.org/>`_:
it is a scalable, fault-tolerant, and schema-free document-oriented database. it is a scalable, fault-tolerant, and schema-free document-oriented database.
It is used in large and small organizations for a variety of applications where It is used in large and small organizations for a variety of applications where
traditional SQL databases are not the best solution for the problem at hand. traditional SQL databases are not the best solution for the problem at hand.
...@@ -20,7 +20,7 @@ A document is an association of metadata and attachment(s). The metadata is the ...@@ -20,7 +20,7 @@ A document is an association of metadata and attachment(s). The metadata is the
set of properties of the document and the attachments are the binaries of the content set of properties of the document and the attachments are the binaries of the content
of the document. of the document.
In jIO, metadata is just a dictionnary with keys and values (JSON object), and In jIO, metadata is just a dictionary with keys and values (JSON object), and
attachments are just simple strings. attachments are just simple strings.
.. code-block:: javascript .. code-block:: javascript
...@@ -59,7 +59,7 @@ You can also retrieve document attachment metadata in this object. ...@@ -59,7 +59,7 @@ You can also retrieve document attachment metadata in this object.
Basic Methods Basic Methods
------------- -------------
Below you can find sample calls of the main jIO methods. All examples are using Below you can see examples of the main jIO methods. All examples are using
revisions (as in revision storage or replicate revision storage), so you can revisions (as in revision storage or replicate revision storage), so you can
see how method calls should be made with either of these storages. see how method calls should be made with either of these storages.
...@@ -103,40 +103,40 @@ see how method calls should be made with either of these storages. ...@@ -103,40 +103,40 @@ see how method calls should be made with either of these storages.
// delete a document and its attachment(s) // delete a document and its attachment(s)
jio_instance.remove({"_id": "my_document"}). jio_instance.remove({"_id": "my_document"}).
then(function (response) { then(function (response) {
// console.log(response): // console.log(response);
}); });
// delete an attachment // delete an attachment
jio_instance.removeAttachment({"_id": "my_document", "_attachment": "its_attachment"}). jio_instance.removeAttachment({"_id": "my_document", "_attachment": "its_attachment"}).
then(function (response) { then(function (response) {
// console.log(response): // console.log(response);
}); });
// get all documents // get all documents
jio_instance.allDocs().then(function (response) { jio_instance.allDocs().then(function (response) {
// console.log(response): // console.log(response);
}); });
Promises Promises
-------- --------
Each JIO methods returns a Promise object, which allows us to get responses into Each jIO method returns a Promise object, which allows us to get responses into
callback parameters and to chain callbacks with other returned values. callback parameters and to chain callbacks with other returned values.
JIO uses a custom version of `RSVP.js <https://github.com/tildeio/rsvp.js>`_, adding canceler and progression features. jIO uses a custom version of `RSVP.js <https://github.com/tildeio/rsvp.js>`_, adding canceler and progression features.
You can read more about promises: You can read more about promises:
* `github RSVP.js <https://github.com/tildeio/rsvp.js#rsvpjs-->`_ * `RSVP.js <https://github.com/tildeio/rsvp.js#rsvpjs-->`_ on GitHub
* `Promises/A+ <http://promisesaplus.com/>`_ * `Promises/A+ <http://promisesaplus.com/>`_
* `CommonJS Promises <http://wiki.commonjs.org/wiki/Promises>`_ * `CommonJS Promises <http://wiki.commonjs.org/wiki/Promises>`_
Method Options and Callback Responses Method Options and Callback Responses
------------------------------------- -------------------------------------
To retrieve JIO responses, you have to provide callbacks like this: To retrieve jIO responses, you have to provide callbacks like this:
.. code-block:: javascript .. code-block:: javascript
...@@ -144,103 +144,103 @@ To retrieve JIO responses, you have to provide callbacks like this: ...@@ -144,103 +144,103 @@ To retrieve JIO responses, you have to provide callbacks like this:
then([responseCallback], [errorCallback], [progressionCallback]); then([responseCallback], [errorCallback], [progressionCallback]);
* On command success, responseCallback will be called with the JIO response as first parameter. * On command success, ``responseCallback`` will be called with the jIO response as first parameter.
* On command error, errorCallback will be called with the JIO error as first parameter. * On command error, ``errorCallback`` will be called with the jIO error as first parameter.
* On command notification, progressionCallback will be called with the storage notification. * On command notification, ``progressionCallback`` will be called with the storage notification.
Here is a list of responses returned by JIO according to methods and options: Here is a list of responses returned by jIO according to methods and options:
================== =============================== ====================================== ================== =========================================== ===============================================
Option Available for Response (Callback first parameter) Option Available for Response (Callback first parameter)
================== =============================== ====================================== ================== =========================================== ===============================================
No options post, put, remove .. code-block:: javascript No options ``post()``, ``put()``, ``remove()`` .. code-block:: javascript
{ {
"result": "success", "result": "success",
"method": "post", "method": "post",
// or put or remove // or put or remove
"id": "my_doc_id", "id": "my_doc_id",
"status": 204, "status": 204,
"statusText": "No Content" "statusText": "No Content"
} }
No options putAttachment, removeAttachment .. code-block:: javascript No options ``putAttachment()``, ``removeAttachment()`` .. code-block:: javascript
{ {
"result": "success", "result": "success",
"method": "putAttachment", "method": "putAttachment",
// or removeAttachment // or removeAttachment
"id": "my_doc_id", "id": "my_doc_id",
"attachment": "my_attachment_id", "attachment": "my_attachment_id",
"status": 204, "status": 204,
"statusText": "No Content" "statusText": "No Content"
} }
No options get .. code-block:: javascript No options ``get()`` .. code-block:: javascript
{ {
"result": "success", "result": "success",
"method": "get", "method": "get",
"id": "my_doc_id", "id": "my_doc_id",
"status": 200, "status": 200,
"statusText": "Ok", "statusText": "Ok",
"data": { "data": {
// Here, the document metadata // Here, the document metadata
} }
} }
No options getAttachment .. code-block:: javascript No options ``getAttachment()`` .. code-block:: javascript
{ {
"result": "success", "result": "success",
"method": "getAttachment", "method": "getAttachment",
"id": "my_doc_id", "id": "my_doc_id",
"attachment": "my_attachment_id", "attachment": "my_attachment_id",
"status": 200, "status": 200,
"statusText": "Ok", "statusText": "Ok",
"data": Blob // Here, the attachment content "data": Blob // Here, the attachment content
} }
No option allDocs .. code-block:: javascript No option ``allDocs()`` .. code-block:: javascript
{ {
"result": "success", "result": "success",
"method": "allDocs", "method": "allDocs",
"id": "my_doc_id", "id": "my_doc_id",
"status": 200, "status": 200,
"statusText": "Ok", "statusText": "Ok",
"data": { "data": {
"total_rows": 1, "total_rows": 1,
"rows": [{ "rows": [{
"id": "mydoc", "id": "mydoc",
"key": "mydoc", // optional "key": "mydoc", // optional
"value": {}, "value": {},
}] }]
} }
} }
include_docs: true allDocs .. code-block:: javascript include_docs: true ``allDocs()`` .. code-block:: javascript
{ {
"result": "success", "result": "success",
"method": "allDocs", "method": "allDocs",
"id": "my_doc_id", "id": "my_doc_id",
"status": 200, "status": 200,
"statusText": "Ok", "statusText": "Ok",
"data": { "data": {
"total_rows": 1, "total_rows": 1,
"rows": [{ "rows": [{
"id": "mydoc", "id": "mydoc",
"key": "mydoc", // optional "key": "mydoc", // optional
"value": {}, "value": {},
"doc": { "doc": {
// Here, "mydoc" metadata // Here, "mydoc" metadata
} }
}] }]
} }
} }
================== =============================== ====================================== ================== =========================================== ===============================================
In case of error, the errorCallback first parameter will look like: In case of error, the ``errorCallback`` first parameter will look like:
.. code-block:: javascript .. code-block:: javascript
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
:language: javascript :language: javascript
.. _metadata-head: .. _metadata-head:
Metadata Metadata
======== ========
...@@ -13,9 +14,8 @@ The word "metadata" means "data about data". Metadata articulates a context for ...@@ -13,9 +14,8 @@ The word "metadata" means "data about data". Metadata articulates a context for
objects of interest -- "resources" such as MP3 files, library books, or objects of interest -- "resources" such as MP3 files, library books, or
satellite images -- in the form of "resource descriptions". As a tradition, satellite images -- in the form of "resource descriptions". As a tradition,
resource description dates back to the earliest archives and library catalogs. resource description dates back to the earliest archives and library catalogs.
The modern "metadata" field that gave rise to Dublin Core and other recent During the Web revolution of the mid-1990s, `Dublic Core <http://dublincore.org/metadata-basics/>`_
standards emerged with the Web revolution of the mid-1990s. has emerged as one of the prominent metadata standards.
http://dublincore.org/metadata-basics/
Why use metadata? Why use metadata?
----------------- -----------------
...@@ -27,7 +27,7 @@ way to save documents and to get them). So we must use metadata for ...@@ -27,7 +27,7 @@ way to save documents and to get them). So we must use metadata for
*interoperability reasons*. Interoperability is the ability of diverse systems *interoperability reasons*. Interoperability is the ability of diverse systems
and organizations to work together. and organizations to work together.
How to format metadata with JIO How to format metadata with jIO
------------------------------- -------------------------------
See below XML and its JSON equivalent: See below XML and its JSON equivalent:
...@@ -60,10 +60,10 @@ List of metadata to use ...@@ -60,10 +60,10 @@ List of metadata to use
Identification Identification
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
* **"_id"**, a specific JIO metadata which helps the storage to find a document * **_id**, a specific jIO metadata which helps the storage to find a document
(can be a real path name, a dc:identifier, a uuid, ...). **String Only** (can be a real path name, a dc:identifier, a uuid, ...). **String Only**
* **"identifer"**, :js:`{"identifier": "http://domain/jio_home_page"}, {"identifier": "urn:ISBN:978-1-2345-6789-X"}, * **identifer**, :js:`{"identifier": "http://domain/jio_home_page"}, {"identifier": "urn:ISBN:978-1-2345-6789-X"},
{"identifier": [{"scheme": "DCTERMS.URI", "content": "http://domain/jio_home_page"}]}` {"identifier": [{"scheme": "DCTERMS.URI", "content": "http://domain/jio_home_page"}]}`
an unambiguous reference to the resource within a given context. Recommended an unambiguous reference to the resource within a given context. Recommended
...@@ -73,14 +73,14 @@ Identification ...@@ -73,14 +73,14 @@ Identification
Resource Locator (URL), the Digital Object Identifier (DOI) and the Resource Locator (URL), the Digital Object Identifier (DOI) and the
International Standard Book Number (ISBN). International Standard Book Number (ISBN).
* **"format"**, :js:`{"format": ["text/html", "52 kB"]}, {"format": ["image/jpeg", "100 x 100 pixels", "13.2 KiB"]}` * **format**, :js:`{"format": ["text/html", "52 kB"]}, {"format": ["image/jpeg", "100 x 100 pixels", "13.2 KiB"]}`
the physical or digital manifestation of the resource. Typically, Format may the physical or digital manifestation of the resource. Typically, Format may
include the media-type or dimensions of the resource. Examples of dimensions include the media-type or dimensions of the resource. Examples of dimensions
include size and duration. Format may be used to determine the software, include size and duration. Format may be used to determine the software,
hardware or other equipment needed to display or operate the resource. hardware or other equipment needed to display or operate the resource.
* **"date"**, :js:`{"date": "2011-12-13T14:15:16Z"}, {"date": {"scheme": "DCTERMS.W3CDTF", "content": "2011-12-13"}}` * **date**, :js:`{"date": "2011-12-13T14:15:16Z"}, {"date": {"scheme": "DCTERMS.W3CDTF", "content": "2011-12-13"}}`
a date associated with an event in the life cycle of the resource. Typically, a date associated with an event in the life cycle of the resource. Typically,
Date will be associated with the creation or availability of the resource. Date will be associated with the creation or availability of the resource.
...@@ -88,7 +88,7 @@ Identification ...@@ -88,7 +88,7 @@ Identification
of ISO 8601 `Date and Time Formats, W3C Note <http://www.w3.org/TR/NOTE-datetime>`_ of ISO 8601 `Date and Time Formats, W3C Note <http://www.w3.org/TR/NOTE-datetime>`_
and follows the YYYY-MM-DD format. and follows the YYYY-MM-DD format.
* **"type"**, :js:`{"type": "Text"}, {"type": "Image"}, {"type": "Dataset"}` * **type**, :js:`{"type": "Text"}, {"type": "Image"}, {"type": "Dataset"}`
the nature or genre of the content of the resource. Type includes terms describing the nature or genre of the content of the resource. Type includes terms describing
general categories, functions, genres, or aggregation levels for content. general categories, functions, genres, or aggregation levels for content.
...@@ -99,26 +99,26 @@ Identification ...@@ -99,26 +99,26 @@ Identification
Intellectual property Intellectual property
^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
* **"creator"**, :js:`{"creator": "Tristan Cavelier"}, {"creator": ["Tristan Cavelier", "Sven Franck"]}` * **creator**, :js:`{"creator": "Tristan Cavelier"}, {"creator": ["Tristan Cavelier", "Sven Franck"]}`
an entity primarily responsible for creating the content of the resource. an entity primarily responsible for creating the content of the resource.
Examples of a Creator include a person, an organization, or a service. Examples of a Creator include a person, an organization, or a service.
Typically the name of the Creator should be used to indicate the entity. Typically the name of the Creator should be used to indicate the entity.
* **"publisher"**, :js:`{"publisher": "Nexedi"}` * **publisher**, :js:`{"publisher": "Nexedi"}`
the entity responsible for making the resource available. Examples of a the entity responsible for making the resource available. Examples of a
Publisher include a person, an organization, or a service. Typically, the name Publisher include a person, an organization, or a service. Typically, the name
of a Publisher should be used to indicate the entity. of a Publisher should be used to indicate the entity.
* **"contributor"**, :js:`{"contributor": ["Full Name", "Full Name", ...]}` * **contributor**, :js:`{"contributor": ["Full Name", "Full Name", ...]}`
an entity responsible for making contributions to the content of the an entity responsible for making contributions to the content of the
resource. Examples of a Contributor include a person, an organization or a resource. Examples of a Contributor include a person, an organization or a
service. Typically, the name of a Contributor should be used to indicate the service. Typically, the name of a Contributor should be used to indicate the
entity. entity.
* **"rights"**, :js:`{"rights": "Access limited to members"}, {"rights": "https://www.j-io.org/documentation/jio-documentation/#copyright-and-license"}` * **rights**, :js:`{"rights": "Access limited to members"}, {"rights": "https://www.j-io.org/documentation/jio-documentation/#copyright-and-license"}`
information about rights held in and over the resource. Typically a Rights information about rights held in and over the resource. Typically a Rights
element will contain a rights management statement for the resource, or element will contain a rights management statement for the resource, or
...@@ -131,24 +131,24 @@ Intellectual property ...@@ -131,24 +131,24 @@ Intellectual property
Content Content
^^^^^^^ ^^^^^^^
* **"title"**, :js:`{"title": "JIO Home Page"}` * **title**, :js:`{"title": "jIO Home Page"}`
the name given to the resource. Typically, a Title will be a name by which the resource is formally known. the name given to the resource. Typically, a Title will be a name by which the resource is formally known.
* **"subject"**, :js:`{"subject": "JIO"}, {"subject": ["JIO", "basics"]}` * **subject**, :js:`{"subject": "jIO"}, {"subject": ["jIO", "basics"]}`
the topic of the content of the resource. Typically, a Subject will be the topic of the content of the resource. Typically, a Subject will be
expressed as keywords or key phrases or classification codes that describe the expressed as keywords or key phrases or classification codes that describe the
topic of the resource. Recommended best practice is to select a value from a topic of the resource. Recommended best practice is to select a value from a
controlled vocabulary or formal classification scheme. controlled vocabulary or formal classification scheme.
* **"description"**, :js:`{"description": "Simple guide to show the basics of JIO"}, {"description": {"lang": "fr", "content": "Ma description"}}` * **description**, :js:`{"description": "Simple guide to show the basics of jIO"}, {"description": {"lang": "fr", "content": "Ma description"}}`
an account of the content of the resource. Description may include but is not an account of the content of the resource. Description may include but is not
limited to: an abstract, table of contents, reference to a graphical limited to: an abstract, table of contents, reference to a graphical
representation of content or a free-text account of the content. representation of content or a free-text account of the content.
* **"language"**, :js:`{"language": "en"}` * **language**, :js:`{"language": "en"}`
the language of the intellectual content of the resource. Recommended best the language of the intellectual content of the resource. Recommended best
practice for the values of the Language element is defined by `RFC 3066 <http://www.ietf.org/rfc/rfc3066.txt>`_ practice for the values of the Language element is defined by `RFC 3066 <http://www.ietf.org/rfc/rfc3066.txt>`_
...@@ -157,20 +157,20 @@ Content ...@@ -157,20 +157,20 @@ Content
or "eng" for English, "akk" for Akkadian, and "en-GB" for English used in the or "eng" for English, "akk" for Akkadian, and "en-GB" for English used in the
United Kingdom. United Kingdom.
* **"source"**, :js:`{"source": ["Image taken from a drawing by Mr. Artist", "<phone number>"]}`, * **source**, :js:`{"source": ["Image taken from a drawing by Mr. Artist", "<phone number>"]}`,
a Reference to a resource from which the present resource is derived. The a Reference to a resource from which the present resource is derived. The
present resource may be derived from the Source resource in whole or part. present resource may be derived from the Source resource in whole or part.
Recommended best practice is to reference the resource by means of a string or Recommended best practice is to reference the resource by means of a string or
number conforming to a formal identification system. number conforming to a formal identification system.
* **"relation"**, :js:`{"relation": "Resilience project"}` * **relation**, :js:`{"relation": "Resilience project"}`
a reference to a related resource. Recommended best practice is to reference a reference to a related resource. Recommended best practice is to reference
the resource by means of a string or number conforming to a formal the resource by means of a string or number conforming to a formal
identification system. identification system.
* **"coverage"**, :js:`{"coverage": "France"}` * **coverage**, :js:`{"coverage": "France"}`
the extent or scope of the content of the resource. Coverage will typically the extent or scope of the content of the resource. Coverage will typically
include spatial location (a place name or geographic co-ordinates), temporal include spatial location (a place name or geographic co-ordinates), temporal
...@@ -181,13 +181,13 @@ Content ...@@ -181,13 +181,13 @@ Content
places or time periods should be used in preference to numeric identifiers such places or time periods should be used in preference to numeric identifiers such
as sets of co-ordinates or date ranges. as sets of co-ordinates or date ranges.
* **"category"**, :js:`{"category": ["parent/26323", "resilience/javascript", "javascript/library/io"]}` * **category**, :js:`{"category": ["parent/26323", "resilience/javascript", "javascript/library/io"]}`
the category the resource is associated with. The categories may look like the category the resource is associated with. The categories may look like
navigational facets, they correspond to the properties of the resource which navigational facets, they correspond to the properties of the resource which
can be generated with metadata or some other informations (see `faceted search <https://en.wikipedia.org/wiki/Faceted_search>`_). can be generated with metadata or some other information (see `faceted search <https://en.wikipedia.org/wiki/Faceted_search>`_).
* **"product"**, :js:`{"product": "..."}` * **product**, :js:`{"product": "..."}`
for e-commerce use. for e-commerce use.
...@@ -199,7 +199,7 @@ Content ...@@ -199,7 +199,7 @@ Content
Examples Examples
-------- --------
Posting a webpage for JIO Posting a webpage for jIO
^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: javascript .. code-block:: javascript
...@@ -211,16 +211,16 @@ Posting a webpage for JIO ...@@ -211,16 +211,16 @@ Posting a webpage for JIO
"date" : new Date(), "date" : new Date(),
"type" : "Text", "type" : "Text",
"creator" : ["Nexedi", "Tristan Cavelier", "Sven Franck"], "creator" : ["Nexedi", "Tristan Cavelier", "Sven Franck"],
"title" : "JIO Home Page", "title" : "jIO Home Page",
"subject" : ["JIO", "basics"], "subject" : ["jIO", "basics"],
"description" : "Simple guide to show the basics of JIO", "description" : "Simple guide to show the basics of jIO",
"category" : ["resilience/jio", "webpage"], "category" : ["resilience/jio", "webpage"],
"language" : "en" "language" : "en"
}, callbacks); // send content as attachment }, callbacks); // send content as attachment
Posting JIO library Posting jIO library
^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
.. code-block:: javascript .. code-block:: javascript
...@@ -236,7 +236,7 @@ Posting JIO library ...@@ -236,7 +236,7 @@ Posting JIO library
"rights" : "rights" :
"https://www.j-io.org/documentation/jio-documentation/#copyright-and-license", "https://www.j-io.org/documentation/jio-documentation/#copyright-and-license",
"title" : "Javascript Input/Output", "title" : "Javascript Input/Output",
"subject" : "JIO", "subject" : "jIO",
"category" : ["resilience/javascript", "javascript/library/io"] "category" : ["resilience/javascript", "javascript/library/io"]
"description" : "jIO is a client-side JavaScript library to manage " + "description" : "jIO is a client-side JavaScript library to manage " +
"documents across multiple storages." "documents across multiple storages."
...@@ -355,14 +355,14 @@ With complex query: ...@@ -355,14 +355,14 @@ With complex query:
jio.allDocs({"query": "creator: \"someone\""}, callbacks); jio.allDocs({"query": "creator: \"someone\""}, callbacks);
Getting all documents about JIO in the resilience project Getting all documents about jIO in the resilience project
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
With complex query: With complex query:
.. code-block:: javascript .. code-block:: javascript
jio.allDocs({"query": "subject: \"JIO\" AND category: \"resilience\""}, callbacks); jio.allDocs({"query": "subject: \"jIO\" AND category: \"resilience\""}, callbacks);
......
...@@ -181,7 +181,7 @@ Good Example ...@@ -181,7 +181,7 @@ Good Example
.. code-block:: javascript .. code-block:: javascript
function func () { function func() {
return { return {
"name": "Batman" "name": "Batman"
}; };
...@@ -502,7 +502,7 @@ Additional Readings ...@@ -502,7 +502,7 @@ Additional Readings
Resources, additional reading materials and links: Resources, additional reading materials and links:
* `Javascript Patterns <http://shop.oreilly.com/product/9780596806767.do>`_, main ressource used. * `JavaScript Patterns <http://shop.oreilly.com/product/9780596806767.do>`_, main ressource used.
* `JSLint <http://www.jslint.com/>`_, code quality. * `JSLint <http://www.jslint.com/>`_, code quality.
* `YUIDoc <http://yuilibrary.com/projects/yuidoc>`_, generate documentation from code. * `YUIDoc <http://yuilibrary.com/projects/yuidoc>`_, generate documentation from code.
......
...@@ -7,7 +7,7 @@ Why Conflicts can Occur ...@@ -7,7 +7,7 @@ Why Conflicts can Occur
Using jIO you can store documents in multiple storage locations. With Using jIO you can store documents in multiple storage locations. With
increasing number of users working on a document and some storages not being increasing number of users working on a document and some storages not being
available or responding too slow, conflicts are more likely to occur. JIO available or responding too slow, conflicts are more likely to occur. jIO
defines a conflict as multiple versions of a document existing in a storage defines a conflict as multiple versions of a document existing in a storage
tree and a user trying to save on a version that does not match the latest tree and a user trying to save on a version that does not match the latest
version of the document. version of the document.
...@@ -37,11 +37,11 @@ Simple Conflict Example ...@@ -37,11 +37,11 @@ Simple Conflict Example
You are keeping a namecard file on your PC updating from your smartphone. Your You are keeping a namecard file on your PC updating from your smartphone. Your
smartphone ran out of battery and is offline when you update your namecard on smartphone ran out of battery and is offline when you update your namecard on
your PC with your new email adress. Someone else change this email from your PC your PC with your new email adress. Someone else changes this email from your PC
and once your smartphone is recharged, you go back online and the previous and once your smartphone is recharged, you go back online and the previous
update is executed. update is executed.
#. Setting up the storage tree #. Set up the storage tree
.. code-block:: javascript .. code-block:: javascript
...@@ -64,7 +64,7 @@ update is executed. ...@@ -64,7 +64,7 @@ update is executed.
}); });
#. Create your namecard on your smartphone #. Create the namecard on your smartphone
.. code-block:: javascript .. code-block:: javascript
...@@ -91,10 +91,10 @@ update is executed. ...@@ -91,10 +91,10 @@ update is executed.
// response.rev -> "2-068E73F5B44FEC987B51354DFC772891" // response.rev -> "2-068E73F5B44FEC987B51354DFC772891"
}); });
Your smartphone is offline, so you will now have one version (1-578...) on Your smartphone is offline, so now you will have one version (1-578...) on
your smartphone and another version on webDav (2-068...) on your PC. your smartphone and another version on webDav (2-068...) on your PC.
#. You modify your namecard while being offline #. You modify the namecard while being offline
.. code-block:: javascript .. code-block:: javascript
...@@ -114,7 +114,7 @@ update is executed. ...@@ -114,7 +114,7 @@ update is executed.
}); });
#. Later, your smartphone is online and you retrieve your namecard. #. Later, your smartphone is online and you retrieve the other version of the namecard.
.. code-block:: javascript .. code-block:: javascript
...@@ -157,7 +157,7 @@ update is executed. ...@@ -157,7 +157,7 @@ update is executed.
When deleting the conflicting version of your namecard, jIO removes this When deleting the conflicting version of your namecard, jIO removes this
version from all storages and sets the document tree leaf of this version to version from all storages and sets the document tree leaf of this version to
deleted. All storages now contain just a single version of your namecard deleted. All storages now contain just a single version of the namecard
(2-3753...). Note that, on the document tree, removing a revison will (2-3753...). Note that, on the document tree, removing a revison will
create a new revision with status set to *deleted*. create a new revision with status set to *deleted*.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Authors &mdash; JIO 2.0.0 documentation</title> <title>Authors &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<link rel="next" title="Copyright and license" href="license.html" /> <link rel="next" title="Copyright and license" href="license.html" />
<link rel="prev" title="JavaScript Naming Conventions" href="naming_conventions.html" /> <link rel="prev" title="JavaScript Naming Conventions" href="naming_conventions.html" />
</head> </head>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<li class="right" > <li class="right" >
<a href="naming_conventions.html" title="JavaScript Naming Conventions" <a href="naming_conventions.html" title="JavaScript Naming Conventions"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<li class="right" > <li class="right" >
<a href="naming_conventions.html" title="JavaScript Naming Conventions" <a href="naming_conventions.html" title="JavaScript Naming Conventions"
>previous</a> |</li> >previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>List of Available Storages &mdash; JIO 2.0.0 documentation</title> <title>List of Available Storages &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<link rel="next" title="JIO GIDStorage" href="gid_storage.html" /> <link rel="next" title="jIO GIDStorage" href="gid_storage.html" />
<link rel="prev" title="Revision Storages: Conflicts and Resolution" href="revision_storages.html" /> <link rel="prev" title="Revision Storages: Conflicts and Resolution" href="revision_storages.html" />
</head> </head>
<body> <body>
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
<a href="genindex.html" title="General Index" <a href="genindex.html" title="General Index"
accesskey="I">index</a></li> accesskey="I">index</a></li>
<li class="right" > <li class="right" >
<a href="gid_storage.html" title="JIO GIDStorage" <a href="gid_storage.html" title="jIO GIDStorage"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="revision_storages.html" title="Revision Storages: Conflicts and Resolution" <a href="revision_storages.html" title="Revision Storages: Conflicts and Resolution"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -53,27 +53,25 @@ ...@@ -53,27 +53,25 @@
<div class="section" id="list-of-available-storages"> <div class="section" id="list-of-available-storages">
<span id="id1"></span><h1>List of Available Storages<a class="headerlink" href="#list-of-available-storages" title="Permalink to this headline"></a></h1> <span id="id1"></span><h1>List of Available Storages<a class="headerlink" href="#list-of-available-storages" title="Permalink to this headline"></a></h1>
<p>JIO saves his job queue in a workspace which is localStorage by default. <p>jIO saves his job queue in a workspace which is localStorage by default.
Provided storage descriptions are also stored, and it can be dangerous to Provided storage descriptions are also stored, and it can be dangerous to
store passwords.</p> store passwords.</p>
<p>The best way to create a storage description is to use the (often) provided <p>The best way to create a storage description is to use the (often) provided
tool given by the storage library. The returned description is secured to avoid tool given by the storage library. The returned description is secured to avoid
clear readable password. (encrypted password for instance)</p> cleartext, readable passwords (as opposed to encrypted passwords for instance).</p>
<p>When building storage trees, there is no limit on the number of storages you <p>When building storage trees, there is no limit on the number of storages you
can use. The only thing you have to be aware of is compatability of simple and can use. The only thing you have to be aware of is compatibility of simple and
revision based storages.</p> revision based storages.</p>
<div class="section" id="connectors"> <div class="section" id="connectors">
<h2>Connectors<a class="headerlink" href="#connectors" title="Permalink to this headline"></a></h2> <h2>Connectors<a class="headerlink" href="#connectors" title="Permalink to this headline"></a></h2>
<div class="section" id="localstorage"> <div class="section" id="localstorage">
<h3>LocalStorage<a class="headerlink" href="#localstorage" title="Permalink to this headline"></a></h3> <h3>LocalStorage<a class="headerlink" href="#localstorage" title="Permalink to this headline"></a></h3>
<p>Three methods are provided:</p> <p>Three methods are provided:</p>
<blockquote> <ul class="simple">
<div><ul class="simple">
<li><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">createDescription</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name other"><span class="pre">username</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">application_name</span></span><span class="punctuation"><span class="pre">],</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">mode</span></span><span class="operator"><span class="pre">=</span></span><span class="literal string double"><span class="pre">&quot;localStorage&quot;</span></span><span class="punctuation"><span class="pre">])</span></span></tt></li> <li><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">createDescription</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name other"><span class="pre">username</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">application_name</span></span><span class="punctuation"><span class="pre">],</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">mode</span></span><span class="operator"><span class="pre">=</span></span><span class="literal string double"><span class="pre">&quot;localStorage&quot;</span></span><span class="punctuation"><span class="pre">])</span></span></tt></li>
<li><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">createLocalDescription</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name other"><span class="pre">username</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">application_name</span></span><span class="punctuation"><span class="pre">])</span></span></tt></li> <li><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">createLocalDescription</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name other"><span class="pre">username</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">application_name</span></span><span class="punctuation"><span class="pre">])</span></span></tt></li>
<li><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">createMemoryDescription</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name other"><span class="pre">username</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">application_name</span></span><span class="punctuation"><span class="pre">])</span></span></tt></li> <li><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">createMemoryDescription</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name other"><span class="pre">username</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">application_name</span></span><span class="punctuation"><span class="pre">])</span></span></tt></li>
</ul> </ul>
</div></blockquote>
<p>All parameters are strings.</p> <p>All parameters are strings.</p>
<p>Examples:</p> <p>Examples:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="c1">// to work on browser localStorage</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="c1">// to work on browser localStorage</span>
...@@ -86,18 +84,43 @@ revision based storages.</p> ...@@ -86,18 +84,43 @@ revision based storages.</p>
</div> </div>
<div class="section" id="davstorage"> <div class="section" id="davstorage">
<h3>DavStorage<a class="headerlink" href="#davstorage" title="Permalink to this headline"></a></h3> <h3>DavStorage<a class="headerlink" href="#davstorage" title="Permalink to this headline"></a></h3>
<p>The tool dav_storage.createDescription generates a dav storage description for <p>The method <tt class="docutils literal"><span class="pre">dav_storage.createDescription()</span></tt> generates a DAV storage description for
<em>no</em>, <em>basic</em> or <em>digest</em> authentication (<em>digest</em> is not implemented yet).</p> <em>none</em>, <em>basic</em> or <em>digest</em> authentication.</p>
<p>NB: digest <strong>is not implemented yet</strong>.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">dav_storage</span><span class="p">.</span><span class="nx">createDescription</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span> <span class="nx">auth_type</span><span class="p">,</span> <span class="p">[</span><span class="nx">realm</span><span class="p">],</span> <span class="p">[</span><span class="nx">username</span><span class="p">],</span> <span class="p">[</span><span class="nx">password</span><span class="p">]);</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">dav_storage</span><span class="p">.</span><span class="nx">createDescription</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span> <span class="nx">auth_type</span><span class="p">,</span> <span class="p">[</span><span class="nx">realm</span><span class="p">],</span> <span class="p">[</span><span class="nx">username</span><span class="p">],</span> <span class="p">[</span><span class="nx">password</span><span class="p">]);</span>
</pre></div> </pre></div>
</div> </div>
<p>All parameters are strings.</p> <p>All parameters are strings.</p>
<p>Only <tt class="docutils literal"><span class="pre">url</span></tt> and <tt class="docutils literal"><span class="pre">auth_type</span></tt> are required. If <tt class="docutils literal"><span class="pre">auth_type</span></tt> is equal to &#8220;none&#8221;, <table border="1" class="docutils">
then <tt class="docutils literal"><span class="pre">realm</span></tt>, <tt class="docutils literal"><span class="pre">username</span></tt> and <tt class="docutils literal"><span class="pre">password</span></tt> are useless. <tt class="docutils literal"><span class="pre">username</span></tt> and <tt class="docutils literal"><span class="pre">password</span></tt> become <colgroup>
required if <tt class="docutils literal"><span class="pre">auth_type</span></tt> is equal to &#8220;basic&#8221;. And <tt class="docutils literal"><span class="pre">realm</span></tt> also becomes required if <col width="35%" />
<tt class="docutils literal"><span class="pre">auth_type</span></tt> is equal to &#8220;digest&#8221;.</p> <col width="65%" />
<p>digest <strong>is not implemented yet</strong></p> </colgroup>
<p><strong>Be careful</strong>: The generated description never contains readable password, but <thead valign="bottom">
<tr class="row-odd"><th class="head">parameter</th>
<th class="head">required?</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">url</span></tt></td>
<td>yes</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">auth_type</span></tt></td>
<td>yes</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">realm</span></tt></td>
<td>if auth_type == &#8216;digest&#8217;</td>
</tr>
<tr class="row-odd"><td><tt class="docutils literal"><span class="pre">username</span></tt></td>
<td>if auth_type != &#8216;none&#8217;</td>
</tr>
<tr class="row-even"><td><tt class="docutils literal"><span class="pre">password</span></tt></td>
<td>if auth-type != &#8216;none&#8217;</td>
</tr>
</tbody>
</table>
<p>If <tt class="docutils literal"><span class="pre">auth_type</span></tt> is &#8220;none&#8221;, then <tt class="docutils literal"><span class="pre">realm</span></tt>, <tt class="docutils literal"><span class="pre">username</span></tt> and <tt class="docutils literal"><span class="pre">password</span></tt> are never used.</p>
<p><strong>Be careful</strong>: The generated description never contains a readable password, but
for basic authentication, the password will just be base64 encoded.</p> for basic authentication, the password will just be base64 encoded.</p>
</div> </div>
<div class="section" id="s3storage"> <div class="section" id="s3storage">
...@@ -114,7 +137,7 @@ for basic authentication, the password will just be base64 encoded.</p> ...@@ -114,7 +137,7 @@ for basic authentication, the password will just be base64 encoded.</p>
<div class="section" id="indexstorage"> <div class="section" id="indexstorage">
<h3>IndexStorage<a class="headerlink" href="#indexstorage" title="Permalink to this headline"></a></h3> <h3>IndexStorage<a class="headerlink" href="#indexstorage" title="Permalink to this headline"></a></h3>
<p>This handler indexes documents metadata into a database (which is a simple <p>This handler indexes documents metadata into a database (which is a simple
document) to increase the speed of allDocs requests. However, it is not able to document) to increase the speed of <tt class="docutils literal"><span class="pre">allDocs()</span></tt> requests. However, it is not able to
manage the <tt class="docutils literal"><span class="pre">include_docs</span></tt> option.</p> manage the <tt class="docutils literal"><span class="pre">include_docs</span></tt> option.</p>
<p>The sub storages have to manage <tt class="docutils literal"><span class="pre">query</span></tt> and <tt class="docutils literal"><span class="pre">include_docs</span></tt> options.</p> <p>The sub storages have to manage <tt class="docutils literal"><span class="pre">query</span></tt> and <tt class="docutils literal"><span class="pre">include_docs</span></tt> options.</p>
<p>Here is the description:</p> <p>Here is the description:</p>
...@@ -160,8 +183,8 @@ manage the <tt class="docutils literal"><span class="pre">include_docs</span></t ...@@ -160,8 +183,8 @@ manage the <tt class="docutils literal"><span class="pre">include_docs</span></t
<h2>Revision Based Handlers<a class="headerlink" href="#revision-based-handlers" title="Permalink to this headline"></a></h2> <h2>Revision Based Handlers<a class="headerlink" href="#revision-based-handlers" title="Permalink to this headline"></a></h2>
<p>A revision based handler is a storage which is able to do some document <p>A revision based handler is a storage which is able to do some document
versioning using simple storages listed above.</p> versioning using simple storages listed above.</p>
<p>On JIO command parameter, <tt class="docutils literal"><span class="pre">_id</span></tt> is still used to identify a document, but <p>On jIO command parameter, <tt class="docutils literal"><span class="pre">_id</span></tt> is still used to identify a document, but
another id <tt class="docutils literal"><span class="pre">_rev</span></tt> must be defined to use a specific revision of this document.</p> another id <tt class="docutils literal"><span class="pre">_rev</span></tt> must be defined to use a specific revision of that document.</p>
<p>On command responses, you will find another field <tt class="docutils literal"><span class="pre">rev</span></tt> which will represent the <p>On command responses, you will find another field <tt class="docutils literal"><span class="pre">rev</span></tt> which will represent the
new revision produced by your action. All the document history is kept unless new revision produced by your action. All the document history is kept unless
you decide to delete older revisions.</p> you decide to delete older revisions.</p>
...@@ -218,7 +241,7 @@ options <strong>conflicts: true</strong>, <strong>revs: true</strong> or <strong ...@@ -218,7 +241,7 @@ options <strong>conflicts: true</strong>, <strong>revs: true</strong> or <strong
title="previous chapter">Revision Storages: Conflicts and Resolution</a></p> title="previous chapter">Revision Storages: Conflicts and Resolution</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="gid_storage.html" <p class="topless"><a href="gid_storage.html"
title="next chapter">JIO GIDStorage</a></p> title="next chapter">jIO GIDStorage</a></p>
<h3>This Page</h3> <h3>This Page</h3>
<ul class="this-page-menu"> <ul class="this-page-menu">
<li><a href="_sources/available_storages.txt" <li><a href="_sources/available_storages.txt"
...@@ -248,12 +271,12 @@ options <strong>conflicts: true</strong>, <strong>revs: true</strong> or <strong ...@@ -248,12 +271,12 @@ options <strong>conflicts: true</strong>, <strong>revs: true</strong> or <strong
<a href="genindex.html" title="General Index" <a href="genindex.html" title="General Index"
>index</a></li> >index</a></li>
<li class="right" > <li class="right" >
<a href="gid_storage.html" title="JIO GIDStorage" <a href="gid_storage.html" title="jIO GIDStorage"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="revision_storages.html" title="Revision Storages: Conflicts and Resolution" <a href="revision_storages.html" title="Revision Storages: Conflicts and Resolution"
>previous</a> |</li> >previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JIO Complex Queries &mdash; JIO 2.0.0 documentation</title> <title>jIO Complex Queries &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<link rel="next" title="Metadata" href="metadata.html" /> <link rel="next" title="Metadata" href="metadata.html" />
<link rel="prev" title="JIO GIDStorage" href="gid_storage.html" /> <link rel="prev" title="jIO GIDStorage" href="gid_storage.html" />
</head> </head>
<body> <body>
<div class="related"> <div class="related">
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
<a href="metadata.html" title="Metadata" <a href="metadata.html" title="Metadata"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="gid_storage.html" title="JIO GIDStorage" <a href="gid_storage.html" title="jIO GIDStorage"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -52,25 +52,25 @@ ...@@ -52,25 +52,25 @@
<div class="body"> <div class="body">
<div class="section" id="jio-complex-queries"> <div class="section" id="jio-complex-queries">
<h1>JIO Complex Queries<a class="headerlink" href="#jio-complex-queries" title="Permalink to this headline"></a></h1> <h1>jIO Complex Queries<a class="headerlink" href="#jio-complex-queries" title="Permalink to this headline"></a></h1>
<div class="section" id="what-are-complex-queries"> <div class="section" id="what-are-complex-queries">
<h2>What are Complex Queries?<a class="headerlink" href="#what-are-complex-queries" title="Permalink to this headline"></a></h2> <h2>What are Complex Queries?<a class="headerlink" href="#what-are-complex-queries" title="Permalink to this headline"></a></h2>
<p>In jIO, a complex query can tell a storage server to select, filter, sort, or <p>In jIO, a complex query can ask a storage server to select, filter, sort, or
limit a document list before sending it back. If the server is not able to do limit a document list before sending it back. If the server is not able to do
so, the complex query tool can act on the retreived list by itself. Only the so, the complex query tool can act on the retreived list by itself. Only the
allDocs method can use complex queries.</p> <tt class="docutils literal"><span class="pre">allDocs()</span></tt> method can use complex queries.</p>
<p>A query can either be a string (using a specific language useful for writing <p>A query can either be a string (using a specific language useful for writing
queries), or it can be a tree of objects (useful to browse queries). To handle queries), or it can be a tree of objects (useful to browse queries). To handle
complex queries, jIO uses a parsed grammar file which is compiled using <a class="reference external" href="http://jscc.phorward-software.com/">JSCC</a>.</p> complex queries, jIO uses a parsed grammar file which is compiled using <a class="reference external" href="http://jscc.phorward-software.com/">JSCC</a>.</p>
</div> </div>
<div class="section" id="why-use-complex-queries"> <div class="section" id="why-use-complex-queries">
<h2>Why use Complex Queries?<a class="headerlink" href="#why-use-complex-queries" title="Permalink to this headline"></a></h2> <h2>Why use Complex Queries?<a class="headerlink" href="#why-use-complex-queries" title="Permalink to this headline"></a></h2>
<p>Complex queries can be used similar to database queries. So they are useful to:</p> <p>Complex queries can be used like database queries, for tasks such as:</p>
<ul class="simple"> <ul class="simple">
<li>search a specific document</li> <li>search a specific document</li>
<li>sort a list of documents in a certain order</li> <li>sort a list of documents in a certain order</li>
<li>avoid retrieving a list of ten thousand documents</li> <li>avoid retrieving a list of ten thousand documents</li>
<li>limit the list to show only xy documents by page</li> <li>limit the list to show only N documents per page</li>
</ul> </ul>
<p>For some storages (like localStorage), complex queries can be a powerful tool <p>For some storages (like localStorage), complex queries can be a powerful tool
to query accessible documents. When querying documents on a distant storage, to query accessible documents. When querying documents on a distant storage,
...@@ -82,7 +82,8 @@ itself.</p> ...@@ -82,7 +82,8 @@ itself.</p>
</div> </div>
<div class="section" id="how-to-use-complex-queries-with-jio"> <div class="section" id="how-to-use-complex-queries-with-jio">
<h2>How to use Complex Queries with jIO?<a class="headerlink" href="#how-to-use-complex-queries-with-jio" title="Permalink to this headline"></a></h2> <h2>How to use Complex Queries with jIO?<a class="headerlink" href="#how-to-use-complex-queries-with-jio" title="Permalink to this headline"></a></h2>
<p>Complex queries can be triggered by including the option named query in the allDocs method call. An example would be:</p> <p>Complex queries can be triggered by including the option named query in the <tt class="docutils literal"><span class="pre">allDocs()</span></tt> method call.</p>
<p>Example:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{};</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">options</span> <span class="o">=</span> <span class="p">{};</span>
<span class="c1">// search text query</span> <span class="c1">// search text query</span>
...@@ -119,9 +120,9 @@ itself.</p> ...@@ -119,9 +120,9 @@ itself.</p>
</div> </div>
<div class="section" id="how-to-use-complex-queries-outside-jio"> <div class="section" id="how-to-use-complex-queries-outside-jio">
<h2>How to use Complex Queries outside jIO?<a class="headerlink" href="#how-to-use-complex-queries-outside-jio" title="Permalink to this headline"></a></h2> <h2>How to use Complex Queries outside jIO?<a class="headerlink" href="#how-to-use-complex-queries-outside-jio" title="Permalink to this headline"></a></h2>
<p>Complex Queries provides an API - which namespace is complex_queries. Please <p>Complex Queries provides an API - which namespace is complex_queries.
also refer to the <a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob/HEAD:/examples/complex_example.html?js=1">Complex Queries sample page</a> Refer to the <a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob/HEAD:/examples/complex_example.html?js=1">Complex Queries sample page</a>
on how to use these methods in- and outside jIO. The module provides:</p> for how to use these methods, in and outside jIO. The module provides:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
<span class="nx">parseStringToObject</span><span class="o">:</span> <span class="p">[</span><span class="nb">Function</span><span class="o">:</span> <span class="nx">parseStringToObject</span><span class="p">],</span> <span class="nx">parseStringToObject</span><span class="o">:</span> <span class="p">[</span><span class="nb">Function</span><span class="o">:</span> <span class="nx">parseStringToObject</span><span class="p">],</span>
<span class="nx">stringEscapeRegexpCharacters</span><span class="o">:</span> <span class="p">[</span><span class="nb">Function</span><span class="o">:</span> <span class="nx">stringEscapeRegexpCharacters</span><span class="p">],</span> <span class="nx">stringEscapeRegexpCharacters</span><span class="o">:</span> <span class="p">[</span><span class="nb">Function</span><span class="o">:</span> <span class="nx">stringEscapeRegexpCharacters</span><span class="p">],</span>
...@@ -197,7 +198,7 @@ want to use a wildcard, just set the wildcard character to an empty string.</p> ...@@ -197,7 +198,7 @@ want to use a wildcard, just set the wildcard character to an empty string.</p>
components because criteria like filters will be changed frequently by the components because criteria like filters will be changed frequently by the
component (change <tt class="docutils literal"><span class="pre">limit:</span> <span class="pre">[0,</span> <span class="pre">10]</span></tt> to <tt class="docutils literal"><span class="pre">limit:</span> <span class="pre">[10,</span> <span class="pre">10]</span></tt> or <tt class="docutils literal"><span class="pre">sort_on:</span> <span class="pre">[['title',</span> component (change <tt class="docutils literal"><span class="pre">limit:</span> <span class="pre">[0,</span> <span class="pre">10]</span></tt> to <tt class="docutils literal"><span class="pre">limit:</span> <span class="pre">[10,</span> <span class="pre">10]</span></tt> or <tt class="docutils literal"><span class="pre">sort_on:</span> <span class="pre">[['title',</span>
<span class="pre">'ascending']]</span></tt> to <tt class="docutils literal"><span class="pre">sort_on:</span> <span class="pre">[['creator',</span> <span class="pre">'ascending']]</span></tt>) and each component must <span class="pre">'ascending']]</span></tt> to <tt class="docutils literal"><span class="pre">sort_on:</span> <span class="pre">[['creator',</span> <span class="pre">'ascending']]</span></tt>) and each component must
have their own default properties to keep their own behavior.</p> have its own default properties to keep their own behavior.</p>
</div> </div>
<div class="section" id="convert-complex-queries-into-another-type"> <div class="section" id="convert-complex-queries-into-another-type">
<h3>Convert Complex Queries into another type<a class="headerlink" href="#convert-complex-queries-into-another-type" title="Permalink to this headline"></a></h3> <h3>Convert Complex Queries into another type<a class="headerlink" href="#convert-complex-queries-into-another-type" title="Permalink to this headline"></a></h3>
...@@ -367,7 +368,7 @@ ignore: " "</pre> ...@@ -367,7 +368,7 @@ ignore: " "</pre>
</a></p> </a></p>
<h3><a href="index.html">Table Of Contents</a></h3> <h3><a href="index.html">Table Of Contents</a></h3>
<ul> <ul>
<li><a class="reference internal" href="#">JIO Complex Queries</a><ul> <li><a class="reference internal" href="#">jIO Complex Queries</a><ul>
<li><a class="reference internal" href="#what-are-complex-queries">What are Complex Queries?</a></li> <li><a class="reference internal" href="#what-are-complex-queries">What are Complex Queries?</a></li>
<li><a class="reference internal" href="#why-use-complex-queries">Why use Complex Queries?</a></li> <li><a class="reference internal" href="#why-use-complex-queries">Why use Complex Queries?</a></li>
<li><a class="reference internal" href="#how-to-use-complex-queries-with-jio">How to use Complex Queries with jIO?</a></li> <li><a class="reference internal" href="#how-to-use-complex-queries-with-jio">How to use Complex Queries with jIO?</a></li>
...@@ -385,7 +386,7 @@ ignore: " "</pre> ...@@ -385,7 +386,7 @@ ignore: " "</pre>
<h4>Previous topic</h4> <h4>Previous topic</h4>
<p class="topless"><a href="gid_storage.html" <p class="topless"><a href="gid_storage.html"
title="previous chapter">JIO GIDStorage</a></p> title="previous chapter">jIO GIDStorage</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="metadata.html" <p class="topless"><a href="metadata.html"
title="next chapter">Metadata</a></p> title="next chapter">Metadata</a></p>
...@@ -421,9 +422,9 @@ ignore: " "</pre> ...@@ -421,9 +422,9 @@ ignore: " "</pre>
<a href="metadata.html" title="Metadata" <a href="metadata.html" title="Metadata"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="gid_storage.html" title="JIO GIDStorage" <a href="gid_storage.html" title="jIO GIDStorage"
>previous</a> |</li> >previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>For developers &mdash; JIO 2.0.0 documentation</title> <title>For developers &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<link rel="next" title="JavaScript Naming Conventions" href="naming_conventions.html" /> <link rel="next" title="JavaScript Naming Conventions" href="naming_conventions.html" />
<link rel="prev" title="Metadata" href="metadata.html" /> <link rel="prev" title="Metadata" href="metadata.html" />
</head> </head>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<li class="right" > <li class="right" >
<a href="metadata.html" title="Metadata" <a href="metadata.html" title="Metadata"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -115,23 +115,23 @@ plus the storages and dependencies you need and you will be good to go.</p> ...@@ -115,23 +115,23 @@ plus the storages and dependencies you need and you will be good to go.</p>
</pre></div> </pre></div>
</div> </div>
<p>(To help you design your methods, some tools are provided by jIO.util.)</p> <p>(To help you design your methods, some tools are provided by jIO.util.)</p>
<p>The first parameter command provides some methods to act on the JIO job:</p> <p>The first parameter command provides some methods to act on the jIO job:</p>
<ul> <ul>
<li><p class="first"><tt class="docutils literal"><span class="pre">success</span></tt>, to tell JIO that the job is successfully terminated</p> <li><p class="first"><tt class="docutils literal"><span class="pre">success</span></tt>, to tell jIO that the job is successfully terminated</p>
<p><tt class="docutils literal"><span class="pre">command.success(status[Text],</span> <span class="pre">[{custom</span> <span class="pre">key</span> <span class="pre">to</span> <span class="pre">add</span> <span class="pre">to</span> <span class="pre">the</span> <span class="pre">response}]);</span></tt></p> <p><tt class="docutils literal"><span class="pre">command.success(status[Text],</span> <span class="pre">[{custom</span> <span class="pre">key</span> <span class="pre">to</span> <span class="pre">add</span> <span class="pre">to</span> <span class="pre">the</span> <span class="pre">response}]);</span></tt></p>
</li> </li>
<li><p class="first"><tt class="docutils literal"><span class="pre">resolve</span></tt>, is equal to success</p> <li><p class="first"><tt class="docutils literal"><span class="pre">resolve</span></tt>, is equal to success</p>
</li> </li>
<li><p class="first"><tt class="docutils literal"><span class="pre">error</span></tt>, to tell JIO that the job cannot be done</p> <li><p class="first"><tt class="docutils literal"><span class="pre">error</span></tt>, to tell jIO that the job cannot be done</p>
<p><tt class="docutils literal"><span class="pre">command.error(status[Text],</span> <span class="pre">[reason],</span> <span class="pre">[message],</span> <span class="pre">[{custom</span> <span class="pre">key</span> <span class="pre">to</span> <span class="pre">add</span> <span class="pre">to</span> <span class="pre">the</span> <span class="pre">response}])</span></tt></p> <p><tt class="docutils literal"><span class="pre">command.error(status[Text],</span> <span class="pre">[reason],</span> <span class="pre">[message],</span> <span class="pre">[{custom</span> <span class="pre">key</span> <span class="pre">to</span> <span class="pre">add</span> <span class="pre">to</span> <span class="pre">the</span> <span class="pre">response}])</span></tt></p>
</li> </li>
<li><p class="first"><tt class="docutils literal"><span class="pre">retry</span></tt>, to tell JIO that the job cannot be done now, but can be retried later. (same API than error)</p> <li><p class="first"><tt class="docutils literal"><span class="pre">retry</span></tt>, to tell jIO that the job cannot be done now, but can be retried later. (same API than error)</p>
</li> </li>
<li><p class="first"><tt class="docutils literal"><span class="pre">reject</span></tt>, to tell JIO that the job cannot be done, let JIO to decide whether to retry or not. (same API than error)</p> <li><p class="first"><tt class="docutils literal"><span class="pre">reject</span></tt>, to tell jIO that the job cannot be done, let jIO to decide whether to retry or not. (same API than error)</p>
</li> </li>
</ul> </ul>
<p>The second parameter <tt class="docutils literal"><span class="pre">metadata</span></tt> or <tt class="docutils literal"><span class="pre">param</span></tt> is the first parameter provided by the JIO user.</p> <p>The second parameter <tt class="docutils literal"><span class="pre">metadata</span></tt> or <tt class="docutils literal"><span class="pre">param</span></tt> is the first parameter provided by the jIO user.</p>
<p>The third parameter <tt class="docutils literal"><span class="pre">option</span></tt> is the option parameter provided by the JIO user.</p> <p>The third parameter <tt class="docutils literal"><span class="pre">option</span></tt> is the option parameter provided by the jIO user.</p>
<p>Methods should return the following objects:</p> <p>Methods should return the following objects:</p>
<ul> <ul>
<li><p class="first">post &#8211;&gt; success(&#8220;created&#8221;, {&#8220;id&#8221;: new_generated_id})</p> <li><p class="first">post &#8211;&gt; success(&#8220;created&#8221;, {&#8220;id&#8221;: new_generated_id})</p>
...@@ -378,7 +378,7 @@ can also add your own rules, as we&#8217;re going to see now.</p> ...@@ -378,7 +378,7 @@ can also add your own rules, as we&#8217;re going to see now.</p>
<li class="right" > <li class="right" >
<a href="metadata.html" title="Metadata" <a href="metadata.html" title="Metadata"
>previous</a> |</li> >previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Downloads &mdash; JIO 2.0.0 documentation</title> <title>Downloads &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<link rel="next" title="How to manage documents?" href="manage_documents.html" /> <link rel="next" title="How to manage documents?" href="manage_documents.html" />
<link rel="prev" title="Introduction" href="introduction.html" /> <link rel="prev" title="Introduction" href="introduction.html" />
</head> </head>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<li class="right" > <li class="right" >
<a href="introduction.html" title="Introduction" <a href="introduction.html" title="Introduction"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -53,21 +53,26 @@ ...@@ -53,21 +53,26 @@
<div class="section" id="downloads"> <div class="section" id="downloads">
<span id="download-fork"></span><h1>Downloads<a class="headerlink" href="#downloads" title="Permalink to this headline"></a></h1> <span id="download-fork"></span><h1>Downloads<a class="headerlink" href="#downloads" title="Permalink to this headline"></a></h1>
<p>Core:</p> <div class="section" id="core">
<h2>Core<a class="headerlink" href="#core" title="Permalink to this headline"></a></h2>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js">[sha256.amd.js]</a></li> <li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js">sha256.amd.js</a></li>
<li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/rsvp/rsvp-custom.js">[rsvp-custom.js]</a>, AMD only version [<a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/rsvp/rsvp-custom.amd.js">rsvp-custom.amd.js</a>]</li> <li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/rsvp/rsvp-custom.js">rsvp-custom.js</a>, AMD only version: <a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/rsvp/rsvp-custom.amd.js">rsvp-custom.amd.js</a></li>
<li>jIO, <a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/jio.js">[jio.js]</a></li> <li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/jio.js">jio.js</a></li>
<li>complex_queries, <a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/complex_queries.js">[complex_queries.js]</a></li> <li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/complex_queries.js">complex_queries.js</a></li>
</ul> </ul>
<p>Storage dependencies:</p> </div>
<div class="section" id="storage-dependencies">
<h2>Storage dependencies<a class="headerlink" href="#storage-dependencies" title="Permalink to this headline"></a></h2>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="http://jquery.com/">jQuery</a>, <a class="reference external" href="http://code.jquery.com/jquery.js">[jquery.js]</a></li> <li><a class="reference external" href="http://code.jquery.com/jquery.js">jquery.js</a></li>
<li><a class="reference external" href="https://crypto.stanford.edu/sjcl/">sjcl</a>, <a class="reference external" href="https://crypto.stanford.edu/sjcl/sjcl.zip">[sjcl.zip]</a></li> <li><a class="reference external" href="https://crypto.stanford.edu/sjcl/">sjcl</a>, [<a class="reference external" href="https://crypto.stanford.edu/sjcl/sjcl.zip">sjcl.zip</a>]</li>
<li><a class="reference external" href="http://pajhome.org.uk/crypt/md5/sha1.html">sha1</a>, <a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/jsSha1/sha1.js">[sha1.js]</a>, AMD compatible version [<a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha1.amd.js">sha1.amd.js</a>]</li> <li><a class="reference external" href="http://pajhome.org.uk/crypt/md5/sha1.html">sha1</a>, [<a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/jsSha1/sha1.js">sha1.js</a>], AMD compatible version: <a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha1.amd.js">sha1.amd.js</a></li>
<li><a class="reference external" href="http://anmar.eu.org/projects/jssha2/">sha2, sha256</a>, <a class="reference external" href="http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip">[jssha2.zip]</a>, AMD compatible versions <a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha2.amd.js">[sha2.amd.js]</a> <a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js">[sha256.amd.js]</a></li> <li><a class="reference external" href="http://anmar.eu.org/projects/jssha2/">sha2, sha256</a>, <a class="reference external" href="http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip">jssha2.zip</a>, AMD compatible versions: <a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha2.amd.js">sha2.amd.js</a>, <a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js">sha256.amd.js</a></li>
</ul> </ul>
<p>Storage connectors:</p> </div>
<div class="section" id="storage-connectors">
<h2>Storage connectors<a class="headerlink" href="#storage-connectors" title="Permalink to this headline"></a></h2>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/localstorage.js">localstorage.js</a></li> <li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/localstorage.js">localstorage.js</a></li>
<li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/davstorage.js">davstorage.js</a></li> <li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/davstorage.js">davstorage.js</a></li>
...@@ -77,18 +82,23 @@ ...@@ -77,18 +82,23 @@
<li>restsqlstorage.js (depends on jQuery) (WIP)</li> <li>restsqlstorage.js (depends on jQuery) (WIP)</li>
<li>mioga2storage.js (depends on jQuery) (WIP)</li> <li>mioga2storage.js (depends on jQuery) (WIP)</li>
</ul> </ul>
<p>Storage handlers:</p> </div>
<div class="section" id="storage-handlers">
<h2>Storage handlers<a class="headerlink" href="#storage-handlers" title="Permalink to this headline"></a></h2>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/indexstorage.js">indexstorage.js</a> (WIP)</li> <li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/indexstorage.js">indexstorage.js</a> (WIP)</li>
<li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/gidstorage.js">gidstorage.js</a> (WIP)</li> <li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/gidstorage.js">gidstorage.js</a> (WIP)</li>
<li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/splitstorage.js">splitstorage.js</a> (WIP)</li> <li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/splitstorage.js">splitstorage.js</a> (WIP)</li>
<li>replicatestorage.js (WIP)</li> <li>replicatestorage.js (WIP)</li>
</ul> </ul>
<p>Revision based storage handlers:</p> </div>
<div class="section" id="revision-based-storage-handlers">
<h2>Revision based storage handlers<a class="headerlink" href="#revision-based-storage-handlers" title="Permalink to this headline"></a></h2>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/revisionstorage.js">revisionstorage.js</a> (depends on sha256) (WIP)</li> <li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/revisionstorage.js">revisionstorage.js</a> (depends on sha256) (WIP)</li>
<li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/replicatestorage.js">replicaterevisionstorage.js</a> (WIP)</li> <li><a class="reference external" href="http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/replicatestorage.js">replicaterevisionstorage.js</a> (WIP)</li>
</ul> </ul>
</div>
<div class="section" id="minified-version"> <div class="section" id="minified-version">
<h2>Minified version<a class="headerlink" href="#minified-version" title="Permalink to this headline"></a></h2> <h2>Minified version<a class="headerlink" href="#minified-version" title="Permalink to this headline"></a></h2>
<p>To get the minified version of the jIO library, you have to build it yourself. See documentation.</p> <p>To get the minified version of the jIO library, you have to build it yourself. See documentation.</p>
...@@ -131,6 +141,11 @@ ...@@ -131,6 +141,11 @@
<h3><a href="index.html">Table Of Contents</a></h3> <h3><a href="index.html">Table Of Contents</a></h3>
<ul> <ul>
<li><a class="reference internal" href="#">Downloads</a><ul> <li><a class="reference internal" href="#">Downloads</a><ul>
<li><a class="reference internal" href="#core">Core</a></li>
<li><a class="reference internal" href="#storage-dependencies">Storage dependencies</a></li>
<li><a class="reference internal" href="#storage-connectors">Storage connectors</a></li>
<li><a class="reference internal" href="#storage-handlers">Storage handlers</a></li>
<li><a class="reference internal" href="#revision-based-storage-handlers">Revision based storage handlers</a></li>
<li><a class="reference internal" href="#minified-version">Minified version</a></li> <li><a class="reference internal" href="#minified-version">Minified version</a></li>
<li><a class="reference internal" href="#fork">Fork</a></li> <li><a class="reference internal" href="#fork">Fork</a></li>
</ul> </ul>
...@@ -177,7 +192,7 @@ ...@@ -177,7 +192,7 @@
<li class="right" > <li class="right" >
<a href="introduction.html" title="Introduction" <a href="introduction.html" title="Introduction"
>previous</a> |</li> >previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index &mdash; JIO 2.0.0 documentation</title> <title>Index &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
</head> </head>
<body> <body>
<div class="related"> <div class="related">
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<li class="right" style="margin-right: 10px"> <li class="right" style="margin-right: 10px">
<a href="#" title="General Index" <a href="#" title="General Index"
accesskey="I">index</a></li> accesskey="I">index</a></li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<li class="right" style="margin-right: 10px"> <li class="right" style="margin-right: 10px">
<a href="#" title="General Index" <a href="#" title="General Index"
>index</a></li> >index</a></li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JIO GIDStorage &mdash; JIO 2.0.0 documentation</title> <title>jIO GIDStorage &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<link rel="next" title="JIO Complex Queries" href="complex_queries.html" /> <link rel="next" title="jIO Complex Queries" href="complex_queries.html" />
<link rel="prev" title="List of Available Storages" href="available_storages.html" /> <link rel="prev" title="List of Available Storages" href="available_storages.html" />
</head> </head>
<body> <body>
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
<a href="genindex.html" title="General Index" <a href="genindex.html" title="General Index"
accesskey="I">index</a></li> accesskey="I">index</a></li>
<li class="right" > <li class="right" >
<a href="complex_queries.html" title="JIO Complex Queries" <a href="complex_queries.html" title="jIO Complex Queries"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="available_storages.html" title="List of Available Storages" <a href="available_storages.html" title="List of Available Storages"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -52,10 +52,10 @@ ...@@ -52,10 +52,10 @@
<div class="body"> <div class="body">
<div class="section" id="jio-gidstorage"> <div class="section" id="jio-gidstorage">
<span id="gid-storage"></span><h1>JIO GIDStorage<a class="headerlink" href="#jio-gidstorage" title="Permalink to this headline"></a></h1> <span id="gid-storage"></span><h1>jIO GIDStorage<a class="headerlink" href="#jio-gidstorage" title="Permalink to this headline"></a></h1>
<p>A storage to enable interoperability between all kind of storages.</p> <p>A storage to enable interoperability between all kind of storages.</p>
<p>A global ID (GID) is a document id which represents a unique document. This ID <p>A global ID (GID) is a document id which represents a unique document. This ID
will be used to find this unique document on all kind of backends.</p> is then used to find this unique document on all types of backends.</p>
<p>This storage uses sub storage allDocs and complex queries to find unique documents, and converts their ids to gids.</p> <p>This storage uses sub storage allDocs and complex queries to find unique documents, and converts their ids to gids.</p>
<div class="section" id="where-it-can-be-used"> <div class="section" id="where-it-can-be-used">
<h2>Where it can be used<a class="headerlink" href="#where-it-can-be-used" title="Permalink to this headline"></a></h2> <h2>Where it can be used<a class="headerlink" href="#where-it-can-be-used" title="Permalink to this headline"></a></h2>
...@@ -85,7 +85,7 @@ will be used to find this unique document on all kind of backends.</p> ...@@ -85,7 +85,7 @@ will be used to find this unique document on all kind of backends.</p>
<span class="p">}</span> <span class="p">}</span>
</pre></div> </pre></div>
</div> </div>
<p>This description tells the <em>GIDStorage</em> to use 2 metadata (<tt class="docutils literal"><span class="pre">type</span></tt>, <tt class="docutils literal"><span class="pre">title</span></tt>) to define a <p>This description tells the <em>GIDStorage</em> to use 2 metadata attributes (<tt class="docutils literal"><span class="pre">type</span></tt>, <tt class="docutils literal"><span class="pre">title</span></tt>) to define a
document as unique in the default case. If the document is of type <tt class="docutils literal"><span class="pre">Text</span></tt>, then document as unique in the default case. If the document is of type <tt class="docutils literal"><span class="pre">Text</span></tt>, then
the handler will use 3 metadata (<tt class="docutils literal"><span class="pre">type</span></tt>, <tt class="docutils literal"><span class="pre">title</span></tt>, <tt class="docutils literal"><span class="pre">language</span></tt>). the handler will use 3 metadata (<tt class="docutils literal"><span class="pre">type</span></tt>, <tt class="docutils literal"><span class="pre">title</span></tt>, <tt class="docutils literal"><span class="pre">language</span></tt>).
If these constraints are not respected, then the storage returns an error telling us to If these constraints are not respected, then the storage returns an error telling us to
...@@ -110,21 +110,23 @@ constraints:</p> ...@@ -110,21 +110,23 @@ constraints:</p>
<span class="p">}</span> <span class="p">}</span>
</pre></div> </pre></div>
</div> </div>
<p>Available metadata types are: <p>Available metadata types are:</p>
* <tt class="docutils literal"><span class="pre">&quot;json&quot;</span></tt> - The json value of the metadata. <ul class="simple">
* <tt class="docutils literal"><span class="pre">&quot;string&quot;</span></tt> - The value as string if it is not a list. <li><tt class="docutils literal"><span class="pre">&quot;json&quot;</span></tt> - The json value of the metadata.</li>
* <tt class="docutils literal"><span class="pre">&quot;list&quot;</span></tt> - The value as list. <li><tt class="docutils literal"><span class="pre">&quot;string&quot;</span></tt> - The value as string if it is not a list.</li>
* <tt class="docutils literal"><span class="pre">&quot;date&quot;</span></tt> - The value if it can be converted to a date (as string). <li><tt class="docutils literal"><span class="pre">&quot;list&quot;</span></tt> - The value as list.</li>
* <tt class="docutils literal"><span class="pre">&quot;DCMIType&quot;</span></tt> - A value matching one of the DCMIType Vocabulary (as string). <li><tt class="docutils literal"><span class="pre">&quot;date&quot;</span></tt> - The value if it can be converted to a date (as string).</li>
* <tt class="docutils literal"><span class="pre">&quot;contentType&quot;</span></tt> - A value which is a content type (as string). <li><tt class="docutils literal"><span class="pre">&quot;DCMIType&quot;</span></tt> - A value matching one of the DCMIType Vocabulary (as string).</li>
* <tt class="docutils literal"><span class="pre">[&quot;DCMIType&quot;,</span> <span class="pre">&quot;list&quot;]</span></tt> - The value which contains a DCMIType (as list). <li><tt class="docutils literal"><span class="pre">&quot;contentType&quot;</span></tt> - A value which is a content type (as string).</li>
* <tt class="docutils literal"><span class="pre">[...]</span></tt> - make your own combination.</p> <li><tt class="docutils literal"><span class="pre">[&quot;DCMIType&quot;,</span> <span class="pre">&quot;list&quot;]</span></tt> - The value which contains a DCMIType (as list).</li>
<li><tt class="docutils literal"><span class="pre">[...]</span></tt> - make your own combination.</li>
</ul>
</div> </div>
<div class="section" id="document-requirements"> <div class="section" id="document-requirements">
<h2>Document Requirements<a class="headerlink" href="#document-requirements" title="Permalink to this headline"></a></h2> <h2>Document Requirements<a class="headerlink" href="#document-requirements" title="Permalink to this headline"></a></h2>
<p>A metadata value must be a string. This string can be placed in an object which <p>A metadata value must be a string. This string can be placed in an attribute within
key is &#8216;content&#8217;. The object can contains custom keys with string values. A a <tt class="docutils literal"><span class="pre">&quot;content&quot;</span></tt> key. The object can contains custom keys with string values. A
metadata can contain several values. Example:</p> metadata object can contain several values. Example:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
<span class="s2">&quot;key&quot;</span><span class="o">:</span> <span class="s2">&quot;value&quot;</span><span class="p">,</span> <span class="s2">&quot;key&quot;</span><span class="o">:</span> <span class="s2">&quot;value&quot;</span><span class="p">,</span>
<span class="c1">// or</span> <span class="c1">// or</span>
...@@ -142,7 +144,7 @@ metadata can contain several values. Example:</p> ...@@ -142,7 +144,7 @@ metadata can contain several values. Example:</p>
<span class="p">}</span> <span class="p">}</span>
</pre></div> </pre></div>
</div> </div>
<p>Metadata which name begin with an underscore can contain anything.</p> <p>Metadata attributes which names begin with an underscore can contain anything.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
<span class="s2">&quot;_key&quot;</span><span class="o">:</span> <span class="p">{</span><span class="s2">&quot;whatever&quot;</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;blue&quot;</span><span class="p">,</span> <span class="p">[]],</span> <span class="s2">&quot;a&quot;</span><span class="o">:</span> <span class="kc">null</span><span class="p">}</span> <span class="s2">&quot;_key&quot;</span><span class="o">:</span> <span class="p">{</span><span class="s2">&quot;whatever&quot;</span><span class="o">:</span> <span class="p">[</span><span class="s2">&quot;blue&quot;</span><span class="p">,</span> <span class="p">[]],</span> <span class="s2">&quot;a&quot;</span><span class="o">:</span> <span class="kc">null</span><span class="p">}</span>
<span class="p">}</span> <span class="p">}</span>
...@@ -153,7 +155,7 @@ metadata can contain several values. Example:</p> ...@@ -153,7 +155,7 @@ metadata can contain several values. Example:</p>
<h2>Storage Requirements<a class="headerlink" href="#storage-requirements" title="Permalink to this headline"></a></h2> <h2>Storage Requirements<a class="headerlink" href="#storage-requirements" title="Permalink to this headline"></a></h2>
<ul class="simple"> <ul class="simple">
<li>This storage is not compatible with <em>RevisionStorage</em> and <em>ReplicateRevisionStorage</em>.</li> <li>This storage is not compatible with <em>RevisionStorage</em> and <em>ReplicateRevisionStorage</em>.</li>
<li>Sub storage have to support complex queries options and <tt class="docutils literal"><span class="pre">include_docs</span></tt> option.</li> <li>Sub storages have to support options for <tt class="docutils literal"><span class="pre">complex</span> <span class="pre">queries</span></tt> and <tt class="docutils literal"><span class="pre">include_docs</span></tt>.</li>
</ul> </ul>
</div> </div>
<div class="section" id="dependencies"> <div class="section" id="dependencies">
...@@ -162,7 +164,7 @@ metadata can contain several values. Example:</p> ...@@ -162,7 +164,7 @@ metadata can contain several values. Example:</p>
</div> </div>
<div class="section" id="suggested-storage-tree"> <div class="section" id="suggested-storage-tree">
<h2>Suggested storage tree<a class="headerlink" href="#suggested-storage-tree" title="Permalink to this headline"></a></h2> <h2>Suggested storage tree<a class="headerlink" href="#suggested-storage-tree" title="Permalink to this headline"></a></h2>
<p>Replication Between Storage:</p> <p>Replication between storages:</p>
<div class="highlight-python"><pre>Replicate Storage <div class="highlight-python"><pre>Replicate Storage
+-- GID Storage +-- GID Storage
| `-- Local Storage | `-- Local Storage
...@@ -172,7 +174,7 @@ metadata can contain several values. Example:</p> ...@@ -172,7 +174,7 @@ metadata can contain several values. Example:</p>
`-- Remote Storage 2</pre> `-- Remote Storage 2</pre>
</div> </div>
<p><strong>CAUTION: All gid storage must have the same description!</strong></p> <p><strong>CAUTION: All gid storage must have the same description!</strong></p>
<p>Offline Application Usage:</p> <p>Offline application usage:</p>
<div class="highlight-python"><pre>Replicate Storage <div class="highlight-python"><pre>Replicate Storage
+-- Index Storage with DB in Local Storage +-- Index Storage with DB in Local Storage
| `-- GID Storage | `-- GID Storage
...@@ -195,7 +197,7 @@ metadata can contain several values. Example:</p> ...@@ -195,7 +197,7 @@ metadata can contain several values. Example:</p>
</a></p> </a></p>
<h3><a href="index.html">Table Of Contents</a></h3> <h3><a href="index.html">Table Of Contents</a></h3>
<ul> <ul>
<li><a class="reference internal" href="#">JIO GIDStorage</a><ul> <li><a class="reference internal" href="#">jIO GIDStorage</a><ul>
<li><a class="reference internal" href="#where-it-can-be-used">Where it can be used</a></li> <li><a class="reference internal" href="#where-it-can-be-used">Where it can be used</a></li>
<li><a class="reference internal" href="#storage-description">Storage Description</a></li> <li><a class="reference internal" href="#storage-description">Storage Description</a></li>
<li><a class="reference internal" href="#document-requirements">Document Requirements</a></li> <li><a class="reference internal" href="#document-requirements">Document Requirements</a></li>
...@@ -211,7 +213,7 @@ metadata can contain several values. Example:</p> ...@@ -211,7 +213,7 @@ metadata can contain several values. Example:</p>
title="previous chapter">List of Available Storages</a></p> title="previous chapter">List of Available Storages</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="complex_queries.html" <p class="topless"><a href="complex_queries.html"
title="next chapter">JIO Complex Queries</a></p> title="next chapter">jIO Complex Queries</a></p>
<h3>This Page</h3> <h3>This Page</h3>
<ul class="this-page-menu"> <ul class="this-page-menu">
<li><a href="_sources/gid_storage.txt" <li><a href="_sources/gid_storage.txt"
...@@ -241,12 +243,12 @@ metadata can contain several values. Example:</p> ...@@ -241,12 +243,12 @@ metadata can contain several values. Example:</p>
<a href="genindex.html" title="General Index" <a href="genindex.html" title="General Index"
>index</a></li> >index</a></li>
<li class="right" > <li class="right" >
<a href="complex_queries.html" title="JIO Complex Queries" <a href="complex_queries.html" title="jIO Complex Queries"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="available_storages.html" title="List of Available Storages" <a href="available_storages.html" title="List of Available Storages"
>previous</a> |</li> >previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to JIO’s documentation! &mdash; JIO 2.0.0 documentation</title> <title>Welcome to jIO’s documentation! &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="#" /> <link rel="top" title="jIO 2.0.0 documentation" href="#" />
<link rel="next" title="Introduction" href="introduction.html" /> <link rel="next" title="Introduction" href="introduction.html" />
</head> </head>
<body> <body>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<li class="right" > <li class="right" >
<a href="introduction.html" title="Introduction" <a href="introduction.html" title="Introduction"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li><a href="#">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="#">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<div class="body"> <div class="body">
<div class="section" id="welcome-to-jio-s-documentation"> <div class="section" id="welcome-to-jio-s-documentation">
<h1>Welcome to JIO&#8217;s documentation!<a class="headerlink" href="#welcome-to-jio-s-documentation" title="Permalink to this headline"></a></h1> <h1>Welcome to jIO&#8217;s documentation!<a class="headerlink" href="#welcome-to-jio-s-documentation" title="Permalink to this headline"></a></h1>
<p>Contents:</p> <p>Contents:</p>
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<ul> <ul>
...@@ -59,6 +59,11 @@ ...@@ -59,6 +59,11 @@
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="download.html">Downloads</a><ul> <li class="toctree-l1"><a class="reference internal" href="download.html">Downloads</a><ul>
<li class="toctree-l2"><a class="reference internal" href="download.html#core">Core</a></li>
<li class="toctree-l2"><a class="reference internal" href="download.html#storage-dependencies">Storage dependencies</a></li>
<li class="toctree-l2"><a class="reference internal" href="download.html#storage-connectors">Storage connectors</a></li>
<li class="toctree-l2"><a class="reference internal" href="download.html#storage-handlers">Storage handlers</a></li>
<li class="toctree-l2"><a class="reference internal" href="download.html#revision-based-storage-handlers">Revision based storage handlers</a></li>
<li class="toctree-l2"><a class="reference internal" href="download.html#minified-version">Minified version</a></li> <li class="toctree-l2"><a class="reference internal" href="download.html#minified-version">Minified version</a></li>
<li class="toctree-l2"><a class="reference internal" href="download.html#fork">Fork</a></li> <li class="toctree-l2"><a class="reference internal" href="download.html#fork">Fork</a></li>
</ul> </ul>
...@@ -83,7 +88,7 @@ ...@@ -83,7 +88,7 @@
<li class="toctree-l2"><a class="reference internal" href="available_storages.html#revision-based-handlers">Revision Based Handlers</a></li> <li class="toctree-l2"><a class="reference internal" href="available_storages.html#revision-based-handlers">Revision Based Handlers</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="gid_storage.html">JIO GIDStorage</a><ul> <li class="toctree-l1"><a class="reference internal" href="gid_storage.html">jIO GIDStorage</a><ul>
<li class="toctree-l2"><a class="reference internal" href="gid_storage.html#where-it-can-be-used">Where it can be used</a></li> <li class="toctree-l2"><a class="reference internal" href="gid_storage.html#where-it-can-be-used">Where it can be used</a></li>
<li class="toctree-l2"><a class="reference internal" href="gid_storage.html#storage-description">Storage Description</a></li> <li class="toctree-l2"><a class="reference internal" href="gid_storage.html#storage-description">Storage Description</a></li>
<li class="toctree-l2"><a class="reference internal" href="gid_storage.html#document-requirements">Document Requirements</a></li> <li class="toctree-l2"><a class="reference internal" href="gid_storage.html#document-requirements">Document Requirements</a></li>
...@@ -92,7 +97,7 @@ ...@@ -92,7 +97,7 @@
<li class="toctree-l2"><a class="reference internal" href="gid_storage.html#suggested-storage-tree">Suggested storage tree</a></li> <li class="toctree-l2"><a class="reference internal" href="gid_storage.html#suggested-storage-tree">Suggested storage tree</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="complex_queries.html">JIO Complex Queries</a><ul> <li class="toctree-l1"><a class="reference internal" href="complex_queries.html">jIO Complex Queries</a><ul>
<li class="toctree-l2"><a class="reference internal" href="complex_queries.html#what-are-complex-queries">What are Complex Queries?</a></li> <li class="toctree-l2"><a class="reference internal" href="complex_queries.html#what-are-complex-queries">What are Complex Queries?</a></li>
<li class="toctree-l2"><a class="reference internal" href="complex_queries.html#why-use-complex-queries">Why use Complex Queries?</a></li> <li class="toctree-l2"><a class="reference internal" href="complex_queries.html#why-use-complex-queries">Why use Complex Queries?</a></li>
<li class="toctree-l2"><a class="reference internal" href="complex_queries.html#how-to-use-complex-queries-with-jio">How to use Complex Queries with jIO?</a></li> <li class="toctree-l2"><a class="reference internal" href="complex_queries.html#how-to-use-complex-queries-with-jio">How to use Complex Queries with jIO?</a></li>
...@@ -103,7 +108,7 @@ ...@@ -103,7 +108,7 @@
<li class="toctree-l1"><a class="reference internal" href="metadata.html">Metadata</a><ul> <li class="toctree-l1"><a class="reference internal" href="metadata.html">Metadata</a><ul>
<li class="toctree-l2"><a class="reference internal" href="metadata.html#what-is-metadata">What is metadata?</a></li> <li class="toctree-l2"><a class="reference internal" href="metadata.html#what-is-metadata">What is metadata?</a></li>
<li class="toctree-l2"><a class="reference internal" href="metadata.html#why-use-metadata">Why use metadata?</a></li> <li class="toctree-l2"><a class="reference internal" href="metadata.html#why-use-metadata">Why use metadata?</a></li>
<li class="toctree-l2"><a class="reference internal" href="metadata.html#how-to-format-metadata-with-jio">How to format metadata with JIO</a></li> <li class="toctree-l2"><a class="reference internal" href="metadata.html#how-to-format-metadata-with-jio">How to format metadata with jIO</a></li>
<li class="toctree-l2"><a class="reference internal" href="metadata.html#list-of-metadata-to-use">List of metadata to use</a></li> <li class="toctree-l2"><a class="reference internal" href="metadata.html#list-of-metadata-to-use">List of metadata to use</a></li>
<li class="toctree-l2"><a class="reference internal" href="metadata.html#examples">Examples</a></li> <li class="toctree-l2"><a class="reference internal" href="metadata.html#examples">Examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="metadata.html#tools">Tools</a></li> <li class="toctree-l2"><a class="reference internal" href="metadata.html#tools">Tools</a></li>
...@@ -131,12 +136,7 @@ ...@@ -131,12 +136,7 @@
<li class="toctree-l1"><a class="reference internal" href="license.html">Copyright and license</a></li> <li class="toctree-l1"><a class="reference internal" href="license.html">Copyright and license</a></li>
</ul> </ul>
</div> </div>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline"></a></h1>
<ul class="simple"> <ul class="simple">
<li><a class="reference internal" href="genindex.html"><em>Index</em></a></li>
<li><a class="reference internal" href="py-modindex.html"><em>Module Index</em></a></li>
<li><a class="reference internal" href="search.html"><em>Search Page</em></a></li> <li><a class="reference internal" href="search.html"><em>Search Page</em></a></li>
</ul> </ul>
</div> </div>
...@@ -150,14 +150,6 @@ ...@@ -150,14 +150,6 @@
<p class="logo"><a href="#"> <p class="logo"><a href="#">
<img class="logo" src="_static/jio-logo.png" alt="Logo"/> <img class="logo" src="_static/jio-logo.png" alt="Logo"/>
</a></p> </a></p>
<h3><a href="#">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Welcome to JIO&#8217;s documentation!</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
</ul>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="introduction.html" <p class="topless"><a href="introduction.html"
title="next chapter">Introduction</a></p> title="next chapter">Introduction</a></p>
...@@ -192,7 +184,7 @@ ...@@ -192,7 +184,7 @@
<li class="right" > <li class="right" >
<a href="introduction.html" title="Introduction" <a href="introduction.html" title="Introduction"
>next</a> |</li> >next</a> |</li>
<li><a href="#">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="#">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Introduction &mdash; JIO 2.0.0 documentation</title> <title>Introduction &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<link rel="next" title="Downloads" href="download.html" /> <link rel="next" title="Downloads" href="download.html" />
<link rel="prev" title="Welcome to JIO’s documentation!" href="index.html" /> <link rel="prev" title="Welcome to jIO’s documentation!" href="index.html" />
</head> </head>
<body> <body>
<div class="related"> <div class="related">
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
<a href="download.html" title="Downloads" <a href="download.html" title="Downloads"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="index.html" title="Welcome to JIO’s documentation!" <a href="index.html" title="Welcome to jIO’s documentation!"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h1> <h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline"></a></h1>
<div class="section" id="what-is-jio"> <div class="section" id="what-is-jio">
<h2>What is jIO?<a class="headerlink" href="#what-is-jio" title="Permalink to this headline"></a></h2> <h2>What is jIO?<a class="headerlink" href="#what-is-jio" title="Permalink to this headline"></a></h2>
<p>JIO is a JavaScript library that allows to manage JSON documents on local or <p>jIO is a JavaScript library that allows to manage JSON documents on local or
remote storages in asynchronous fashion. jIO is an abstracted API mapped after remote storages in asynchronous fashion. jIO is an abstracted API mapped after
CouchDB, that offers connectors to multiple storages, special handlers to CouchDB, that offers connectors to multiple storages, special handlers to
enhance functionality (replication, revisions, indexing) and a query module to enhance functionality (replication, revisions, indexing) and a query module to
...@@ -63,14 +63,14 @@ retrieve documents and specific information across storage trees.</p> ...@@ -63,14 +63,14 @@ retrieve documents and specific information across storage trees.</p>
</div> </div>
<div class="section" id="how-does-it-work"> <div class="section" id="how-does-it-work">
<h2>How does it work?<a class="headerlink" href="#how-does-it-work" title="Permalink to this headline"></a></h2> <h2>How does it work?<a class="headerlink" href="#how-does-it-work" title="Permalink to this headline"></a></h2>
<p>JIO is separated into three parts - jIO core and storage library(ies). The core <p>jIO is composed of two parts - jIO core and storage library(ies). The core
is using storage libraries (connectors) to interact with the associated remote is using storage libraries (connectors) to interact with the associated remote
storage servers. Some queries can be used on top of the jIO allDocs method to storage servers. Some queries can be used on top of the jIO <tt class="docutils literal"><span class="pre">allDocs()</span></tt> method to
query documents based on defined criteria.</p> query documents based on defined criteria.</p>
<p>JIO uses a job management system, so every method called adds a job into a <p>jIO uses a job management system, so every method call adds a job into a
queue. The queue is copied in the browser&#8217;s local storage (by default), so it queue. The queue is copied in the browser&#8217;s local storage (by default), so it
can be restored in case of a browser crash. Jobs are being invoked can be restored in case of browser crash. Jobs are invoked
asynchronously with ongoing jobs not being able to re-trigger to prevent asynchronously and ongoing jobs are not able to re-trigger to prevent
conflicts.</p> conflicts.</p>
</div> </div>
<div class="section" id="getting-started"> <div class="section" id="getting-started">
...@@ -78,7 +78,7 @@ conflicts.</p> ...@@ -78,7 +78,7 @@ conflicts.</p>
<p>This walkthrough is designed to get you started using a basic jIO instance.</p> <p>This walkthrough is designed to get you started using a basic jIO instance.</p>
<ol class="arabic"> <ol class="arabic">
<li><p class="first">Download jIO core, the storages you want to use as well as the <li><p class="first">Download jIO core, the storages you want to use as well as the
complex-queries scripts as well as the dependencies required for the storages complex-queries scripts and the dependencies required for the storages
you intend to use. <a class="reference internal" href="download.html#download-fork"><em>[Download &amp; Fork]</em></a></p> you intend to use. <a class="reference internal" href="download.html#download-fork"><em>[Download &amp; Fork]</em></a></p>
</li> </li>
<li><p class="first">Add the scripts to your HTML page in the following order:</p> <li><p class="first">Add the scripts to your HTML page in the following order:</p>
...@@ -94,7 +94,7 @@ you intend to use. <a class="reference internal" href="download.html#download-f ...@@ -94,7 +94,7 @@ you intend to use. <a class="reference internal" href="download.html#download-f
&lt;script ...&gt;</pre> &lt;script ...&gt;</pre>
</div> </div>
<p>With require js, the main.js will be like this:</p> <p>With <a class="reference external" href="http://requirejs.org/">RequireJS</a>, the main.js will look like:</p>
<div class="highlight-javascript"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 <div class="highlight-javascript"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2 2
3 3
...@@ -125,7 +125,7 @@ you intend to use. <a class="reference internal" href="download.html#download-f ...@@ -125,7 +125,7 @@ you intend to use. <a class="reference internal" href="download.html#download-f
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>
</li> </li>
<li><p class="first">jIO connects to a number of storages and allows to add handlers (or <li><p class="first">jIO connects to a number of storages and allows adding handlers (or
functions) to specifc storages. functions) to specifc storages.
You can use both handlers and available storages to build a storage You can use both handlers and available storages to build a storage
tree across which all documents will be maintained and managed by jIO.</p> tree across which all documents will be maintained and managed by jIO.</p>
...@@ -135,59 +135,57 @@ tree across which all documents will be maintained and managed by jIO.</p> ...@@ -135,59 +135,57 @@ tree across which all documents will be maintained and managed by jIO.</p>
</pre></div> </pre></div>
</div> </div>
</li> </li>
</ol> <li><p class="first">The jIO API provides ten main methods to manage documents across the storage(s) specified in your jIO storage tree.</p>
<ol class="arabic">
<li><p class="first">The jIO API provides six main methods to manage documents across the storage(s) specified in your jIO storage tree.</p>
<table border="1" class="docutils"> <table border="1" class="docutils">
<colgroup> <colgroup>
<col width="16%" /> <col width="19%" />
<col width="48%" /> <col width="46%" />
<col width="36%" /> <col width="35%" />
</colgroup> </colgroup>
<thead valign="bottom"> <thead valign="bottom">
<tr class="row-odd"><th class="head">Method</th> <tr class="row-odd"><th class="head">Method</th>
<th class="head">Sample Call</th> <th class="head">Example call</th>
<th class="head">Description</th> <th class="head">Description</th>
</tr> </tr>
</thead> </thead>
<tbody valign="top"> <tbody valign="top">
<tr class="row-even"><td><cite>post</cite></td> <tr class="row-even"><td><tt class="docutils literal"><span class="pre">post()</span></tt></td>
<td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">post</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name builtin"><span class="pre">document</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td> <td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">post</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name builtin"><span class="pre">document</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td>
<td>Creates a new document</td> <td>Creates a new document</td>
</tr> </tr>
<tr class="row-odd"><td><cite>put</cite></td> <tr class="row-odd"><td><tt class="docutils literal"><span class="pre">put()</span></tt></td>
<td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">put</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name builtin"><span class="pre">document</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td> <td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">put</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name builtin"><span class="pre">document</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td>
<td>Creates/Updates a document</td> <td>Creates/Updates a document</td>
</tr> </tr>
<tr class="row-even"><td><cite>putAttachment</cite></td> <tr class="row-even"><td><tt class="docutils literal"><span class="pre">putAttachment()</span></tt></td>
<td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">putAttachement</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name other"><span class="pre">attachment</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td> <td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">putAttachement</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name other"><span class="pre">attachment</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td>
<td>Updates/Adds an attachment to a document</td> <td>Updates/Adds an attachment to a document</td>
</tr> </tr>
<tr class="row-odd"><td><cite>get</cite></td> <tr class="row-odd"><td><tt class="docutils literal"><span class="pre">get()</span></tt></td>
<td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">get</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name builtin"><span class="pre">document</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td> <td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">get</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name builtin"><span class="pre">document</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td>
<td>Reads a document</td> <td>Reads a document</td>
</tr> </tr>
<tr class="row-even"><td><cite>getAttachment</cite></td> <tr class="row-even"><td><tt class="docutils literal"><span class="pre">getAttachment()</span></tt></td>
<td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">getAttachment</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name other"><span class="pre">attachment</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td> <td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">getAttachment</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name other"><span class="pre">attachment</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td>
<td>Reads a document attachment</td> <td>Reads a document attachment</td>
</tr> </tr>
<tr class="row-odd"><td><cite>remove</cite></td> <tr class="row-odd"><td><tt class="docutils literal"><span class="pre">remove()</span></tt></td>
<td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">remove</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name builtin"><span class="pre">document</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td> <td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">remove</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name builtin"><span class="pre">document</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td>
<td>Deletes a document and its attachments</td> <td>Deletes a document and its attachments</td>
</tr> </tr>
<tr class="row-even"><td><cite>removeAttachment</cite></td> <tr class="row-even"><td><tt class="docutils literal"><span class="pre">removeAttachment()</span></tt></td>
<td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">removeAttachment</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name other"><span class="pre">attachment</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td> <td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">removeAttachment</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name other"><span class="pre">attachment</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td>
<td>Deletes a document attachment</td> <td>Deletes a document attachment</td>
</tr> </tr>
<tr class="row-odd"><td><cite>allDocs</cite></td> <tr class="row-odd"><td><tt class="docutils literal"><span class="pre">allDocs()</span></tt></td>
<td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">allDocs</span></span><span class="punctuation"><span class="pre">(</span></span><span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td> <td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">allDocs</span></span><span class="punctuation"><span class="pre">(</span></span><span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td>
<td>Retrieves a list of existing documents</td> <td>Retrieves a list of existing documents</td>
</tr> </tr>
<tr class="row-even"><td><cite>check</cite></td> <tr class="row-even"><td><tt class="docutils literal"><span class="pre">check()</span></tt></td>
<td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">check</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name builtin"><span class="pre">document</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td> <td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">check</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name builtin"><span class="pre">document</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td>
<td>Check the document state</td> <td>Check the document state</td>
</tr> </tr>
<tr class="row-odd"><td><cite>repair</cite></td> <tr class="row-odd"><td><tt class="docutils literal"><span class="pre">repair()</span></tt></td>
<td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">repair</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name builtin"><span class="pre">document</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td> <td><tt class="code js javascript docutils literal"><span class="name other"><span class="pre">my_jio</span></span><span class="punctuation"><span class="pre">.</span></span><span class="name other"><span class="pre">repair</span></span><span class="punctuation"><span class="pre">(</span></span><span class="name builtin"><span class="pre">document</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="name other"><span class="pre">options</span></span><span class="punctuation"><span class="pre">]);</span></span></tt></td>
<td>Repair the document</td> <td>Repair the document</td>
</tr> </tr>
...@@ -219,7 +217,7 @@ tree across which all documents will be maintained and managed by jIO.</p> ...@@ -219,7 +217,7 @@ tree across which all documents will be maintained and managed by jIO.</p>
<h4>Previous topic</h4> <h4>Previous topic</h4>
<p class="topless"><a href="index.html" <p class="topless"><a href="index.html"
title="previous chapter">Welcome to JIO&#8217;s documentation!</a></p> title="previous chapter">Welcome to jIO&#8217;s documentation!</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="download.html" <p class="topless"><a href="download.html"
title="next chapter">Downloads</a></p> title="next chapter">Downloads</a></p>
...@@ -255,9 +253,9 @@ tree across which all documents will be maintained and managed by jIO.</p> ...@@ -255,9 +253,9 @@ tree across which all documents will be maintained and managed by jIO.</p>
<a href="download.html" title="Downloads" <a href="download.html" title="Downloads"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="index.html" title="Welcome to JIO’s documentation!" <a href="index.html" title="Welcome to jIO’s documentation!"
>previous</a> |</li> >previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Copyright and license &mdash; JIO 2.0.0 documentation</title> <title>Copyright and license &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<link rel="prev" title="Authors" href="authors.html" /> <link rel="prev" title="Authors" href="authors.html" />
</head> </head>
<body> <body>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<li class="right" > <li class="right" >
<a href="authors.html" title="Authors" <a href="authors.html" title="Authors"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -96,7 +96,7 @@ information on LGPL can be found <a class="reference external" href="http://en.w ...@@ -96,7 +96,7 @@ information on LGPL can be found <a class="reference external" href="http://en.w
<li class="right" > <li class="right" >
<a href="authors.html" title="Authors" <a href="authors.html" title="Authors"
>previous</a> |</li> >previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>How to manage documents? &mdash; JIO 2.0.0 documentation</title> <title>How to manage documents? &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<link rel="next" title="Revision Storages: Conflicts and Resolution" href="revision_storages.html" /> <link rel="next" title="Revision Storages: Conflicts and Resolution" href="revision_storages.html" />
<link rel="prev" title="Downloads" href="download.html" /> <link rel="prev" title="Downloads" href="download.html" />
</head> </head>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<li class="right" > <li class="right" >
<a href="download.html" title="Downloads" <a href="download.html" title="Downloads"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -53,10 +53,10 @@ ...@@ -53,10 +53,10 @@
<div class="section" id="how-to-manage-documents"> <div class="section" id="how-to-manage-documents">
<h1>How to manage documents?<a class="headerlink" href="#how-to-manage-documents" title="Permalink to this headline"></a></h1> <h1>How to manage documents?<a class="headerlink" href="#how-to-manage-documents" title="Permalink to this headline"></a></h1>
<p>JIO is mapped after the CouchDB API and extends them to provide unified, scalable <p>jIO is mapped after the CouchDB APIs and extends them to provide unified, scalable
and high performance access via Javascript to a wide variety of different and high performance access via JavaScript to a wide variety of different
storage backends.</p> storage backends.</p>
<p>If you are unfamiliar with <a class="reference external" href="http://couchdb.apache.org/">Apache CouchDB</a>: <p>If you are not familiar with <a class="reference external" href="http://couchdb.apache.org/">Apache CouchDB</a>:
it is a scalable, fault-tolerant, and schema-free document-oriented database. it is a scalable, fault-tolerant, and schema-free document-oriented database.
It is used in large and small organizations for a variety of applications where It is used in large and small organizations for a variety of applications where
traditional SQL databases are not the best solution for the problem at hand. traditional SQL databases are not the best solution for the problem at hand.
...@@ -68,7 +68,7 @@ and has its own conflict management system.</p> ...@@ -68,7 +68,7 @@ and has its own conflict management system.</p>
<p>A document is an association of metadata and attachment(s). The metadata is the <p>A document is an association of metadata and attachment(s). The metadata is the
set of properties of the document and the attachments are the binaries of the content set of properties of the document and the attachments are the binaries of the content
of the document.</p> of the document.</p>
<p>In jIO, metadata is just a dictionnary with keys and values (JSON object), and <p>In jIO, metadata is just a dictionary with keys and values (JSON object), and
attachments are just simple strings.</p> attachments are just simple strings.</p>
<div class="highlight-javascript"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 <div class="highlight-javascript"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2 2
...@@ -117,7 +117,7 @@ attachments are just simple strings.</p> ...@@ -117,7 +117,7 @@ attachments are just simple strings.</p>
</div> </div>
<div class="section" id="basic-methods"> <div class="section" id="basic-methods">
<h2>Basic Methods<a class="headerlink" href="#basic-methods" title="Permalink to this headline"></a></h2> <h2>Basic Methods<a class="headerlink" href="#basic-methods" title="Permalink to this headline"></a></h2>
<p>Below you can find sample calls of the main jIO methods. All examples are using <p>Below you can see examples of the main jIO methods. All examples are using
revisions (as in revision storage or replicate revision storage), so you can revisions (as in revision storage or replicate revision storage), so you can
see how method calls should be made with either of these storages.</p> see how method calls should be made with either of these storages.</p>
<div class="highlight-javascript"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1 <div class="highlight-javascript"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
...@@ -206,54 +206,52 @@ see how method calls should be made with either of these storages.</p> ...@@ -206,54 +206,52 @@ see how method calls should be made with either of these storages.</p>
<span class="c1">// delete a document and its attachment(s)</span> <span class="c1">// delete a document and its attachment(s)</span>
<span class="nx">jio_instance</span><span class="p">.</span><span class="nx">remove</span><span class="p">({</span><span class="s2">&quot;_id&quot;</span><span class="o">:</span> <span class="s2">&quot;my_document&quot;</span><span class="p">}).</span> <span class="nx">jio_instance</span><span class="p">.</span><span class="nx">remove</span><span class="p">({</span><span class="s2">&quot;_id&quot;</span><span class="o">:</span> <span class="s2">&quot;my_document&quot;</span><span class="p">}).</span>
<span class="nx">then</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span> <span class="nx">then</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// console.log(response):</span> <span class="c1">// console.log(response);</span>
<span class="p">});</span> <span class="p">});</span>
<span class="c1">// delete an attachment</span> <span class="c1">// delete an attachment</span>
<span class="nx">jio_instance</span><span class="p">.</span><span class="nx">removeAttachment</span><span class="p">({</span><span class="s2">&quot;_id&quot;</span><span class="o">:</span> <span class="s2">&quot;my_document&quot;</span><span class="p">,</span> <span class="s2">&quot;_attachment&quot;</span><span class="o">:</span> <span class="s2">&quot;its_attachment&quot;</span><span class="p">}).</span> <span class="nx">jio_instance</span><span class="p">.</span><span class="nx">removeAttachment</span><span class="p">({</span><span class="s2">&quot;_id&quot;</span><span class="o">:</span> <span class="s2">&quot;my_document&quot;</span><span class="p">,</span> <span class="s2">&quot;_attachment&quot;</span><span class="o">:</span> <span class="s2">&quot;its_attachment&quot;</span><span class="p">}).</span>
<span class="nx">then</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span> <span class="nx">then</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// console.log(response):</span> <span class="c1">// console.log(response);</span>
<span class="p">});</span> <span class="p">});</span>
<span class="c1">// get all documents</span> <span class="c1">// get all documents</span>
<span class="nx">jio_instance</span><span class="p">.</span><span class="nx">allDocs</span><span class="p">().</span><span class="nx">then</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span> <span class="nx">jio_instance</span><span class="p">.</span><span class="nx">allDocs</span><span class="p">().</span><span class="nx">then</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// console.log(response):</span> <span class="c1">// console.log(response);</span>
<span class="p">});</span> <span class="p">});</span>
</pre></div> </pre></div>
</td></tr></table></div> </td></tr></table></div>
</div> </div>
<div class="section" id="promises"> <div class="section" id="promises">
<h2>Promises<a class="headerlink" href="#promises" title="Permalink to this headline"></a></h2> <h2>Promises<a class="headerlink" href="#promises" title="Permalink to this headline"></a></h2>
<p>Each JIO methods returns a Promise object, which allows us to get responses into <p>Each jIO method returns a Promise object, which allows us to get responses into
callback parameters and to chain callbacks with other returned values.</p> callback parameters and to chain callbacks with other returned values.</p>
<p>JIO uses a custom version of <a class="reference external" href="https://github.com/tildeio/rsvp.js">RSVP.js</a>, adding canceler and progression features.</p> <p>jIO uses a custom version of <a class="reference external" href="https://github.com/tildeio/rsvp.js">RSVP.js</a>, adding canceler and progression features.</p>
<p>You can read more about promises:</p> <p>You can read more about promises:</p>
<blockquote> <ul class="simple">
<div><ul class="simple"> <li><a class="reference external" href="https://github.com/tildeio/rsvp.js#rsvpjs--">RSVP.js</a> on GitHub</li>
<li><a class="reference external" href="https://github.com/tildeio/rsvp.js#rsvpjs--">github RSVP.js</a></li>
<li><a class="reference external" href="http://promisesaplus.com/">Promises/A+</a></li> <li><a class="reference external" href="http://promisesaplus.com/">Promises/A+</a></li>
<li><a class="reference external" href="http://wiki.commonjs.org/wiki/Promises">CommonJS Promises</a></li> <li><a class="reference external" href="http://wiki.commonjs.org/wiki/Promises">CommonJS Promises</a></li>
</ul> </ul>
</div></blockquote>
</div> </div>
<div class="section" id="method-options-and-callback-responses"> <div class="section" id="method-options-and-callback-responses">
<h2>Method Options and Callback Responses<a class="headerlink" href="#method-options-and-callback-responses" title="Permalink to this headline"></a></h2> <h2>Method Options and Callback Responses<a class="headerlink" href="#method-options-and-callback-responses" title="Permalink to this headline"></a></h2>
<p>To retrieve JIO responses, you have to provide callbacks like this:</p> <p>To retrieve jIO responses, you have to provide callbacks like this:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio_instance</span><span class="p">.</span><span class="nx">post</span><span class="p">(</span><span class="nx">metadata</span><span class="p">,</span> <span class="p">[</span><span class="nx">options</span><span class="p">]).</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio_instance</span><span class="p">.</span><span class="nx">post</span><span class="p">(</span><span class="nx">metadata</span><span class="p">,</span> <span class="p">[</span><span class="nx">options</span><span class="p">]).</span>
<span class="nx">then</span><span class="p">([</span><span class="nx">responseCallback</span><span class="p">],</span> <span class="p">[</span><span class="nx">errorCallback</span><span class="p">],</span> <span class="p">[</span><span class="nx">progressionCallback</span><span class="p">]);</span> <span class="nx">then</span><span class="p">([</span><span class="nx">responseCallback</span><span class="p">],</span> <span class="p">[</span><span class="nx">errorCallback</span><span class="p">],</span> <span class="p">[</span><span class="nx">progressionCallback</span><span class="p">]);</span>
</pre></div> </pre></div>
</div> </div>
<ul class="simple"> <ul class="simple">
<li>On command success, responseCallback will be called with the JIO response as first parameter.</li> <li>On command success, <tt class="docutils literal"><span class="pre">responseCallback</span></tt> will be called with the jIO response as first parameter.</li>
<li>On command error, errorCallback will be called with the JIO error as first parameter.</li> <li>On command error, <tt class="docutils literal"><span class="pre">errorCallback</span></tt> will be called with the jIO error as first parameter.</li>
<li>On command notification, progressionCallback will be called with the storage notification.</li> <li>On command notification, <tt class="docutils literal"><span class="pre">progressionCallback</span></tt> will be called with the storage notification.</li>
</ul> </ul>
<p>Here is a list of responses returned by JIO according to methods and options:</p> <p>Here is a list of responses returned by jIO according to methods and options:</p>
<table border="1" class="docutils"> <table border="1" class="docutils">
<colgroup> <colgroup>
<col width="19%" /> <col width="17%" />
<col width="32%" /> <col width="40%" />
<col width="49%" /> <col width="44%" />
</colgroup> </colgroup>
<thead valign="bottom"> <thead valign="bottom">
<tr class="row-odd"><th class="head">Option</th> <tr class="row-odd"><th class="head">Option</th>
...@@ -263,7 +261,7 @@ callback parameters and to chain callbacks with other returned values.</p> ...@@ -263,7 +261,7 @@ callback parameters and to chain callbacks with other returned values.</p>
</thead> </thead>
<tbody valign="top"> <tbody valign="top">
<tr class="row-even"><td>No options</td> <tr class="row-even"><td>No options</td>
<td>post, put, remove</td> <td><tt class="docutils literal"><span class="pre">post()</span></tt>, <tt class="docutils literal"><span class="pre">put()</span></tt>, <tt class="docutils literal"><span class="pre">remove()</span></tt></td>
<td><div class="first last highlight-javascript"><div class="highlight"><pre><span class="p">{</span> <td><div class="first last highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
<span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="p">,</span> <span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="p">,</span>
<span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;post&quot;</span><span class="p">,</span> <span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;post&quot;</span><span class="p">,</span>
...@@ -277,7 +275,7 @@ callback parameters and to chain callbacks with other returned values.</p> ...@@ -277,7 +275,7 @@ callback parameters and to chain callbacks with other returned values.</p>
</td> </td>
</tr> </tr>
<tr class="row-odd"><td>No options</td> <tr class="row-odd"><td>No options</td>
<td>putAttachment, removeAttachment</td> <td><tt class="docutils literal"><span class="pre">putAttachment()</span></tt>, <tt class="docutils literal"><span class="pre">removeAttachment()</span></tt></td>
<td><div class="first last highlight-javascript"><div class="highlight"><pre><span class="p">{</span> <td><div class="first last highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
<span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="p">,</span> <span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="p">,</span>
<span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;putAttachment&quot;</span><span class="p">,</span> <span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;putAttachment&quot;</span><span class="p">,</span>
...@@ -292,7 +290,7 @@ callback parameters and to chain callbacks with other returned values.</p> ...@@ -292,7 +290,7 @@ callback parameters and to chain callbacks with other returned values.</p>
</td> </td>
</tr> </tr>
<tr class="row-even"><td>No options</td> <tr class="row-even"><td>No options</td>
<td>get</td> <td><tt class="docutils literal"><span class="pre">get()</span></tt></td>
<td><div class="first last highlight-javascript"><div class="highlight"><pre><span class="p">{</span> <td><div class="first last highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
<span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="p">,</span> <span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="p">,</span>
<span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;get&quot;</span><span class="p">,</span> <span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;get&quot;</span><span class="p">,</span>
...@@ -308,7 +306,7 @@ callback parameters and to chain callbacks with other returned values.</p> ...@@ -308,7 +306,7 @@ callback parameters and to chain callbacks with other returned values.</p>
</td> </td>
</tr> </tr>
<tr class="row-odd"><td>No options</td> <tr class="row-odd"><td>No options</td>
<td>getAttachment</td> <td><tt class="docutils literal"><span class="pre">getAttachment()</span></tt></td>
<td><div class="first last highlight-javascript"><div class="highlight"><pre><span class="p">{</span> <td><div class="first last highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
<span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="p">,</span> <span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="p">,</span>
<span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;getAttachment&quot;</span><span class="p">,</span> <span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;getAttachment&quot;</span><span class="p">,</span>
...@@ -323,7 +321,7 @@ callback parameters and to chain callbacks with other returned values.</p> ...@@ -323,7 +321,7 @@ callback parameters and to chain callbacks with other returned values.</p>
</td> </td>
</tr> </tr>
<tr class="row-even"><td>No option</td> <tr class="row-even"><td>No option</td>
<td>allDocs</td> <td><tt class="docutils literal"><span class="pre">allDocs()</span></tt></td>
<td><div class="first last highlight-javascript"><div class="highlight"><pre><span class="p">{</span> <td><div class="first last highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
<span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="p">,</span> <span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="p">,</span>
<span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;allDocs&quot;</span><span class="p">,</span> <span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;allDocs&quot;</span><span class="p">,</span>
...@@ -344,7 +342,7 @@ callback parameters and to chain callbacks with other returned values.</p> ...@@ -344,7 +342,7 @@ callback parameters and to chain callbacks with other returned values.</p>
</td> </td>
</tr> </tr>
<tr class="row-odd"><td>include_docs: true</td> <tr class="row-odd"><td>include_docs: true</td>
<td>allDocs</td> <td><tt class="docutils literal"><span class="pre">allDocs()</span></tt></td>
<td><div class="first last highlight-javascript"><div class="highlight"><pre><span class="p">{</span> <td><div class="first last highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
<span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="p">,</span> <span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;success&quot;</span><span class="p">,</span>
<span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;allDocs&quot;</span><span class="p">,</span> <span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;allDocs&quot;</span><span class="p">,</span>
...@@ -369,7 +367,7 @@ callback parameters and to chain callbacks with other returned values.</p> ...@@ -369,7 +367,7 @@ callback parameters and to chain callbacks with other returned values.</p>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>In case of error, the errorCallback first parameter will look like:</p> <p>In case of error, the <tt class="docutils literal"><span class="pre">errorCallback</span></tt> first parameter will look like:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
<span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;error&quot;</span><span class="p">,</span> <span class="s2">&quot;result&quot;</span><span class="o">:</span> <span class="s2">&quot;error&quot;</span><span class="p">,</span>
<span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;get&quot;</span><span class="p">,</span> <span class="s2">&quot;method&quot;</span><span class="o">:</span> <span class="s2">&quot;get&quot;</span><span class="p">,</span>
...@@ -519,7 +517,7 @@ callback parameters and to chain callbacks with other returned values.</p> ...@@ -519,7 +517,7 @@ callback parameters and to chain callbacks with other returned values.</p>
<li class="right" > <li class="right" >
<a href="download.html" title="Downloads" <a href="download.html" title="Downloads"
>previous</a> |</li> >previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Metadata &mdash; JIO 2.0.0 documentation</title> <title>Metadata &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<link rel="next" title="For developers" href="developers.html" /> <link rel="next" title="For developers" href="developers.html" />
<link rel="prev" title="JIO Complex Queries" href="complex_queries.html" /> <link rel="prev" title="jIO Complex Queries" href="complex_queries.html" />
</head> </head>
<body> <body>
<div class="related"> <div class="related">
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
<a href="developers.html" title="For developers" <a href="developers.html" title="For developers"
accesskey="N">next</a> |</li> accesskey="N">next</a> |</li>
<li class="right" > <li class="right" >
<a href="complex_queries.html" title="JIO Complex Queries" <a href="complex_queries.html" title="jIO Complex Queries"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -52,16 +52,15 @@ ...@@ -52,16 +52,15 @@
<div class="body"> <div class="body">
<div class="section" id="metadata"> <div class="section" id="metadata">
<h1>Metadata<a class="headerlink" href="#metadata" title="Permalink to this headline"></a></h1> <span id="metadata-head"></span><h1>Metadata<a class="headerlink" href="#metadata" title="Permalink to this headline"></a></h1>
<div class="section" id="what-is-metadata"> <div class="section" id="what-is-metadata">
<h2>What is metadata?<a class="headerlink" href="#what-is-metadata" title="Permalink to this headline"></a></h2> <h2>What is metadata?<a class="headerlink" href="#what-is-metadata" title="Permalink to this headline"></a></h2>
<p>The word &#8220;metadata&#8221; means &#8220;data about data&#8221;. Metadata articulates a context for <p>The word &#8220;metadata&#8221; means &#8220;data about data&#8221;. Metadata articulates a context for
objects of interest &#8211; &#8220;resources&#8221; such as MP3 files, library books, or objects of interest &#8211; &#8220;resources&#8221; such as MP3 files, library books, or
satellite images &#8211; in the form of &#8220;resource descriptions&#8221;. As a tradition, satellite images &#8211; in the form of &#8220;resource descriptions&#8221;. As a tradition,
resource description dates back to the earliest archives and library catalogs. resource description dates back to the earliest archives and library catalogs.
The modern &#8220;metadata&#8221; field that gave rise to Dublin Core and other recent During the Web revolution of the mid-1990s, <a class="reference external" href="http://dublincore.org/metadata-basics/">Dublic Core</a>
standards emerged with the Web revolution of the mid-1990s. has emerged as one of the prominent metadata standards.</p>
<a class="reference external" href="http://dublincore.org/metadata-basics/">http://dublincore.org/metadata-basics/</a></p>
</div> </div>
<div class="section" id="why-use-metadata"> <div class="section" id="why-use-metadata">
<h2>Why use metadata?<a class="headerlink" href="#why-use-metadata" title="Permalink to this headline"></a></h2> <h2>Why use metadata?<a class="headerlink" href="#why-use-metadata" title="Permalink to this headline"></a></h2>
...@@ -73,7 +72,7 @@ way to save documents and to get them). So we must use metadata for ...@@ -73,7 +72,7 @@ way to save documents and to get them). So we must use metadata for
and organizations to work together.</p> and organizations to work together.</p>
</div> </div>
<div class="section" id="how-to-format-metadata-with-jio"> <div class="section" id="how-to-format-metadata-with-jio">
<h2>How to format metadata with JIO<a class="headerlink" href="#how-to-format-metadata-with-jio" title="Permalink to this headline"></a></h2> <h2>How to format metadata with jIO<a class="headerlink" href="#how-to-format-metadata-with-jio" title="Permalink to this headline"></a></h2>
<p>See below XML and its JSON equivalent:</p> <p>See below XML and its JSON equivalent:</p>
<table border="1" class="docutils"> <table border="1" class="docutils">
<colgroup> <colgroup>
...@@ -132,10 +131,10 @@ and organizations to work together.</p> ...@@ -132,10 +131,10 @@ and organizations to work together.</p>
<div class="section" id="identification"> <div class="section" id="identification">
<h3>Identification<a class="headerlink" href="#identification" title="Permalink to this headline"></a></h3> <h3>Identification<a class="headerlink" href="#identification" title="Permalink to this headline"></a></h3>
<ul> <ul>
<li><p class="first"><strong>&#8220;_id&#8221;</strong>, a specific JIO metadata which helps the storage to find a document <li><p class="first"><strong>_id</strong>, a specific jIO metadata which helps the storage to find a document
(can be a real path name, a dc:identifier, a uuid, ...). <strong>String Only</strong></p> (can be a real path name, a dc:identifier, a uuid, ...). <strong>String Only</strong></p>
</li> </li>
<li><p class="first"><strong>&#8220;identifer&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;identifier&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;http://domain/jio_home_page&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;identifier&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;urn:ISBN:978-1-2345-6789-X&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <li><p class="first"><strong>identifer</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;identifier&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;http://domain/jio_home_page&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;identifier&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;urn:ISBN:978-1-2345-6789-X&quot;</span></span><span class="punctuation"><span class="pre">},</span></span>
<span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;identifier&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;scheme&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;DCTERMS.URI&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;content&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;http://domain/jio_home_page&quot;</span></span><span class="punctuation"><span class="pre">}]}</span></span></tt></p> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;identifier&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;scheme&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;DCTERMS.URI&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;content&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;http://domain/jio_home_page&quot;</span></span><span class="punctuation"><span class="pre">}]}</span></span></tt></p>
<p>an unambiguous reference to the resource within a given context. Recommended <p>an unambiguous reference to the resource within a given context. Recommended
best practice is to identify the resource by means of a string or number best practice is to identify the resource by means of a string or number
...@@ -144,20 +143,20 @@ systems include the Uniform Resource Identifier (URI) (including the Uniform ...@@ -144,20 +143,20 @@ systems include the Uniform Resource Identifier (URI) (including the Uniform
Resource Locator (URL), the Digital Object Identifier (DOI) and the Resource Locator (URL), the Digital Object Identifier (DOI) and the
International Standard Book Number (ISBN).</p> International Standard Book Number (ISBN).</p>
</li> </li>
<li><p class="first"><strong>&#8220;format&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;format&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;text/html&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;52</span> <span class="pre">kB&quot;</span></span><span class="punctuation"><span class="pre">]},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;format&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;image/jpeg&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;100</span> <span class="pre">x</span> <span class="pre">100</span> <span class="pre">pixels&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;13.2</span> <span class="pre">KiB&quot;</span></span><span class="punctuation"><span class="pre">]}</span></span></tt></p> <li><p class="first"><strong>format</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;format&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;text/html&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;52</span> <span class="pre">kB&quot;</span></span><span class="punctuation"><span class="pre">]},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;format&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;image/jpeg&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;100</span> <span class="pre">x</span> <span class="pre">100</span> <span class="pre">pixels&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;13.2</span> <span class="pre">KiB&quot;</span></span><span class="punctuation"><span class="pre">]}</span></span></tt></p>
<p>the physical or digital manifestation of the resource. Typically, Format may <p>the physical or digital manifestation of the resource. Typically, Format may
include the media-type or dimensions of the resource. Examples of dimensions include the media-type or dimensions of the resource. Examples of dimensions
include size and duration. Format may be used to determine the software, include size and duration. Format may be used to determine the software,
hardware or other equipment needed to display or operate the resource.</p> hardware or other equipment needed to display or operate the resource.</p>
</li> </li>
<li><p class="first"><strong>&#8220;date&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;date&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;2011-12-13T14:15:16Z&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;date&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;scheme&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;DCTERMS.W3CDTF&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;content&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;2011-12-13&quot;</span></span><span class="punctuation"><span class="pre">}}</span></span></tt></p> <li><p class="first"><strong>date</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;date&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;2011-12-13T14:15:16Z&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;date&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;scheme&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;DCTERMS.W3CDTF&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;content&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;2011-12-13&quot;</span></span><span class="punctuation"><span class="pre">}}</span></span></tt></p>
<p>a date associated with an event in the life cycle of the resource. Typically, <p>a date associated with an event in the life cycle of the resource. Typically,
Date will be associated with the creation or availability of the resource. Date will be associated with the creation or availability of the resource.
Recommended best practice for encoding the date value is defined in a profile Recommended best practice for encoding the date value is defined in a profile
of ISO 8601 <a class="reference external" href="http://www.w3.org/TR/NOTE-datetime">Date and Time Formats, W3C Note</a> of ISO 8601 <a class="reference external" href="http://www.w3.org/TR/NOTE-datetime">Date and Time Formats, W3C Note</a>
and follows the YYYY-MM-DD format.</p> and follows the YYYY-MM-DD format.</p>
</li> </li>
<li><p class="first"><strong>&#8220;type&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;type&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Text&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;type&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Image&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;type&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Dataset&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p> <li><p class="first"><strong>type</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;type&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Text&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;type&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Image&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;type&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Dataset&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p>
<p>the nature or genre of the content of the resource. Type includes terms describing <p>the nature or genre of the content of the resource. Type includes terms describing
general categories, functions, genres, or aggregation levels for content. general categories, functions, genres, or aggregation levels for content.
Recommended best practice is to select a value from a controlled vocabulary. Recommended best practice is to select a value from a controlled vocabulary.
...@@ -168,23 +167,23 @@ Recommended best practice is to select a value from a controlled vocabulary. ...@@ -168,23 +167,23 @@ Recommended best practice is to select a value from a controlled vocabulary.
<div class="section" id="intellectual-property"> <div class="section" id="intellectual-property">
<h3>Intellectual property<a class="headerlink" href="#intellectual-property" title="Permalink to this headline"></a></h3> <h3>Intellectual property<a class="headerlink" href="#intellectual-property" title="Permalink to this headline"></a></h3>
<ul> <ul>
<li><p class="first"><strong>&#8220;creator&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;creator&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Tristan</span> <span class="pre">Cavelier&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;creator&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;Tristan</span> <span class="pre">Cavelier&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;Sven</span> <span class="pre">Franck&quot;</span></span><span class="punctuation"><span class="pre">]}</span></span></tt></p> <li><p class="first"><strong>creator</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;creator&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Tristan</span> <span class="pre">Cavelier&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;creator&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;Tristan</span> <span class="pre">Cavelier&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;Sven</span> <span class="pre">Franck&quot;</span></span><span class="punctuation"><span class="pre">]}</span></span></tt></p>
<p>an entity primarily responsible for creating the content of the resource. <p>an entity primarily responsible for creating the content of the resource.
Examples of a Creator include a person, an organization, or a service. Examples of a Creator include a person, an organization, or a service.
Typically the name of the Creator should be used to indicate the entity.</p> Typically the name of the Creator should be used to indicate the entity.</p>
</li> </li>
<li><p class="first"><strong>&#8220;publisher&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;publisher&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Nexedi&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p> <li><p class="first"><strong>publisher</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;publisher&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Nexedi&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p>
<p>the entity responsible for making the resource available. Examples of a <p>the entity responsible for making the resource available. Examples of a
Publisher include a person, an organization, or a service. Typically, the name Publisher include a person, an organization, or a service. Typically, the name
of a Publisher should be used to indicate the entity.</p> of a Publisher should be used to indicate the entity.</p>
</li> </li>
<li><p class="first"><strong>&#8220;contributor&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;contributor&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;Full</span> <span class="pre">Name&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;Full</span> <span class="pre">Name&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">...]}</span></span></tt></p> <li><p class="first"><strong>contributor</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;contributor&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;Full</span> <span class="pre">Name&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;Full</span> <span class="pre">Name&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">...]}</span></span></tt></p>
<p>an entity responsible for making contributions to the content of the <p>an entity responsible for making contributions to the content of the
resource. Examples of a Contributor include a person, an organization or a resource. Examples of a Contributor include a person, an organization or a
service. Typically, the name of a Contributor should be used to indicate the service. Typically, the name of a Contributor should be used to indicate the
entity.</p> entity.</p>
</li> </li>
<li><p class="first"><strong>&#8220;rights&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;rights&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Access</span> <span class="pre">limited</span> <span class="pre">to</span> <span class="pre">members&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;rights&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;https://www.j-io.org/documentation/jio-documentation/#copyright-and-license&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p> <li><p class="first"><strong>rights</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;rights&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Access</span> <span class="pre">limited</span> <span class="pre">to</span> <span class="pre">members&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;rights&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;https://www.j-io.org/documentation/jio-documentation/#copyright-and-license&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p>
<p>information about rights held in and over the resource. Typically a Rights <p>information about rights held in and over the resource. Typically a Rights
element will contain a rights management statement for the resource, or element will contain a rights management statement for the resource, or
reference a service providing such information. Rights information often reference a service providing such information. Rights information often
...@@ -197,21 +196,21 @@ status of these and other rights with respect to the resource.</p> ...@@ -197,21 +196,21 @@ status of these and other rights with respect to the resource.</p>
<div class="section" id="content"> <div class="section" id="content">
<h3>Content<a class="headerlink" href="#content" title="Permalink to this headline"></a></h3> <h3>Content<a class="headerlink" href="#content" title="Permalink to this headline"></a></h3>
<ul> <ul>
<li><p class="first"><strong>&#8220;title&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;title&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;JIO</span> <span class="pre">Home</span> <span class="pre">Page&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p> <li><p class="first"><strong>title</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;title&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;jIO</span> <span class="pre">Home</span> <span class="pre">Page&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p>
<p>the name given to the resource. Typically, a Title will be a name by which the resource is formally known.</p> <p>the name given to the resource. Typically, a Title will be a name by which the resource is formally known.</p>
</li> </li>
<li><p class="first"><strong>&#8220;subject&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;subject&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;JIO&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;subject&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;JIO&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;basics&quot;</span></span><span class="punctuation"><span class="pre">]}</span></span></tt></p> <li><p class="first"><strong>subject</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;subject&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;jIO&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;subject&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;jIO&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;basics&quot;</span></span><span class="punctuation"><span class="pre">]}</span></span></tt></p>
<p>the topic of the content of the resource. Typically, a Subject will be <p>the topic of the content of the resource. Typically, a Subject will be
expressed as keywords or key phrases or classification codes that describe the expressed as keywords or key phrases or classification codes that describe the
topic of the resource. Recommended best practice is to select a value from a topic of the resource. Recommended best practice is to select a value from a
controlled vocabulary or formal classification scheme.</p> controlled vocabulary or formal classification scheme.</p>
</li> </li>
<li><p class="first"><strong>&#8220;description&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;description&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Simple</span> <span class="pre">guide</span> <span class="pre">to</span> <span class="pre">show</span> <span class="pre">the</span> <span class="pre">basics</span> <span class="pre">of</span> <span class="pre">JIO&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;description&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;lang&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;fr&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;content&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Ma</span> <span class="pre">description&quot;</span></span><span class="punctuation"><span class="pre">}}</span></span></tt></p> <li><p class="first"><strong>description</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;description&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Simple</span> <span class="pre">guide</span> <span class="pre">to</span> <span class="pre">show</span> <span class="pre">the</span> <span class="pre">basics</span> <span class="pre">of</span> <span class="pre">jIO&quot;</span></span><span class="punctuation"><span class="pre">},</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;description&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;lang&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;fr&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;content&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Ma</span> <span class="pre">description&quot;</span></span><span class="punctuation"><span class="pre">}}</span></span></tt></p>
<p>an account of the content of the resource. Description may include but is not <p>an account of the content of the resource. Description may include but is not
limited to: an abstract, table of contents, reference to a graphical limited to: an abstract, table of contents, reference to a graphical
representation of content or a free-text account of the content.</p> representation of content or a free-text account of the content.</p>
</li> </li>
<li><p class="first"><strong>&#8220;language&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;language&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;en&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p> <li><p class="first"><strong>language</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;language&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;en&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p>
<p>the language of the intellectual content of the resource. Recommended best <p>the language of the intellectual content of the resource. Recommended best
practice for the values of the Language element is defined by <a class="reference external" href="http://www.ietf.org/rfc/rfc3066.txt">RFC 3066</a> practice for the values of the Language element is defined by <a class="reference external" href="http://www.ietf.org/rfc/rfc3066.txt">RFC 3066</a>
which, in conjunction with <a class="reference external" href="http://www.oasis-open.org/cover/iso639a.html">ISO 639</a>, defines two- and which, in conjunction with <a class="reference external" href="http://www.oasis-open.org/cover/iso639a.html">ISO 639</a>, defines two- and
...@@ -219,18 +218,18 @@ three-letter primary language tags with optional subtags. Examples include &#822 ...@@ -219,18 +218,18 @@ three-letter primary language tags with optional subtags. Examples include &#822
or &#8220;eng&#8221; for English, &#8220;akk&#8221; for Akkadian, and &#8220;en-GB&#8221; for English used in the or &#8220;eng&#8221; for English, &#8220;akk&#8221; for Akkadian, and &#8220;en-GB&#8221; for English used in the
United Kingdom.</p> United Kingdom.</p>
</li> </li>
<li><p class="first"><strong>&#8220;source&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;source&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;Image</span> <span class="pre">taken</span> <span class="pre">from</span> <span class="pre">a</span> <span class="pre">drawing</span> <span class="pre">by</span> <span class="pre">Mr.</span> <span class="pre">Artist&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;&lt;phone</span> <span class="pre">number&gt;&quot;</span></span><span class="punctuation"><span class="pre">]}</span></span></tt>,</p> <li><p class="first"><strong>source</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;source&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;Image</span> <span class="pre">taken</span> <span class="pre">from</span> <span class="pre">a</span> <span class="pre">drawing</span> <span class="pre">by</span> <span class="pre">Mr.</span> <span class="pre">Artist&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;&lt;phone</span> <span class="pre">number&gt;&quot;</span></span><span class="punctuation"><span class="pre">]}</span></span></tt>,</p>
<p>a Reference to a resource from which the present resource is derived. The <p>a Reference to a resource from which the present resource is derived. The
present resource may be derived from the Source resource in whole or part. present resource may be derived from the Source resource in whole or part.
Recommended best practice is to reference the resource by means of a string or Recommended best practice is to reference the resource by means of a string or
number conforming to a formal identification system.</p> number conforming to a formal identification system.</p>
</li> </li>
<li><p class="first"><strong>&#8220;relation&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;relation&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Resilience</span> <span class="pre">project&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p> <li><p class="first"><strong>relation</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;relation&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;Resilience</span> <span class="pre">project&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p>
<p>a reference to a related resource. Recommended best practice is to reference <p>a reference to a related resource. Recommended best practice is to reference
the resource by means of a string or number conforming to a formal the resource by means of a string or number conforming to a formal
identification system.</p> identification system.</p>
</li> </li>
<li><p class="first"><strong>&#8220;coverage&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;coverage&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;France&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p> <li><p class="first"><strong>coverage</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;coverage&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;France&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p>
<p>the extent or scope of the content of the resource. Coverage will typically <p>the extent or scope of the content of the resource. Coverage will typically
include spatial location (a place name or geographic co-ordinates), temporal include spatial location (a place name or geographic co-ordinates), temporal
period (a period label, date, or date range) or jurisdiction (such as a named period (a period label, date, or date range) or jurisdiction (such as a named
...@@ -239,12 +238,12 @@ controlled vocabulary (for example, the <a class="reference external" href="http ...@@ -239,12 +238,12 @@ controlled vocabulary (for example, the <a class="reference external" href="http
places or time periods should be used in preference to numeric identifiers such places or time periods should be used in preference to numeric identifiers such
as sets of co-ordinates or date ranges.</p> as sets of co-ordinates or date ranges.</p>
</li> </li>
<li><p class="first"><strong>&#8220;category&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;category&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;parent/26323&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;resilience/javascript&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;javascript/library/io&quot;</span></span><span class="punctuation"><span class="pre">]}</span></span></tt></p> <li><p class="first"><strong>category</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;category&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="punctuation"><span class="pre">[</span></span><span class="literal string double"><span class="pre">&quot;parent/26323&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;resilience/javascript&quot;</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="literal string double"><span class="pre">&quot;javascript/library/io&quot;</span></span><span class="punctuation"><span class="pre">]}</span></span></tt></p>
<p>the category the resource is associated with. The categories may look like <p>the category the resource is associated with. The categories may look like
navigational facets, they correspond to the properties of the resource which navigational facets, they correspond to the properties of the resource which
can be generated with metadata or some other informations (see <a class="reference external" href="https://en.wikipedia.org/wiki/Faceted_search">faceted search</a>).</p> can be generated with metadata or some other information (see <a class="reference external" href="https://en.wikipedia.org/wiki/Faceted_search">faceted search</a>).</p>
</li> </li>
<li><p class="first"><strong>&#8220;product&#8221;</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;product&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;...&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p> <li><p class="first"><strong>product</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="literal string double"><span class="pre">&quot;product&quot;</span></span><span class="operator"><span class="pre">:</span></span> <span class="literal string double"><span class="pre">&quot;...&quot;</span></span><span class="punctuation"><span class="pre">}</span></span></tt></p>
<p>for e-commerce use.</p> <p>for e-commerce use.</p>
</li> </li>
<li><p class="first"><strong>custom</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="name other"><span class="pre">custom1</span></span><span class="operator"><span class="pre">:</span></span> <span class="name other"><span class="pre">value1</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="name other"><span class="pre">custom2</span></span><span class="operator"><span class="pre">:</span></span> <span class="name other"><span class="pre">value2</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">...}</span></span></tt></p> <li><p class="first"><strong>custom</strong>, <tt class="code js javascript docutils literal"><span class="punctuation"><span class="pre">{</span></span><span class="name other"><span class="pre">custom1</span></span><span class="operator"><span class="pre">:</span></span> <span class="name other"><span class="pre">value1</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="name other"><span class="pre">custom2</span></span><span class="operator"><span class="pre">:</span></span> <span class="name other"><span class="pre">value2</span></span><span class="punctuation"><span class="pre">,</span></span> <span class="punctuation"><span class="pre">...}</span></span></tt></p>
...@@ -255,7 +254,7 @@ can be generated with metadata or some other informations (see <a class="referen ...@@ -255,7 +254,7 @@ can be generated with metadata or some other informations (see <a class="referen
<div class="section" id="examples"> <div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2> <h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<div class="section" id="posting-a-webpage-for-jio"> <div class="section" id="posting-a-webpage-for-jio">
<h3>Posting a webpage for JIO<a class="headerlink" href="#posting-a-webpage-for-jio" title="Permalink to this headline"></a></h3> <h3>Posting a webpage for jIO<a class="headerlink" href="#posting-a-webpage-for-jio" title="Permalink to this headline"></a></h3>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio</span><span class="p">.</span><span class="nx">put</span><span class="p">({</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio</span><span class="p">.</span><span class="nx">put</span><span class="p">({</span>
<span class="s2">&quot;_id&quot;</span> <span class="o">:</span> <span class="s2">&quot;...&quot;</span><span class="p">,</span> <span class="s2">&quot;_id&quot;</span> <span class="o">:</span> <span class="s2">&quot;...&quot;</span><span class="p">,</span>
<span class="s2">&quot;identifier&quot;</span> <span class="o">:</span> <span class="s2">&quot;http://domain/jio_home_page&quot;</span><span class="p">,</span> <span class="s2">&quot;identifier&quot;</span> <span class="o">:</span> <span class="s2">&quot;http://domain/jio_home_page&quot;</span><span class="p">,</span>
...@@ -263,9 +262,9 @@ can be generated with metadata or some other informations (see <a class="referen ...@@ -263,9 +262,9 @@ can be generated with metadata or some other informations (see <a class="referen
<span class="s2">&quot;date&quot;</span> <span class="o">:</span> <span class="k">new</span> <span class="nb">Date</span><span class="p">(),</span> <span class="s2">&quot;date&quot;</span> <span class="o">:</span> <span class="k">new</span> <span class="nb">Date</span><span class="p">(),</span>
<span class="s2">&quot;type&quot;</span> <span class="o">:</span> <span class="s2">&quot;Text&quot;</span><span class="p">,</span> <span class="s2">&quot;type&quot;</span> <span class="o">:</span> <span class="s2">&quot;Text&quot;</span><span class="p">,</span>
<span class="s2">&quot;creator&quot;</span> <span class="o">:</span> <span class="p">[</span><span class="s2">&quot;Nexedi&quot;</span><span class="p">,</span> <span class="s2">&quot;Tristan Cavelier&quot;</span><span class="p">,</span> <span class="s2">&quot;Sven Franck&quot;</span><span class="p">],</span> <span class="s2">&quot;creator&quot;</span> <span class="o">:</span> <span class="p">[</span><span class="s2">&quot;Nexedi&quot;</span><span class="p">,</span> <span class="s2">&quot;Tristan Cavelier&quot;</span><span class="p">,</span> <span class="s2">&quot;Sven Franck&quot;</span><span class="p">],</span>
<span class="s2">&quot;title&quot;</span> <span class="o">:</span> <span class="s2">&quot;JIO Home Page&quot;</span><span class="p">,</span> <span class="s2">&quot;title&quot;</span> <span class="o">:</span> <span class="s2">&quot;jIO Home Page&quot;</span><span class="p">,</span>
<span class="s2">&quot;subject&quot;</span> <span class="o">:</span> <span class="p">[</span><span class="s2">&quot;JIO&quot;</span><span class="p">,</span> <span class="s2">&quot;basics&quot;</span><span class="p">],</span> <span class="s2">&quot;subject&quot;</span> <span class="o">:</span> <span class="p">[</span><span class="s2">&quot;jIO&quot;</span><span class="p">,</span> <span class="s2">&quot;basics&quot;</span><span class="p">],</span>
<span class="s2">&quot;description&quot;</span> <span class="o">:</span> <span class="s2">&quot;Simple guide to show the basics of JIO&quot;</span><span class="p">,</span> <span class="s2">&quot;description&quot;</span> <span class="o">:</span> <span class="s2">&quot;Simple guide to show the basics of jIO&quot;</span><span class="p">,</span>
<span class="s2">&quot;category&quot;</span> <span class="o">:</span> <span class="p">[</span><span class="s2">&quot;resilience/jio&quot;</span><span class="p">,</span> <span class="s2">&quot;webpage&quot;</span><span class="p">],</span> <span class="s2">&quot;category&quot;</span> <span class="o">:</span> <span class="p">[</span><span class="s2">&quot;resilience/jio&quot;</span><span class="p">,</span> <span class="s2">&quot;webpage&quot;</span><span class="p">],</span>
<span class="s2">&quot;language&quot;</span> <span class="o">:</span> <span class="s2">&quot;en&quot;</span> <span class="s2">&quot;language&quot;</span> <span class="o">:</span> <span class="s2">&quot;en&quot;</span>
<span class="p">},</span> <span class="nx">callbacks</span><span class="p">);</span> <span class="c1">// send content as attachment</span> <span class="p">},</span> <span class="nx">callbacks</span><span class="p">);</span> <span class="c1">// send content as attachment</span>
...@@ -273,7 +272,7 @@ can be generated with metadata or some other informations (see <a class="referen ...@@ -273,7 +272,7 @@ can be generated with metadata or some other informations (see <a class="referen
</div> </div>
</div> </div>
<div class="section" id="posting-jio-library"> <div class="section" id="posting-jio-library">
<h3>Posting JIO library<a class="headerlink" href="#posting-jio-library" title="Permalink to this headline"></a></h3> <h3>Posting jIO library<a class="headerlink" href="#posting-jio-library" title="Permalink to this headline"></a></h3>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio</span><span class="p">.</span><span class="nx">put</span><span class="p">({</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio</span><span class="p">.</span><span class="nx">put</span><span class="p">({</span>
<span class="s2">&quot;_id&quot;</span> <span class="o">:</span> <span class="s2">&quot;...&quot;</span><span class="p">,</span> <span class="s2">&quot;_id&quot;</span> <span class="o">:</span> <span class="s2">&quot;...&quot;</span><span class="p">,</span>
<span class="s2">&quot;identifier&quot;</span> <span class="o">:</span> <span class="s2">&quot;jio.js&quot;</span><span class="p">,</span> <span class="s2">&quot;identifier&quot;</span> <span class="o">:</span> <span class="s2">&quot;jio.js&quot;</span><span class="p">,</span>
...@@ -285,7 +284,7 @@ can be generated with metadata or some other informations (see <a class="referen ...@@ -285,7 +284,7 @@ can be generated with metadata or some other informations (see <a class="referen
<span class="s2">&quot;rights&quot;</span> <span class="o">:</span> <span class="s2">&quot;rights&quot;</span> <span class="o">:</span>
<span class="s2">&quot;https://www.j-io.org/documentation/jio-documentation/#copyright-and-license&quot;</span><span class="p">,</span> <span class="s2">&quot;https://www.j-io.org/documentation/jio-documentation/#copyright-and-license&quot;</span><span class="p">,</span>
<span class="s2">&quot;title&quot;</span> <span class="o">:</span> <span class="s2">&quot;Javascript Input/Output&quot;</span><span class="p">,</span> <span class="s2">&quot;title&quot;</span> <span class="o">:</span> <span class="s2">&quot;Javascript Input/Output&quot;</span><span class="p">,</span>
<span class="s2">&quot;subject&quot;</span> <span class="o">:</span> <span class="s2">&quot;JIO&quot;</span><span class="p">,</span> <span class="s2">&quot;subject&quot;</span> <span class="o">:</span> <span class="s2">&quot;jIO&quot;</span><span class="p">,</span>
<span class="s2">&quot;category&quot;</span> <span class="o">:</span> <span class="p">[</span><span class="s2">&quot;resilience/javascript&quot;</span><span class="p">,</span> <span class="s2">&quot;javascript/library/io&quot;</span><span class="p">]</span> <span class="s2">&quot;category&quot;</span> <span class="o">:</span> <span class="p">[</span><span class="s2">&quot;resilience/javascript&quot;</span><span class="p">,</span> <span class="s2">&quot;javascript/library/io&quot;</span><span class="p">]</span>
<span class="s2">&quot;description&quot;</span> <span class="o">:</span> <span class="s2">&quot;jIO is a client-side JavaScript library to manage &quot;</span> <span class="o">+</span> <span class="s2">&quot;description&quot;</span> <span class="o">:</span> <span class="s2">&quot;jIO is a client-side JavaScript library to manage &quot;</span> <span class="o">+</span>
<span class="s2">&quot;documents across multiple storages.&quot;</span> <span class="s2">&quot;documents across multiple storages.&quot;</span>
...@@ -390,9 +389,9 @@ can be generated with metadata or some other informations (see <a class="referen ...@@ -390,9 +389,9 @@ can be generated with metadata or some other informations (see <a class="referen
</div> </div>
</div> </div>
<div class="section" id="getting-all-documents-about-jio-in-the-resilience-project"> <div class="section" id="getting-all-documents-about-jio-in-the-resilience-project">
<h3>Getting all documents about JIO in the resilience project<a class="headerlink" href="#getting-all-documents-about-jio-in-the-resilience-project" title="Permalink to this headline"></a></h3> <h3>Getting all documents about jIO in the resilience project<a class="headerlink" href="#getting-all-documents-about-jio-in-the-resilience-project" title="Permalink to this headline"></a></h3>
<p>With complex query:</p> <p>With complex query:</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio</span><span class="p">.</span><span class="nx">allDocs</span><span class="p">({</span><span class="s2">&quot;query&quot;</span><span class="o">:</span> <span class="s2">&quot;subject: \&quot;JIO\&quot; AND category: \&quot;resilience\&quot;&quot;</span><span class="p">},</span> <span class="nx">callbacks</span><span class="p">);</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio</span><span class="p">.</span><span class="nx">allDocs</span><span class="p">({</span><span class="s2">&quot;query&quot;</span><span class="o">:</span> <span class="s2">&quot;subject: \&quot;jIO\&quot; AND category: \&quot;resilience\&quot;&quot;</span><span class="p">},</span> <span class="nx">callbacks</span><span class="p">);</span>
</pre></div> </pre></div>
</div> </div>
</div> </div>
...@@ -476,7 +475,7 @@ can be generated with metadata or some other informations (see <a class="referen ...@@ -476,7 +475,7 @@ can be generated with metadata or some other informations (see <a class="referen
<li><a class="reference internal" href="#">Metadata</a><ul> <li><a class="reference internal" href="#">Metadata</a><ul>
<li><a class="reference internal" href="#what-is-metadata">What is metadata?</a></li> <li><a class="reference internal" href="#what-is-metadata">What is metadata?</a></li>
<li><a class="reference internal" href="#why-use-metadata">Why use metadata?</a></li> <li><a class="reference internal" href="#why-use-metadata">Why use metadata?</a></li>
<li><a class="reference internal" href="#how-to-format-metadata-with-jio">How to format metadata with JIO</a></li> <li><a class="reference internal" href="#how-to-format-metadata-with-jio">How to format metadata with jIO</a></li>
<li><a class="reference internal" href="#list-of-metadata-to-use">List of metadata to use</a><ul> <li><a class="reference internal" href="#list-of-metadata-to-use">List of metadata to use</a><ul>
<li><a class="reference internal" href="#identification">Identification</a></li> <li><a class="reference internal" href="#identification">Identification</a></li>
<li><a class="reference internal" href="#intellectual-property">Intellectual property</a></li> <li><a class="reference internal" href="#intellectual-property">Intellectual property</a></li>
...@@ -484,15 +483,15 @@ can be generated with metadata or some other informations (see <a class="referen ...@@ -484,15 +483,15 @@ can be generated with metadata or some other informations (see <a class="referen
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#examples">Examples</a><ul> <li><a class="reference internal" href="#examples">Examples</a><ul>
<li><a class="reference internal" href="#posting-a-webpage-for-jio">Posting a webpage for JIO</a></li> <li><a class="reference internal" href="#posting-a-webpage-for-jio">Posting a webpage for jIO</a></li>
<li><a class="reference internal" href="#posting-jio-library">Posting JIO library</a></li> <li><a class="reference internal" href="#posting-jio-library">Posting jIO library</a></li>
<li><a class="reference internal" href="#posting-a-webpage-for-interoperability-levels">Posting a webpage for interoperability levels</a></li> <li><a class="reference internal" href="#posting-a-webpage-for-interoperability-levels">Posting a webpage for interoperability levels</a></li>
<li><a class="reference internal" href="#posting-an-image">Posting an image</a></li> <li><a class="reference internal" href="#posting-an-image">Posting an image</a></li>
<li><a class="reference internal" href="#posting-a-book">Posting a book</a></li> <li><a class="reference internal" href="#posting-a-book">Posting a book</a></li>
<li><a class="reference internal" href="#posting-a-video">Posting a video</a></li> <li><a class="reference internal" href="#posting-a-video">Posting a video</a></li>
<li><a class="reference internal" href="#posting-a-job-announcement">Posting a job announcement</a></li> <li><a class="reference internal" href="#posting-a-job-announcement">Posting a job announcement</a></li>
<li><a class="reference internal" href="#getting-a-list-of-document-created-by-someone">Getting a list of document created by someone</a></li> <li><a class="reference internal" href="#getting-a-list-of-document-created-by-someone">Getting a list of document created by someone</a></li>
<li><a class="reference internal" href="#getting-all-documents-about-jio-in-the-resilience-project">Getting all documents about JIO in the resilience project</a></li> <li><a class="reference internal" href="#getting-all-documents-about-jio-in-the-resilience-project">Getting all documents about jIO in the resilience project</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference internal" href="#tools">Tools</a><ul> <li><a class="reference internal" href="#tools">Tools</a><ul>
...@@ -506,7 +505,7 @@ can be generated with metadata or some other informations (see <a class="referen ...@@ -506,7 +505,7 @@ can be generated with metadata or some other informations (see <a class="referen
<h4>Previous topic</h4> <h4>Previous topic</h4>
<p class="topless"><a href="complex_queries.html" <p class="topless"><a href="complex_queries.html"
title="previous chapter">JIO Complex Queries</a></p> title="previous chapter">jIO Complex Queries</a></p>
<h4>Next topic</h4> <h4>Next topic</h4>
<p class="topless"><a href="developers.html" <p class="topless"><a href="developers.html"
title="next chapter">For developers</a></p> title="next chapter">For developers</a></p>
...@@ -542,9 +541,9 @@ can be generated with metadata or some other informations (see <a class="referen ...@@ -542,9 +541,9 @@ can be generated with metadata or some other informations (see <a class="referen
<a href="developers.html" title="For developers" <a href="developers.html" title="For developers"
>next</a> |</li> >next</a> |</li>
<li class="right" > <li class="right" >
<a href="complex_queries.html" title="JIO Complex Queries" <a href="complex_queries.html" title="jIO Complex Queries"
>previous</a> |</li> >previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JavaScript Naming Conventions &mdash; JIO 2.0.0 documentation</title> <title>JavaScript Naming Conventions &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<link rel="next" title="Authors" href="authors.html" /> <link rel="next" title="Authors" href="authors.html" />
<link rel="prev" title="For developers" href="developers.html" /> <link rel="prev" title="For developers" href="developers.html" />
</head> </head>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<li class="right" > <li class="right" >
<a href="developers.html" title="For developers" <a href="developers.html" title="For developers"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -191,7 +191,7 @@ split on multiple lines.</p> ...@@ -191,7 +191,7 @@ split on multiple lines.</p>
</pre></div> </pre></div>
</div> </div>
<p>Good Example</p> <p>Good Example</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">func</span> <span class="p">()</span> <span class="p">{</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="kd">function</span> <span class="nx">func</span><span class="p">()</span> <span class="p">{</span>
<span class="k">return</span> <span class="p">{</span> <span class="k">return</span> <span class="p">{</span>
<span class="s2">&quot;name&quot;</span><span class="o">:</span> <span class="s2">&quot;Batman&quot;</span> <span class="s2">&quot;name&quot;</span><span class="o">:</span> <span class="s2">&quot;Batman&quot;</span>
<span class="p">};</span> <span class="p">};</span>
...@@ -451,7 +451,7 @@ itself. Comments should look like this:</p> ...@@ -451,7 +451,7 @@ itself. Comments should look like this:</p>
<h2>Additional Readings<a class="headerlink" href="#additional-readings" title="Permalink to this headline"></a></h2> <h2>Additional Readings<a class="headerlink" href="#additional-readings" title="Permalink to this headline"></a></h2>
<p>Resources, additional reading materials and links:</p> <p>Resources, additional reading materials and links:</p>
<ul class="simple"> <ul class="simple">
<li><a class="reference external" href="http://shop.oreilly.com/product/9780596806767.do">Javascript Patterns</a>, main ressource used.</li> <li><a class="reference external" href="http://shop.oreilly.com/product/9780596806767.do">JavaScript Patterns</a>, main ressource used.</li>
<li><a class="reference external" href="http://www.jslint.com/">JSLint</a>, code quality.</li> <li><a class="reference external" href="http://www.jslint.com/">JSLint</a>, code quality.</li>
<li><a class="reference external" href="http://yuilibrary.com/projects/yuidoc">YUIDoc</a>, generate documentation from code.</li> <li><a class="reference external" href="http://yuilibrary.com/projects/yuidoc">YUIDoc</a>, generate documentation from code.</li>
</ul> </ul>
...@@ -541,7 +541,7 @@ itself. Comments should look like this:</p> ...@@ -541,7 +541,7 @@ itself. Comments should look like this:</p>
<li class="right" > <li class="right" >
<a href="developers.html" title="For developers" <a href="developers.html" title="For developers"
>previous</a> |</li> >previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Revision Storages: Conflicts and Resolution &mdash; JIO 2.0.0 documentation</title> <title>Revision Storages: Conflicts and Resolution &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<link rel="next" title="List of Available Storages" href="available_storages.html" /> <link rel="next" title="List of Available Storages" href="available_storages.html" />
<link rel="prev" title="How to manage documents?" href="manage_documents.html" /> <link rel="prev" title="How to manage documents?" href="manage_documents.html" />
</head> </head>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<li class="right" > <li class="right" >
<a href="manage_documents.html" title="How to manage documents?" <a href="manage_documents.html" title="How to manage documents?"
accesskey="P">previous</a> |</li> accesskey="P">previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<h2>Why Conflicts can Occur<a class="headerlink" href="#why-conflicts-can-occur" title="Permalink to this headline"></a></h2> <h2>Why Conflicts can Occur<a class="headerlink" href="#why-conflicts-can-occur" title="Permalink to this headline"></a></h2>
<p>Using jIO you can store documents in multiple storage locations. With <p>Using jIO you can store documents in multiple storage locations. With
increasing number of users working on a document and some storages not being increasing number of users working on a document and some storages not being
available or responding too slow, conflicts are more likely to occur. JIO available or responding too slow, conflicts are more likely to occur. jIO
defines a conflict as multiple versions of a document existing in a storage defines a conflict as multiple versions of a document existing in a storage
tree and a user trying to save on a version that does not match the latest tree and a user trying to save on a version that does not match the latest
version of the document.</p> version of the document.</p>
...@@ -83,11 +83,11 @@ version on all storages.</p> ...@@ -83,11 +83,11 @@ version on all storages.</p>
<h2>Simple Conflict Example<a class="headerlink" href="#simple-conflict-example" title="Permalink to this headline"></a></h2> <h2>Simple Conflict Example<a class="headerlink" href="#simple-conflict-example" title="Permalink to this headline"></a></h2>
<p>You are keeping a namecard file on your PC updating from your smartphone. Your <p>You are keeping a namecard file on your PC updating from your smartphone. Your
smartphone ran out of battery and is offline when you update your namecard on smartphone ran out of battery and is offline when you update your namecard on
your PC with your new email adress. Someone else change this email from your PC your PC with your new email adress. Someone else changes this email from your PC
and once your smartphone is recharged, you go back online and the previous and once your smartphone is recharged, you go back online and the previous
update is executed.</p> update is executed.</p>
<ol class="arabic simple"> <ol class="arabic simple">
<li>Setting up the storage tree</li> <li>Set up the storage tree</li>
</ol> </ol>
<blockquote> <blockquote>
<div><div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">jio_instance</span> <span class="o">=</span> <span class="nx">jIO</span><span class="p">.</span><span class="nx">newJio</span><span class="p">({</span> <div><div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">jio_instance</span> <span class="o">=</span> <span class="nx">jIO</span><span class="p">.</span><span class="nx">newJio</span><span class="p">({</span>
...@@ -111,7 +111,7 @@ update is executed.</p> ...@@ -111,7 +111,7 @@ update is executed.</p>
</div> </div>
</div></blockquote> </div></blockquote>
<ol class="arabic"> <ol class="arabic">
<li><p class="first">Create your namecard on your smartphone</p> <li><p class="first">Create the namecard on your smartphone</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio_instance</span><span class="p">.</span><span class="nx">post</span><span class="p">({</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio_instance</span><span class="p">.</span><span class="nx">post</span><span class="p">({</span>
<span class="s2">&quot;_id&quot;</span><span class="o">:</span> <span class="s2">&quot;myNameCard&quot;</span><span class="p">,</span> <span class="s2">&quot;_id&quot;</span><span class="o">:</span> <span class="s2">&quot;myNameCard&quot;</span><span class="p">,</span>
<span class="s2">&quot;email&quot;</span><span class="o">:</span> <span class="s2">&quot;me@web.com&quot;</span> <span class="s2">&quot;email&quot;</span><span class="o">:</span> <span class="s2">&quot;me@web.com&quot;</span>
...@@ -134,10 +134,10 @@ update is executed.</p> ...@@ -134,10 +134,10 @@ update is executed.</p>
<span class="p">});</span> <span class="p">});</span>
</pre></div> </pre></div>
</div> </div>
<p>Your smartphone is offline, so you will now have one version (1-578...) on <p>Your smartphone is offline, so now you will have one version (1-578...) on
your smartphone and another version on webDav (2-068...) on your PC.</p> your smartphone and another version on webDav (2-068...) on your PC.</p>
</li> </li>
<li><p class="first">You modify your namecard while being offline</p> <li><p class="first">You modify the namecard while being offline</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio_instance</span><span class="p">.</span><span class="nx">get</span><span class="p">({</span><span class="s2">&quot;_id&quot;</span><span class="o">:</span> <span class="s2">&quot;myNameCard&quot;</span><span class="p">}).</span><span class="nx">then</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio_instance</span><span class="p">.</span><span class="nx">get</span><span class="p">({</span><span class="s2">&quot;_id&quot;</span><span class="o">:</span> <span class="s2">&quot;myNameCard&quot;</span><span class="p">}).</span><span class="nx">then</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// response.id -&gt; &quot;myNameCard&quot;</span> <span class="c1">// response.id -&gt; &quot;myNameCard&quot;</span>
<span class="c1">// response.rev -&gt; &quot;1-5782E71F1E4BF698FA3793D9D5A96393&quot;</span> <span class="c1">// response.rev -&gt; &quot;1-5782E71F1E4BF698FA3793D9D5A96393&quot;</span>
...@@ -155,7 +155,7 @@ your smartphone and another version on webDav (2-068...) on your PC.</p> ...@@ -155,7 +155,7 @@ your smartphone and another version on webDav (2-068...) on your PC.</p>
</pre></div> </pre></div>
</div> </div>
</li> </li>
<li><p class="first">Later, your smartphone is online and you retrieve your namecard.</p> <li><p class="first">Later, your smartphone is online and you retrieve the other version of the namecard.</p>
<div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio_instance</span><span class="p">.</span><span class="nx">get</span><span class="p">({</span><span class="s2">&quot;_id&quot;</span><span class="o">:</span> <span class="s2">&quot;myNameCard&quot;</span><span class="p">}).</span><span class="nx">then</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span> <div class="highlight-javascript"><div class="highlight"><pre><span class="nx">jio_instance</span><span class="p">.</span><span class="nx">get</span><span class="p">({</span><span class="s2">&quot;_id&quot;</span><span class="o">:</span> <span class="s2">&quot;myNameCard&quot;</span><span class="p">}).</span><span class="nx">then</span><span class="p">(</span><span class="kd">function</span> <span class="p">(</span><span class="nx">response</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// response.id -&gt; &quot;myNameCard&quot;</span> <span class="c1">// response.id -&gt; &quot;myNameCard&quot;</span>
<span class="c1">// response.rev -&gt; &quot;2-3753476B70A49EA4D8C9039E7B04254C&quot;</span> <span class="c1">// response.rev -&gt; &quot;2-3753476B70A49EA4D8C9039E7B04254C&quot;</span>
...@@ -192,7 +192,7 @@ specified in the GET call. Deleting either version will solve the conflict.</p> ...@@ -192,7 +192,7 @@ specified in the GET call. Deleting either version will solve the conflict.</p>
</div> </div>
<p>When deleting the conflicting version of your namecard, jIO removes this <p>When deleting the conflicting version of your namecard, jIO removes this
version from all storages and sets the document tree leaf of this version to version from all storages and sets the document tree leaf of this version to
deleted. All storages now contain just a single version of your namecard deleted. All storages now contain just a single version of the namecard
(2-3753...). Note that, on the document tree, removing a revison will (2-3753...). Note that, on the document tree, removing a revison will
create a new revision with status set to <em>deleted</em>.</p> create a new revision with status set to <em>deleted</em>.</p>
</li> </li>
...@@ -259,7 +259,7 @@ create a new revision with status set to <em>deleted</em>.</p> ...@@ -259,7 +259,7 @@ create a new revision with status set to <em>deleted</em>.</p>
<li class="right" > <li class="right" >
<a href="manage_documents.html" title="How to manage documents?" <a href="manage_documents.html" title="How to manage documents?"
>previous</a> |</li> >previous</a> |</li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search &mdash; JIO 2.0.0 documentation</title> <title>Search &mdash; jIO 2.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/searchtools.js"></script> <script type="text/javascript" src="_static/searchtools.js"></script>
<link rel="top" title="JIO 2.0.0 documentation" href="index.html" /> <link rel="top" title="jIO 2.0.0 documentation" href="index.html" />
<script type="text/javascript"> <script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); }); jQuery(function() { Search.loadIndex("searchindex.js"); });
</script> </script>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<li class="right" style="margin-right: 10px"> <li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index" <a href="genindex.html" title="General Index"
accesskey="I">index</a></li> accesskey="I">index</a></li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<li class="right" style="margin-right: 10px"> <li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index" <a href="genindex.html" title="General Index"
>index</a></li> >index</a></li>
<li><a href="index.html">JIO 2.0.0 documentation</a> &raquo;</li> <li><a href="index.html">jIO 2.0.0 documentation</a> &raquo;</li>
</ul> </ul>
</div> </div>
<div class="footer"> <div class="footer">
......
Search.setIndex({objects:{},terms:{represent:12,all:[4,1,2,5,7,10,11,12],code:[9,0,11,12,6],rfc4646:12,workspac:2,chain:7,whatev:4,queri:[0,1,2,4,5,12],global:[4,6],job_typ:12,my_docu:7,although:6,w3cdtf:12,mp3:12,abil:12,follow:[5,7,11,12,6],row:7,categori:12,decid:[10,11,2],typeerror:11,depend:[5,0,9,11,4],system:[5,7,12],xml:12,base64:2,readabl:[1,2,6],attachment_data:11,send:[1,12],articl:12,program:7,under:3,phorward:[],sha256:[5,9,7],"1080p":12,"068e":10,digit:12,sourc:[9,0,12,3,6],everi:[5,10],string:[4,1,2,6,7,11,12],fals:[11,12],rise:12,caveli:[12,8],account:12,unfamiliar:7,util:11,jssha2:9,veri:12,retriev:[5,10,1,7],brows:1,tri:10,and_express:1,contenttyp:4,administr:12,level:[12,6],plural:6,scalabl:7,list:[0,1,2,4,5,7,12],upload:12,"try":[10,1,11],item:1,commonj:7,small:[7,6],getdat:12,refer:[1,11,12],"20th":1,pleas:[1,11],prevent:[5,6],healei:12,cap:6,webdav:10,ten:1,core:[5,9,12],natur:12,convertstringtoregexp:1,"13t13":12,second:[11,12],design:[5,0,11,12],aggreg:12,"13t14":12,download:[5,0,9,11],compat:[5,4,9,2],index:[5,0,1,2,4],what:[0,1,5,6,7,11,12],abc:7,newcap:6,sub:[4,2,6],compar:1,defin:[4,1,2,5,6,10,11,12],sum:6,abl:[5,1,2],"while":10,uniform:12,access:[1,12,7,6],delet:[5,10,7,2],abbrevi:6,version:[0,2,5,7,9,10],"new":[2,5,6,7,10,11,12],calculatearea:6,other_keys_and_valu:1,setattribut:6,method:[0,1,2,5,6,7,11],metadata:[0,2,4,7,11,12],gethour:12,full:[1,12,2,6],deriv:12,newjio:[10,7],gener:[4,1,12,2,6],never:2,privat:6,here:[4,7,2,3],bodi:[7,2],nodej:11,let:11,path:[5,12],along:10,becom:2,modifi:10,sinc:6,valu:[4,1,11,7,12],wait:11,search:[0,1,12],produc:2,samedocumentid:11,include_doc:[4,7,2],slow:10,until:11,dublin:12,queue:[5,11,2],jame:[1,12],amount:1,rdf:12,action:[11,2],implement:[11,2],head:[],via:7,shorthand:6,iana:12,danger:2,auth_typ:2,app:7,entiti:12,prefer:12,ipr:12,thumbnail:7,api:[5,1,11,7],dav_storag:2,job_rul:11,wip:9,instal:11,do_something_funct:6,"28910a4937537b5168e772896b70ec98":10,select:[10,1,11,12],franck:[12,8],from:[10,1,12,6],describ:12,would:1,memori:2,myvideo:7,two:[7,11,12,6],coverag:12,connector:[5,0,1,2,9],complex_queri:[5,9,1,11],handler:[5,0,9,2,4],call:[1,5,6,7,10,11],value2:[4,12],value1:[4,12],recommend:12,taken:12,scope:12,md5:7,type:[4,1,2,6,7,10,11,12],getw3cdat:12,more:[10,7,3,6],sort:1,capit:6,progressioncallback:7,createdescript:2,src:5,notif:7,enhanc:5,warn:6,phone:12,manager_job55787655:12,prototyp:11,known:12,jurisdict:12,content_typ:[7,11],must:[4,1,2,10,11,12],topic:12,none:2,graphic:12,join:1,err:7,restor:5,setup:[10,11],work:[0,2,5,6,10,12],uniqu:4,dev:11,histori:2,"_attach":[7,11],dublin_cor:12,morgan:12,arewrit:11,purpos:6,control:12,want:[5,4,1,11],give:[],process:11,dcmityp:4,share:10,custom1:12,custom2:12,high:7,tag:[12,6],caution:4,tab:6,phrase:12,onlin:[10,6],serial:1,occur:[0,10],unus:6,alwai:[1,6],multipl:[5,10,12,6],eng:12,deliverynot:6,anoth:[10,1,11,2],object_list:1,write:[1,6],how:[0,1,5,7,10,11,12],reject:11,answer:1,iso:12,simpl:[0,1,2,7,10,12],updat:[5,10,7,11,2],npm:11,map:[5,7],product:12,recogn:1,clone:[9,11],after:[5,7,11,12],befor:[1,11,6],catalog:12,offlin:[4,10],mai:12,end:[11,6],underscor:[4,6],data:[4,7,11,12,10],physic:12,bar:4,github:[9,7],essenti:[0,6],practic:12,third:[11,6],read:[5,0,7,9,6],bind:[11,6],secur:[2,6],correspond:12,replicaterevis:10,element:[1,12,6],callback:[0,1,7,12],maintain:[5,1,6],combin:4,thesauru:12,allow:[5,7,6],parti:6,order:[5,10,1,6],oper:[1,12,6],w3c:12,six:5,help:[11,12],softwar:12,"_rev":[10,2],"068e73f5b44fec987b51354dfc772891":10,midnight:12,soon:[1,2],jpeg:[7,12],held:12,london:12,left:10,equip:12,still:2,digest:[7,2],namecard:10,conjunct:12,outer:6,cli:11,fit:6,jio:[0,1,2,3,4,5,7,9,10,11,12],fix:6,html:[5,4,7,12],mystorag:11,main:[5,7,6],might:6,pixel:12,rsvp:[5,9,7],them:[7,12,6],good:[11,6],"return":[4,2,6,7,10,11,12],greater:1,thei:[1,11,12,6],francoi:8,handl:1,initi:[12,6],mention:1,dav:[4,2,10],promis:[0,7],storage_descript:[5,11],front:6,retreiv:1,now:[10,11],discuss:[12,6],introduct:[5,0],choic:12,term:12,grammar:[0,1],name:[0,1,4,6,11,12],anyth:4,edit:4,config:5,revers:6,smartphon:10,authent:2,separ:[5,6],easili:12,exampl:[0,1,2,4,6,7,10,11,12],mode:2,each:[1,7,6],found:[7,3,12],side:[1,12],bond:1,compil:[1,11,7],my_doc_id:7,replac:[0,11,12],continu:6,my_video:[7,12],realli:11,ensur:6,meta:7,"static":1,connect:5,year:[1,2],resourc:[12,6],orient:7,special:5,out:10,variabl:6,"3rd":[],space:6,routin:10,miss:[7,6],ongo:5,rev:[10,2],publish:12,content:[0,7,12,4],xwikistorag:[9,2],code_nam:11,reader:[11,6],hardwar:12,ref:[],ass:6,franc:12,navig:12,selected_job:11,"3753476b70a49ea4d8c9039e7b04254c":10,differ:[4,7,11,12,6],free:[7,12],standard:12,"_getfirst":6,quick:[0,11],reason:[7,11,12,6],base:[5,0,9,11,2],mime:12,york:12,put:[5,6,7,10,11,12],org:[9,12,6],tristan:[12,8],earliest:12,care:2,indent:6,where:[0,1,2,4,7,12],could:1,synchron:[4,10],sven:[12,8],keep:[10,1,11],filter:1,thing:2,length:[7,12],place:[4,12],perman:12,outsid:[0,1,6],ltd:12,pagechang:6,summari:12,confus:6,top:5,getfirst:6,first:[7,11,6],origin:[12,6],dimens:12,rang:12,isbn:12,directli:6,"44z":12,onc:10,arrai:[1,6],qualiti:6,number:[1,2,5,6,10,12],yourself:[9,11],walkthrough:5,alreadi:11,done:[11,6],messag:[7,11],open:[3,6],primari:12,size:12,datetim:[],given:[1,2,12],convent:[0,11,6],script:[5,6],associ:[5,7,12],interact:5,sometim:6,construct:1,citi:12,attack:6,activepag:6,draft:7,too:10,accept:11,time:12,termin:[1,11],scheme:[4,12],"40th":1,tricki:12,store:[0,7,2,10],schema:[0,1,7],adher:6,removeattach:[5,7,11],consol:[1,7],statement:[12,6],nilsson:12,namespac:1,tool:[0,1,2,6,7,11,12],copi:5,specifi:[5,10],part:[5,12,6],pars:1,nomen:6,off:10,ogg:[7,12],grunt:11,than:[1,11,6],wide:7,kind:4,john:1,right_parenthes:1,keyword:12,whenev:[10,11],remot:[5,4],split:[4,6],remov:[5,10,7,11],tree:[0,1,2,4,5,7,10],see:[5,9,7,11,12],charact:[1,6],project:[12,6],ressourc:6,posit:6,video:[0,7,12],unique_identifi:6,accoci:[],browser:[5,2],pre:1,getmillisecond:12,getlast:6,fashion:5,rouen:12,ran:10,well:[5,11,6],xaoe41papniwz:12,modern:12,mind:11,onparseend:1,geograph:12,mikael:12,have:[4,1,2,6,7,9,10,11,12],tabl:[0,12],need:[1,11,12],areread:11,seem:6,onparsecomplexqueri:1,input_str:6,option:[0,1,2,4,5,6,7,10,11,12],recharg:10,bitwis:6,date:[4,12],built:11,equival:12,inform:[5,1,12,3,6],namedfunct:6,new_generated_id:11,lgpl:3,mid:12,note:[10,12,6],also:[1,11,2,7,6],satellit:12,revisionstorag:[9,4],build:[5,9,11,2],indic:[0,1,2,12],are_ignor:1,thoma:12,environ:6,local_storag:2,brace:6,divers:12,singl:[10,6],incoher:11,getsecond:12,begin:[4,6],sure:11,unless:2,exec:1,usernam:[7,2],previou:[10,6],numero:1,most:10,letter:[12,6],why:[0,1,12,10],getmonth:12,tradit:[7,12],sub_storag:[4,2,10],annum:12,doi:12,don:[1,11,6],url:[2,12],doc:[7,2],clear:[0,11,2],later:[10,11],request:[1,2],uri:[4,12],doe:[5,0,1,10,6],salari:12,deni:11,declar:6,wildcard:1,pattern:6,subtag:12,"_id":[10,7,11,2,12],someth:[],commerc:12,usr:7,descirpt:[],show:[1,12,7,6],text:[4,1,11,7,12],syntax:6,row_object:11,creatememorydescript:2,jio_inst:[10,1,11,7],my_attachment_id:7,find:[4,1,2,7,11,12],internet_media_typ:12,involv:12,frequent:1,onli:[1,2,6,9,11,12],exactli:1,locat:[10,12,6],execut:[10,1,11],copyright:[0,3,12],writer:11,apach:7,state:[5,11],should:[12,1,11,7,6],email:10,suppos:6,local:[5,4,7,10],over:12,movingimag:7,uniqueidentifi:6,contribut:12,variou:12,get:[0,5,6,7,9,10,11,12],express:[1,12],compli:[],indexstorag:[9,1,2],repo:9,cannot:11,jscc:1,increas:[10,2],requir:[0,1,2,4,5,6,11],sameparamet:11,replicatestorag:9,isgetmethod:11,enabl:4,organ:[7,12],artist:12,specif:[5,1,2,12],"public":6,rfc:12,provid:[1,2,5,7,11,12],bad:6,integr:6,contain:[4,11,2,12,10],s3storag:[9,2],valid:6,view:9,respond:10,conform:12,set:[1,2,6,7,10,11,12],creator:[1,2,7,12],assumpt:12,displai:[10,12],super_:1,intellectu:12,result:[1,12,7,6],respons:[0,2,7,10,11,12],corrupt:11,close:6,becaus:[10,1,12],best:[7,12,2,6],subject:[2,12],pete:12,awar:2,statu:[10,7,11,12],beautifi:6,extend:7,errorcallback:7,databas:[1,2,7],review:4,wikipedia:12,label:[10,12],written:6,between:[4,6],progress:7,paramet:[7,11,2,6],across:[5,12,6],speed:2,attribut:[4,6],altern:[10,1,6],sorton:1,accord:7,getminut:12,human_read:1,kei:[4,1,11,7,12],numer:12,javascript:[0,5,6,7,11,12],cycl:12,job:[5,0,11,2,12],unabl:7,french:12,extent:12,solv:[0,10],simplequeri:1,boolean_express:1,"0oe":7,come:1,thank:[1,11],both:5,last:[],useless:2,plugin:6,fault:7,howev:2,equal:[1,11,2,6],tempor:12,facet:12,index_year:2,instanc:[5,7,11,2,12],context:[12,6],logic:1,mani:7,articul:12,whole:12,encompass:12,comment:6,putattach:[5,7,11],baker:12,licens:[0,3,12],author:[0,7,12,8],technic:[10,6],can:[0,1,2,3,4,5,6,7,10,11,12],xwiki:[4,12],form:[12,6],period:12,header:6,dcterm:[4,12],mystoragetyp:11,"16z":12,toler:7,dougla:12,respect:[4,12],not_found:7,assign:[12,6],duplic:4,replicaterevisionstorag:[9,4],complexqueri:1,index_title_subject:2,"5782e71f1e4bf698fa3793d9d5a96393":10,three:[5,2,12],empti:1,implicit:6,compon:1,offer:5,json:[0,1,2,4,5,7,12],trigger:[5,1,11],my_imag:7,total_row:7,basic:[0,1,2,5,6,7,12],unambigu:12,silenc:6,"abstract":[5,12],createlocaldescript:2,revison:10,field:[1,2,12],life:12,me_again:10,backend:[4,7],jio_home_pag:12,imag:[4,7,12],resolut:[0,10],convert:[4,1],erp5storag:9,minifi:[9,0],doesn:[1,11],func:6,input:12,specifc:5,present:12,titlecas:6,"case":[4,1,5,6,7,11],replic:[5,4,7,2,10],"3ue":7,interoper:[4,12],look:[7,12,6],"14t14":12,plain:7,servic:12,properti:[1,11,7,12],durat:12,cast:6,invok:5,unifi:7,"typeof":11,abov:[4,2],error:[4,7,11,6],anonym:6,clear_job_rul:11,kingdom:12,attachment_id:11,readi:11,genr:12,samestoragedescript:11,non:6,contributor:12,kwarg:11,my_jio:5,no_cont:11,responsecallback:7,crash:5,revis:[0,2,5,7,9,10],south:12,attach:[5,7,2,12],sever:[4,11,12,6],parent:[2,12],akk:12,"null":4,develop:[0,11,10,6],welcom:0,minim:6,perform:7,suggest:[0,4],make:[4,11,12,10,6],couchdb:[5,7,12],same:[4,11,6],enciph:[],member:12,binari:7,when:[4,1,2,6,10,11],complex:[5,0,1,12,4],akkadian:12,descend:1,requset:7,mydoc:7,document:[0,1,2,4,5,6,7,9,10,11,12],conflict:[0,2,5,6,7,10,11],archiv:12,blue:4,someon:[10,12],solut:7,jslint:6,"_kei":4,jqueri:[9,6],dublincor:12,storagelist:10,user:[10,1,11],pdf:[1,12],kib:12,"_data":7,left_parenthes:1,typic:12,recent:12,jsbeautifi:6,lower:[1,6],appropri:[1,12],kept:2,addjobrulecondit:11,older:2,com:[4,12,2,10],alldoc:[4,1,2,5,7,11,12],itself:[1,6],person:[12,6],promid:11,client:[1,12],command:[7,11,2],sha2:9,thi:[4,1,2,5,6,7,10,11,12],english:12,undefin:[2,6],"_valu":11,latest:10,identifi:[7,12,2,6],delivery_not:6,just:[1,2,7,10,11,12],camel:6,photo:12,gid:4,ordin:12,rest:7,tolowercas:1,distant:1,my_new_m:10,human:1,output_str:6,document_metadata:11,yet:2,languag:[4,1,12],web:[4,12,10],cut:10,sjcl:9,mix:6,pouchdb:7,param:[11,12,6],identif:12,add:[5,0,7,11,2],book:12,blob:[7,11],unparam:6,els:[10,6],save:[10,2,12],adress:10,modul:[5,0,1],match:[4,1,10,6],gave:12,real:12,applic:[4,1,2,6,7,12],which:[4,1,2,5,6,7,11,12],format:[0,1,2,4,6,7,12],webpag:12,spatial:12,amd:[5,9],sha1:9,camelcas:6,five:12,know:11,nexedi:12,world:4,shadow:6,realm:2,you:[4,1,2,5,6,7,9,10,11,12],document_id:11,mioga2:12,application_nam:[7,2],like:[1,5,6,7,10,11,12],success:[7,11],manual:10,resolv:11,manifest:12,oct:[],fork:[5,0,9,11],"boolean":12,necessari:[11,6],either:[10,1,7],night:12,output:12,manag:[0,2,5,7,11,12],yyyi:12,use_utc:12,www:12,right:12,often:[12,2,6],callbakc:12,eahilsantand:12,creation:[11,12],ascend:1,back:[10,1,12],yuidoc:6,havedocumentid:11,batteri:10,intern:12,sampl:[5,4,1,7],act:[1,11],mean:[12,6],billioud:8,erp5:[9,4,12],server:[5,1,12],librari:[0,2,3,5,7,9,11,12],absent:12,guid:12,leaf:10,dictionnari:7,lead:6,"function":[1,5,6,7,10,11,12],mobil:6,avoid:[1,11,2,6],definit:12,restsqlstorag:9,per:[12,6],track:10,retri:11,larg:[1,7],unit:12,statustext:7,condit:[0,11,6],foo:4,getnam:6,myfunct:6,binary_str:11,plu:11,object:[4,1,6,7,11,12],run:[1,11],power:1,getfullyear:12,word:[1,12,6],imposs:11,inspect:6,usag:4,interfac:1,revs_info:2,gidstorag:[9,0,2,4],repositori:11,offset:12,its_attach:7,post:[5,10,7,11,12],"throw":11,comparison:11,about:[7,12,6],zip:9,constraint:4,column:1,materi:6,http:[9,4,7,12],gettimezoneoffset:12,page:[0,1,4,5,6,12],maxlen:6,revolut:12,onparsesimplequeri:1,includ:[1,11,12,6],alert:[7,6],constructor:[11,6],johnston:12,mynamecard:10,fri:[],block:[],toisostr:12,repair:[5,11],own:[0,1,4,7,11,12],delivery_note_list:6,primarili:12,wildcard_charact:1,query_list:1,within:[12,6],encod:[2,12],domain:12,automat:6,dataset:[2,12],value_list:6,getattach:[5,7,11],new_york_city_at_night:12,resili:12,addstorag:11,notat:6,onparsestart:1,chang:[10,1,6],announc:12,storag:[0,1,2,4,5,7,9,10,11,12],your:[0,2,4,5,6,10,11],east:12,accordingli:10,git:9,log:[1,7],wai:[11,2,12],dosomethingfunct:6,aren:[],support:4,lastest:[],openweb:12,stringescaperegexpcharact:1,custom:[4,5,6,7,9,11,12],avail:[0,1,2,4,5,6,7,10,12],start:[5,0,1,11,6],"_blob":11,localstorag:[0,1,2,5,7,9,11],inner:6,lot:6,"var":[1,2,5,6,7,10,11,12],value3:4,xxxx:7,cancel:7,chu:12,deliveri:6,media:12,"4aaqskz":7,getti:12,interest:12,wiki:12,enough:6,batman:6,queryfactori:1,criteria:[5,1],"_getlast":6,davstorag:[5,9,2],createjio:[5,11,2],morganhealei:12,mioga2storag:9,link:[11,6],last_modifi:1,totaljob:12,line:[11,6],"true":[1,2,6,7,10,11,12],framework:12,utc:12,made:[7,12],search_text:1,consist:6,possibl:6,whether:11,maximum:6,tell:[4,1,11],asynchron:5,below:[1,7,12],limit:[1,2,12],hand:7,usemetadataonli:11,grasp:6,highlight:6,problem:[7,6],similar:[1,11],urn:12,expect:6,classif:12,featur:7,creat:[0,1,2,5,7,10,11,12],certain:[1,6],del_not:6,parser:11,deep:11,repres:[4,2],exist:[5,10,7,11],parsestringtoobject:1,file:[10,1,11,12,6],behavior:1,some:[4,1,2,5,6,7,10,11,12],curl:7,addit:[0,6,2,4],check:[5,11,6],splitstorag:[9,2],password:2,successfulli:11,encrypt:2,titl:[4,1,2,7,11,12],creation_d:1,detail:[],event:[12,6],"default":[0,1,2,4,5,11,12],jobseek:12,other:[1,2,6,7,10,12],my_callback:6,varieti:7,test:[11,6],uuid:12,sameopt:11,thousand:1,node:6,draw:12,relat:12,intend:5,determin:12,dosometh:6,liter:6,docum:12,"class":6,samemethod:11,prototypeappl:6,vocabulari:[4,12],sql:7,throughout:6,formal:12,impli:6,sort_on:1,lang:12,leav:10,"_mimetyp":7,home:12,regexp:6,descript:[0,1,2,4,5,7,11,12],rule:[0,11],select_list:1,gitori:9,emerg:12,ignor:1,potenti:6,getobjectorarrai:6,sametitleifstr:11,profil:12,hello:4,togeth:[12,6]},objtypes:{},titles:["Welcome to JIO&#8217;s documentation!","JIO Complex Queries","List of Available Storages","Copyright and license","JIO GIDStorage","Introduction","JavaScript Naming Conventions","How to manage documents?","Authors","Downloads","Revision Storages: Conflicts and Resolution","For developers","Metadata"],objnames:{},filenames:["index","complex_queries","available_storages","license","gid_storage","introduction","naming_conventions","manage_documents","authors","download","revision_storages","developers","metadata"]}) Search.setIndex({objects:{},terms:{represent:12,all:[4,1,2,5,7,10,11,12],code:[9,0,11,12,6],rfc4646:12,workspac:2,chain:7,whatev:4,queri:[0,1,2,4,5,12],grunt:11,global:[4,6],job_typ:12,w3cdtf:12,mp3:12,boolean_express:1,follow:[5,7,11,12,6],other_keys_and_valu:1,categori:12,decid:[10,11,2],nodej:11,depend:[5,0,9,11,4],system:[5,7,12],xml:12,base64:2,readabl:[1,2,6],attachment_data:11,send:[1,12],articl:12,program:7,under:3,larg:[1,7],sha256:[5,9,7],"1080p":12,"068e":10,digit:12,sourc:[9,0,12,3,6],everi:[5,10],string:[4,1,2,6,7,11,12],fals:[11,12],rise:[],caveli:[12,8],account:12,unfamiliar:[],util:11,graphic:12,veri:12,retriev:[5,10,1,7],brows:1,tri:10,and_express:1,contenttyp:4,administr:12,level:[12,6],descend:1,scalabl:7,list:[0,1,2,4,5,7,12],upload:12,"try":[10,1,11],item:1,commonj:7,quick:[0,11],getdat:12,refer:[1,11,12],servic:12,"20th":1,pleas:11,prevent:[5,6],healei:12,cap:6,abil:12,ten:[5,1],binary_str:11,natur:12,dimens:12,convertstringtoregexp:1,"13t13":12,second:[11,12],design:[5,0,11,12],aggreg:12,"13t14":12,download:[5,0,9,11],compat:[5,4,9,2],index:[5,4,1,2],what:[0,1,5,6,7,11,12],abc:7,newcap:6,sub:[4,2,6],compar:1,defin:[4,1,2,5,6,10,11,12],sum:6,abl:[5,1,2],invok:5,uniform:12,access:[1,12,7,6],delet:[5,10,7,2],abbrevi:6,version:[0,2,5,7,9,10],"new":[2,5,6,7,10,11,12],calculatearea:6,row:7,setattribut:6,method:[0,1,2,5,6,7,11],metadata:[0,2,4,7,11,12],gethour:12,full:[1,12,2,6],deriv:12,newjio:[10,7],gener:[4,1,12,2,6],never:2,privat:6,here:[4,7,2,3],bodi:[7,2],lgpl:3,let:11,path:[5,12],along:10,replicaterevisionstorag:[9,4],modifi:10,sinc:6,valu:[4,1,11,7,12],wait:11,dublic:12,search:[0,1,12],samedocumentid:11,include_doc:[4,7,2],across:[5,12,6],dublin:12,queue:[5,11,2],jame:[1,12],amount:1,rdf:12,action:[11,2],implement:[11,2],human_read:1,via:7,shorthand:6,iana:12,danger:2,auth_typ:2,modul:[5,1],offset:12,prefer:12,ipr:12,ask:1,api:[5,1,11,7],dav_storag:2,job_rul:11,wip:9,instal:11,do_something_funct:6,"28910a4937537b5168e772896b70ec98":10,select:[10,1,11,12],franck:[12,8],from:[10,1,12,6],describ:12,would:1,memori:2,myvideo:7,two:[5,7,11,12,6],coverag:12,connector:[5,0,1,2,9],complex_queri:[5,9,1,11],handler:[5,0,9,2,4],call:[1,5,6,7,10,11],value2:[4,12],value1:[4,12],recommend:12,taken:12,scope:12,care:2,type:[4,1,2,6,7,10,11,12],until:11,more:[10,7,3,6],sort:1,capit:6,progressioncallback:7,createdescript:2,comparison:11,relat:12,enhanc:5,warn:6,phone:12,manager_job55787655:12,prototyp:11,known:12,content_typ:[7,11],must:[4,1,2,10,11,12],topic:12,none:2,jssha2:9,join:1,err:7,restor:5,setup:[10,11],work:[0,2,5,6,10,12],uniqu:4,dev:11,histori:2,other:[1,2,6,7,10,12],tag:[12,6],dublin_cor:12,morgan:12,arewrit:11,purpos:6,control:12,tab:6,process:11,dcmityp:4,share:10,custom1:12,indic:[1,2,12],high:7,"_attach":[7,11],caution:4,want:[5,4,1,11],onlin:[10,6],phrase:12,serial:1,made:[7,12],occur:[0,10],contribut:12,alwai:[1,6],end:[11,6],eng:12,deliverynot:6,anoth:[10,1,11,2],object_list:1,write:[1,6],how:[0,1,5,7,10,11,12],reject:11,answer:1,place:[4,12],left_parenthes:1,updat:[5,10,7,11,2],npm:11,map:[5,7],product:12,recogn:1,clone:[9,11],after:[5,7,11,12],befor:[1,11,6],catalog:12,offlin:[4,10],date:[4,12],multipl:[5,10,12,6],underscor:[4,6],data:[4,7,11,12,10],physic:12,github:[9,7],essenti:[0,6],practic:12,third:[11,6],read:[5,0,7,9,6],bind:[11,6],secur:[2,6],correspond:12,replicaterevis:10,element:[1,12,6],inform:[5,1,12,3,6],maintain:[5,1,6],combin:4,thesauru:12,allow:[5,7,6],parti:6,order:[5,10,1,6],oper:[1,12,6],w3c:12,six:[],help:[11,12],repair:[5,11],"_rev":[10,2],"068e73f5b44fec987b51354dfc772891":10,midnight:12,indexstorag:[9,1,2],jpeg:[7,12],held:12,london:12,localstorag:[0,1,2,5,7,9,11],equip:12,still:2,digest:[7,2],paramet:[7,11,2,6],conjunct:12,outer:6,thank:[1,11],fit:6,jio:[0,1,2,3,4,5,7,9,10,11,12],fix:6,complex:[5,0,1,12,4],mystorag:11,main:[5,7,6],might:6,pixel:12,rsvp:[5,9,7],them:[7,12,6],good:[11,6],"return":[4,2,6,7,10,11,12],greater:1,thei:[11,12,6],francoi:8,handl:1,promin:12,auth:2,repositori:11,mention:1,dav:[4,2,10],"_valu":11,storage_descript:[5,11],front:6,isgetmethod:11,now:[10,11],discuss:[12,6],introduct:[5,0],choic:12,term:12,grammar:[0,1],name:[0,1,4,6,11,12],anyth:4,edit:4,simpl:[0,1,2,7,10,12],revers:6,smartphon:10,authent:2,separ:6,easili:12,mode:2,each:[1,7,6],found:[7,3,12],notif:7,side:[1,12],bond:1,compil:[1,11,7],last_modifi:1,replac:[0,11,12],dataset:[2,12],continu:6,my_video:[7,12],realli:11,ensur:6,meta:7,"static":1,connect:5,year:[1,2],resourc:[12,6],orient:7,special:5,out:10,variabl:6,space:6,open:[3,6],rev:[10,2],publish:12,profil:12,xwikistorag:[9,2],code_nam:11,reader:[11,6],hardwar:12,plural:6,ass:6,franc:12,navig:12,selected_job:11,cleartext:2,"3753476b70a49ea4d8c9039e7b04254c":10,given:[1,2,12],free:[7,12],standard:12,"_getfirst":6,small:[7,6],reason:[7,11,12,6],base:[5,0,9,11,2],mime:12,york:12,dictionari:7,latest:10,put:[5,6,7,10,11,12],org:[9,12,6],earliest:12,md5:7,indent:6,s3storag:[9,2],could:1,synchron:[4,10],sven:[12,8],gidstorag:[9,0,2,4],keep:[10,1,11],filter:1,thing:2,length:[7,12],toler:7,iso:12,perman:12,outsid:[0,1,6],ltd:12,view:9,confus:6,imposs:11,getfirst:6,first:[7,11,6],origin:[12,6],softwar:12,rang:12,isbn:12,its_attach:7,directli:6,"44z":12,onc:10,queryfactori:1,qualiti:6,number:[1,2,5,6,10,12],yourself:[9,11],mai:12,alreadi:11,done:[11,6],construct:1,oppos:2,miss:[7,6],primari:12,size:12,differ:[4,7,11,12,6],convent:[0,11,6],script:[5,6],associ:[5,7,12],top:5,creator:[1,2,7,12],sometim:6,messag:[7,11],citi:12,attack:6,activepag:6,draft:7,too:10,accept:11,termin:[1,11],john:1,"40th":1,store:[0,7,2,10],schema:[0,1,7],adher:6,removeattach:[5,7,11],consol:[1,7],option:[0,1,2,4,5,6,7,10,11,12],nilsson:12,namespac:1,tool:[0,1,2,6,7,11,12],copi:5,specifi:[5,10],task:1,part:[5,12,6],pars:1,nomen:6,kept:2,ogg:[7,12],exactli:1,than:[1,11,6],wide:7,kind:4,scheme:[4,12],right_parenthes:1,keyword:12,whenev:[10,11],remot:[5,4],remov:[5,10,7,11],tree:[0,1,2,4,5,7,10],see:[5,9,7,11,12],charact:[1,6],jqueri:[9,6],ressourc:6,posit:6,video:[0,7,12],unique_identifi:6,browser:[5,2],pre:1,getmillisecond:12,fashion:5,rouen:12,ran:10,well:[5,11,6],xaoe41papniwz:12,modern:[],mind:11,onparseend:1,geograph:12,titl:[4,1,2,7,11,12],mikael:12,have:[4,1,2,6,7,9,10,11,12],tabl:12,need:[1,11,12],areread:11,seem:6,onparsecomplexqueri:1,input_str:6,recharg:10,bitwis:6,realm:2,built:11,equival:12,callback:[0,1,7,12],namedfunct:6,new_generated_id:11,mid:12,client:[1,12],note:[10,12,6],mix:6,satellit:12,revisionstorag:[9,4],build:[5,9,11,2],which:[4,1,2,5,6,7,11,12],are_ignor:1,thoma:12,environ:6,local_storag:2,brace:6,divers:12,singl:[10,6],incoher:11,getsecond:12,begin:[4,6],sure:11,unless:2,exec:1,usernam:[7,2],previou:[10,6],numero:1,most:10,letter:[12,6],my_doc_id:7,why:[0,1,12,10],getmonth:12,tradit:[7,12],sub_storag:[4,2,10],annum:12,doi:12,don:[1,11,6],url:[2,12],doc:[7,2],clear:[0,11],later:[10,11],request:[1,2],uri:[4,12],doe:[5,0,1,10,6],salari:12,deni:11,declar:6,wildcard:1,databas:[1,2,7],subtag:12,"_id":[10,7,11,2,12],commerc:12,jurisdict:12,show:[1,12,7,6],text:[4,1,11,7,12],syntax:6,row_object:11,creatememorydescript:2,jio_inst:[10,1,11,7],my_attachment_id:7,find:[4,1,11,2,12],internet_media_typ:12,involv:12,frequent:1,onli:[1,2,6,9,11,12],slow:10,locat:[10,12,6],just:[1,2,7,10,11,12],copyright:[0,3,12],"true":[1,2,6,7,10,11,12],writer:11,apach:7,state:[5,11],should:[12,1,11,7,6],email:10,suppos:6,local:[5,4,7,10],over:12,movingimag:7,uniqueidentifi:6,unus:6,variou:12,get:[0,5,6,7,9,10,11,12],familiar:7,express:[1,12],soon:[1,2],repo:9,cannot:11,jscc:1,increas:[10,2],requir:[0,1,2,4,5,6,11],sameparamet:11,retreiv:1,replicatestorag:9,bar:4,enabl:4,organ:[7,12],artist:12,specif:[5,1,2,12],"public":6,rfc:12,provid:[1,2,5,7,11,12],bad:6,integr:6,contain:[4,11,2,12,10],where:[0,1,2,4,7,12],summari:12,respond:10,conform:12,set:[1,2,6,7,10,11,12],ongo:5,accord:7,displai:[10,12],super_:1,intellectu:12,result:[1,12,7,6],respons:[0,2,7,10,11,12],corrupt:11,close:6,becaus:[10,1,12],best:[7,12,2,6],subject:[2,12],pete:12,awar:2,statu:[10,7,11,12],beautifi:6,parent:[2,12],pattern:6,review:4,creation_d:1,wikipedia:12,label:[10,12],written:6,between:[4,6],progress:7,namecard:10,thumbnail:7,speed:2,attribut:[4,6],altern:[10,1,6],sorton:1,assumpt:12,getminut:12,tristan:[12,8],kei:[4,1,11,7,12],numer:12,javascript:[0,5,6,7,11,12],onparsestart:1,cycl:12,job:[5,0,11,2,12],unabl:7,french:12,extent:12,select_list:1,solv:[0,10],simplequeri:1,"0oe":7,come:1,cli:11,both:5,plugin:6,fault:7,howev:2,equal:[1,11,2,6],tempor:12,facet:12,index_year:2,instanc:[5,7,11,2,12],context:[12,6],logic:1,pdf:[1,12],articul:12,com:[4,12,2,10],comment:6,putattach:[5,7,11],licens:[0,3,12],author:[0,7,12,8],technic:[10,6],can:[0,1,2,3,4,5,6,7,10,11,12],within:[4,12,6],xwiki:[4,12],period:12,header:6,dcterm:[4,12],mystoragetyp:11,"16z":12,pagechang:6,dougla:12,respect:[4,12],not_found:7,assign:[12,6],duplic:4,becom:[],complexqueri:1,index_title_subject:2,"5782e71f1e4bf698fa3793d9d5a96393":10,three:[2,12],empti:1,implicit:6,compon:1,offer:5,json:[0,1,2,4,5,7,12],trigger:[5,1,11],my_imag:7,total_row:7,basic:[0,1,2,5,6,7,12],unambigu:12,silenc:6,"abstract":[5,12],createlocaldescript:2,revison:10,field:[1,2],life:12,me_again:10,backend:[4,7],jio_home_pag:12,thousand:1,resolut:[0,10],convert:[4,1],erp5storag:9,minifi:[9,0],doesn:[1,11],func:6,input:12,specifc:5,present:12,titlecas:6,"case":[4,1,5,6,7,11],replic:[5,4,7,2,10],"3ue":7,interoper:[4,12],look:[5,7,12,6],"14t14":12,plain:7,wiki:12,properti:[1,11,7,12],durat:12,cast:6,"while":10,unifi:7,"typeof":11,abov:[4,2],error:[4,7,11,6],anonym:6,gave:[],clear_job_rul:11,real:12,attachment_id:11,"_blob":11,readi:11,genr:12,samestoragedescript:11,non:6,kwarg:11,my_jio:5,no_cont:11,responsecallback:7,crash:5,revis:[0,2,5,7,9,10],sametitleifstr:11,attach:[5,7,2,12],sever:[4,11,12,6],onparsesimplequeri:1,akk:12,"null":4,develop:[0,11,10,6],welcom:0,minim:6,perform:7,suggest:[0,4],make:[4,11,12,10,6],couchdb:[5,7,12],same:[4,11,6],member:12,binari:7,html:[5,4,7,12],akkadian:12,split:[4,6],south:12,requset:7,mydoc:7,document:[0,1,2,4,5,6,7,9,10,11,12],conflict:[0,2,5,6,7,10,11],archiv:12,blue:4,someon:[10,12],solut:7,jslint:6,"_kei":4,dublincor:12,storagelist:10,initi:[12,6],mani:7,kib:12,"_data":7,typic:12,recent:[],jsbeautifi:6,lower:[1,6],appropri:[1,12],off:10,addjobrulecondit:11,older:2,whole:12,alldoc:[4,1,2,5,7,11,12],itself:[1,6],person:[12,6],promid:11,exampl:[0,1,2,4,5,6,7,10,11,12],command:[7,11,2],sha2:9,thi:[4,1,2,5,6,7,10,11,12],english:12,entiti:12,promis:[0,7],left:10,identifi:[7,12,2,6],execut:[10,1,11],camel:6,photo:12,ordin:12,rest:7,tolowercas:1,distant:1,my_new_m:10,human:1,world:4,config:5,document_metadata:11,yet:2,languag:[4,1,12],web:[4,12,10],cut:10,sjcl:9,also:[7,11,2,6],pouchdb:7,jobseek:12,param:[11,12,6],identif:12,add:[5,0,7,11,2],book:12,inner:6,blob:[7,11],unparam:6,els:[10,6],tell:[4,11],save:[10,2,12],adress:10,app:7,match:[4,1,10,6],useless:[],kingdom:12,applic:[4,1,2,6,7,12],format:[0,1,2,4,6,7,12],webpag:12,varieti:7,amd:[5,9],sha1:9,camelcas:6,five:12,know:11,nexedi:12,output_str:6,shadow:6,password:2,you:[4,1,2,5,6,7,9,10,11,12],document_id:11,mioga2:12,application_nam:[7,2],like:[1,5,6,7,10,11,12],success:[7,11],manual:10,resolv:11,manifest:12,"boolean":12,necessari:[11,6],either:[10,1,7],night:12,output:12,"function":[1,5,6,7,10,11,12],manag:[0,2,5,7,11,12],yyyi:12,use_utc:12,www:12,right:12,often:[12,2,6],typeerror:11,callbakc:12,del_not:6,arrai:[1,6],interact:5,ascend:1,back:[10,1,12],yuidoc:6,havedocumentid:11,batteri:10,intern:12,sampl:[4,1],act:[1,11],mobil:6,billioud:8,erp5:[9,4,12],server:[5,1,12],librari:[0,2,3,5,7,9,11,12],absent:12,guid:12,leaf:10,dictionnari:[],lead:6,deliveri:6,getobjectorarrai:6,avoid:[1,11,2,6],definit:12,restsqlstorag:9,per:[1,12,6],track:10,retri:11,leav:10,unit:12,statustext:7,condit:[0,11,6],foo:4,getnam:6,myfunct:6,core:[5,0,9,12],plu:11,object:[4,1,6,7,11,12],run:[1,11],power:1,word:[1,12,6],inspect:6,usag:4,curl:7,revs_info:2,my_callback:6,although:6,parsestringtoobject:1,regexp:6,post:[5,10,7,11,12],"throw":11,src:5,about:[7,12,6],zip:9,constraint:4,column:1,materi:6,http:[9,4,7,12],gettimezoneoffset:12,page:[0,1,4,5,6,12],maxlen:6,revolut:12,statement:[12,6],includ:[1,11,12,6],alert:[7,6],constructor:[11,6],johnston:12,mynamecard:10,produc:2,toisostr:12,routin:10,own:[0,1,4,7,11,12],delivery_note_list:6,chu:12,primarili:12,wildcard_charact:1,query_list:1,getfullyear:12,encod:[2,12],domain:12,automat:6,compos:5,value_list:6,getattach:[5,7,11],new_york_city_at_night:12,resili:12,addstorag:11,notat:6,contributor:12,chang:[10,1,6],announc:12,storag:[0,1,2,4,5,7,9,10,11,12],your:[0,2,4,5,6,10,11],webdav:10,east:12,accordingli:10,git:9,log:[1,7],wai:[11,2,12],dosomethingfunct:6,support:4,openweb:12,stringescaperegexpcharact:1,custom:[4,5,6,7,9,11,12],avail:[0,1,2,4,5,6,7,10,12],start:[5,0,1,11,6],gid:4,interfac:1,errorcallback:7,lot:6,"var":[1,2,5,6,7,10,11,12],value3:4,xxxx:7,eahilsantand:12,cancel:7,usr:7,fork:[5,0,9,11],project:[12,6],"4aaqskz":7,creation:[11,12],getti:12,interest:12,form:[12,6],enough:6,batman:6,criteria:[5,1],"_getlast":6,davstorag:[5,9,2],createjio:[5,11,2],content:[0,7,12,4],morganhealei:12,mioga2storag:9,link:[11,6],totaljob:12,line:[11,6],walkthrough:5,framework:12,extend:7,utc:12,getlast:6,search_text:1,consist:6,possibl:6,whether:11,maximum:6,getw3cdat:12,asynchron:5,below:[1,7,12],limit:[1,2,12],hand:7,usemetadataonli:11,grasp:6,highlight:6,problem:[7,6],similar:11,urn:12,expect:6,classif:12,featur:7,creat:[0,1,2,5,7,10,11,12],certain:[1,6],dure:12,parser:11,deep:11,repres:[4,2],exist:[5,10,7,11],file:[10,1,11,12,6],behavior:1,some:[4,1,2,5,6,7,10,11,12],encompass:12,addit:[0,6,2,4],check:[5,11,6],splitstorag:[9,2],successfulli:11,encrypt:2,my_docu:7,user:[10,1,11],when:[4,1,2,6,10,11],gitori:9,event:[12,6],"default":[0,1,2,4,5,11,12],undefin:[2,6],valid:6,custom2:12,spatial:12,test:[11,6],uuid:12,sameopt:11,imag:[4,7,12],node:6,draw:12,media:12,intend:5,determin:12,dosometh:6,liter:6,docum:12,"class":6,samemethod:11,prototypeappl:6,vocabulari:[4,12],sql:7,throughout:6,formal:12,impli:6,sort_on:1,lang:12,requirej:5,"_mimetyp":7,home:12,baker:12,descript:[0,1,2,4,5,7,11,12],rule:[0,11],tricki:12,delivery_not:6,emerg:12,ignor:1,potenti:6,time:12,mean:[12,6],hello:4,togeth:[12,6]},objtypes:{},titles:["Welcome to jIO&#8217;s documentation!","jIO Complex Queries","List of Available Storages","Copyright and license","jIO GIDStorage","Introduction","JavaScript Naming Conventions","How to manage documents?","Authors","Downloads","Revision Storages: Conflicts and Resolution","For developers","Metadata"],objnames:{},filenames:["index","complex_queries","available_storages","license","gid_storage","introduction","naming_conventions","manage_documents","authors","download","revision_storages","developers","metadata"]})
\ No newline at end of file \ No newline at end of file
.. role:: js(code) .. role:: js(code)
:language: javascript :language: javascript
.. _list-of-available-storages: .. _list-of-available-storages:
List of Available Storages List of Available Storages
...@@ -15,10 +13,10 @@ store passwords. ...@@ -15,10 +13,10 @@ store passwords.
The best way to create a storage description is to use the (often) provided The best way to create a storage description is to use the (often) provided
tool given by the storage library. The returned description is secured to avoid tool given by the storage library. The returned description is secured to avoid
clear readable password. (encrypted password for instance) cleartext, readable passwords (as opposed to encrypted passwords for instance).
When building storage trees, there is no limit on the number of storages you When building storage trees, there is no limit on the number of storages you
can use. The only thing you have to be aware of is compatability of simple and can use. The only thing you have to be aware of is compatibility of simple and
revision based storages. revision based storages.
...@@ -28,12 +26,11 @@ Connectors ...@@ -28,12 +26,11 @@ Connectors
LocalStorage LocalStorage
^^^^^^^^^^^^ ^^^^^^^^^^^^
Three methods are provided: Three methods are provided:
* :js:`createDescription(username, [application_name], [mode="localStorage"])` * :js:`createDescription(username, [application_name], [mode="localStorage"])`
* :js:`createLocalDescription(username, [application_name])` * :js:`createLocalDescription(username, [application_name])`
* :js:`createMemoryDescription(username, [application_name])` * :js:`createMemoryDescription(username, [application_name])`
All parameters are strings. All parameters are strings.
...@@ -51,8 +48,10 @@ Examples: ...@@ -51,8 +48,10 @@ Examples:
DavStorage DavStorage
^^^^^^^^^^ ^^^^^^^^^^
The tool dav_storage.createDescription generates a dav storage description for The method ``dav_storage.createDescription()`` generates a DAV storage description for
*no*, *basic* or *digest* authentication (*digest* is not implemented yet). *none*, *basic* or *digest* authentication.
NB: digest **is not implemented yet**.
.. code-block:: javascript .. code-block:: javascript
...@@ -60,16 +59,19 @@ The tool dav_storage.createDescription generates a dav storage description for ...@@ -60,16 +59,19 @@ The tool dav_storage.createDescription generates a dav storage description for
All parameters are strings. All parameters are strings.
.. XXX simplify here ============= ========================
parameter required?
Only ``url`` and ``auth_type`` are required. If ``auth_type`` is equal to "none", ============= ========================
then ``realm``, ``username`` and ``password`` are useless. ``username`` and ``password`` become ``url`` yes
required if ``auth_type`` is equal to "basic". And ``realm`` also becomes required if ``auth_type`` yes
``auth_type`` is equal to "digest". ``realm`` if auth_type == 'digest'
``username`` if auth_type != 'none'
``password`` if auth-type != 'none'
============= ========================
digest **is not implemented yet** If ``auth_type`` is "none", then ``realm``, ``username`` and ``password`` are never used.
**Be careful**: The generated description never contains readable password, but **Be careful**: The generated description never contains a readable password, but
for basic authentication, the password will just be base64 encoded. for basic authentication, the password will just be base64 encoded.
S3Storage S3Storage
...@@ -89,7 +91,7 @@ IndexStorage ...@@ -89,7 +91,7 @@ IndexStorage
^^^^^^^^^^^^ ^^^^^^^^^^^^
This handler indexes documents metadata into a database (which is a simple This handler indexes documents metadata into a database (which is a simple
document) to increase the speed of allDocs requests. However, it is not able to document) to increase the speed of ``allDocs()`` requests. However, it is not able to
manage the ``include_docs`` option. manage the ``include_docs`` option.
The sub storages have to manage ``query`` and ``include_docs`` options. The sub storages have to manage ``query`` and ``include_docs`` options.
...@@ -145,7 +147,7 @@ A revision based handler is a storage which is able to do some document ...@@ -145,7 +147,7 @@ A revision based handler is a storage which is able to do some document
versioning using simple storages listed above. versioning using simple storages listed above.
On jIO command parameter, ``_id`` is still used to identify a document, but On jIO command parameter, ``_id`` is still used to identify a document, but
another id ``_rev`` must be defined to use a specific revision of this document. another id ``_rev`` must be defined to use a specific revision of that document.
On command responses, you will find another field ``rev`` which will represent the On command responses, you will find another field ``rev`` which will represent the
new revision produced by your action. All the document history is kept unless new revision produced by your action. All the document history is kept unless
......
...@@ -4,10 +4,10 @@ jIO Complex Queries ...@@ -4,10 +4,10 @@ jIO Complex Queries
What are Complex Queries? What are Complex Queries?
------------------------- -------------------------
In jIO, a complex query can tell a storage server to select, filter, sort, or In jIO, a complex query can ask a storage server to select, filter, sort, or
limit a document list before sending it back. If the server is not able to do limit a document list before sending it back. If the server is not able to do
so, the complex query tool can act on the retreived list by itself. Only the so, the complex query tool can act on the retreived list by itself. Only the
allDocs method can use complex queries. ``allDocs()`` method can use complex queries.
A query can either be a string (using a specific language useful for writing A query can either be a string (using a specific language useful for writing
queries), or it can be a tree of objects (useful to browse queries). To handle queries), or it can be a tree of objects (useful to browse queries). To handle
...@@ -16,12 +16,12 @@ complex queries, jIO uses a parsed grammar file which is compiled using `JSCC <h ...@@ -16,12 +16,12 @@ complex queries, jIO uses a parsed grammar file which is compiled using `JSCC <h
Why use Complex Queries? Why use Complex Queries?
------------------------ ------------------------
Complex queries can be used similar to database queries. So they are useful to: Complex queries can be used like database queries, for tasks such as:
* search a specific document * search a specific document
* sort a list of documents in a certain order * sort a list of documents in a certain order
* avoid retrieving a list of ten thousand documents * avoid retrieving a list of ten thousand documents
* limit the list to show only xy documents by page * limit the list to show only N documents per page
For some storages (like localStorage), complex queries can be a powerful tool For some storages (like localStorage), complex queries can be a powerful tool
to query accessible documents. When querying documents on a distant storage, to query accessible documents. When querying documents on a distant storage,
...@@ -34,7 +34,9 @@ itself. ...@@ -34,7 +34,9 @@ itself.
How to use Complex Queries with jIO? How to use Complex Queries with jIO?
------------------------------------ ------------------------------------
Complex queries can be triggered by including the option named query in the allDocs method call. An example would be: Complex queries can be triggered by including the option named query in the ``allDocs()`` method call.
Example:
.. code-block:: javascript .. code-block:: javascript
...@@ -74,11 +76,11 @@ Complex queries can be triggered by including the option named query in the allD ...@@ -74,11 +76,11 @@ Complex queries can be triggered by including the option named query in the allD
How to use Complex Queries outside jIO? How to use Complex Queries outside jIO?
--------------------------------------- ---------------------------------------
.. XXX 404 on complex_example.html .. XXX 404 page missing on complex_example.html
Complex Queries provides an API - which namespace is complex_queries. Please Complex Queries provides an API - which namespace is complex_queries.
also refer to the `Complex Queries sample page <http://git.erp5.org/gitweb/jio.git/blob/HEAD:/examples/complex_example.html?js=1>`_ Refer to the `Complex Queries sample page <http://git.erp5.org/gitweb/jio.git/blob/HEAD:/examples/complex_example.html?js=1>`_
on how to use these methods in- and outside jIO. The module provides: for how to use these methods, in and outside jIO. The module provides:
.. code-block:: javascript .. code-block:: javascript
...@@ -168,7 +170,7 @@ Default search types should be defined in the application's user interface ...@@ -168,7 +170,7 @@ Default search types should be defined in the application's user interface
components because criteria like filters will be changed frequently by the components because criteria like filters will be changed frequently by the
component (change ``limit: [0, 10]`` to ``limit: [10, 10]`` or ``sort_on: [['title', component (change ``limit: [0, 10]`` to ``limit: [10, 10]`` or ``sort_on: [['title',
'ascending']]`` to ``sort_on: [['creator', 'ascending']]``) and each component must 'ascending']]`` to ``sort_on: [['creator', 'ascending']]``) and each component must
have their own default properties to keep their own behavior. have its own default properties to keep their own behavior.
Convert Complex Queries into another type Convert Complex Queries into another type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......
...@@ -4,21 +4,26 @@ ...@@ -4,21 +4,26 @@
Downloads Downloads
========= =========
Core: Core
^^^^
* `[sha256.amd.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js>`_ * `sha256.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js>`_
* `[rsvp-custom.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/rsvp/rsvp-custom.js>`_, AMD only version [`rsvp-custom.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/rsvp/rsvp-custom.amd.js>`_] * `rsvp-custom.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/rsvp/rsvp-custom.js>`_, AMD only version: `rsvp-custom.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/rsvp/rsvp-custom.amd.js>`_
* jIO, `[jio.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/jio.js>`_ * `jio.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/jio.js>`_
* complex_queries, `[complex_queries.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/complex_queries.js>`_ * `complex_queries.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/complex_queries.js>`_
Storage dependencies: Storage dependencies
^^^^^^^^^^^^^^^^^^^^
* `jQuery <http://jquery.com/>`_, `[jquery.js] <http://code.jquery.com/jquery.js>`_ .. XXX this is a little confusing. Also, the link to sha1.js is broken (404)
* `sjcl <https://crypto.stanford.edu/sjcl/>`_, `[sjcl.zip] <https://crypto.stanford.edu/sjcl/sjcl.zip>`_
* `sha1 <http://pajhome.org.uk/crypt/md5/sha1.html>`_, `[sha1.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/jsSha1/sha1.js>`_, AMD compatible version [`sha1.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha1.amd.js>`_]
* `sha2, sha256 <http://anmar.eu.org/projects/jssha2/>`_, `[jssha2.zip] <http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip>`_, AMD compatible versions `[sha2.amd.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha2.amd.js>`_ `[sha256.amd.js] <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js>`_
Storage connectors: * `jquery.js <http://code.jquery.com/jquery.js>`_
* `sjcl <https://crypto.stanford.edu/sjcl/>`_, [`sjcl.zip <https://crypto.stanford.edu/sjcl/sjcl.zip>`_]
* `sha1 <http://pajhome.org.uk/crypt/md5/sha1.html>`_, [`sha1.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/lib/jsSha1/sha1.js>`_], AMD compatible version: `sha1.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha1.amd.js>`_
* `sha2, sha256 <http://anmar.eu.org/projects/jssha2/>`_, `jssha2.zip <http://anmar.eu.org/projects/jssha2/files/jssha2-0.3.zip>`_, AMD compatible versions: `sha2.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha2.amd.js>`_, `sha256.amd.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/sha256.amd.js>`_
Storage connectors
^^^^^^^^^^^^^^^^^^
* `localstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/localstorage.js>`_ * `localstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/localstorage.js>`_
* `davstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/davstorage.js>`_ * `davstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/davstorage.js>`_
...@@ -28,27 +33,29 @@ Storage connectors: ...@@ -28,27 +33,29 @@ Storage connectors:
* restsqlstorage.js (depends on jQuery) (WIP) * restsqlstorage.js (depends on jQuery) (WIP)
* mioga2storage.js (depends on jQuery) (WIP) * mioga2storage.js (depends on jQuery) (WIP)
Storage handlers: Storage handlers
^^^^^^^^^^^^^^^^
* `indexstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/indexstorage.js>`_ (WIP) * `indexstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/indexstorage.js>`_ (WIP)
* `gidstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/gidstorage.js>`_ (WIP) * `gidstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/gidstorage.js>`_ (WIP)
* `splitstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/splitstorage.js>`_ (WIP) * `splitstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/splitstorage.js>`_ (WIP)
* replicatestorage.js (WIP) * replicatestorage.js (WIP)
Revision based storage handlers: Revision based storage handlers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* `revisionstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/revisionstorage.js>`_ (depends on sha256) (WIP) * `revisionstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/revisionstorage.js>`_ (depends on sha256) (WIP)
* `replicaterevisionstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/replicatestorage.js>`_ (WIP) * `replicaterevisionstorage.js <http://git.erp5.org/gitweb/jio.git/blob_plain/refs/heads/master:/src/jio.storage/replicatestorage.js>`_ (WIP)
Minified version Minified version
---------------- ^^^^^^^^^^^^^^^^
.. XXX this sounds harsh. Can we provide it or at least be more explicit? .. XXX this sounds harsh. Can we provide it or at least be more explicit?
To get the minified version of the jIO library, you have to build it yourself. See documentation. To get the minified version of the jIO library, you have to build it yourself. See documentation.
Fork Fork
---- ^^^^
jIO source code jIO source code
......
...@@ -7,7 +7,7 @@ jIO GIDStorage ...@@ -7,7 +7,7 @@ jIO GIDStorage
A storage to enable interoperability between all kind of storages. A storage to enable interoperability between all kind of storages.
A global ID (GID) is a document id which represents a unique document. This ID A global ID (GID) is a document id which represents a unique document. This ID
will be used to find this unique document on all kind of backends. is then used to find this unique document on all types of backends.
This storage uses sub storage allDocs and complex queries to find unique documents, and converts their ids to gids. This storage uses sub storage allDocs and complex queries to find unique documents, and converts their ids to gids.
...@@ -43,7 +43,7 @@ Example: ...@@ -43,7 +43,7 @@ Example:
} }
This description tells the *GIDStorage* to use 2 metadata (``type``, ``title``) to define a This description tells the *GIDStorage* to use 2 metadata attributes (``type``, ``title``) to define a
document as unique in the default case. If the document is of type ``Text``, then document as unique in the default case. If the document is of type ``Text``, then
the handler will use 3 metadata (``type``, ``title``, ``language``). the handler will use 3 metadata (``type``, ``title``, ``language``).
If these constraints are not respected, then the storage returns an error telling us to If these constraints are not respected, then the storage returns an error telling us to
...@@ -72,6 +72,7 @@ constraints: ...@@ -72,6 +72,7 @@ constraints:
Available metadata types are: Available metadata types are:
* ``"json"`` - The json value of the metadata. * ``"json"`` - The json value of the metadata.
* ``"string"`` - The value as string if it is not a list. * ``"string"`` - The value as string if it is not a list.
* ``"list"`` - The value as list. * ``"list"`` - The value as list.
...@@ -86,9 +87,9 @@ Available metadata types are: ...@@ -86,9 +87,9 @@ Available metadata types are:
Document Requirements Document Requirements
--------------------- ---------------------
A metadata value must be a string. This string can be placed in an object which A metadata value must be a string. This string can be placed in an attribute within
key is 'content'. The object can contains custom keys with string values. A a ``"content"`` key. The object can contains custom keys with string values. A
metadata can contain several values. Example: metadata object can contain several values. Example:
.. code-block:: javascript .. code-block:: javascript
...@@ -109,7 +110,7 @@ metadata can contain several values. Example: ...@@ -109,7 +110,7 @@ metadata can contain several values. Example:
} }
Metadata which name begin with an underscore can contain anything. Metadata attributes which names begin with an underscore can contain anything.
.. code-block:: javascript .. code-block:: javascript
...@@ -121,7 +122,8 @@ Storage Requirements ...@@ -121,7 +122,8 @@ Storage Requirements
-------------------- --------------------
* This storage is not compatible with *RevisionStorage* and *ReplicateRevisionStorage*. * This storage is not compatible with *RevisionStorage* and *ReplicateRevisionStorage*.
* Sub storage have to support complex queries options and ``include_docs`` option. * Sub storages have to support options for ``complex queries`` and ``include_docs``.
Dependencies Dependencies
------------ ------------
...@@ -131,7 +133,7 @@ No dependency. ...@@ -131,7 +133,7 @@ No dependency.
Suggested storage tree Suggested storage tree
---------------------- ----------------------
Replication Between Storage:: Replication between storages::
Replicate Storage Replicate Storage
+-- GID Storage +-- GID Storage
...@@ -143,7 +145,7 @@ Replication Between Storage:: ...@@ -143,7 +145,7 @@ Replication Between Storage::
**CAUTION: All gid storage must have the same description!** **CAUTION: All gid storage must have the same description!**
Offline Application Usage:: Offline application usage::
Replicate Storage Replicate Storage
+-- Index Storage with DB in Local Storage +-- Index Storage with DB in Local Storage
......
...@@ -17,17 +17,15 @@ retrieve documents and specific information across storage trees. ...@@ -17,17 +17,15 @@ retrieve documents and specific information across storage trees.
How does it work? How does it work?
----------------- -----------------
.. XXX three parts? jIO is composed of two parts - jIO core and storage library(ies). The core
jIO is separated into three parts - jIO core and storage library(ies). The core
is using storage libraries (connectors) to interact with the associated remote is using storage libraries (connectors) to interact with the associated remote
storage servers. Some queries can be used on top of the jIO allDocs method to storage servers. Some queries can be used on top of the jIO ``allDocs()`` method to
query documents based on defined criteria. query documents based on defined criteria.
jIO uses a job management system, so every method called adds a job into a jIO uses a job management system, so every method call adds a job into a
queue. The queue is copied in the browser's local storage (by default), so it queue. The queue is copied in the browser's local storage (by default), so it
can be restored in case of a browser crash. Jobs are being invoked can be restored in case of browser crash. Jobs are invoked
asynchronously with ongoing jobs not being able to re-trigger to prevent asynchronously and ongoing jobs are not able to re-trigger to prevent
conflicts. conflicts.
Getting started Getting started
...@@ -36,7 +34,7 @@ Getting started ...@@ -36,7 +34,7 @@ Getting started
This walkthrough is designed to get you started using a basic jIO instance. This walkthrough is designed to get you started using a basic jIO instance.
#. Download jIO core, the storages you want to use as well as the #. Download jIO core, the storages you want to use as well as the
complex-queries scripts as well as the dependencies required for the storages complex-queries scripts and the dependencies required for the storages
you intend to use. :ref:`[Download & Fork] <download-fork>` you intend to use. :ref:`[Download & Fork] <download-fork>`
#. Add the scripts to your HTML page in the following order: #. Add the scripts to your HTML page in the following order:
...@@ -56,7 +54,7 @@ This walkthrough is designed to get you started using a basic jIO instance. ...@@ -56,7 +54,7 @@ This walkthrough is designed to get you started using a basic jIO instance.
<script ...> <script ...>
With require js, the main.js will be like this: With `RequireJS <http://requirejs.org/>`_, the main.js will look like:
.. code-block:: javascript .. code-block:: javascript
:linenos: :linenos:
...@@ -77,7 +75,7 @@ This walkthrough is designed to get you started using a basic jIO instance. ...@@ -77,7 +75,7 @@ This walkthrough is designed to get you started using a basic jIO instance.
}); });
#. jIO connects to a number of storages and allows to add handlers (or #. jIO connects to a number of storages and allows adding handlers (or
functions) to specifc storages. functions) to specifc storages.
You can use both handlers and available storages to build a storage You can use both handlers and available storages to build a storage
tree across which all documents will be maintained and managed by jIO. tree across which all documents will be maintained and managed by jIO.
...@@ -89,23 +87,21 @@ This walkthrough is designed to get you started using a basic jIO instance. ...@@ -89,23 +87,21 @@ This walkthrough is designed to get you started using a basic jIO instance.
// create your jio instance // create your jio instance
var my_jio = jIO.createJIO(storage_description); var my_jio = jIO.createJIO(storage_description);
.. XXX 6 methods or 10? #. The jIO API provides ten main methods to manage documents across the storage(s) specified in your jIO storage tree.
#. The jIO API provides six main methods to manage documents across the storage(s) specified in your jIO storage tree. ====================== ===================================================== ========================================
Method Example call Description
================== ===================================================== ======================================== ====================== ===================================================== ========================================
Method Sample Call Description ``post()`` :js:`my_jio.post(document, [options]);` Creates a new document
================== ===================================================== ======================================== ``put()`` :js:`my_jio.put(document, [options]);` Creates/Updates a document
`post` :js:`my_jio.post(document, [options]);` Creates a new document ``putAttachment()`` :js:`my_jio.putAttachement(attachment, [options]);` Updates/Adds an attachment to a document
`put` :js:`my_jio.put(document, [options]);` Creates/Updates a document ``get()`` :js:`my_jio.get(document, [options]);` Reads a document
`putAttachment` :js:`my_jio.putAttachement(attachment, [options]);` Updates/Adds an attachment to a document ``getAttachment()`` :js:`my_jio.getAttachment(attachment, [options]);` Reads a document attachment
`get` :js:`my_jio.get(document, [options]);` Reads a document ``remove()`` :js:`my_jio.remove(document, [options]);` Deletes a document and its attachments
`getAttachment` :js:`my_jio.getAttachment(attachment, [options]);` Reads a document attachment ``removeAttachment()`` :js:`my_jio.removeAttachment(attachment, [options]);` Deletes a document attachment
`remove` :js:`my_jio.remove(document, [options]);` Deletes a document and its attachments ``allDocs()`` :js:`my_jio.allDocs([options]);` Retrieves a list of existing documents
`removeAttachment` :js:`my_jio.removeAttachment(attachment, [options]);` Deletes a document attachment ``check()`` :js:`my_jio.check(document, [options]);` Check the document state
`allDocs` :js:`my_jio.allDocs([options]);` Retrieves a list of existing documents ``repair()`` :js:`my_jio.repair(document, [options]);` Repair the document
`check` :js:`my_jio.check(document, [options]);` Check the document state ====================== ===================================================== ========================================
`repair` :js:`my_jio.repair(document, [options]);` Repair the document
================== ===================================================== ========================================
How to manage documents? How to manage documents?
======================== ========================
jIO is mapped after the CouchDB API and extends them to provide unified, scalable jIO is mapped after the CouchDB APIs and extends them to provide unified, scalable
and high performance access via Javascript to a wide variety of different and high performance access via JavaScript to a wide variety of different
storage backends. storage backends.
If you are unfamiliar with `Apache CouchDB <http://couchdb.apache.org/>`_: If you are not familiar with `Apache CouchDB <http://couchdb.apache.org/>`_:
it is a scalable, fault-tolerant, and schema-free document-oriented database. it is a scalable, fault-tolerant, and schema-free document-oriented database.
It is used in large and small organizations for a variety of applications where It is used in large and small organizations for a variety of applications where
traditional SQL databases are not the best solution for the problem at hand. traditional SQL databases are not the best solution for the problem at hand.
...@@ -20,7 +20,7 @@ A document is an association of metadata and attachment(s). The metadata is the ...@@ -20,7 +20,7 @@ A document is an association of metadata and attachment(s). The metadata is the
set of properties of the document and the attachments are the binaries of the content set of properties of the document and the attachments are the binaries of the content
of the document. of the document.
In jIO, metadata is just a dictionnary with keys and values (JSON object), and In jIO, metadata is just a dictionary with keys and values (JSON object), and
attachments are just simple strings. attachments are just simple strings.
.. code-block:: javascript .. code-block:: javascript
...@@ -59,7 +59,7 @@ You can also retrieve document attachment metadata in this object. ...@@ -59,7 +59,7 @@ You can also retrieve document attachment metadata in this object.
Basic Methods Basic Methods
------------- -------------
Below you can find sample calls of the main jIO methods. All examples are using Below you can see examples of the main jIO methods. All examples are using
revisions (as in revision storage or replicate revision storage), so you can revisions (as in revision storage or replicate revision storage), so you can
see how method calls should be made with either of these storages. see how method calls should be made with either of these storages.
...@@ -103,34 +103,34 @@ see how method calls should be made with either of these storages. ...@@ -103,34 +103,34 @@ see how method calls should be made with either of these storages.
// delete a document and its attachment(s) // delete a document and its attachment(s)
jio_instance.remove({"_id": "my_document"}). jio_instance.remove({"_id": "my_document"}).
then(function (response) { then(function (response) {
// console.log(response): // console.log(response);
}); });
// delete an attachment // delete an attachment
jio_instance.removeAttachment({"_id": "my_document", "_attachment": "its_attachment"}). jio_instance.removeAttachment({"_id": "my_document", "_attachment": "its_attachment"}).
then(function (response) { then(function (response) {
// console.log(response): // console.log(response);
}); });
// get all documents // get all documents
jio_instance.allDocs().then(function (response) { jio_instance.allDocs().then(function (response) {
// console.log(response): // console.log(response);
}); });
Promises Promises
-------- --------
Each jIO methods returns a Promise object, which allows us to get responses into Each jIO method returns a Promise object, which allows us to get responses into
callback parameters and to chain callbacks with other returned values. callback parameters and to chain callbacks with other returned values.
jIO uses a custom version of `RSVP.js <https://github.com/tildeio/rsvp.js>`_, adding canceler and progression features. jIO uses a custom version of `RSVP.js <https://github.com/tildeio/rsvp.js>`_, adding canceler and progression features.
You can read more about promises: You can read more about promises:
* `github RSVP.js <https://github.com/tildeio/rsvp.js#rsvpjs-->`_ * `RSVP.js <https://github.com/tildeio/rsvp.js#rsvpjs-->`_ on GitHub
* `Promises/A+ <http://promisesaplus.com/>`_ * `Promises/A+ <http://promisesaplus.com/>`_
* `CommonJS Promises <http://wiki.commonjs.org/wiki/Promises>`_ * `CommonJS Promises <http://wiki.commonjs.org/wiki/Promises>`_
Method Options and Callback Responses Method Options and Callback Responses
...@@ -144,103 +144,103 @@ To retrieve jIO responses, you have to provide callbacks like this: ...@@ -144,103 +144,103 @@ To retrieve jIO responses, you have to provide callbacks like this:
then([responseCallback], [errorCallback], [progressionCallback]); then([responseCallback], [errorCallback], [progressionCallback]);
* On command success, responseCallback will be called with the jIO response as first parameter. * On command success, ``responseCallback`` will be called with the jIO response as first parameter.
* On command error, errorCallback will be called with the jIO error as first parameter. * On command error, ``errorCallback`` will be called with the jIO error as first parameter.
* On command notification, progressionCallback will be called with the storage notification. * On command notification, ``progressionCallback`` will be called with the storage notification.
Here is a list of responses returned by jIO according to methods and options: Here is a list of responses returned by jIO according to methods and options:
================== =============================== ====================================== ================== =========================================== ===============================================
Option Available for Response (Callback first parameter) Option Available for Response (Callback first parameter)
================== =============================== ====================================== ================== =========================================== ===============================================
No options post, put, remove .. code-block:: javascript No options ``post()``, ``put()``, ``remove()`` .. code-block:: javascript
{ {
"result": "success", "result": "success",
"method": "post", "method": "post",
// or put or remove // or put or remove
"id": "my_doc_id", "id": "my_doc_id",
"status": 204, "status": 204,
"statusText": "No Content" "statusText": "No Content"
} }
No options putAttachment, removeAttachment .. code-block:: javascript No options ``putAttachment()``, ``removeAttachment()`` .. code-block:: javascript
{ {
"result": "success", "result": "success",
"method": "putAttachment", "method": "putAttachment",
// or removeAttachment // or removeAttachment
"id": "my_doc_id", "id": "my_doc_id",
"attachment": "my_attachment_id", "attachment": "my_attachment_id",
"status": 204, "status": 204,
"statusText": "No Content" "statusText": "No Content"
} }
No options get .. code-block:: javascript No options ``get()`` .. code-block:: javascript
{ {
"result": "success", "result": "success",
"method": "get", "method": "get",
"id": "my_doc_id", "id": "my_doc_id",
"status": 200, "status": 200,
"statusText": "Ok", "statusText": "Ok",
"data": { "data": {
// Here, the document metadata // Here, the document metadata
} }
} }
No options getAttachment .. code-block:: javascript No options ``getAttachment()`` .. code-block:: javascript
{ {
"result": "success", "result": "success",
"method": "getAttachment", "method": "getAttachment",
"id": "my_doc_id", "id": "my_doc_id",
"attachment": "my_attachment_id", "attachment": "my_attachment_id",
"status": 200, "status": 200,
"statusText": "Ok", "statusText": "Ok",
"data": Blob // Here, the attachment content "data": Blob // Here, the attachment content
} }
No option allDocs .. code-block:: javascript No option ``allDocs()`` .. code-block:: javascript
{ {
"result": "success", "result": "success",
"method": "allDocs", "method": "allDocs",
"id": "my_doc_id", "id": "my_doc_id",
"status": 200, "status": 200,
"statusText": "Ok", "statusText": "Ok",
"data": { "data": {
"total_rows": 1, "total_rows": 1,
"rows": [{ "rows": [{
"id": "mydoc", "id": "mydoc",
"key": "mydoc", // optional "key": "mydoc", // optional
"value": {}, "value": {},
}] }]
} }
} }
include_docs: true allDocs .. code-block:: javascript include_docs: true ``allDocs()`` .. code-block:: javascript
{ {
"result": "success", "result": "success",
"method": "allDocs", "method": "allDocs",
"id": "my_doc_id", "id": "my_doc_id",
"status": 200, "status": 200,
"statusText": "Ok", "statusText": "Ok",
"data": { "data": {
"total_rows": 1, "total_rows": 1,
"rows": [{ "rows": [{
"id": "mydoc", "id": "mydoc",
"key": "mydoc", // optional "key": "mydoc", // optional
"value": {}, "value": {},
"doc": { "doc": {
// Here, "mydoc" metadata // Here, "mydoc" metadata
} }
}] }]
} }
} }
================== =============================== ====================================== ================== =========================================== ===============================================
In case of error, the errorCallback first parameter will look like: In case of error, the ``errorCallback`` first parameter will look like:
.. code-block:: javascript .. code-block:: javascript
......
...@@ -14,9 +14,8 @@ The word "metadata" means "data about data". Metadata articulates a context for ...@@ -14,9 +14,8 @@ The word "metadata" means "data about data". Metadata articulates a context for
objects of interest -- "resources" such as MP3 files, library books, or objects of interest -- "resources" such as MP3 files, library books, or
satellite images -- in the form of "resource descriptions". As a tradition, satellite images -- in the form of "resource descriptions". As a tradition,
resource description dates back to the earliest archives and library catalogs. resource description dates back to the earliest archives and library catalogs.
The modern "metadata" field that gave rise to Dublin Core and other recent During the Web revolution of the mid-1990s, `Dublic Core <http://dublincore.org/metadata-basics/>`_
standards emerged with the Web revolution of the mid-1990s. has emerged as one of the prominent metadata standards.
http://dublincore.org/metadata-basics/
Why use metadata? Why use metadata?
----------------- -----------------
...@@ -61,10 +60,10 @@ List of metadata to use ...@@ -61,10 +60,10 @@ List of metadata to use
Identification Identification
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
* **"_id"**, a specific jIO metadata which helps the storage to find a document * **_id**, a specific jIO metadata which helps the storage to find a document
(can be a real path name, a dc:identifier, a uuid, ...). **String Only** (can be a real path name, a dc:identifier, a uuid, ...). **String Only**
* **"identifer"**, :js:`{"identifier": "http://domain/jio_home_page"}, {"identifier": "urn:ISBN:978-1-2345-6789-X"}, * **identifer**, :js:`{"identifier": "http://domain/jio_home_page"}, {"identifier": "urn:ISBN:978-1-2345-6789-X"},
{"identifier": [{"scheme": "DCTERMS.URI", "content": "http://domain/jio_home_page"}]}` {"identifier": [{"scheme": "DCTERMS.URI", "content": "http://domain/jio_home_page"}]}`
an unambiguous reference to the resource within a given context. Recommended an unambiguous reference to the resource within a given context. Recommended
...@@ -74,14 +73,14 @@ Identification ...@@ -74,14 +73,14 @@ Identification
Resource Locator (URL), the Digital Object Identifier (DOI) and the Resource Locator (URL), the Digital Object Identifier (DOI) and the
International Standard Book Number (ISBN). International Standard Book Number (ISBN).
* **"format"**, :js:`{"format": ["text/html", "52 kB"]}, {"format": ["image/jpeg", "100 x 100 pixels", "13.2 KiB"]}` * **format**, :js:`{"format": ["text/html", "52 kB"]}, {"format": ["image/jpeg", "100 x 100 pixels", "13.2 KiB"]}`
the physical or digital manifestation of the resource. Typically, Format may the physical or digital manifestation of the resource. Typically, Format may
include the media-type or dimensions of the resource. Examples of dimensions include the media-type or dimensions of the resource. Examples of dimensions
include size and duration. Format may be used to determine the software, include size and duration. Format may be used to determine the software,
hardware or other equipment needed to display or operate the resource. hardware or other equipment needed to display or operate the resource.
* **"date"**, :js:`{"date": "2011-12-13T14:15:16Z"}, {"date": {"scheme": "DCTERMS.W3CDTF", "content": "2011-12-13"}}` * **date**, :js:`{"date": "2011-12-13T14:15:16Z"}, {"date": {"scheme": "DCTERMS.W3CDTF", "content": "2011-12-13"}}`
a date associated with an event in the life cycle of the resource. Typically, a date associated with an event in the life cycle of the resource. Typically,
Date will be associated with the creation or availability of the resource. Date will be associated with the creation or availability of the resource.
...@@ -89,7 +88,7 @@ Identification ...@@ -89,7 +88,7 @@ Identification
of ISO 8601 `Date and Time Formats, W3C Note <http://www.w3.org/TR/NOTE-datetime>`_ of ISO 8601 `Date and Time Formats, W3C Note <http://www.w3.org/TR/NOTE-datetime>`_
and follows the YYYY-MM-DD format. and follows the YYYY-MM-DD format.
* **"type"**, :js:`{"type": "Text"}, {"type": "Image"}, {"type": "Dataset"}` * **type**, :js:`{"type": "Text"}, {"type": "Image"}, {"type": "Dataset"}`
the nature or genre of the content of the resource. Type includes terms describing the nature or genre of the content of the resource. Type includes terms describing
general categories, functions, genres, or aggregation levels for content. general categories, functions, genres, or aggregation levels for content.
...@@ -100,26 +99,26 @@ Identification ...@@ -100,26 +99,26 @@ Identification
Intellectual property Intellectual property
^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
* **"creator"**, :js:`{"creator": "Tristan Cavelier"}, {"creator": ["Tristan Cavelier", "Sven Franck"]}` * **creator**, :js:`{"creator": "Tristan Cavelier"}, {"creator": ["Tristan Cavelier", "Sven Franck"]}`
an entity primarily responsible for creating the content of the resource. an entity primarily responsible for creating the content of the resource.
Examples of a Creator include a person, an organization, or a service. Examples of a Creator include a person, an organization, or a service.
Typically the name of the Creator should be used to indicate the entity. Typically the name of the Creator should be used to indicate the entity.
* **"publisher"**, :js:`{"publisher": "Nexedi"}` * **publisher**, :js:`{"publisher": "Nexedi"}`
the entity responsible for making the resource available. Examples of a the entity responsible for making the resource available. Examples of a
Publisher include a person, an organization, or a service. Typically, the name Publisher include a person, an organization, or a service. Typically, the name
of a Publisher should be used to indicate the entity. of a Publisher should be used to indicate the entity.
* **"contributor"**, :js:`{"contributor": ["Full Name", "Full Name", ...]}` * **contributor**, :js:`{"contributor": ["Full Name", "Full Name", ...]}`
an entity responsible for making contributions to the content of the an entity responsible for making contributions to the content of the
resource. Examples of a Contributor include a person, an organization or a resource. Examples of a Contributor include a person, an organization or a
service. Typically, the name of a Contributor should be used to indicate the service. Typically, the name of a Contributor should be used to indicate the
entity. entity.
* **"rights"**, :js:`{"rights": "Access limited to members"}, {"rights": "https://www.j-io.org/documentation/jio-documentation/#copyright-and-license"}` * **rights**, :js:`{"rights": "Access limited to members"}, {"rights": "https://www.j-io.org/documentation/jio-documentation/#copyright-and-license"}`
information about rights held in and over the resource. Typically a Rights information about rights held in and over the resource. Typically a Rights
element will contain a rights management statement for the resource, or element will contain a rights management statement for the resource, or
...@@ -132,24 +131,24 @@ Intellectual property ...@@ -132,24 +131,24 @@ Intellectual property
Content Content
^^^^^^^ ^^^^^^^
* **"title"**, :js:`{"title": "jIO Home Page"}` * **title**, :js:`{"title": "jIO Home Page"}`
the name given to the resource. Typically, a Title will be a name by which the resource is formally known. the name given to the resource. Typically, a Title will be a name by which the resource is formally known.
* **"subject"**, :js:`{"subject": "jIO"}, {"subject": ["jIO", "basics"]}` * **subject**, :js:`{"subject": "jIO"}, {"subject": ["jIO", "basics"]}`
the topic of the content of the resource. Typically, a Subject will be the topic of the content of the resource. Typically, a Subject will be
expressed as keywords or key phrases or classification codes that describe the expressed as keywords or key phrases or classification codes that describe the
topic of the resource. Recommended best practice is to select a value from a topic of the resource. Recommended best practice is to select a value from a
controlled vocabulary or formal classification scheme. controlled vocabulary or formal classification scheme.
* **"description"**, :js:`{"description": "Simple guide to show the basics of jIO"}, {"description": {"lang": "fr", "content": "Ma description"}}` * **description**, :js:`{"description": "Simple guide to show the basics of jIO"}, {"description": {"lang": "fr", "content": "Ma description"}}`
an account of the content of the resource. Description may include but is not an account of the content of the resource. Description may include but is not
limited to: an abstract, table of contents, reference to a graphical limited to: an abstract, table of contents, reference to a graphical
representation of content or a free-text account of the content. representation of content or a free-text account of the content.
* **"language"**, :js:`{"language": "en"}` * **language**, :js:`{"language": "en"}`
the language of the intellectual content of the resource. Recommended best the language of the intellectual content of the resource. Recommended best
practice for the values of the Language element is defined by `RFC 3066 <http://www.ietf.org/rfc/rfc3066.txt>`_ practice for the values of the Language element is defined by `RFC 3066 <http://www.ietf.org/rfc/rfc3066.txt>`_
...@@ -158,20 +157,20 @@ Content ...@@ -158,20 +157,20 @@ Content
or "eng" for English, "akk" for Akkadian, and "en-GB" for English used in the or "eng" for English, "akk" for Akkadian, and "en-GB" for English used in the
United Kingdom. United Kingdom.
* **"source"**, :js:`{"source": ["Image taken from a drawing by Mr. Artist", "<phone number>"]}`, * **source**, :js:`{"source": ["Image taken from a drawing by Mr. Artist", "<phone number>"]}`,
a Reference to a resource from which the present resource is derived. The a Reference to a resource from which the present resource is derived. The
present resource may be derived from the Source resource in whole or part. present resource may be derived from the Source resource in whole or part.
Recommended best practice is to reference the resource by means of a string or Recommended best practice is to reference the resource by means of a string or
number conforming to a formal identification system. number conforming to a formal identification system.
* **"relation"**, :js:`{"relation": "Resilience project"}` * **relation**, :js:`{"relation": "Resilience project"}`
a reference to a related resource. Recommended best practice is to reference a reference to a related resource. Recommended best practice is to reference
the resource by means of a string or number conforming to a formal the resource by means of a string or number conforming to a formal
identification system. identification system.
* **"coverage"**, :js:`{"coverage": "France"}` * **coverage**, :js:`{"coverage": "France"}`
the extent or scope of the content of the resource. Coverage will typically the extent or scope of the content of the resource. Coverage will typically
include spatial location (a place name or geographic co-ordinates), temporal include spatial location (a place name or geographic co-ordinates), temporal
...@@ -182,13 +181,13 @@ Content ...@@ -182,13 +181,13 @@ Content
places or time periods should be used in preference to numeric identifiers such places or time periods should be used in preference to numeric identifiers such
as sets of co-ordinates or date ranges. as sets of co-ordinates or date ranges.
* **"category"**, :js:`{"category": ["parent/26323", "resilience/javascript", "javascript/library/io"]}` * **category**, :js:`{"category": ["parent/26323", "resilience/javascript", "javascript/library/io"]}`
the category the resource is associated with. The categories may look like the category the resource is associated with. The categories may look like
navigational facets, they correspond to the properties of the resource which navigational facets, they correspond to the properties of the resource which
can be generated with metadata or some other informations (see `faceted search <https://en.wikipedia.org/wiki/Faceted_search>`_). can be generated with metadata or some other information (see `faceted search <https://en.wikipedia.org/wiki/Faceted_search>`_).
* **"product"**, :js:`{"product": "..."}` * **product**, :js:`{"product": "..."}`
for e-commerce use. for e-commerce use.
......
...@@ -181,7 +181,7 @@ Good Example ...@@ -181,7 +181,7 @@ Good Example
.. code-block:: javascript .. code-block:: javascript
function func () { function func() {
return { return {
"name": "Batman" "name": "Batman"
}; };
...@@ -502,7 +502,7 @@ Additional Readings ...@@ -502,7 +502,7 @@ Additional Readings
Resources, additional reading materials and links: Resources, additional reading materials and links:
* `Javascript Patterns <http://shop.oreilly.com/product/9780596806767.do>`_, main ressource used. * `JavaScript Patterns <http://shop.oreilly.com/product/9780596806767.do>`_, main ressource used.
* `JSLint <http://www.jslint.com/>`_, code quality. * `JSLint <http://www.jslint.com/>`_, code quality.
* `YUIDoc <http://yuilibrary.com/projects/yuidoc>`_, generate documentation from code. * `YUIDoc <http://yuilibrary.com/projects/yuidoc>`_, generate documentation from code.
......
...@@ -37,11 +37,11 @@ Simple Conflict Example ...@@ -37,11 +37,11 @@ Simple Conflict Example
You are keeping a namecard file on your PC updating from your smartphone. Your You are keeping a namecard file on your PC updating from your smartphone. Your
smartphone ran out of battery and is offline when you update your namecard on smartphone ran out of battery and is offline when you update your namecard on
your PC with your new email adress. Someone else change this email from your PC your PC with your new email adress. Someone else changes this email from your PC
and once your smartphone is recharged, you go back online and the previous and once your smartphone is recharged, you go back online and the previous
update is executed. update is executed.
#. Setting up the storage tree #. Set up the storage tree
.. code-block:: javascript .. code-block:: javascript
...@@ -64,7 +64,7 @@ update is executed. ...@@ -64,7 +64,7 @@ update is executed.
}); });
#. Create your namecard on your smartphone #. Create the namecard on your smartphone
.. code-block:: javascript .. code-block:: javascript
...@@ -91,10 +91,10 @@ update is executed. ...@@ -91,10 +91,10 @@ update is executed.
// response.rev -> "2-068E73F5B44FEC987B51354DFC772891" // response.rev -> "2-068E73F5B44FEC987B51354DFC772891"
}); });
Your smartphone is offline, so you will now have one version (1-578...) on Your smartphone is offline, so now you will have one version (1-578...) on
your smartphone and another version on webDav (2-068...) on your PC. your smartphone and another version on webDav (2-068...) on your PC.
#. You modify your namecard while being offline #. You modify the namecard while being offline
.. code-block:: javascript .. code-block:: javascript
...@@ -114,7 +114,7 @@ update is executed. ...@@ -114,7 +114,7 @@ update is executed.
}); });
#. Later, your smartphone is online and you retrieve your namecard. #. Later, your smartphone is online and you retrieve the other version of the namecard.
.. code-block:: javascript .. code-block:: javascript
...@@ -157,7 +157,7 @@ update is executed. ...@@ -157,7 +157,7 @@ update is executed.
When deleting the conflicting version of your namecard, jIO removes this When deleting the conflicting version of your namecard, jIO removes this
version from all storages and sets the document tree leaf of this version to version from all storages and sets the document tree leaf of this version to
deleted. All storages now contain just a single version of your namecard deleted. All storages now contain just a single version of the namecard
(2-3753...). Note that, on the document tree, removing a revison will (2-3753...). Note that, on the document tree, removing a revison will
create a new revision with status set to *deleted*. create a new revision with status set to *deleted*.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment