diff --git a/docs/specs/metadata_example.xml b/docs/specs/metadata_example.xml index a184c53f..b12356a2 100644 --- a/docs/specs/metadata_example.xml +++ b/docs/specs/metadata_example.xml @@ -1,30 +1,30 @@ - - - HAL - hal@ccsd.cnrs.fr - - hal - The assignment problem - https://hal.archives-ouvertes.fr/hal-01243573 - other identifier, DOI, ARK - Domain - description - - author1 - Inria - UPMC - - - author2 - Inria - UPMC - - - - - - - + + + HAL + hal@ccsd.cnrs.fr + + hal + The assignment problem + https://hal.archives-ouvertes.fr/hal-01243573 + other identifier, DOI, ARK + Domain + description + + author1 + Inria + UPMC + + + author2 + Inria + UPMC + + + + + + + diff --git a/docs/specs/spec-meta-deposit.rst b/docs/specs/spec-meta-deposit.rst index ae905cb2..ff7b17e3 100644 --- a/docs/specs/spec-meta-deposit.rst +++ b/docs/specs/spec-meta-deposit.rst @@ -1,135 +1,135 @@ .. _spec-metadata-deposit: The metadata-only deposit ^^^^^^^^^^^^^^^^^^^^^^^^^ Goal ==== A client may wish to deposit only metadata about an origin or object already present in the Software Heritage archive. The metadata-only deposit is a special deposit where no content is provided and the data transferred to Software Heritage is only the metadata about an object in the archive. Requirements ============ 1. Create a metadata-only deposit through a :ref:`POST request` 2. It is composed of ONLY one Atom XML document 3. It MUST comply with :ref:`the metadata requirements` 4. It MUST reference an **object** or an **origin** in a deposit tag 5. The reference SHOULD exist in the SWH archive 6. The **object** reference MUST be a SWHID on one of the following artifact types: - origin - snapshot - release - revision - directory - content 7. The SWHID MAY be a `core identifier`_ with or without `qualifiers`_ 8. The SWHID MUST NOT reference a fragment of code with the classifier `lines` .. _core identifier: https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html#core-identifiers .. _qualifiers: https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html#qualifiers A complete metadata example =========================== The reference element is included in the metadata xml atomEntry under the swh namespace: .. code:: xml - - HAL - hal@ccsd.cnrs.fr - - The assignment problem - https://hal.archives-ouvertes.fr/hal-01243573 - other identifier, DOI, ARK - Domain - description - - author1 - Inria - UPMC - - - author2 - Inria - UPMC - - - - - - + xmlns:codemeta="https://doi.org/10.5063/SCHEMA/CODEMETA-2.0" + xmlns:swh="https://www.softwareheritage.org/schema/2018/deposit"> + + HAL + hal@ccsd.cnrs.fr + + The assignment problem + https://hal.archives-ouvertes.fr/hal-01243573 + other identifier, DOI, ARK + Domain + description + + Author1 + Inria + UPMC + + + Author2 + Inria + UPMC + + + + + + References ========== The metadata reference can be either on: - an origin - a graph object (core SWHID with or without qualifiers) Origins ------- The metadata may be on an origin, identified by the origin's URL: .. code:: xml Graph objects ------------- It may also reference an object in the `SWH graph `: contents, directories, revisions, releases, and snapshots: .. code:: xml .. code:: xml The value of the ``swhid`` attribute must be a `SWHID `, with any context qualifiers in this list: * ``origin`` * ``visit`` * ``anchor`` * ``path`` and they should be provided whenever relevant, especially ``origin``. Other qualifiers are not allowed (for example, ``line`` isn't because SWH cannot store metadata at a finer level than entire contents). Loading procedure ================= In this case, the metadata-deposit will be injected as a metadata entry of the relevant object, with the information about the contributor of the deposit.