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 origin or object in the | A client wishes to deposit only metadata about an origin or object in the | ||||
Software 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 in the archive. | the metadata about an object in the archive. | ||||
Requirements | Requirements | ||||
------------ | ------------ | ||||
The scope of the metadata-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 any of the | ||||
following: | following: | ||||
- origin | - origin | ||||
- snapshot | - snapshot | ||||
- revision | |||||
- release | - release | ||||
- revision | |||||
- directory | |||||
- content | |||||
A complete metadata example | A complete metadata example | ||||
--------------------------- | --------------------------- | ||||
The reference element is included in the metadata xml atomEntry under the | The reference element is included in the metadata xml atomEntry under the | ||||
swh namespace: | swh namespace: | ||||
TODO: publish schema at https://www.softwareheritage.org/schema/2018/deposit | TODO: publish schema at https://www.softwareheritage.org/schema/2018/deposit | ||||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | <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 | Graph objects | ||||
============= | ============= | ||||
Reference a snapshot, revision or release: | It may also reference an object in the `SWH graph <data-model>`: contents, | ||||
directories, revisions, releases, and snapshots: | |||||
.. code:: xml | .. code:: xml | ||||
<swh:deposit> | <swh:deposit> | ||||
<swh:reference> | <swh:reference> | ||||
<swh:object swhid="swh:1:xxx:aaaaaaaaaaaaaa..." /> | <swh:object swhid="swh:1:xxx:aaaaaaaaaaaaaa..." /> | ||||
</swh:reference> | </swh:reference> | ||||
</swh:deposit> | </swh:deposit> | ||||
Show All 9 Lines |