Skip to content

Commit

Permalink
Changes due to review: drop "'contents' relationship"
Browse files Browse the repository at this point in the history
  • Loading branch information
rartino committed Jun 28, 2022
1 parent c7a00dd commit e817790
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions optimade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2805,12 +2805,12 @@ Collections Entries

Collections entries are used to define a set of Entries of any types.
For example, a collection of Structure entries can be used to indicate that they are conceptually related, such as structures representing aluminium unit cells with point defects.
The set of entries that belong to the collection is defined using a :val:`contents` relationship (see the `Relationships`_ section).
The set of entries that belong to the collection is defined using relationships from the collection to each entry (OPTIMADE relationships are defined in `Relationships`_).
A collection can contain other collections.
Furthermore, implementations are suggested to add database-specific properties for additional metadata they want to store about the collections.
An OPTIMADE response representing a collection with all referenced entries included via the JSON API field :field:`included` (or equivalent in other response formats) can be used as a universal format for storage or transfer of a subset of (or all) data in an OPTIMADE database.

The following example shows how the :val:`contents` relationship from a collection to other entries defines the contents of a collection:
The following example shows how relationships from a collection to other entries defines the contents of the collection:

.. code:: jsonc
Expand All @@ -2828,6 +2828,10 @@ The following example shows how the :val:`contents` relationship from a collecti
{ "type": "structures", "id": "example.com:structures:4711" },
{ "type": "structures", "id": "example.com:structures:4712" },
{ "type": "structures", "id": "example.com:structures:4713" }
]
},
"calculations": {
"data": [
{ "type": "calculations", "id": "example.com:calculations:1899" }
]
}
Expand Down

0 comments on commit e817790

Please sign in to comment.