@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.
Files changed (105) hide show
  1. package/README.md +1 -1
  2. package/dist/es/dataTypes/dcatDataTypes.js +80 -49
  3. package/dist/es/dataTypes/dcatDataTypes.js.map +1 -1
  4. package/dist/es/index.js +6 -2
  5. package/dist/es/index.js.map +1 -1
  6. package/dist/es/models/IDcatCatalog.js.map +1 -1
  7. package/dist/es/models/IDcatCatalogBase.js +2 -0
  8. package/dist/es/models/IDcatCatalogBase.js.map +1 -0
  9. package/dist/es/models/IDcatCatalogRecord.js.map +1 -1
  10. package/dist/es/models/IDcatCatalogRecordBase.js +2 -0
  11. package/dist/es/models/IDcatCatalogRecordBase.js.map +1 -0
  12. package/dist/es/models/IDcatDataService.js.map +1 -1
  13. package/dist/es/models/IDcatDataServiceBase.js +2 -0
  14. package/dist/es/models/IDcatDataServiceBase.js.map +1 -0
  15. package/dist/es/models/IDcatDataset.js.map +1 -1
  16. package/dist/es/models/IDcatDatasetBase.js +2 -0
  17. package/dist/es/models/IDcatDatasetBase.js.map +1 -0
  18. package/dist/es/models/IDcatDatasetSeries.js.map +1 -1
  19. package/dist/es/models/IDcatDistribution.js.map +1 -1
  20. package/dist/es/models/IDcatDistributionBase.js +2 -0
  21. package/dist/es/models/IDcatDistributionBase.js.map +1 -0
  22. package/dist/es/models/IDcatRelationship.js.map +1 -1
  23. package/dist/es/models/IDcatResource.js.map +1 -1
  24. package/dist/es/models/IDcatResourceBase.js +2 -0
  25. package/dist/es/models/IDcatResourceBase.js.map +1 -0
  26. package/dist/es/models/IDcatRole.js.map +1 -1
  27. package/dist/es/models/dcatContextType.js.map +1 -1
  28. package/dist/es/models/dcatContexts.js +15 -19
  29. package/dist/es/models/dcatContexts.js.map +1 -1
  30. package/dist/es/schemas/DcatCatalog.json +10 -489
  31. package/dist/es/schemas/DcatCatalogBase.json +109 -0
  32. package/dist/es/schemas/DcatCatalogRecord.json +10 -210
  33. package/dist/es/schemas/DcatCatalogRecordBase.json +76 -0
  34. package/dist/es/schemas/DcatContextType.json +30 -0
  35. package/dist/es/schemas/DcatDataService.json +10 -356
  36. package/dist/es/schemas/DcatDataServiceBase.json +43 -0
  37. package/dist/es/schemas/DcatDataset.json +10 -405
  38. package/dist/es/schemas/DcatDatasetBase.json +94 -0
  39. package/dist/es/schemas/DcatDatasetSeries.json +17 -394
  40. package/dist/es/schemas/DcatDistribution.json +10 -266
  41. package/dist/es/schemas/DcatDistributionBase.json +134 -0
  42. package/dist/es/schemas/DcatRelationship.json +11 -170
  43. package/dist/es/schemas/DcatResource.json +10 -340
  44. package/dist/es/schemas/DcatResourceBase.json +663 -0
  45. package/dist/es/schemas/DcatRole.json +15 -167
  46. package/dist/types/dataTypes/dcatDataTypes.d.ts +0 -1
  47. package/dist/types/index.d.ts +6 -2
  48. package/dist/types/models/IDcatCatalog.d.ts +5 -43
  49. package/dist/types/models/IDcatCatalogBase.d.ts +54 -0
  50. package/dist/types/models/IDcatCatalogRecord.d.ts +2 -40
  51. package/dist/types/models/IDcatCatalogRecordBase.d.ts +51 -0
  52. package/dist/types/models/IDcatDataService.d.ts +5 -22
  53. package/dist/types/models/IDcatDataServiceBase.d.ts +31 -0
  54. package/dist/types/models/IDcatDataset.d.ts +5 -51
  55. package/dist/types/models/IDcatDatasetBase.d.ts +60 -0
  56. package/dist/types/models/IDcatDatasetSeries.d.ts +6 -0
  57. package/dist/types/models/IDcatDistribution.d.ts +2 -110
  58. package/dist/types/models/IDcatDistributionBase.d.ts +123 -0
  59. package/dist/types/models/IDcatRelationship.d.ts +2 -2
  60. package/dist/types/models/IDcatResource.d.ts +3 -109
  61. package/dist/types/models/IDcatResourceBase.d.ts +120 -0
  62. package/dist/types/models/IDcatRole.d.ts +8 -5
  63. package/dist/types/models/dcatContextType.d.ts +4 -4
  64. package/dist/types/models/dcatContexts.d.ts +15 -19
  65. package/docs/changelog.md +1125 -11
  66. package/docs/examples.md +25 -1
  67. package/docs/reference/classes/DcatDataTypes.md +2 -3
  68. package/docs/reference/index.md +6 -11
  69. package/docs/reference/interfaces/IDcatCatalog.md +138 -106
  70. package/docs/reference/interfaces/IDcatCatalogBase.md +558 -0
  71. package/docs/reference/interfaces/IDcatCatalogRecord.md +53 -25
  72. package/docs/reference/interfaces/IDcatCatalogRecordBase.md +101 -0
  73. package/docs/reference/interfaces/IDcatDataService.md +90 -74
  74. package/docs/reference/interfaces/IDcatDataServiceBase.md +382 -0
  75. package/docs/reference/interfaces/IDcatDataset.md +120 -85
  76. package/docs/reference/interfaces/IDcatDatasetBase.md +443 -0
  77. package/docs/reference/interfaces/IDcatDatasetSeries.md +88 -68
  78. package/docs/reference/interfaces/IDcatDistribution.md +137 -53
  79. package/docs/reference/interfaces/IDcatDistributionBase.md +269 -0
  80. package/docs/reference/interfaces/IDcatRelationship.md +6 -22
  81. package/docs/reference/interfaces/IDcatResource.md +132 -57
  82. package/docs/reference/interfaces/IDcatResourceBase.md +260 -0
  83. package/docs/reference/interfaces/IDcatRole.md +11 -19
  84. package/docs/reference/type-aliases/DcatContextType.md +4 -4
  85. package/docs/reference/variables/DcatClasses.md +9 -9
  86. package/docs/reference/variables/DcatContexts.md +21 -33
  87. package/docs/reference/variables/DcatRelationshipType.md +9 -9
  88. package/package.json +10 -10
  89. package/dist/es/models/types/dcatContextFreeTypes.js +0 -4
  90. package/dist/es/models/types/dcatContextFreeTypes.js.map +0 -1
  91. package/dist/es/models/types/dcatPropertyTypes.js +0 -4
  92. package/dist/es/models/types/dcatPropertyTypes.js.map +0 -1
  93. package/dist/types/models/types/dcatContextFreeTypes.d.ts +0 -40
  94. package/dist/types/models/types/dcatPropertyTypes.d.ts +0 -29
  95. package/docs/reference/type-aliases/CatalogOptionalContext.md +0 -11
  96. package/docs/reference/type-aliases/CatalogRecordOptionalContext.md +0 -11
  97. package/docs/reference/type-aliases/DataServiceOptionalContext.md +0 -11
  98. package/docs/reference/type-aliases/DatasetOptionalContext.md +0 -11
  99. package/docs/reference/type-aliases/DcatDateTimeType.md +0 -6
  100. package/docs/reference/type-aliases/DcatDecimalType.md +0 -5
  101. package/docs/reference/type-aliases/DcatDurationType.md +0 -5
  102. package/docs/reference/type-aliases/DcatIriType.md +0 -5
  103. package/docs/reference/type-aliases/DcatLiteralType.md +0 -5
  104. package/docs/reference/type-aliases/DcatNonNegativeIntegerType.md +0 -5
  105. package/docs/reference/type-aliases/DistributionOptionalContext.md +0 -11
