Changeset View
Changeset View
Standalone View
Standalone View
docs/specs/spec-meta-deposit.rst
The metadata-deposit | The metadata-deposit | ||||
==================== | ==================== | ||||
Goal | Goal | ||||
---- | ---- | ||||
A client wishes to deposit only metadata about an object in the Software | A client wishes to deposit only metadata about an origin or object in the | ||||
Heritage archive. | Software Heritage archive. | ||||
The metadata-deposit is a special deposit where no content is | The metadata-deposit is a special deposit where no content is | ||||
provided and the data transferred to Software Heritage is only | provided and the data transferred to Software Heritage is only | ||||
the metadata about an object or several objects in the archive. | the metadata about an object or several objects in the archive. | ||||
Requirements | Requirements | ||||
------------ | ------------ | ||||
The scope of the meta-deposit is different than the | The scope of the metadata-deposit is different than the | ||||
sparse-deposit. While a sparse-deposit creates a revision with referenced | sparse-deposit. While a sparse-deposit creates a revision with referenced | ||||
directories and content files, the metadata-deposit references one of the | directories and content files, the metadata-deposit references one of the | ||||
following: | following: | ||||
- origin | - origin | ||||
- snapshot | - snapshot | ||||
- revision | - revision | ||||
- release | - release | ||||
Show All 35 Lines | <entry xmlns="http://www.w3.org/2005/Atom" | ||||
</codemeta:author> | </codemeta:author> | ||||
<swh:deposit> | <swh:deposit> | ||||
<swh:reference> | <swh:reference> | ||||
<swh:origin url='https://github.com/user/repo'/> | <swh:origin url='https://github.com/user/repo'/> | ||||
</swh:reference> | </swh:reference> | ||||
</swh:deposit> | </swh:deposit> | ||||
</entry> | </entry> | ||||
Examples by target type | References | ||||
^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^ | ||||
Reference an origin: | |||||
Origins | |||||
======= | |||||
The metadata may be on an origin, identified by the origin's URL: | |||||
.. code:: xml | .. code:: xml | ||||
<swh:deposit> | <swh:deposit> | ||||
<swh:reference> | <swh:reference> | ||||
<swh:origin url="https://github.com/user/repo"/> | <swh:origin url="https://github.com/user/repo" /> | ||||
</swh:reference> | </swh:reference> | ||||
</swh:deposit> | </swh:deposit> | ||||
Graph objects | |||||
============= | |||||
Reference a snapshot, revision or release: | Reference a snapshot, revision or release: | ||||
.. code:: xml | .. code:: xml | ||||
With ${type} in {snp (snapshot), rev (revision), rel (release) }: | |||||
<swh:deposit> | <swh:deposit> | ||||
<swh:reference> | <swh:reference> | ||||
<swh:object id="swh:1:${type}:aaaaaaaaaaaaaa..."/> | <swh:object swhid="swh:1:xxx:aaaaaaaaaaaaaa..." /> | ||||
</swh:reference> | </swh:reference> | ||||
</swh:deposit> | </swh:deposit> | ||||
Loading procedure | Loading procedure | ||||
------------------ | ------------------ | ||||
In this case, the metadata-deposit will be injected as a metadata entry at the | In this case, the metadata-deposit will be injected as a metadata entry of | ||||
appropriate level (origin_metadata, revision_metadata, etc.) with the information | the relevant object, with the information about the contributor of the deposit. | ||||
about the contributor of the deposit. Contrary to the complete and sparse | Contrary to the complete and sparse deposit, there will be no object creation. | ||||
deposit, there will be no object creation. |