Commit 1c422fd3 authored by Marco Mariani's avatar Marco Mariani

docs: consistently use lowercase j in jIO

parent 2f930bbe
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
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.
...@@ -144,7 +144,7 @@ Revision Based Handlers ...@@ -144,7 +144,7 @@ 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 this 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
......
JIO Complex Queries jIO Complex Queries
=================== ===================
What are Complex Queries? What are Complex Queries?
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# JIO documentation build configuration file, created by # jIO documentation build configuration file, created by
# sphinx-quickstart on Fri Nov 15 11:55:08 2013. # sphinx-quickstart on Fri Nov 15 11:55:08 2013.
# #
# This file is execfile()d with the current directory set to its containing dir. # This file is execfile()d with the current directory set to its containing dir.
...@@ -42,7 +42,7 @@ source_suffix = '.rst' ...@@ -42,7 +42,7 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'JIO' project = u'jIO'
copyright = u'2013, Nexedi' copyright = u'2013, Nexedi'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
...@@ -167,7 +167,7 @@ html_static_path = ['_static'] ...@@ -167,7 +167,7 @@ html_static_path = ['_static']
#html_file_suffix = None #html_file_suffix = None
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = 'JIOdoc' htmlhelp_basename = 'jIOdoc'
# -- Options for LaTeX output -------------------------------------------------- # -- Options for LaTeX output --------------------------------------------------
...@@ -186,7 +186,7 @@ latex_elements = { ...@@ -186,7 +186,7 @@ latex_elements = {
# Grouping the document tree into LaTeX files. List of tuples # Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]). # (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [ latex_documents = [
('index', 'JIO.tex', u'JIO Documentation', ('index', 'jIO.tex', u'jIO Documentation',
u'Nexedi', 'manual'), u'Nexedi', 'manual'),
] ]
...@@ -216,7 +216,7 @@ latex_documents = [ ...@@ -216,7 +216,7 @@ latex_documents = [
# One entry per manual page. List of tuples # One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
('index', 'jio', u'JIO Documentation', ('index', 'jio', u'jIO Documentation',
[u'Nexedi'], 1) [u'Nexedi'], 1)
] ]
...@@ -230,8 +230,8 @@ man_pages = [ ...@@ -230,8 +230,8 @@ man_pages = [
# (source start file, target name, title, author, # (source start file, target name, title, author,
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
('index', 'JIO', u'JIO Documentation', ('index', 'jIO', u'jIO Documentation',
u'Nexedi', 'JIO', 'One line description of project.', u'Nexedi', 'jIO', 'One line description of project.',
'Miscellaneous'), 'Miscellaneous'),
] ]
......
...@@ -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:
......
.. _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.
......
.. 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
...@@ -19,12 +19,12 @@ How does it work? ...@@ -19,12 +19,12 @@ How does it work?
.. XXX three parts? .. XXX three parts?
JIO is separated into three 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 called 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 a browser crash. Jobs are being invoked
asynchronously with ongoing jobs not being able to re-trigger to prevent asynchronously with ongoing jobs not being able to re-trigger to prevent
......
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 API 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.
...@@ -121,10 +121,10 @@ see how method calls should be made with either of these storages. ...@@ -121,10 +121,10 @@ see how method calls should be made with either of these storages.
Promises Promises
-------- --------
Each JIO methods returns a Promise object, which allows us to get responses into Each jIO methods 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:
...@@ -136,7 +136,7 @@ You can read more about promises: ...@@ -136,7 +136,7 @@ You can read more about 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,11 +144,11 @@ To retrieve JIO responses, you have to provide callbacks like this: ...@@ -144,11 +144,11 @@ 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:
================== =============================== ====================================== ================== =============================== ======================================
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
:language: javascript :language: javascript
.. _metadata-head: .. _metadata-head:
Metadata Metadata
======== ========
...@@ -27,7 +28,7 @@ way to save documents and to get them). So we must use metadata for ...@@ -27,7 +28,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,7 +61,7 @@ List of metadata to use ...@@ -60,7 +61,7 @@ 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"},
...@@ -131,18 +132,18 @@ Intellectual property ...@@ -131,18 +132,18 @@ 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
...@@ -199,7 +200,7 @@ Content ...@@ -199,7 +200,7 @@ Content
Examples Examples
-------- --------
Posting a webpage for JIO Posting a webpage for jIO
^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: javascript .. code-block:: javascript
...@@ -211,16 +212,16 @@ Posting a webpage for JIO ...@@ -211,16 +212,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 +237,7 @@ Posting JIO library ...@@ -236,7 +237,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 +356,14 @@ With complex query: ...@@ -355,14 +356,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);
......
...@@ -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.
......
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