@@ -1,104 +1,23 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/w3c-dcat/DcatRole",
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.",
4
+ "title": "DcatRole",
5
+ "description": "Interface for DCAT Role.\nA role is the function of a resource or agent with respect to another resource,\nin the context of resource attribution or resource relationships.",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "@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
- "odrl": {
88
- "type": "string",
89
- "const": "http://www.w3.org/ns/odrl/2/"
90
- },
91
- "foaf": {
92
- "type": "string",
93
- "const": "https://xmlns.com/foaf/0.1/"
94
- }
95
- },
96
- "required": [
97
- "dcat",
98
- "dcterms"
99
- ]
9
+ "$ref": "https://schema.twindev.org/w3c-dcat/DcatContextType",
10
+ "description": "The JSON-LD context for the resource."
11
+ },
12
+ "@type": {
13
+ "const": "dcat:Role",
14
+ "description": "The type identifier, typically \"Role\"."
100
15
  },
101
16
  "@id": {
17
+ "type": "string",
18
+ "description": "The unique identifier for the role object."
19
+ },
20
+ "dcterms:title": {
102
21
  "anyOf": [
103
22
  {
104
23
  "type": "string"
@@ -109,83 +28,12 @@
109
28
  "type": "string"
110
29
  }
111
30
  }
112
- ]
113
- },
114
- "@included": {
115
- "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
116
- },
117
- "@graph": {
118
- "anyOf": [
119
- {
120
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
121
- },
122
- {
123
- "type": "array",
124
- "items": {
125
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
126
- }
127
- }
128
- ]
129
- },
130
- "@nest": {
131
- "anyOf": [
132
- {
133
- "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
134
- },
135
- {
136
- "type": "array",
137
- "items": {
138
- "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
139
- }
140
- }
141
- ]
142
- },
143
- "@type": {
144
- "type": "string",
145
- "const": "dcat:Role",
146
- "description": "The type identifier, typically \"Role\"."
147
- },
148
- "@reverse": {
149
- "type": "object",
150
- "additionalProperties": {
151
- "type": "string"
152
- }
153
- },
154
- "@index": {
155
- "type": "string"
156
- },
157
- "dcterms:title": {
158
- "$ref": "https://schema.twindev.org/w3c-dcat/DcatLiteralType",
159
- "description": "A name given to the distribution."
31
+ ],
32
+ "description": "A name given to the role."
160
33
  }
161
34
  },
162
35
  "required": [
163
36
  "@context",
164
37
  "@type"
165
- ],
166
- "additionalProperties": {
167
- "anyOf": [
168
- {
169
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
170
- },
171
- {
172
- "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
173
- },
174
- {
175
- "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
176
- },
177
- {
178
- "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
179
- },
180
- {
181
- "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
182
- },
183
- {
184
- "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
185
- },
186
- {
187
- "type": "array"
188
- }
189
- ]
190
- }
38
+ ]
191
39
  }
@@ -4,7 +4,6 @@
4
4
  export declare class DcatDataTypes {
5
5
  /**
6
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
7
  */
9
8
  static registerRedirects(): void;
10
9
  /**
@@ -4,13 +4,17 @@ export * from "./models/dcatContexts.js";
4
4
  export * from "./models/dcatContextType.js";
5
5
  export * from "./models/dcatRelationshipTypes.js";
6
6
  export * from "./models/IDcatCatalog.js";
7
+ export * from "./models/IDcatCatalogBase.js";
7
8
  export * from "./models/IDcatCatalogRecord.js";
9
+ export * from "./models/IDcatCatalogRecordBase.js";
8
10
  export * from "./models/IDcatDataService.js";
11
+ export * from "./models/IDcatDataServiceBase.js";
9
12
  export * from "./models/IDcatDataset.js";
13
+ export * from "./models/IDcatDatasetBase.js";
10
14
  export * from "./models/IDcatDatasetSeries.js";
11
15
  export * from "./models/IDcatDistribution.js";
16
+ export * from "./models/IDcatDistributionBase.js";
12
17
  export * from "./models/IDcatRelationship.js";
13
18
  export * from "./models/IDcatResource.js";
19
+ export * from "./models/IDcatResourceBase.js";
14
20
  export * from "./models/IDcatRole.js";
15
- export * from "./models/types/dcatPropertyTypes.js";
16
- export * from "./models/types/dcatContextFreeTypes.js";
@@ -1,52 +1,14 @@
1
- import type { ObjectOrArray } from "@twin.org/core";
2
- import type { DcatClasses } from "./dcatClasses.js";
3
- import type { IDcatDataset } from "./IDcatDataset.js";
4
- import type { IDcatResource } from "./IDcatResource.js";
5
- import type { CatalogOptionalContext, CatalogRecordOptionalContext, DataServiceOptionalContext, DatasetOptionalContext } from "./types/dcatContextFreeTypes.js";
1
+ import type { DcatContextType } from "./dcatContextType.js";
2
+ import type { IDcatCatalogBase } from "./IDcatCatalogBase.js";
6
3
  /**
7
4
  * Interface for DCAT Catalog.
8
5
  * A curated collection of metadata about resources (datasets and data services).
9
6
  * Note: dcat:Catalog is a sub-class of dcat:Dataset per the W3C spec.
10
7
  * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog
11
8
  */
12
- export interface IDcatCatalog extends IDcatDataset {
9
+ export interface IDcatCatalog extends IDcatCatalogBase {
13
10
  /**
14
- * The type identifier, typically "Catalog".
11
+ * The JSON-LD context for the resource.
15
12
  */
16
- "@type": typeof DcatClasses.Catalog;
17
- /**
18
- * A homepage of the catalog (a public Web document usually available in HTML).
19
- * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_homepage
20
- */
21
- "foaf:homepage"?: string;
22
- /**
23
- * A knowledge organization system (KOS) used to classify the resources in the catalog.
24
- * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_themes
25
- */
26
- "dcat:themeTaxonomy"?: ObjectOrArray<IDcatResource>;
27
- /**
28
- * A resource that is listed in the catalog.
29
- * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_resource
30
- */
31
- "dcat:resource"?: ObjectOrArray<IDcatResource>;
32
- /**
33
- * A dataset that is listed in the catalog.
34
- * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_dataset
35
- */
36
- "dcat:dataset"?: ObjectOrArray<DatasetOptionalContext>;
37
- /**
38
- * A data service that is listed in the catalog.
39
- * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_service
40
- */
41
- "dcat:service"?: ObjectOrArray<DataServiceOptionalContext>;
42
- /**
43
- * A catalog that is listed in the catalog.
44
- * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_catalog
45
- */
46
- "dcat:catalog"?: ObjectOrArray<CatalogOptionalContext>;
47
- /**
48
- * A record describing the registration of a single resource in the catalog.
49
- * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_catalog_record
50
- */
51
- "dcat:record"?: ObjectOrArray<CatalogRecordOptionalContext>;
13
+ "@context": DcatContextType;
52
14
  }
@@ -0,0 +1,54 @@
1
+ import type { ObjectOrArray } from "@twin.org/core";
2
+ import type { DcatClasses } from "./dcatClasses.js";
3
+ import type { IDcatCatalogRecordBase } from "./IDcatCatalogRecordBase.js";
4
+ import type { IDcatDataServiceBase } from "./IDcatDataServiceBase.js";
5
+ import type { IDcatDatasetBase } from "./IDcatDatasetBase.js";
6
+ import type { IDcatResource } from "./IDcatResource.js";
7
+ /**
8
+ * Base interface for DCAT Catalog without JSON-LD context.
9
+ * This is the context-free variant of IDcatCatalog, intended for embedding
10
+ * catalogs inline within other objects where the context is provided by the enclosing document.
11
+ * Note: dcat:Catalog is a sub-class of dcat:Dataset per the W3C spec.
12
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog
13
+ */
14
+ export interface IDcatCatalogBase extends IDcatDatasetBase {
15
+ /**
16
+ * The type identifier, typically "Catalog".
17
+ */
18
+ "@type": typeof DcatClasses.Catalog;
19
+ /**
20
+ * A homepage of the catalog (a public Web document usually available in HTML).
21
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_homepage
22
+ */
23
+ "foaf:homepage"?: string;
24
+ /**
25
+ * A knowledge organization system (KOS) used to classify the resources in the catalog.
26
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_themes
27
+ */
28
+ "dcat:themeTaxonomy"?: ObjectOrArray<IDcatResource>;
29
+ /**
30
+ * A resource that is listed in the catalog.
31
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_resource
32
+ */
33
+ "dcat:resource"?: ObjectOrArray<IDcatResource>;
34
+ /**
35
+ * A dataset that is listed in the catalog.
36
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_dataset
37
+ */
38
+ "dcat:dataset"?: ObjectOrArray<IDcatDatasetBase>;
39
+ /**
40
+ * A data service that is listed in the catalog.
41
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_service
42
+ */
43
+ "dcat:service"?: ObjectOrArray<IDcatDataServiceBase>;
44
+ /**
45
+ * A catalog that is listed in the catalog.
46
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_catalog
47
+ */
48
+ "dcat:catalog"?: ObjectOrArray<IDcatCatalogBase>;
49
+ /**
50
+ * A record describing the registration of a single resource in the catalog.
51
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_catalog_record
52
+ */
53
+ "dcat:record"?: ObjectOrArray<IDcatCatalogRecordBase>;
54
+ }
@@ -1,52 +1,14 @@
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
1
  import type { DcatContextType } from "./dcatContextType.js";
5
- import type { IDcatResource } from "./IDcatResource.js";
6
- import type { DcatDateTimeType, DcatLiteralType } from "./types/dcatPropertyTypes.js";
2
+ import type { IDcatCatalogRecordBase } from "./IDcatCatalogRecordBase.js";
7
3
  /**
8
4
  * Interface for DCAT Catalog Record.
9
5
  * A record in a catalog, describing the registration of a single dataset or data
10
6
  * service.
11
7
  * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog_Record
12
8
  */
13
- export interface IDcatCatalogRecord extends IJsonLdNodeObject {
9
+ export interface IDcatCatalogRecord extends IDcatCatalogRecordBase {
14
10
  /**
15
11
  * The JSON-LD context for the resource.
16
12
  */
17
13
  "@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"?: DcatLiteralType;
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"?: DcatLiteralType;
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"?: DcatDateTimeType;
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"?: DcatDateTimeType;
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"?: IDcatResource;
52
14
  }
@@ -0,0 +1,51 @@
1
+ import type { ObjectOrArray } from "@twin.org/core";
2
+ import type { DcatClasses } from "./dcatClasses.js";
3
+ import type { IDcatResource } from "./IDcatResource.js";
4
+ /**
5
+ * Base interface for DCAT Catalog Record without JSON-LD context.
6
+ * This is the context-free variant of IDcatCatalogRecord, intended for embedding
7
+ * catalog record objects inline within catalogs where the context is provided by the enclosing document.
8
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog_Record
9
+ */
10
+ export interface IDcatCatalogRecordBase {
11
+ /**
12
+ * The type identifier, typically "CatalogRecord".
13
+ */
14
+ "@type": typeof DcatClasses.CatalogRecord;
15
+ /**
16
+ * The unique identifier for the catalog record.
17
+ */
18
+ "@id"?: string;
19
+ /**
20
+ * A name given to the catalog record.
21
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_title
22
+ */
23
+ "dcterms:title"?: ObjectOrArray<string>;
24
+ /**
25
+ * A free-text account of the catalog record.
26
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_description
27
+ */
28
+ "dcterms:description"?: ObjectOrArray<string>;
29
+ /**
30
+ * The date of listing of the catalog record in the catalog.
31
+ * @json-schema format:date-time
32
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_listing_date
33
+ */
34
+ "dcterms:issued"?: string;
35
+ /**
36
+ * Most recent date on which the catalog record entry was changed or modified.
37
+ * @json-schema format:date-time
38
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_update_date
39
+ */
40
+ "dcterms:modified"?: string;
41
+ /**
42
+ * An established standard to which the catalog record conforms.
43
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_conforms_to
44
+ */
45
+ "dcterms:conformsTo"?: ObjectOrArray<string>;
46
+ /**
47
+ * The dataset or data service described in the catalog record.
48
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_primary_topic
49
+ */
50
+ "foaf:primaryTopic"?: IDcatResource;
51
+ }
@@ -1,31 +1,14 @@
1
- import type { ObjectOrArray } from "@twin.org/core";
2
- import type { DcatClasses } from "./dcatClasses.js";
3
- import type { IDcatResource } from "./IDcatResource.js";
1
+ import type { DcatContextType } from "./dcatContextType.js";
2
+ import type { IDcatDataServiceBase } from "./IDcatDataServiceBase.js";
4
3
  /**
5
4
  * Interface for DCAT Data Service.
6
5
  * A collection of operations that provides access to one or more datasets or data
7
6
  * processing functions.
8
7
  * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Data_Service
9
8
  */
10
- export interface IDcatDataService extends IDcatResource {
9
+ export interface IDcatDataService extends IDcatDataServiceBase {
11
10
  /**
12
- * The type identifier, typically "DataService".
11
+ * The JSON-LD context for the resource.
13
12
  */
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>;
13
+ "@context": DcatContextType;
31
14
  }
@@ -0,0 +1,31 @@
1
+ import type { ObjectOrArray } from "@twin.org/core";
2
+ import type { DcatClasses } from "./dcatClasses.js";
3
+ import type { IDcatResourceBase } from "./IDcatResourceBase.js";
4
+ /**
5
+ * Base interface for DCAT Data Service without JSON-LD context.
6
+ * This is the context-free variant of IDcatDataService, intended for embedding
7
+ * data service objects inline within other objects where the context is provided by the enclosing document.
8
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Data_Service
9
+ */
10
+ export interface IDcatDataServiceBase extends IDcatResourceBase {
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
+ }
@@ -1,60 +1,14 @@
1
- import type { ObjectOrArray } from "@twin.org/core";
2
- import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
3
- import type { IDublinCorePeriodOfTime } from "@twin.org/standards-dublin-core";
4
- import type { DcatClasses } from "./dcatClasses.js";
5
- import type { IDcatResource } from "./IDcatResource.js";
6
- import type { DistributionOptionalContext } from "./types/dcatContextFreeTypes.js";
7
- import type { DcatDecimalType, DcatDurationType } from "./types/dcatPropertyTypes.js";
1
+ import type { DcatContextType } from "./dcatContextType.js";
2
+ import type { IDcatDatasetBase } from "./IDcatDatasetBase.js";
8
3
  /**
9
4
  * Interface for DCAT Dataset.
10
5
  * A collection of data, published or curated by a single agent, and available
11
6
  * for access or download in one or more representations.
12
7
  * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset
13
8
  */
14
- export interface IDcatDataset extends IDcatResource {
9
+ export interface IDcatDataset extends IDcatDatasetBase {
15
10
  /**
16
- * The type identifier, typically "Dataset".
17
- * Can also be "Catalog" or "DatasetSeries" for subclasses.
11
+ * The JSON-LD context for the resource.
18
12
  */
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<DistributionOptionalContext>;
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"?: DcatDecimalType;
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"?: IDublinCorePeriodOfTime;
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"?: DcatDurationType;
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;
13
+ "@context": DcatContextType;
60
14
  }
@@ -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 { IDublinCorePeriodOfTime } from "@twin.org/standards-dublin-core";
4
+ import type { DcatClasses } from "./dcatClasses.js";
5
+ import type { IDcatDistributionBase } from "./IDcatDistributionBase.js";
6
+ import type { IDcatResourceBase } from "./IDcatResourceBase.js";
7
+ /**
8
+ * Base interface for DCAT Dataset without JSON-LD context.
9
+ * This is the context-free variant of IDcatDataset, intended for embedding
10
+ * dataset objects inline within other objects where the context is provided by the enclosing document.
11
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset
12
+ */
13
+ export interface IDcatDatasetBase extends IDcatResourceBase {
14
+ /**
15
+ * The type identifier, typically "Dataset".
16
+ * Can also be "Catalog" or "DatasetSeries" for subclasses.
17
+ */
18
+ "@type": typeof DcatClasses.Dataset | typeof DcatClasses.Catalog | typeof DcatClasses.DatasetSeries;
19
+ /**
20
+ * An available distribution of the dataset.
21
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_distribution
22
+ */
23
+ "dcat:distribution"?: ObjectOrArray<IDcatDistributionBase>;
24
+ /**
25
+ * The frequency at which the dataset is published.
26
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_frequency
27
+ */
28
+ "dcterms:accrualPeriodicity"?: string;
29
+ /**
30
+ * A dataset series of which the dataset is part.
31
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_in_series
32
+ */
33
+ "dcat:inSeries"?: string;
34
+ /**
35
+ * The geographical area covered by the dataset.
36
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_spatial
37
+ */
38
+ "dcterms:spatial"?: IJsonLdNodeObject | string | string[];
39
+ /**
40
+ * Minimum spatial separation resolvable in a dataset, measured in meters.
41
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_spatial_resolution
42
+ */
43
+ "dcat:spatialResolutionInMeters"?: number;
44
+ /**
45
+ * The temporal period that the dataset covers.
46
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_temporal
47
+ */
48
+ "dcterms:temporal"?: IDublinCorePeriodOfTime;
49
+ /**
50
+ * Minimum time period resolvable in the dataset.
51
+ * @json-schema format:duration
52
+ * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_temporal_resolution
53
+ */
54
+ "dcat:temporalResolution"?: string;
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
+ }