@twin.org/standards-w3c-dcat 0.0.3-next.3
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/LICENSE +201 -0
- package/README.md +21 -0
- package/dist/es/dataTypes/dcatDataTypes.js +77 -0
- package/dist/es/dataTypes/dcatDataTypes.js.map +1 -0
- package/dist/es/index.js +18 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/ICatalog.js +2 -0
- package/dist/es/models/ICatalog.js.map +1 -0
- package/dist/es/models/ICatalogRecord.js +2 -0
- package/dist/es/models/ICatalogRecord.js.map +1 -0
- package/dist/es/models/IDataService.js +2 -0
- package/dist/es/models/IDataService.js.map +1 -0
- package/dist/es/models/IDataset.js +2 -0
- package/dist/es/models/IDataset.js.map +1 -0
- package/dist/es/models/IDatasetSeries.js +2 -0
- package/dist/es/models/IDatasetSeries.js.map +1 -0
- package/dist/es/models/IDistribution.js +2 -0
- package/dist/es/models/IDistribution.js.map +1 -0
- package/dist/es/models/IRelationship.js +2 -0
- package/dist/es/models/IRelationship.js.map +1 -0
- package/dist/es/models/IResource.js +2 -0
- package/dist/es/models/IResource.js.map +1 -0
- package/dist/es/models/IRole.js +2 -0
- package/dist/es/models/IRole.js.map +1 -0
- package/dist/es/models/dcatClasses.js +56 -0
- package/dist/es/models/dcatClasses.js.map +1 -0
- package/dist/es/models/dcatContextType.js +2 -0
- package/dist/es/models/dcatContextType.js.map +1 -0
- package/dist/es/models/dcatContexts.js +38 -0
- package/dist/es/models/dcatContexts.js.map +1 -0
- package/dist/es/models/dcatRelationshipTypes.js +57 -0
- package/dist/es/models/dcatRelationshipTypes.js.map +1 -0
- package/dist/es/models/types/dcatPropertyTypes.js +4 -0
- package/dist/es/models/types/dcatPropertyTypes.js.map +1 -0
- package/dist/es/schemas/Catalog.json +491 -0
- package/dist/es/schemas/CatalogRecord.json +212 -0
- package/dist/es/schemas/DataService.json +358 -0
- package/dist/es/schemas/Dataset.json +407 -0
- package/dist/es/schemas/DatasetSeries.json +425 -0
- package/dist/es/schemas/Distribution.json +268 -0
- package/dist/es/schemas/Relationship.json +187 -0
- package/dist/es/schemas/Resource.json +342 -0
- package/dist/es/schemas/Role.json +182 -0
- package/dist/types/dataTypes/dcatDataTypes.d.ts +14 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/models/ICatalog.d.ts +53 -0
- package/dist/types/models/ICatalogRecord.d.ts +52 -0
- package/dist/types/models/IDataService.d.ts +31 -0
- package/dist/types/models/IDataset.d.ts +60 -0
- package/dist/types/models/IDatasetSeries.d.ts +30 -0
- package/dist/types/models/IDistribution.d.ts +122 -0
- package/dist/types/models/IRelationship.d.ts +30 -0
- package/dist/types/models/IResource.d.ts +119 -0
- package/dist/types/models/IRole.d.ts +25 -0
- package/dist/types/models/dcatClasses.d.ts +56 -0
- package/dist/types/models/dcatContextType.d.ts +11 -0
- package/dist/types/models/dcatContexts.d.ts +38 -0
- package/dist/types/models/dcatRelationshipTypes.d.ts +57 -0
- package/dist/types/models/types/dcatPropertyTypes.d.ts +29 -0
- package/docs/changelog.md +22 -0
- package/docs/examples.md +1 -0
- package/docs/reference/classes/DcatDataTypes.md +38 -0
- package/docs/reference/index.md +36 -0
- package/docs/reference/interfaces/ICatalog.md +557 -0
- package/docs/reference/interfaces/ICatalogRecord.md +113 -0
- package/docs/reference/interfaces/IDataService.md +382 -0
- package/docs/reference/interfaces/IDataset.md +447 -0
- package/docs/reference/interfaces/IDatasetSeries.md +509 -0
- package/docs/reference/interfaces/IDistribution.md +281 -0
- package/docs/reference/interfaces/IRelationship.md +65 -0
- package/docs/reference/interfaces/IResource.md +274 -0
- package/docs/reference/interfaces/IRole.md +53 -0
- package/docs/reference/type-aliases/DateTimeType.md +6 -0
- package/docs/reference/type-aliases/DcatClasses.md +5 -0
- package/docs/reference/type-aliases/DcatContextType.md +16 -0
- package/docs/reference/type-aliases/DcatContexts.md +5 -0
- package/docs/reference/type-aliases/DcatRelationshipType.md +5 -0
- package/docs/reference/type-aliases/DecimalType.md +5 -0
- package/docs/reference/type-aliases/DurationType.md +5 -0
- package/docs/reference/type-aliases/IriType.md +5 -0
- package/docs/reference/type-aliases/LiteralType.md +5 -0
- package/docs/reference/type-aliases/NonNegativeIntegerType.md +5 -0
- package/docs/reference/variables/DcatClasses.md +102 -0
- package/docs/reference/variables/DcatContexts.md +63 -0
- package/docs/reference/variables/DcatRelationshipType.md +103 -0
- package/locales/en.json +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/w3c-dcat/Role",
|
|
4
|
+
"description": "Interface for DCAT Role. A role is the function of a resource or agent with respect to another resource, in the context of resource attribution or resource relationships.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"@context": {
|
|
8
|
+
"description": "The DCAT JSON-LD context type. Supports the DCAT context URL or arrays with additional context definitions.",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": {
|
|
11
|
+
"anyOf": [
|
|
12
|
+
{
|
|
13
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdExpandedTermDefinition"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": [
|
|
17
|
+
"null",
|
|
18
|
+
"string"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"properties": {
|
|
24
|
+
"@base": {
|
|
25
|
+
"type": [
|
|
26
|
+
"string",
|
|
27
|
+
"null"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"@direction": {
|
|
31
|
+
"type": [
|
|
32
|
+
"string",
|
|
33
|
+
"null"
|
|
34
|
+
],
|
|
35
|
+
"enum": [
|
|
36
|
+
"ltr",
|
|
37
|
+
"rtl",
|
|
38
|
+
null
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"@import": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"@language": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
"@propagate": {
|
|
48
|
+
"type": "boolean"
|
|
49
|
+
},
|
|
50
|
+
"@protected": {
|
|
51
|
+
"type": "boolean"
|
|
52
|
+
},
|
|
53
|
+
"@type": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"@container": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"const": "@set"
|
|
59
|
+
},
|
|
60
|
+
"@protected": {
|
|
61
|
+
"type": "boolean"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": [
|
|
65
|
+
"@container"
|
|
66
|
+
],
|
|
67
|
+
"additionalProperties": false
|
|
68
|
+
},
|
|
69
|
+
"@version": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"const": "1.1"
|
|
72
|
+
},
|
|
73
|
+
"@vocab": {
|
|
74
|
+
"type": [
|
|
75
|
+
"string",
|
|
76
|
+
"null"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"dcat": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"const": "http://www.w3.org/ns/dcat#"
|
|
82
|
+
},
|
|
83
|
+
"dcterms": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"const": "http://purl.org/dc/terms/"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": [
|
|
89
|
+
"dcat",
|
|
90
|
+
"dcterms"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"@id": {
|
|
94
|
+
"anyOf": [
|
|
95
|
+
{
|
|
96
|
+
"type": "string"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "array",
|
|
100
|
+
"items": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"@included": {
|
|
107
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
108
|
+
},
|
|
109
|
+
"@graph": {
|
|
110
|
+
"anyOf": [
|
|
111
|
+
{
|
|
112
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "array",
|
|
116
|
+
"items": {
|
|
117
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"@nest": {
|
|
123
|
+
"anyOf": [
|
|
124
|
+
{
|
|
125
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"type": "array",
|
|
129
|
+
"items": {
|
|
130
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"@type": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"const": "Role",
|
|
138
|
+
"description": "The type identifier, typically \"Role\"."
|
|
139
|
+
},
|
|
140
|
+
"@reverse": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": {
|
|
143
|
+
"type": "string"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"@index": {
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"dcterms:title": {
|
|
150
|
+
"$ref": "https://schema.twindev.org/w3c-dcat/LiteralType",
|
|
151
|
+
"description": "A name given to the distribution."
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": [
|
|
155
|
+
"@type"
|
|
156
|
+
],
|
|
157
|
+
"additionalProperties": {
|
|
158
|
+
"anyOf": [
|
|
159
|
+
{
|
|
160
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"type": "array"
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class providing DCAT data type utilities and JSON-LD redirect registration.
|
|
3
|
+
*/
|
|
4
|
+
export declare class DcatDataTypes {
|
|
5
|
+
/**
|
|
6
|
+
* Register redirects for DCAT namespace to enable offline JSON-LD processing.
|
|
7
|
+
* This maps the W3C DCAT namespace to a local redirect URL for faster resolution.
|
|
8
|
+
*/
|
|
9
|
+
static registerRedirects(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Register all the DCAT data types with their JSON schemas.
|
|
12
|
+
*/
|
|
13
|
+
static registerTypes(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./dataTypes/dcatDataTypes.js";
|
|
2
|
+
export * from "./models/dcatClasses.js";
|
|
3
|
+
export * from "./models/dcatContexts.js";
|
|
4
|
+
export * from "./models/dcatContextType.js";
|
|
5
|
+
export * from "./models/dcatRelationshipTypes.js";
|
|
6
|
+
export * from "./models/ICatalog.js";
|
|
7
|
+
export * from "./models/ICatalogRecord.js";
|
|
8
|
+
export * from "./models/IDataService.js";
|
|
9
|
+
export * from "./models/IDataset.js";
|
|
10
|
+
export * from "./models/IDatasetSeries.js";
|
|
11
|
+
export * from "./models/IDistribution.js";
|
|
12
|
+
export * from "./models/IRelationship.js";
|
|
13
|
+
export * from "./models/IResource.js";
|
|
14
|
+
export * from "./models/IRole.js";
|
|
15
|
+
export * from "./models/types/dcatPropertyTypes.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { DcatClasses } from "./dcatClasses.js";
|
|
3
|
+
import type { ICatalogRecord } from "./ICatalogRecord.js";
|
|
4
|
+
import type { IDataService } from "./IDataService.js";
|
|
5
|
+
import type { IDataset } from "./IDataset.js";
|
|
6
|
+
import type { IResource } from "./IResource.js";
|
|
7
|
+
/**
|
|
8
|
+
* Interface for DCAT Catalog.
|
|
9
|
+
* A curated collection of metadata about resources (datasets and data services).
|
|
10
|
+
* Note: dcat:Catalog is a sub-class of dcat:Dataset per the W3C spec.
|
|
11
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog
|
|
12
|
+
*/
|
|
13
|
+
export interface ICatalog extends IDataset {
|
|
14
|
+
/**
|
|
15
|
+
* The type identifier, typically "Catalog".
|
|
16
|
+
*/
|
|
17
|
+
"@type": typeof DcatClasses.Catalog;
|
|
18
|
+
/**
|
|
19
|
+
* A homepage of the catalog (a public Web document usually available in HTML).
|
|
20
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_homepage
|
|
21
|
+
*/
|
|
22
|
+
"foaf:homepage"?: string;
|
|
23
|
+
/**
|
|
24
|
+
* A knowledge organization system (KOS) used to classify the resources in the catalog.
|
|
25
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_themes
|
|
26
|
+
*/
|
|
27
|
+
"dcat:themeTaxonomy"?: ObjectOrArray<IResource>;
|
|
28
|
+
/**
|
|
29
|
+
* A resource that is listed in the catalog.
|
|
30
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_resource
|
|
31
|
+
*/
|
|
32
|
+
"dcat:resource"?: ObjectOrArray<IResource>;
|
|
33
|
+
/**
|
|
34
|
+
* A dataset that is listed in the catalog.
|
|
35
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_dataset
|
|
36
|
+
*/
|
|
37
|
+
"dcat:dataset"?: ObjectOrArray<IDataset>;
|
|
38
|
+
/**
|
|
39
|
+
* A data service that is listed in the catalog.
|
|
40
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_service
|
|
41
|
+
*/
|
|
42
|
+
"dcat:service"?: ObjectOrArray<IDataService>;
|
|
43
|
+
/**
|
|
44
|
+
* A catalog that is listed in the catalog.
|
|
45
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_catalog
|
|
46
|
+
*/
|
|
47
|
+
"dcat:catalog"?: ObjectOrArray<ICatalog>;
|
|
48
|
+
/**
|
|
49
|
+
* A record describing the registration of a single resource in the catalog.
|
|
50
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_catalog_record
|
|
51
|
+
*/
|
|
52
|
+
"dcat:record"?: ObjectOrArray<ICatalogRecord>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
|
+
import type { DcatClasses } from "./dcatClasses.js";
|
|
4
|
+
import type { DcatContextType } from "./dcatContextType.js";
|
|
5
|
+
import type { IResource } from "./IResource.js";
|
|
6
|
+
import type { DateTimeType, LiteralType } from "./types/dcatPropertyTypes.js";
|
|
7
|
+
/**
|
|
8
|
+
* Interface for DCAT Catalog Record.
|
|
9
|
+
* A record in a catalog, describing the registration of a single dataset or data
|
|
10
|
+
* service.
|
|
11
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog_Record
|
|
12
|
+
*/
|
|
13
|
+
export interface ICatalogRecord extends IJsonLdNodeObject {
|
|
14
|
+
/**
|
|
15
|
+
* The JSON-LD context for the resource.
|
|
16
|
+
*/
|
|
17
|
+
"@context"?: DcatContextType;
|
|
18
|
+
/**
|
|
19
|
+
* The type identifier, typically "CatalogRecord".
|
|
20
|
+
*/
|
|
21
|
+
"@type": typeof DcatClasses.CatalogRecord;
|
|
22
|
+
/**
|
|
23
|
+
* A name given to the catalog record.
|
|
24
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_title
|
|
25
|
+
*/
|
|
26
|
+
"dcterms:title"?: LiteralType;
|
|
27
|
+
/**
|
|
28
|
+
* A free-text account of the catalog record.
|
|
29
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_description
|
|
30
|
+
*/
|
|
31
|
+
"dcterms:description"?: LiteralType;
|
|
32
|
+
/**
|
|
33
|
+
* The date of listing of the catalog record in the catalog.
|
|
34
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_listing_date
|
|
35
|
+
*/
|
|
36
|
+
"dcterms:issued"?: DateTimeType;
|
|
37
|
+
/**
|
|
38
|
+
* Most recent date on which the catalog record entry was changed or modified.
|
|
39
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_update_date
|
|
40
|
+
*/
|
|
41
|
+
"dcterms:modified"?: DateTimeType;
|
|
42
|
+
/**
|
|
43
|
+
* An established standard to which the catalog record conforms.
|
|
44
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_conforms_to
|
|
45
|
+
*/
|
|
46
|
+
"dcterms:conformsTo"?: ObjectOrArray<string>;
|
|
47
|
+
/**
|
|
48
|
+
* The dataset or data service described in the catalog record.
|
|
49
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_primary_topic
|
|
50
|
+
*/
|
|
51
|
+
"foaf:primaryTopic"?: IResource;
|
|
52
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { DcatClasses } from "./dcatClasses.js";
|
|
3
|
+
import type { IResource } from "./IResource.js";
|
|
4
|
+
/**
|
|
5
|
+
* Interface for DCAT Data Service.
|
|
6
|
+
* A collection of operations that provides access to one or more datasets or data
|
|
7
|
+
* processing functions.
|
|
8
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Data_Service
|
|
9
|
+
*/
|
|
10
|
+
export interface IDataService extends IResource {
|
|
11
|
+
/**
|
|
12
|
+
* The type identifier, typically "DataService".
|
|
13
|
+
*/
|
|
14
|
+
"@type": typeof DcatClasses.DataService;
|
|
15
|
+
/**
|
|
16
|
+
* The root location or primary endpoint of the service (a Web-resolvable IRI).
|
|
17
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:data_service_endpoint_url
|
|
18
|
+
*/
|
|
19
|
+
"dcat:endpointURL"?: string;
|
|
20
|
+
/**
|
|
21
|
+
* A description of the services available via the end-points, including their
|
|
22
|
+
* operations, parameters, etc.
|
|
23
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:data_service_endpoint_description
|
|
24
|
+
*/
|
|
25
|
+
"dcat:endpointDescription"?: string;
|
|
26
|
+
/**
|
|
27
|
+
* A collection of data that this data service can distribute.
|
|
28
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:data_service_serves_dataset
|
|
29
|
+
*/
|
|
30
|
+
"dcat:servesDataset"?: ObjectOrArray<string>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
|
+
import type { IPeriodOfTime } from "@twin.org/standards-dublin-core";
|
|
4
|
+
import type { DcatClasses } from "./dcatClasses.js";
|
|
5
|
+
import type { IDistribution } from "./IDistribution.js";
|
|
6
|
+
import type { IResource } from "./IResource.js";
|
|
7
|
+
import type { DecimalType, DurationType } from "./types/dcatPropertyTypes.js";
|
|
8
|
+
/**
|
|
9
|
+
* Interface for DCAT Dataset.
|
|
10
|
+
* A collection of data, published or curated by a single agent, and available
|
|
11
|
+
* for access or download in one or more representations.
|
|
12
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset
|
|
13
|
+
*/
|
|
14
|
+
export interface IDataset extends IResource {
|
|
15
|
+
/**
|
|
16
|
+
* The type identifier, typically "Dataset".
|
|
17
|
+
* Can also be "Catalog" or "DatasetSeries" for subclasses.
|
|
18
|
+
*/
|
|
19
|
+
"@type": typeof DcatClasses.Dataset | typeof DcatClasses.Catalog | typeof DcatClasses.DatasetSeries;
|
|
20
|
+
/**
|
|
21
|
+
* An available distribution of the dataset.
|
|
22
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_distribution
|
|
23
|
+
*/
|
|
24
|
+
"dcat:distribution"?: ObjectOrArray<IDistribution>;
|
|
25
|
+
/**
|
|
26
|
+
* The frequency at which the dataset is published.
|
|
27
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_frequency
|
|
28
|
+
*/
|
|
29
|
+
"dcterms:accrualPeriodicity"?: string;
|
|
30
|
+
/**
|
|
31
|
+
* A dataset series of which the dataset is part.
|
|
32
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_in_series
|
|
33
|
+
*/
|
|
34
|
+
"dcat:inSeries"?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The geographical area covered by the dataset.
|
|
37
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_spatial
|
|
38
|
+
*/
|
|
39
|
+
"dcterms:spatial"?: IJsonLdNodeObject | ObjectOrArray<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Minimum spatial separation resolvable in a dataset, measured in meters.
|
|
42
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_spatial_resolution
|
|
43
|
+
*/
|
|
44
|
+
"dcat:spatialResolutionInMeters"?: DecimalType;
|
|
45
|
+
/**
|
|
46
|
+
* The temporal period that the dataset covers.
|
|
47
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_temporal
|
|
48
|
+
*/
|
|
49
|
+
"dcterms:temporal"?: IPeriodOfTime;
|
|
50
|
+
/**
|
|
51
|
+
* Minimum time period resolvable in the dataset.
|
|
52
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_temporal_resolution
|
|
53
|
+
*/
|
|
54
|
+
"dcat:temporalResolution"?: DurationType;
|
|
55
|
+
/**
|
|
56
|
+
* An activity that generated, or provides the business context for, the creation of the dataset.
|
|
57
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_was_generated_by
|
|
58
|
+
*/
|
|
59
|
+
"prov:wasGeneratedBy"?: IJsonLdNodeObject | string;
|
|
60
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { DcatClasses } from "./dcatClasses.js";
|
|
3
|
+
import type { IDataset } from "./IDataset.js";
|
|
4
|
+
/**
|
|
5
|
+
* Interface for DCAT Dataset Series.
|
|
6
|
+
* A collection of datasets that are published separately, but share some common
|
|
7
|
+
* characteristics that enable them to be grouped together.
|
|
8
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset_Series
|
|
9
|
+
*/
|
|
10
|
+
export interface IDatasetSeries extends IDataset {
|
|
11
|
+
/**
|
|
12
|
+
* The type identifier, typically "DatasetSeries".
|
|
13
|
+
*/
|
|
14
|
+
"@type": typeof DcatClasses.DatasetSeries;
|
|
15
|
+
/**
|
|
16
|
+
* A dataset that is part of this dataset series.
|
|
17
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_series_first
|
|
18
|
+
*/
|
|
19
|
+
"dcat:first"?: string;
|
|
20
|
+
/**
|
|
21
|
+
* A dataset that is part of this dataset series.
|
|
22
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_series_last
|
|
23
|
+
*/
|
|
24
|
+
"dcat:last"?: string;
|
|
25
|
+
/**
|
|
26
|
+
* A dataset that is part of this dataset series.
|
|
27
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_series_member
|
|
28
|
+
*/
|
|
29
|
+
"dcat:seriesMember"?: ObjectOrArray<string>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
import type { DcatContextType } from "./dcatContextType.js";
|
|
6
|
+
import type { DateTimeType, DecimalType, DurationType, LiteralType, NonNegativeIntegerType } from "./types/dcatPropertyTypes.js";
|
|
7
|
+
/**
|
|
8
|
+
* Interface for DCAT Distribution.
|
|
9
|
+
* A specific representation of a dataset. A dataset might be available in multiple
|
|
10
|
+
* serializations that may differ in various ways.
|
|
11
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Distribution
|
|
12
|
+
*/
|
|
13
|
+
export interface IDistribution extends IJsonLdNodeObject {
|
|
14
|
+
/**
|
|
15
|
+
* The JSON-LD context for the resource.
|
|
16
|
+
*/
|
|
17
|
+
"@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"?: LiteralType;
|
|
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"?: LiteralType;
|
|
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"?: DateTimeType;
|
|
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"?: DateTimeType;
|
|
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"?: NonNegativeIntegerType;
|
|
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"?: DecimalType;
|
|
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"?: DurationType;
|
|
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
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { DcatClasses } from "./dcatClasses.js";
|
|
3
|
+
import type { DcatContextType } from "./dcatContextType.js";
|
|
4
|
+
import type { IRole } from "./IRole.js";
|
|
5
|
+
/**
|
|
6
|
+
* Interface for DCAT Relationship.
|
|
7
|
+
* An association class for attaching additional information to a relationship
|
|
8
|
+
* between DCAT Resources.
|
|
9
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Relationship
|
|
10
|
+
*/
|
|
11
|
+
export interface IRelationship extends IJsonLdNodeObject {
|
|
12
|
+
/**
|
|
13
|
+
* The JSON-LD context for the resource.
|
|
14
|
+
*/
|
|
15
|
+
"@context": DcatContextType;
|
|
16
|
+
/**
|
|
17
|
+
* The type identifier, typically "Relationship".
|
|
18
|
+
*/
|
|
19
|
+
"@type": typeof DcatClasses.Relationship;
|
|
20
|
+
/**
|
|
21
|
+
* The link to a related resource.
|
|
22
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:relationship_relation
|
|
23
|
+
*/
|
|
24
|
+
"dcterms:relation"?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The function of an entity or agent with respect to another resource.
|
|
27
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:relationship_hadRole
|
|
28
|
+
*/
|
|
29
|
+
"dcat:hadRole"?: IRole;
|
|
30
|
+
}
|