Skip to content

Commit a7e83a6

Browse files
authored
fix: readd distribution to Catalog (#220)
* fix: readd Catalog inherits from Dataset This reverts commit a0fd456. * fix: remove hasPolicy from Catalog object * fix: import correct table on GET dataset
1 parent 7304a0b commit a7e83a6

4 files changed

Lines changed: 28 additions & 15 deletions

File tree

artifacts/src/main/resources/catalog/catalog-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"type": "object",
3434
"allOf": [
3535
{
36-
"$ref": "https://w3id.org/dspace/2025/1/catalog/dataset-schema.json#/definitions/Resource"
36+
"$ref": "https://w3id.org/dspace/2025/1/catalog/dataset-schema.json#/definitions/AbstractDataset"
3737
},
3838
{
3939
"properties": {

artifacts/src/main/resources/catalog/dataset-schema.json

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,14 @@
99
],
1010
"$id": "https://w3id.org/dspace/2025/1/catalog/dataset-schema.json",
1111
"definitions": {
12-
"Dataset": {
12+
"AbstractDataset": {
1313
"type": "object",
1414
"allOf": [
1515
{
1616
"$ref": "#/definitions/Resource"
1717
},
1818
{
1919
"properties": {
20-
"hasPolicy": {
21-
"type": "array",
22-
"items": {
23-
"$ref": "https://w3id.org/dspace/2025/1/negotiation/contract-schema.json#/definitions/Offer"
24-
},
25-
"minItems": 1
26-
},
2720
"distribution": {
2821
"type": "array",
2922
"items": {
@@ -33,7 +26,24 @@
3326
}
3427
}
3528
}
29+
]
30+
},
31+
"Dataset": {
32+
"type": "object",
33+
"allOf": [
34+
{
35+
"$ref": "#/definitions/AbstractDataset"
36+
}
3637
],
38+
"properties": {
39+
"hasPolicy": {
40+
"type": "array",
41+
"items": {
42+
"$ref": "https://w3id.org/dspace/2025/1/negotiation/contract-schema.json#/definitions/Offer"
43+
},
44+
"minItems": 1
45+
}
46+
},
3747
"required": [
3848
"hasPolicy",
3949
"distribution"

specifications/catalog/catalog.protocol.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ provided in protocol-dependent forms, e.g., for an HTTPS binding in the request
7171

7272
### ACK - Dataset
7373

74-
| | |
75-
|----------------|-------------------------------------------------------------------------------|
76-
| **Sent by** | [=Provider=] |
77-
| **Schema** | [JSON Schema](message/schema/dataset-schema.json) |
78-
| **Example** | [Dataset Example](message/example/dataset.json) |
79-
| **Properties** | <p data-include="message/table/dataset.html" data-include-format="html"></p> |
74+
| | |
75+
|----------------|----------------------------------------------------------------------------------|
76+
| **Sent by** | [=Provider=] |
77+
| **Schema** | [JSON Schema](message/schema/dataset-schema.json) |
78+
| **Example** | [Dataset Example](message/example/dataset.json) |
79+
| **Properties** | <p data-include="message/table/rootdataset.html" data-include-format="html"></p> |
8080

8181
- A [=Dataset=] MUST have at least one `hasPolicy` attribute that contains an [=Offer=] defining the [=Policy=] associated with the [=Dataset=].
8282

specifications/common/type.definitions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<p data-include="message/table/dataaddress.html" data-include-format="html">
1313
</p>
1414

15+
<p data-include="message/table/dataset.html" data-include-format="html">
16+
</p>
17+
1518
<p data-include="message/table/distribution.html" data-include-format="html">
1619
</p>
1720

0 commit comments

Comments
 (0)