Skip to content
Snippets Groups Projects
Commit 5b86d55f authored by Daniel Hornung's avatar Daniel Hornung
Browse files

DOC FIX: Fixing style, syntax and links.

parent d87f689b
No related branches found
No related tags found
2 merge requests!21Release v0.4.0,!15Document server code structure
...@@ -121,7 +121,7 @@ Examples: ...@@ -121,7 +121,7 @@ Examples:
##### `d1>d2`: Transitive, non-symmetric relation. ##### `d1>d2`: Transitive, non-symmetric relation.
Semantics depend on the flavors of d1 and d2. If both are... Semantics depend on the flavors of d1 and d2. If both are...
###### [UTCDateTime](Datatype#datetime) ###### [UTCDateTime](Datatype#datetime)
* ''True'' iff the time of d1 is after the the time of d2 according to [https://en.wikipedia.org/wiki/Coordinated_Universal_Time](UTC) * ''True'' iff the time of d1 is after the the time of d2 according to [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
* ''False'' otherwise. * ''False'' otherwise.
###### [SemiCompleteDateTime](Datatype#datetime) ###### [SemiCompleteDateTime](Datatype#datetime)
......
#Permissions Permissions
===========
CaosDB has a fine grained role based permission system. Each interaction CaosDB has a fine grained role based permission system. Each interaction
with the server is governed by the current rules of the user, by default with the server is governed by the current rules of the user, by default
......
...@@ -19,18 +19,21 @@ In each of these directories, the server looks for the following files: ...@@ -19,18 +19,21 @@ In each of these directories, the server looks for the following files:
``server.conf`` ``server.conf``
General server configuration options. The possible configuration options are documented inside General server configuration options. The possible configuration options are documented inside
the `default file <https://gitlab.com/caosdb/caosdb-server/-/blob/dev/conf/core/server.conf>`_. the `default file
<https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/blob/dev/conf/core/server.conf>`__.
``global_entity_permissions.xml`` ``global_entity_permissions.xml``
:ref:`Permissions <concepts:Permissions>` which are automatically set, based on user roles. :doc:`Permissions<../Permissions>` which are automatically set, based on user roles. See the
See the `default file <https://gitlab.com/caosdb/caosdb-server/-/blob/dev/conf/core/global_entity_permissions.xml>`_. `default file
<https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/blob/dev/conf/core/global_entity_permissions.xml>`__.
``usersources.ini`` ``usersources.ini``
This file defines possible sources which are checked when a user tries to authenticate. Each This file defines possible sources which are checked when a user tries to authenticate. Each
defined source has a special section, the possible options are defined separately for each user defined source has a special section, the possible options are defined separately for each user
source. At the moment the best place to look for this specific documentation is at the API source. At the moment the best place to look for this specific documentation is at the API
documentation of :java:type:`UserSource` and its implementing classes. The provided `template documentation of :java:type:`UserSource` and its implementing classes. The provided `template
file <https://gitlab.com/caosdb/caosdb-server/-/blob/dev/conf/core/usersources.ini.template>`_ file
<https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/blob/dev/conf/core/usersources.ini.template>`__
also has some information. The general concept about authentication realms is described in also has some information. The general concept about authentication realms is described in
:java:type:`UserSources`. :java:type:`UserSources`.
...@@ -38,13 +41,13 @@ In each of these directories, the server looks for the following files: ...@@ -38,13 +41,13 @@ In each of these directories, the server looks for the following files:
Configuration for dispensed authentication tokens, which can be used to authenticate to CaosDB Configuration for dispensed authentication tokens, which can be used to authenticate to CaosDB
without the need of a user/password combination. Possible use cases are server-side scripts or without the need of a user/password combination. Possible use cases are server-side scripts or
initial setup after the server start. There is more documentation inside the `template file initial setup after the server start. There is more documentation inside the `template file
<https://gitlab.com/caosdb/caosdb-server/-/blob/dev/conf/core/authtoken.example.yaml>`_. <https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/blob/dev/conf/core/authtoken.example.yaml>`__.
``cache.ccf`` ``cache.ccf``
Configuration for the Java Caching System (JCS) which can be used by the server. More Configuration for the Java Caching System (JCS) which can be used by the server. More
documentation is `upstream documentation is `upstream
<http://commons.apache.org/proper/commons-jcs/getting_started/intro.html>`_ and inside `the file <http://commons.apache.org/proper/commons-jcs/getting_started/intro.html>`_ and inside `the file
<https://gitlab.com/caosdb/caosdb-server/-/blob/dev/conf/core/cache.ccf>`_. <https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/blob/dev/conf/core/cache.ccf>`_.
``log4j2-default.properties``, ``log4j2-debug.properties`` ``log4j2-default.properties``, ``log4j2-debug.properties``
Configuration for logging, following the standard described by the `log4j library Configuration for logging, following the standard described by the `log4j library
......
...@@ -21,12 +21,17 @@ The command could look like:: ...@@ -21,12 +21,17 @@ The command could look like::
tar czvf /path/to/new/backup /path/to/caosdb/filesystem.tar.gz tar czvf /path/to/new/backup /path/to/caosdb/filesystem.tar.gz
You can also save the content of CaosDB using XML. This is **not recommended** since it is less reliable than a real SQL backup. However there may be cases in which an XML backup is desirable, e.g., when transferring entities between two different CaosDB instances. You can also save the content of CaosDB using XML. This is **not recommended** since it produces
Collect the entities that you want to export in a :any:`caosdb-pylib:caosdb.common.models.Container`, here less reproducible results than a plain SQL backup. However there may be cases in which an XML backup
named ``cont``. Then you can export the XML with:: is necessary, e.g., when transferring entities between two different CaosDB instances.
Collect the entities that you want to export in a
:any:`Container<caosdb-pylib:caosdb.common.models.Container>`, named ``cont`` here. Then you can
export the XML with::
from caosadvancedtools.export_related import invert_ids from caosadvancedtools.export_related import invert_ids
from lxml import etree from lxml import etree
invert_ids(cont) invert_ids(cont)
xml = etree.tounicode(cont.to_xml( xml = etree.tounicode(cont.to_xml(
local_serialization=True), pretty_print=True) local_serialization=True), pretty_print=True)
...@@ -38,11 +43,11 @@ named ``cont``. Then you can export the XML with:: ...@@ -38,11 +43,11 @@ named ``cont``. Then you can export the XML with::
Restoring a Backup Restoring a Backup
------------------ ------------------
.. note : .. warning::
CaosDB should be offline before restoring data. CaosDB should be offline before restoring data.
If you want to restore the internal file system, simply replace it. E.g. if your If you want to restore the internal file system, simply replace it. E.g. if your
Backup is a tarball:: backup is a tarball::
tar xvf /path/to/caosroot.tar.gz tar xvf /path/to/caosroot.tar.gz
...@@ -59,9 +64,10 @@ If you want to restore the entities exported to XML, you can do:: ...@@ -59,9 +64,10 @@ If you want to restore the entities exported to XML, you can do::
User Management User Management
--------------- ---------------
The configuration of authentication mechanisms is done via the
``usersources.ini`` file (see :any:`configuration`).
We recommend the Python tools (:any:`caosdb-pylib:Administration`) for further administrative tasks (e.g. setting The configuration of authentication mechanisms is done via the ``usersources.ini`` file (see
user passwords). :any:`configuration`).
We recommend the Python tools (:any:`caosdb-pylib:administration`) for further administrative tasks
(e.g. setting user passwords).
...@@ -31,7 +31,7 @@ The script has to be executable and must be placed somewhere in one of the direc ...@@ -31,7 +31,7 @@ The script has to be executable and must be placed somewhere in one of the direc
Users will need the ``SCRIPTING:EXECUTE:path:to:the:script`` permission. Here the path to the script is of course relativet to the ``SERVER_SIDE_SCRIPTING_BIN_DIRS`` where it is located. Users will need the ``SCRIPTING:EXECUTE:path:to:the:script`` permission. Here the path to the script is of course relativet to the ``SERVER_SIDE_SCRIPTING_BIN_DIRS`` where it is located.
For more information see the :doc:`specification of the API <../specs/Server-side-scripting>` For more information see the :doc:`specification of the API <../specification/Server-side-scripting>`
Environment Environment
------------ ------------
......
...@@ -201,8 +201,8 @@ javadoc_url_map = { ...@@ -201,8 +201,8 @@ javadoc_url_map = {
# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#confval-intersphinx_mapping # https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#confval-intersphinx_mapping
intersphinx_mapping = { intersphinx_mapping = {
"python": ("https://docs.python.org/", None), "python": ("https://docs.python.org/", None),
"caosdb-pylib": ("https://caosdb.gitlab.io/caosdb-pylib/", None), "caosdb-pylib": ("https://docs.indiscale.com/caosdb-pylib/", None),
"caosdb-mysqlbackend": ("https://caosdb.gitlab.io/caosdb-mysqlbackend/", None), "caosdb-mysqlbackend": ("https://docs.indiscale.com/caosdb-mysqlbackend/", None),
} }
......
...@@ -19,8 +19,8 @@ Welcome to caosdb-server's documentation! ...@@ -19,8 +19,8 @@ Welcome to caosdb-server's documentation!
Welcome to the CaosDB, the flexible semantic data management toolkit! Welcome to the CaosDB, the flexible semantic data management toolkit!
This documentation helps you to :doc:`get started<getting_started>`, explains the most important This documentation helps you to :doc:`get started<README_SETUP>`, explains the most important
:doc:`concepts<concepts>` and offers a range of :doc:`tutorials<tutorials>`. :doc:`concepts<concepts>` and has information if you want to :doc:`develop<development/devel>` CaosDB yourself.
Indices and tables Indices and tables
......
...@@ -10,7 +10,7 @@ users may have the same role, and there may be roles without any users. ...@@ -10,7 +10,7 @@ users may have the same role, and there may be roles without any users.
The user and their roles are always returned by the server in answers to requests The user and their roles are always returned by the server in answers to requests
and can thus be interpreted and used by clients. The most important use though and can thus be interpreted and used by clients. The most important use though
is [permission](permissions) checking in the server: Access and is [permission](Permissions) checking in the server: Access and
modification of modification of
entities can be controlled via roles, so that users of a given role are allowed entities can be controlled via roles, so that users of a given role are allowed
or denied certain actions. Incidentally, the permission to edit the permissions or denied certain actions. Incidentally, the permission to edit the permissions
...@@ -32,4 +32,4 @@ There are some special roles, which are automatically assigned to users: ...@@ -32,4 +32,4 @@ There are some special roles, which are automatically assigned to users:
Except for the `anonymous` role, these special roles are not returned by the Except for the `anonymous` role, these special roles are not returned by the
server, but can nevertheless be used to define server, but can nevertheless be used to define
[permissions](permissions.rst). [permissions](Permissions).
.. note ::
This document has not been updated for a long time. Although it is concerned with the mostly
stable API, its content may no longer reflect the actual CaosDB behavior.
# AbstractProperty Specification # AbstractProperty Specification
## Introduction ## Introduction
An `AbstractProperty` is one of the basal [objects of HeartDB](./HeartDBObject). An `AbstractProperty` is one of the basal objects of HeartDB.
An `AbstractProperty` MUST have the following _qualities_ (shortcut in brackets): An `AbstractProperty` MUST have the following _qualities_ (shortcut in brackets):
* a persistent id (`id`) * a persistent id (`id`)
* an unique name (`name`) * an unique name (`name`)
...@@ -54,7 +59,7 @@ Any xml representation of an `AbstractProperty` that is retrieved from the Heart ...@@ -54,7 +59,7 @@ Any xml representation of an `AbstractProperty` that is retrieved from the Heart
<Property id="$id" name="$name" description="$description" generator="$generator" creator="$creator" created="$created" type="file" /> <Property id="$id" name="$name" description="$description" generator="$generator" creator="$creator" created="$created" type="file" />
'''General Notes: '''General Notes:
* If the called Property does not exist or if the Property called without permission, the HeartDB Server will return an [Error](./Errorcodes). * If the called Property does not exist or if the Property called without permission, the HeartDB Server will return an Error.
### POST AbstractProperty ### POST AbstractProperty
Any xml representation of an `AbstractProperty` that is to be posted to the HeartDB server MUST have exactly ONE of the following forms, depending on the `AbstractProperty's` type: Any xml representation of an `AbstractProperty` that is to be posted to the HeartDB server MUST have exactly ONE of the following forms, depending on the `AbstractProperty's` type:
...@@ -80,7 +85,7 @@ Any xml representation of an `AbstractProperty` that is to be posted to the Hear ...@@ -80,7 +85,7 @@ Any xml representation of an `AbstractProperty` that is to be posted to the Hear
* The `AbstractProperty's` `id` and timestamp (`created`) will be generated by the HeartDB Server. * The `AbstractProperty's` `id` and timestamp (`created`) will be generated by the HeartDB Server.
* The `AbstractProperty's` creator will be determined by the HeartDB Server depending on it's policy configuration. * The `AbstractProperty's` creator will be determined by the HeartDB Server depending on it's policy configuration.
* Any given attribute beyond these will be *ignored*. * Any given attribute beyond these will be *ignored*.
* If the `<Property/>` tag isn't compliant with these the HeartDB Server will return an [Error](./Errorcodes). * If the `<Property/>` tag isn't compliant with these the HeartDB Server will return an Error.
---- ----
## Examples ## Examples
......
# RecordType # RecordType
----
## Overview ## Overview
RecordTypes function as templates for [[Record|Records]], they provide a description for a type of Record and define which [[Property|Properties]] should be present. Properties come with an _importance_ attribute which tells the user or client program how strongly necessary the Property is. (As all other entities,) RecordTypes can be inherited from other RecordTypes (or any Entities). When RecordTypes inherit from other RecordTypes, the _inheritance_ flag tells which properties shall be inherited. RecordTypes function as templates for [[Record|Records]], they provide a description for a type of Record and define which [[Property|Properties]] should be present. Properties come with an _importance_ attribute which tells the user or client program how strongly necessary the Property is. (As all other entities,) RecordTypes can be inherited from other RecordTypes (or any Entities). When RecordTypes inherit from other RecordTypes, the _inheritance_ flag tells which properties shall be inherited.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment