@twin.org/standards-w3c-dcat 0.0.3-next.9 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/es/dataTypes/dcatDataTypes.js +80 -49
- package/dist/es/dataTypes/dcatDataTypes.js.map +1 -1
- package/dist/es/index.js +6 -2
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IDcatCatalog.js.map +1 -1
- package/dist/es/models/IDcatCatalogBase.js +2 -0
- package/dist/es/models/IDcatCatalogBase.js.map +1 -0
- package/dist/es/models/IDcatCatalogRecord.js.map +1 -1
- package/dist/es/models/IDcatCatalogRecordBase.js +2 -0
- package/dist/es/models/IDcatCatalogRecordBase.js.map +1 -0
- package/dist/es/models/IDcatDataService.js.map +1 -1
- package/dist/es/models/IDcatDataServiceBase.js +2 -0
- package/dist/es/models/IDcatDataServiceBase.js.map +1 -0
- package/dist/es/models/IDcatDataset.js.map +1 -1
- package/dist/es/models/IDcatDatasetBase.js +2 -0
- package/dist/es/models/IDcatDatasetBase.js.map +1 -0
- package/dist/es/models/IDcatDatasetSeries.js.map +1 -1
- package/dist/es/models/IDcatDistribution.js.map +1 -1
- package/dist/es/models/IDcatDistributionBase.js +2 -0
- package/dist/es/models/IDcatDistributionBase.js.map +1 -0
- package/dist/es/models/IDcatRelationship.js.map +1 -1
- package/dist/es/models/IDcatResource.js.map +1 -1
- package/dist/es/models/IDcatResourceBase.js +2 -0
- package/dist/es/models/IDcatResourceBase.js.map +1 -0
- package/dist/es/models/IDcatRole.js.map +1 -1
- package/dist/es/models/dcatContextType.js.map +1 -1
- package/dist/es/models/dcatContexts.js +15 -19
- package/dist/es/models/dcatContexts.js.map +1 -1
- package/dist/es/schemas/DcatCatalog.json +10 -489
- package/dist/es/schemas/DcatCatalogBase.json +109 -0
- package/dist/es/schemas/DcatCatalogRecord.json +10 -210
- package/dist/es/schemas/DcatCatalogRecordBase.json +76 -0
- package/dist/es/schemas/DcatContextType.json +30 -0
- package/dist/es/schemas/DcatDataService.json +10 -356
- package/dist/es/schemas/DcatDataServiceBase.json +43 -0
- package/dist/es/schemas/DcatDataset.json +10 -405
- package/dist/es/schemas/DcatDatasetBase.json +94 -0
- package/dist/es/schemas/DcatDatasetSeries.json +17 -394
- package/dist/es/schemas/DcatDistribution.json +10 -266
- package/dist/es/schemas/DcatDistributionBase.json +134 -0
- package/dist/es/schemas/DcatRelationship.json +11 -170
- package/dist/es/schemas/DcatResource.json +10 -340
- package/dist/es/schemas/DcatResourceBase.json +663 -0
- package/dist/es/schemas/DcatRole.json +15 -167
- package/dist/types/dataTypes/dcatDataTypes.d.ts +0 -1
- package/dist/types/index.d.ts +6 -2
- package/dist/types/models/IDcatCatalog.d.ts +5 -43
- package/dist/types/models/IDcatCatalogBase.d.ts +54 -0
- package/dist/types/models/IDcatCatalogRecord.d.ts +2 -40
- package/dist/types/models/IDcatCatalogRecordBase.d.ts +51 -0
- package/dist/types/models/IDcatDataService.d.ts +5 -22
- package/dist/types/models/IDcatDataServiceBase.d.ts +31 -0
- package/dist/types/models/IDcatDataset.d.ts +5 -51
- package/dist/types/models/IDcatDatasetBase.d.ts +60 -0
- package/dist/types/models/IDcatDatasetSeries.d.ts +6 -0
- package/dist/types/models/IDcatDistribution.d.ts +2 -110
- package/dist/types/models/IDcatDistributionBase.d.ts +123 -0
- package/dist/types/models/IDcatRelationship.d.ts +2 -2
- package/dist/types/models/IDcatResource.d.ts +3 -109
- package/dist/types/models/IDcatResourceBase.d.ts +120 -0
- package/dist/types/models/IDcatRole.d.ts +8 -5
- package/dist/types/models/dcatContextType.d.ts +4 -4
- package/dist/types/models/dcatContexts.d.ts +15 -19
- package/docs/changelog.md +1125 -11
- package/docs/examples.md +25 -1
- package/docs/reference/classes/DcatDataTypes.md +2 -3
- package/docs/reference/index.md +6 -11
- package/docs/reference/interfaces/IDcatCatalog.md +138 -106
- package/docs/reference/interfaces/IDcatCatalogBase.md +558 -0
- package/docs/reference/interfaces/IDcatCatalogRecord.md +53 -25
- package/docs/reference/interfaces/IDcatCatalogRecordBase.md +101 -0
- package/docs/reference/interfaces/IDcatDataService.md +90 -74
- package/docs/reference/interfaces/IDcatDataServiceBase.md +382 -0
- package/docs/reference/interfaces/IDcatDataset.md +120 -85
- package/docs/reference/interfaces/IDcatDatasetBase.md +443 -0
- package/docs/reference/interfaces/IDcatDatasetSeries.md +88 -68
- package/docs/reference/interfaces/IDcatDistribution.md +137 -53
- package/docs/reference/interfaces/IDcatDistributionBase.md +269 -0
- package/docs/reference/interfaces/IDcatRelationship.md +6 -22
- package/docs/reference/interfaces/IDcatResource.md +132 -57
- package/docs/reference/interfaces/IDcatResourceBase.md +260 -0
- package/docs/reference/interfaces/IDcatRole.md +11 -19
- package/docs/reference/type-aliases/DcatContextType.md +4 -4
- package/docs/reference/variables/DcatClasses.md +9 -9
- package/docs/reference/variables/DcatContexts.md +21 -33
- package/docs/reference/variables/DcatRelationshipType.md +9 -9
- package/package.json +10 -10
- package/dist/es/models/types/dcatContextFreeTypes.js +0 -4
- package/dist/es/models/types/dcatContextFreeTypes.js.map +0 -1
- package/dist/es/models/types/dcatPropertyTypes.js +0 -4
- package/dist/es/models/types/dcatPropertyTypes.js.map +0 -1
- package/dist/types/models/types/dcatContextFreeTypes.d.ts +0 -40
- package/dist/types/models/types/dcatPropertyTypes.d.ts +0 -29
- package/docs/reference/type-aliases/CatalogOptionalContext.md +0 -11
- package/docs/reference/type-aliases/CatalogRecordOptionalContext.md +0 -11
- package/docs/reference/type-aliases/DataServiceOptionalContext.md +0 -11
- package/docs/reference/type-aliases/DatasetOptionalContext.md +0 -11
- package/docs/reference/type-aliases/DcatDateTimeType.md +0 -6
- package/docs/reference/type-aliases/DcatDecimalType.md +0 -5
- package/docs/reference/type-aliases/DcatDurationType.md +0 -5
- package/docs/reference/type-aliases/DcatIriType.md +0 -5
- package/docs/reference/type-aliases/DcatLiteralType.md +0 -5
- package/docs/reference/type-aliases/DcatNonNegativeIntegerType.md +0 -5
- package/docs/reference/type-aliases/DistributionOptionalContext.md +0 -11
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
2
|
import type { DcatClasses } from "./dcatClasses.js";
|
|
3
3
|
import type { IDcatDataset } from "./IDcatDataset.js";
|
|
4
|
+
import type { IDcatDatasetBase } from "./IDcatDatasetBase.js";
|
|
4
5
|
/**
|
|
5
6
|
* Interface for DCAT Dataset Series.
|
|
6
7
|
* A collection of datasets that are published separately, but share some common
|
|
@@ -27,4 +28,9 @@ export interface IDcatDatasetSeries extends IDcatDataset {
|
|
|
27
28
|
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_series_member
|
|
28
29
|
*/
|
|
29
30
|
"dcat:seriesMember"?: ObjectOrArray<string>;
|
|
31
|
+
/**
|
|
32
|
+
* A dataset that is part of this dataset series.
|
|
33
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_dataset
|
|
34
|
+
*/
|
|
35
|
+
"dcat:dataset"?: ObjectOrArray<IDcatDatasetBase>;
|
|
30
36
|
}
|
|
@@ -1,122 +1,14 @@
|
|
|
1
|
-
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
|
-
import type { IOdrlPolicy } from "@twin.org/standards-w3c-odrl";
|
|
4
|
-
import type { DcatClasses } from "./dcatClasses.js";
|
|
5
1
|
import type { DcatContextType } from "./dcatContextType.js";
|
|
6
|
-
import type {
|
|
2
|
+
import type { IDcatDistributionBase } from "./IDcatDistributionBase.js";
|
|
7
3
|
/**
|
|
8
4
|
* Interface for DCAT Distribution.
|
|
9
5
|
* A specific representation of a dataset. A dataset might be available in multiple
|
|
10
6
|
* serializations that may differ in various ways.
|
|
11
7
|
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Distribution
|
|
12
8
|
*/
|
|
13
|
-
export interface IDcatDistribution extends
|
|
9
|
+
export interface IDcatDistribution extends IDcatDistributionBase {
|
|
14
10
|
/**
|
|
15
11
|
* The JSON-LD context for the resource.
|
|
16
12
|
*/
|
|
17
13
|
"@context": DcatContextType;
|
|
18
|
-
/**
|
|
19
|
-
* The type identifier, typically "Distribution".
|
|
20
|
-
*/
|
|
21
|
-
"@type": typeof DcatClasses.Distribution;
|
|
22
|
-
/**
|
|
23
|
-
* A name given to the distribution.
|
|
24
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_title
|
|
25
|
-
*/
|
|
26
|
-
"dcterms:title"?: DcatLiteralType;
|
|
27
|
-
/**
|
|
28
|
-
* A free-text account of the distribution.
|
|
29
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_description
|
|
30
|
-
*/
|
|
31
|
-
"dcterms:description"?: DcatLiteralType;
|
|
32
|
-
/**
|
|
33
|
-
* Date of formal issuance of the distribution.
|
|
34
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_release_date
|
|
35
|
-
*/
|
|
36
|
-
"dcterms:issued"?: DcatDateTimeType;
|
|
37
|
-
/**
|
|
38
|
-
* Most recent date on which the distribution was changed, updated or modified.
|
|
39
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_update_date
|
|
40
|
-
*/
|
|
41
|
-
"dcterms:modified"?: DcatDateTimeType;
|
|
42
|
-
/**
|
|
43
|
-
* A legal document under which the distribution is made available.
|
|
44
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_license
|
|
45
|
-
*/
|
|
46
|
-
"dcterms:license"?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Information about who can access the distribution.
|
|
49
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_access_rights
|
|
50
|
-
*/
|
|
51
|
-
"dcterms:accessRights"?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Information about rights held in and over the distribution.
|
|
54
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_rights
|
|
55
|
-
*/
|
|
56
|
-
"dcterms:rights"?: string;
|
|
57
|
-
/**
|
|
58
|
-
* A URL of the resource that gives access to a distribution of the dataset.
|
|
59
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_access_url
|
|
60
|
-
*/
|
|
61
|
-
"dcat:accessURL"?: string;
|
|
62
|
-
/**
|
|
63
|
-
* A data service that gives access to the distribution.
|
|
64
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_access_service
|
|
65
|
-
*/
|
|
66
|
-
"dcat:accessService"?: string;
|
|
67
|
-
/**
|
|
68
|
-
* The URL of the downloadable file in a given format.
|
|
69
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_download_url
|
|
70
|
-
*/
|
|
71
|
-
"dcat:downloadURL"?: string;
|
|
72
|
-
/**
|
|
73
|
-
* The size of the distribution in bytes.
|
|
74
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_byte_size
|
|
75
|
-
*/
|
|
76
|
-
"dcat:byteSize"?: DcatNonNegativeIntegerType;
|
|
77
|
-
/**
|
|
78
|
-
* The minimum spatial separation resolvable in a distribution, measured in meters.
|
|
79
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_spatial_resolution
|
|
80
|
-
*/
|
|
81
|
-
"dcat:spatialResolutionInMeters"?: DcatDecimalType;
|
|
82
|
-
/**
|
|
83
|
-
* Minimum time period resolvable in the distribution.
|
|
84
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_temporal_resolution
|
|
85
|
-
*/
|
|
86
|
-
"dcat:temporalResolution"?: DcatDurationType;
|
|
87
|
-
/**
|
|
88
|
-
* An established standard to which the distribution conforms.
|
|
89
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_conforms_to
|
|
90
|
-
*/
|
|
91
|
-
"dcterms:conformsTo"?: ObjectOrArray<string>;
|
|
92
|
-
/**
|
|
93
|
-
* The media type of the distribution as defined by IANA.
|
|
94
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_media_type
|
|
95
|
-
*/
|
|
96
|
-
"dcat:mediaType"?: string;
|
|
97
|
-
/**
|
|
98
|
-
* The file format of the distribution.
|
|
99
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_format
|
|
100
|
-
*/
|
|
101
|
-
"dcterms:format"?: string;
|
|
102
|
-
/**
|
|
103
|
-
* The compression format of the distribution.
|
|
104
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_compression_format
|
|
105
|
-
*/
|
|
106
|
-
"dcat:compressFormat"?: string;
|
|
107
|
-
/**
|
|
108
|
-
* The package format of the distribution.
|
|
109
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_packaging_format
|
|
110
|
-
*/
|
|
111
|
-
"dcat:packageFormat"?: string;
|
|
112
|
-
/**
|
|
113
|
-
* The checksum property provides a mechanism to verify the data integrity.
|
|
114
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_checksum
|
|
115
|
-
*/
|
|
116
|
-
"spdx:checksum"?: string;
|
|
117
|
-
/**
|
|
118
|
-
* An ODRL conformant policy expressing the rights associated with the distribution.
|
|
119
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_has_policy
|
|
120
|
-
*/
|
|
121
|
-
"odrl:hasPolicy"?: IOdrlPolicy;
|
|
122
14
|
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IOdrlPolicy } from "@twin.org/standards-w3c-odrl";
|
|
3
|
+
import type { DcatClasses } from "./dcatClasses.js";
|
|
4
|
+
/**
|
|
5
|
+
* Base interface for DCAT Distribution without JSON-LD context.
|
|
6
|
+
* This is the context-free variant of IDcatDistribution, intended for embedding
|
|
7
|
+
* distribution objects inline within datasets where the context is provided by the enclosing document.
|
|
8
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Distribution
|
|
9
|
+
*/
|
|
10
|
+
export interface IDcatDistributionBase {
|
|
11
|
+
/**
|
|
12
|
+
* The type identifier, typically "Distribution".
|
|
13
|
+
*/
|
|
14
|
+
"@type": typeof DcatClasses.Distribution;
|
|
15
|
+
/**
|
|
16
|
+
* The unique identifier for the distribution object.
|
|
17
|
+
*/
|
|
18
|
+
"@id"?: string;
|
|
19
|
+
/**
|
|
20
|
+
* A name given to the distribution.
|
|
21
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_title
|
|
22
|
+
*/
|
|
23
|
+
"dcterms:title"?: ObjectOrArray<string>;
|
|
24
|
+
/**
|
|
25
|
+
* A free-text account of the distribution.
|
|
26
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_description
|
|
27
|
+
*/
|
|
28
|
+
"dcterms:description"?: ObjectOrArray<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Date of formal issuance of the distribution.
|
|
31
|
+
* @json-schema format:date-time
|
|
32
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_release_date
|
|
33
|
+
*/
|
|
34
|
+
"dcterms:issued"?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Most recent date on which the distribution was changed, updated or modified.
|
|
37
|
+
* @json-schema format:date-time
|
|
38
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_update_date
|
|
39
|
+
*/
|
|
40
|
+
"dcterms:modified"?: string;
|
|
41
|
+
/**
|
|
42
|
+
* A legal document under which the distribution is made available.
|
|
43
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_license
|
|
44
|
+
*/
|
|
45
|
+
"dcterms:license"?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Information about who can access the distribution.
|
|
48
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_access_rights
|
|
49
|
+
*/
|
|
50
|
+
"dcterms:accessRights"?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Information about rights held in and over the distribution.
|
|
53
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_rights
|
|
54
|
+
*/
|
|
55
|
+
"dcterms:rights"?: string;
|
|
56
|
+
/**
|
|
57
|
+
* A URL of the resource that gives access to a distribution of the dataset.
|
|
58
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_access_url
|
|
59
|
+
*/
|
|
60
|
+
"dcat:accessURL"?: string;
|
|
61
|
+
/**
|
|
62
|
+
* A data service that gives access to the distribution.
|
|
63
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_access_service
|
|
64
|
+
*/
|
|
65
|
+
"dcat:accessService"?: string;
|
|
66
|
+
/**
|
|
67
|
+
* The URL of the downloadable file in a given format.
|
|
68
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_download_url
|
|
69
|
+
*/
|
|
70
|
+
"dcat:downloadURL"?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The size of the distribution in bytes.
|
|
73
|
+
* @json-schema minimum:0
|
|
74
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_byte_size
|
|
75
|
+
*/
|
|
76
|
+
"dcat:byteSize"?: number;
|
|
77
|
+
/**
|
|
78
|
+
* The minimum spatial separation resolvable in a distribution, measured in meters.
|
|
79
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_spatial_resolution
|
|
80
|
+
*/
|
|
81
|
+
"dcat:spatialResolutionInMeters"?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Minimum time period resolvable in the distribution.
|
|
84
|
+
* @json-schema format:duration
|
|
85
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_temporal_resolution
|
|
86
|
+
*/
|
|
87
|
+
"dcat:temporalResolution"?: string;
|
|
88
|
+
/**
|
|
89
|
+
* An established standard to which the distribution conforms.
|
|
90
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_conforms_to
|
|
91
|
+
*/
|
|
92
|
+
"dcterms:conformsTo"?: ObjectOrArray<string>;
|
|
93
|
+
/**
|
|
94
|
+
* The media type of the distribution as defined by IANA.
|
|
95
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_media_type
|
|
96
|
+
*/
|
|
97
|
+
"dcat:mediaType"?: string;
|
|
98
|
+
/**
|
|
99
|
+
* The file format of the distribution.
|
|
100
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_format
|
|
101
|
+
*/
|
|
102
|
+
"dcterms:format"?: string;
|
|
103
|
+
/**
|
|
104
|
+
* The compression format of the distribution.
|
|
105
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_compression_format
|
|
106
|
+
*/
|
|
107
|
+
"dcat:compressFormat"?: string;
|
|
108
|
+
/**
|
|
109
|
+
* The package format of the distribution.
|
|
110
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_packaging_format
|
|
111
|
+
*/
|
|
112
|
+
"dcat:packageFormat"?: string;
|
|
113
|
+
/**
|
|
114
|
+
* The checksum property provides a mechanism to verify the data integrity.
|
|
115
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_checksum
|
|
116
|
+
*/
|
|
117
|
+
"spdx:checksum"?: string;
|
|
118
|
+
/**
|
|
119
|
+
* An ODRL conformant policy expressing the rights associated with the distribution.
|
|
120
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_has_policy
|
|
121
|
+
*/
|
|
122
|
+
"odrl:hasPolicy"?: IOdrlPolicy;
|
|
123
|
+
}
|
|
@@ -8,7 +8,7 @@ import type { IDcatRole } from "./IDcatRole.js";
|
|
|
8
8
|
* between DCAT Resources.
|
|
9
9
|
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Relationship
|
|
10
10
|
*/
|
|
11
|
-
export interface IDcatRelationship
|
|
11
|
+
export interface IDcatRelationship {
|
|
12
12
|
/**
|
|
13
13
|
* The JSON-LD context for the resource.
|
|
14
14
|
*/
|
|
@@ -21,7 +21,7 @@ export interface IDcatRelationship extends IJsonLdNodeObject {
|
|
|
21
21
|
* The link to a related resource.
|
|
22
22
|
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:relationship_relation
|
|
23
23
|
*/
|
|
24
|
-
"dcterms:relation"?: string;
|
|
24
|
+
"dcterms:relation"?: IJsonLdNodeObject | string;
|
|
25
25
|
/**
|
|
26
26
|
* The function of an entity or agent with respect to another resource.
|
|
27
27
|
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:relationship_hadRole
|
|
@@ -1,119 +1,13 @@
|
|
|
1
|
-
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
|
-
import type { IFoafAgent } from "@twin.org/standards-foaf";
|
|
4
|
-
import type { IOdrlPolicy } from "@twin.org/standards-w3c-odrl";
|
|
5
|
-
import type { DcatClasses } from "./dcatClasses.js";
|
|
6
1
|
import type { DcatContextType } from "./dcatContextType.js";
|
|
7
|
-
import type {
|
|
8
|
-
import type { DcatDateTimeType, DcatLiteralType } from "./types/dcatPropertyTypes.js";
|
|
2
|
+
import type { IDcatResourceBase } from "./IDcatResourceBase.js";
|
|
9
3
|
/**
|
|
10
|
-
*
|
|
4
|
+
* Interface for DCAT catalogued resources.
|
|
11
5
|
* This is the parent class of dcat:Dataset, dcat:DataService, and dcat:Catalog.
|
|
12
6
|
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Resource
|
|
13
7
|
*/
|
|
14
|
-
export interface IDcatResource extends
|
|
8
|
+
export interface IDcatResource extends IDcatResourceBase {
|
|
15
9
|
/**
|
|
16
10
|
* The JSON-LD context for the resource.
|
|
17
11
|
*/
|
|
18
12
|
"@context": DcatContextType;
|
|
19
|
-
/**
|
|
20
|
-
* The type of the resource.
|
|
21
|
-
* Typically "Catalog", "Dataset", "DataService", "DatasetSeries", or the base "Resource".
|
|
22
|
-
*/
|
|
23
|
-
"@type": typeof DcatClasses.Resource | typeof DcatClasses.Dataset | typeof DcatClasses.DataService | typeof DcatClasses.Catalog | typeof DcatClasses.DatasetSeries;
|
|
24
|
-
/**
|
|
25
|
-
* A name given to the resource.
|
|
26
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_title
|
|
27
|
-
*/
|
|
28
|
-
"dcterms:title"?: DcatLiteralType;
|
|
29
|
-
/**
|
|
30
|
-
* A free-text account of the resource.
|
|
31
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_description
|
|
32
|
-
*/
|
|
33
|
-
"dcterms:description"?: DcatLiteralType;
|
|
34
|
-
/**
|
|
35
|
-
* A unique identifier of the resource.
|
|
36
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_identifier
|
|
37
|
-
*/
|
|
38
|
-
"dcterms:identifier"?: DcatLiteralType;
|
|
39
|
-
/**
|
|
40
|
-
* Date of formal issuance (publication) of the resource.
|
|
41
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_release_date
|
|
42
|
-
*/
|
|
43
|
-
"dcterms:issued"?: DcatDateTimeType;
|
|
44
|
-
/**
|
|
45
|
-
* Most recent date on which the resource was changed, updated or modified.
|
|
46
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_update_date
|
|
47
|
-
*/
|
|
48
|
-
"dcterms:modified"?: DcatDateTimeType;
|
|
49
|
-
/**
|
|
50
|
-
* A language of the resource.
|
|
51
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_language
|
|
52
|
-
*/
|
|
53
|
-
"dcterms:language"?: ObjectOrArray<string>;
|
|
54
|
-
/**
|
|
55
|
-
* An entity responsible for making the resource available.
|
|
56
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_publisher
|
|
57
|
-
*/
|
|
58
|
-
"dcterms:publisher"?: IFoafAgent | string;
|
|
59
|
-
/**
|
|
60
|
-
* An entity responsible for producing the resource.
|
|
61
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_creator
|
|
62
|
-
*/
|
|
63
|
-
"dcterms:creator"?: IFoafAgent;
|
|
64
|
-
/**
|
|
65
|
-
* Information about who can access the resource or an indication of its security status.
|
|
66
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_access_rights
|
|
67
|
-
*/
|
|
68
|
-
"dcterms:accessRights"?: IJsonLdNodeObject | string;
|
|
69
|
-
/**
|
|
70
|
-
* A legal document under which the resource is made available.
|
|
71
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_license
|
|
72
|
-
*/
|
|
73
|
-
"dcterms:license"?: IJsonLdNodeObject | string;
|
|
74
|
-
/**
|
|
75
|
-
* Information about rights held in and over the resource.
|
|
76
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_rights
|
|
77
|
-
*/
|
|
78
|
-
"dcterms:rights"?: IJsonLdNodeObject | string;
|
|
79
|
-
/**
|
|
80
|
-
* An established standard to which the resource conforms.
|
|
81
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_conforms_to
|
|
82
|
-
*/
|
|
83
|
-
"dcterms:conformsTo"?: ObjectOrArray<string>;
|
|
84
|
-
/**
|
|
85
|
-
* The nature or genre of the resource.
|
|
86
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_type
|
|
87
|
-
*/
|
|
88
|
-
"dcterms:type"?: string;
|
|
89
|
-
/**
|
|
90
|
-
* Relevant contact information for the catalogued resource.
|
|
91
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_contact_point
|
|
92
|
-
*/
|
|
93
|
-
"dcat:contactPoint"?: IJsonLdNodeObject | string;
|
|
94
|
-
/**
|
|
95
|
-
* A keyword or tag describing the resource.
|
|
96
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_keyword
|
|
97
|
-
*/
|
|
98
|
-
"dcat:keyword"?: DcatLiteralType;
|
|
99
|
-
/**
|
|
100
|
-
* A main category of the resource. A resource can have multiple themes.
|
|
101
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_theme
|
|
102
|
-
*/
|
|
103
|
-
"dcat:theme"?: ObjectOrArray<string>;
|
|
104
|
-
/**
|
|
105
|
-
* A Web page that can be navigated to gain access to the resource.
|
|
106
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_landing_page
|
|
107
|
-
*/
|
|
108
|
-
"dcat:landingPage"?: ObjectOrArray<string>;
|
|
109
|
-
/**
|
|
110
|
-
* Link to a description of a relationship with another resource.
|
|
111
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_qualified_relation
|
|
112
|
-
*/
|
|
113
|
-
"dcat:qualifiedRelation"?: IDcatRelationship | string;
|
|
114
|
-
/**
|
|
115
|
-
* An ODRL conformant policy expressing the rights associated with the resource.
|
|
116
|
-
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_has_policy
|
|
117
|
-
*/
|
|
118
|
-
"odrl:hasPolicy"?: IOdrlPolicy;
|
|
119
13
|
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IJsonLdNodeObject, JsonLdObjectWithAliases, JsonLdObjectWithOptionalContext } from "@twin.org/data-json-ld";
|
|
3
|
+
import type { IFoafAgent } from "@twin.org/standards-foaf";
|
|
4
|
+
import type { IOdrlPolicy } from "@twin.org/standards-w3c-odrl";
|
|
5
|
+
import type { DcatClasses } from "./dcatClasses.js";
|
|
6
|
+
import type { IDcatRelationship } from "./IDcatRelationship.js";
|
|
7
|
+
/**
|
|
8
|
+
* Base interface for DCAT catalogued resources without JSON-LD context.
|
|
9
|
+
* This is the context-free variant of IDcatResource, intended for embedding
|
|
10
|
+
* resources inline within other objects where the context is provided by the enclosing document.
|
|
11
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Resource
|
|
12
|
+
*/
|
|
13
|
+
export interface IDcatResourceBase {
|
|
14
|
+
/**
|
|
15
|
+
* The type of the resource.
|
|
16
|
+
* Typically "Catalog", "Dataset", "DataService", "DatasetSeries", or the base "Resource".
|
|
17
|
+
*/
|
|
18
|
+
"@type": typeof DcatClasses.Resource | typeof DcatClasses.Dataset | typeof DcatClasses.DataService | typeof DcatClasses.Catalog | typeof DcatClasses.DatasetSeries;
|
|
19
|
+
/**
|
|
20
|
+
* The unique identifier for the resource.
|
|
21
|
+
*/
|
|
22
|
+
"@id"?: string;
|
|
23
|
+
/**
|
|
24
|
+
* A name given to the resource.
|
|
25
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_title
|
|
26
|
+
*/
|
|
27
|
+
"dcterms:title"?: ObjectOrArray<string>;
|
|
28
|
+
/**
|
|
29
|
+
* A free-text account of the resource.
|
|
30
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_description
|
|
31
|
+
*/
|
|
32
|
+
"dcterms:description"?: ObjectOrArray<string>;
|
|
33
|
+
/**
|
|
34
|
+
* A unique identifier of the resource.
|
|
35
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_identifier
|
|
36
|
+
*/
|
|
37
|
+
"dcterms:identifier"?: ObjectOrArray<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Date of formal issuance (publication) of the resource.
|
|
40
|
+
* @json-schema format:date-time
|
|
41
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_release_date
|
|
42
|
+
*/
|
|
43
|
+
"dcterms:issued"?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Most recent date on which the resource was changed, updated or modified.
|
|
46
|
+
* @json-schema format:date-time
|
|
47
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_update_date
|
|
48
|
+
*/
|
|
49
|
+
"dcterms:modified"?: string;
|
|
50
|
+
/**
|
|
51
|
+
* A language of the resource.
|
|
52
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_language
|
|
53
|
+
*/
|
|
54
|
+
"dcterms:language"?: ObjectOrArray<string>;
|
|
55
|
+
/**
|
|
56
|
+
* An entity responsible for making the resource available.
|
|
57
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_publisher
|
|
58
|
+
*/
|
|
59
|
+
"dcterms:publisher"?: JsonLdObjectWithAliases<IFoafAgent, "foaf"> | string;
|
|
60
|
+
/**
|
|
61
|
+
* An entity responsible for producing the resource.
|
|
62
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_creator
|
|
63
|
+
*/
|
|
64
|
+
"dcterms:creator"?: JsonLdObjectWithAliases<IFoafAgent, "foaf"> | string;
|
|
65
|
+
/**
|
|
66
|
+
* Information about who can access the resource or an indication of its security status.
|
|
67
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_access_rights
|
|
68
|
+
*/
|
|
69
|
+
"dcterms:accessRights"?: IJsonLdNodeObject | string;
|
|
70
|
+
/**
|
|
71
|
+
* A legal document under which the resource is made available.
|
|
72
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_license
|
|
73
|
+
*/
|
|
74
|
+
"dcterms:license"?: IJsonLdNodeObject | string;
|
|
75
|
+
/**
|
|
76
|
+
* Information about rights held in and over the resource.
|
|
77
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_rights
|
|
78
|
+
*/
|
|
79
|
+
"dcterms:rights"?: IJsonLdNodeObject | string;
|
|
80
|
+
/**
|
|
81
|
+
* An established standard to which the resource conforms.
|
|
82
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_conforms_to
|
|
83
|
+
*/
|
|
84
|
+
"dcterms:conformsTo"?: ObjectOrArray<string>;
|
|
85
|
+
/**
|
|
86
|
+
* The nature or genre of the resource.
|
|
87
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_type
|
|
88
|
+
*/
|
|
89
|
+
"dcterms:type"?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Relevant contact information for the catalogued resource.
|
|
92
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_contact_point
|
|
93
|
+
*/
|
|
94
|
+
"dcat:contactPoint"?: IJsonLdNodeObject | string;
|
|
95
|
+
/**
|
|
96
|
+
* A keyword or tag describing the resource.
|
|
97
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_keyword
|
|
98
|
+
*/
|
|
99
|
+
"dcat:keyword"?: ObjectOrArray<string>;
|
|
100
|
+
/**
|
|
101
|
+
* A main category of the resource. A resource can have multiple themes.
|
|
102
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_theme
|
|
103
|
+
*/
|
|
104
|
+
"dcat:theme"?: ObjectOrArray<string>;
|
|
105
|
+
/**
|
|
106
|
+
* A Web page that can be navigated to gain access to the resource.
|
|
107
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_landing_page
|
|
108
|
+
*/
|
|
109
|
+
"dcat:landingPage"?: ObjectOrArray<string>;
|
|
110
|
+
/**
|
|
111
|
+
* Link to a description of a relationship with another resource.
|
|
112
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_qualified_relation
|
|
113
|
+
*/
|
|
114
|
+
"dcat:qualifiedRelation"?: IDcatRelationship | string;
|
|
115
|
+
/**
|
|
116
|
+
* An ODRL conformant policy expressing the rights associated with the resource.
|
|
117
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_has_policy
|
|
118
|
+
*/
|
|
119
|
+
"odrl:hasPolicy"?: JsonLdObjectWithOptionalContext<IOdrlPolicy>;
|
|
120
|
+
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
2
|
import type { DcatClasses } from "./dcatClasses.js";
|
|
3
3
|
import type { DcatContextType } from "./dcatContextType.js";
|
|
4
|
-
import type { DcatLiteralType } from "./types/dcatPropertyTypes.js";
|
|
5
4
|
/**
|
|
6
5
|
* Interface for DCAT Role.
|
|
7
6
|
* A role is the function of a resource or agent with respect to another resource,
|
|
8
7
|
* in the context of resource attribution or resource relationships.
|
|
9
8
|
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Role
|
|
10
9
|
*/
|
|
11
|
-
export interface IDcatRole
|
|
10
|
+
export interface IDcatRole {
|
|
12
11
|
/**
|
|
13
12
|
* The JSON-LD context for the resource.
|
|
14
13
|
*/
|
|
@@ -18,8 +17,12 @@ export interface IDcatRole extends IJsonLdNodeObject {
|
|
|
18
17
|
*/
|
|
19
18
|
"@type": typeof DcatClasses.Role;
|
|
20
19
|
/**
|
|
21
|
-
*
|
|
20
|
+
* The unique identifier for the role object.
|
|
21
|
+
*/
|
|
22
|
+
"@id"?: string;
|
|
23
|
+
/**
|
|
24
|
+
* A name given to the role.
|
|
22
25
|
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_title
|
|
23
26
|
*/
|
|
24
|
-
"dcterms:title"?:
|
|
27
|
+
"dcterms:title"?: ObjectOrArray<string>;
|
|
25
28
|
}
|
|
@@ -8,8 +8,8 @@ import type { DcatContexts } from "./dcatContexts.js";
|
|
|
8
8
|
* Supports the DCAT context URL or arrays with additional context definitions.
|
|
9
9
|
*/
|
|
10
10
|
export type DcatContextType = {
|
|
11
|
-
dcat: typeof DcatContexts.
|
|
12
|
-
dcterms: typeof DublinCoreContexts.
|
|
13
|
-
odrl?: typeof OdrlContexts.
|
|
14
|
-
foaf?: typeof FoafContexts.
|
|
11
|
+
dcat: typeof DcatContexts.Namespace;
|
|
12
|
+
dcterms: typeof DublinCoreContexts.NamespaceTerms;
|
|
13
|
+
odrl?: typeof OdrlContexts.Namespace;
|
|
14
|
+
foaf?: typeof FoafContexts.Namespace;
|
|
15
15
|
} & IJsonLdContextDefinition;
|
|
@@ -4,37 +4,33 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const DcatContexts: {
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
7
|
+
* The canonical RDF namespace URI.
|
|
8
8
|
*/
|
|
9
|
-
readonly
|
|
9
|
+
readonly Namespace: "http://www.w3.org/ns/dcat#";
|
|
10
10
|
/**
|
|
11
|
-
* The
|
|
11
|
+
* The value to use in @context.
|
|
12
|
+
* Note: Context matches Namespace (both include trailing hash) as per DCAT 3.0 specification.
|
|
13
|
+
* The DCAT JSON-LD context URL format includes a trailing hash.
|
|
12
14
|
*/
|
|
13
|
-
readonly
|
|
15
|
+
readonly Context: "http://www.w3.org/ns/dcat#";
|
|
14
16
|
/**
|
|
15
|
-
* The
|
|
17
|
+
* The JSON-LD Context URL.
|
|
16
18
|
*/
|
|
17
|
-
readonly
|
|
19
|
+
readonly JsonLdContext: "https://www.w3.org/ns/dcat.jsonld";
|
|
18
20
|
/**
|
|
19
|
-
* The
|
|
20
|
-
* @see https://www.w3.org/TR/rdf-schema/
|
|
21
|
+
* The namespace location of the hosted version of the JSON Schema.
|
|
21
22
|
*/
|
|
22
|
-
readonly
|
|
23
|
+
readonly JsonSchemaNamespace: "https://schema.twindev.org/w3c-dcat/";
|
|
23
24
|
/**
|
|
24
|
-
* The
|
|
25
|
+
* The namespace for RDF vocabulary.
|
|
25
26
|
* @see https://www.w3.org/TR/rdf-schema/
|
|
26
27
|
*/
|
|
27
|
-
readonly
|
|
28
|
-
/**
|
|
29
|
-
* The context for SPDX (Software Package Data Exchange) vocabulary.
|
|
30
|
-
* @see https://spdx.org/rdf/terms
|
|
31
|
-
*/
|
|
32
|
-
readonly ContextSpdx: "http://spdx.org/rdf/terms#";
|
|
28
|
+
readonly NamespaceRdf: "http://www.w3.org/2000/01/rdf-schema#";
|
|
33
29
|
/**
|
|
34
|
-
* The context for
|
|
35
|
-
* @see https://www.w3.org/
|
|
30
|
+
* The context for RDF vocabulary Json-LD.
|
|
31
|
+
* @see https://www.w3.org/TR/rdf-schema/
|
|
36
32
|
*/
|
|
37
|
-
readonly
|
|
33
|
+
readonly JsonLdContextRdf: "https://schema.twindev.org/w3c-rdf/types.jsonld";
|
|
38
34
|
};
|
|
39
35
|
/**
|
|
40
36
|
* The contexts for DCAT.
|