@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
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 IOTA Stiftung.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# TWIN Standards W3C DCAT
|
|
2
|
+
|
|
3
|
+
Models which define the structure of [W3C Data Catalog Vocabulary (DCAT)](https://www.w3.org/TR/vocab-dcat-3/) Version 3.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```shell
|
|
8
|
+
npm install @twin.org/standards-w3c-dcat
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
Usage of the APIs is shown in the examples [docs/examples.md](docs/examples.md)
|
|
14
|
+
|
|
15
|
+
## Reference
|
|
16
|
+
|
|
17
|
+
Detailed reference documentation for the API can be found in [docs/reference/index.md](docs/reference/index.md)
|
|
18
|
+
|
|
19
|
+
## Changelog
|
|
20
|
+
|
|
21
|
+
The changes between each version can be found in [docs/changelog.md](docs/changelog.md)
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { DataTypeHandlerFactory } from "@twin.org/data-core";
|
|
2
|
+
import { JsonLdProcessor } from "@twin.org/data-json-ld";
|
|
3
|
+
import { DcatClasses } from "../models/dcatClasses.js";
|
|
4
|
+
import { DcatContexts } from "../models/dcatContexts.js";
|
|
5
|
+
import CatalogSchema from "../schemas/Catalog.json" with { type: "json" };
|
|
6
|
+
import CatalogRecordSchema from "../schemas/CatalogRecord.json" with { type: "json" };
|
|
7
|
+
import DataServiceSchema from "../schemas/DataService.json" with { type: "json" };
|
|
8
|
+
import DatasetSchema from "../schemas/Dataset.json" with { type: "json" };
|
|
9
|
+
import DatasetSeriesSchema from "../schemas/DatasetSeries.json" with { type: "json" };
|
|
10
|
+
import DistributionSchema from "../schemas/Distribution.json" with { type: "json" };
|
|
11
|
+
import RelationshipSchema from "../schemas/Relationship.json" with { type: "json" };
|
|
12
|
+
import ResourceSchema from "../schemas/Resource.json" with { type: "json" };
|
|
13
|
+
import RoleSchema from "../schemas/Role.json" with { type: "json" };
|
|
14
|
+
/**
|
|
15
|
+
* Class providing DCAT data type utilities and JSON-LD redirect registration.
|
|
16
|
+
*/
|
|
17
|
+
export class DcatDataTypes {
|
|
18
|
+
/**
|
|
19
|
+
* Register redirects for DCAT namespace to enable offline JSON-LD processing.
|
|
20
|
+
* This maps the W3C DCAT namespace to a local redirect URL for faster resolution.
|
|
21
|
+
*/
|
|
22
|
+
static registerRedirects() {
|
|
23
|
+
JsonLdProcessor.addRedirect(/https?:\/\/www\.w3\.org\/ns\/dcat#?/, DcatContexts.ContextRedirect);
|
|
24
|
+
JsonLdProcessor.addRedirect(/https?:\/\/www\.w3\.org\/2000\/01\/rdf-schema#?/, DcatContexts.ContextRdfRedirect);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Register all the DCAT data types with their JSON schemas.
|
|
28
|
+
*/
|
|
29
|
+
static registerTypes() {
|
|
30
|
+
DataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.Resource}`, () => ({
|
|
31
|
+
context: DcatContexts.ContextRoot,
|
|
32
|
+
type: DcatClasses.Resource,
|
|
33
|
+
jsonSchema: async () => ResourceSchema
|
|
34
|
+
}));
|
|
35
|
+
DataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.Catalog}`, () => ({
|
|
36
|
+
context: DcatContexts.ContextRoot,
|
|
37
|
+
type: DcatClasses.Catalog,
|
|
38
|
+
jsonSchema: async () => CatalogSchema
|
|
39
|
+
}));
|
|
40
|
+
DataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.Dataset}`, () => ({
|
|
41
|
+
context: DcatContexts.ContextRoot,
|
|
42
|
+
type: DcatClasses.Dataset,
|
|
43
|
+
jsonSchema: async () => DatasetSchema
|
|
44
|
+
}));
|
|
45
|
+
DataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.Distribution}`, () => ({
|
|
46
|
+
context: DcatContexts.ContextRoot,
|
|
47
|
+
type: DcatClasses.Distribution,
|
|
48
|
+
jsonSchema: async () => DistributionSchema
|
|
49
|
+
}));
|
|
50
|
+
DataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.DataService}`, () => ({
|
|
51
|
+
context: DcatContexts.ContextRoot,
|
|
52
|
+
type: DcatClasses.DataService,
|
|
53
|
+
jsonSchema: async () => DataServiceSchema
|
|
54
|
+
}));
|
|
55
|
+
DataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.DatasetSeries}`, () => ({
|
|
56
|
+
context: DcatContexts.ContextRoot,
|
|
57
|
+
type: DcatClasses.DatasetSeries,
|
|
58
|
+
jsonSchema: async () => DatasetSeriesSchema
|
|
59
|
+
}));
|
|
60
|
+
DataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.CatalogRecord}`, () => ({
|
|
61
|
+
context: DcatContexts.ContextRoot,
|
|
62
|
+
type: DcatClasses.CatalogRecord,
|
|
63
|
+
jsonSchema: async () => CatalogRecordSchema
|
|
64
|
+
}));
|
|
65
|
+
DataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.Relationship}`, () => ({
|
|
66
|
+
context: DcatContexts.ContextRoot,
|
|
67
|
+
type: DcatClasses.Relationship,
|
|
68
|
+
jsonSchema: async () => RelationshipSchema
|
|
69
|
+
}));
|
|
70
|
+
DataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.Role}`, () => ({
|
|
71
|
+
context: DcatContexts.ContextRoot,
|
|
72
|
+
type: DcatClasses.Role,
|
|
73
|
+
jsonSchema: async () => RoleSchema
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=dcatDataTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dcatDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/dcatDataTypes.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonSchema } from \"@twin.org/data-core\";\nimport { DataTypeHandlerFactory } from \"@twin.org/data-core\";\nimport { JsonLdProcessor } from \"@twin.org/data-json-ld\";\nimport { DcatClasses } from \"../models/dcatClasses.js\";\nimport { DcatContexts } from \"../models/dcatContexts.js\";\nimport CatalogSchema from \"../schemas/Catalog.json\" with { type: \"json\" };\nimport CatalogRecordSchema from \"../schemas/CatalogRecord.json\" with { type: \"json\" };\nimport DataServiceSchema from \"../schemas/DataService.json\" with { type: \"json\" };\nimport DatasetSchema from \"../schemas/Dataset.json\" with { type: \"json\" };\nimport DatasetSeriesSchema from \"../schemas/DatasetSeries.json\" with { type: \"json\" };\nimport DistributionSchema from \"../schemas/Distribution.json\" with { type: \"json\" };\nimport RelationshipSchema from \"../schemas/Relationship.json\" with { type: \"json\" };\nimport ResourceSchema from \"../schemas/Resource.json\" with { type: \"json\" };\nimport RoleSchema from \"../schemas/Role.json\" with { type: \"json\" };\n\n/**\n * Class providing DCAT data type utilities and JSON-LD redirect registration.\n */\nexport class DcatDataTypes {\n\t/**\n\t * Register redirects for DCAT namespace to enable offline JSON-LD processing.\n\t * This maps the W3C DCAT namespace to a local redirect URL for faster resolution.\n\t */\n\tpublic static registerRedirects(): void {\n\t\tJsonLdProcessor.addRedirect(\n\t\t\t/https?:\\/\\/www\\.w3\\.org\\/ns\\/dcat#?/,\n\t\t\tDcatContexts.ContextRedirect\n\t\t);\n\n\t\tJsonLdProcessor.addRedirect(\n\t\t\t/https?:\\/\\/www\\.w3\\.org\\/2000\\/01\\/rdf-schema#?/,\n\t\t\tDcatContexts.ContextRdfRedirect\n\t\t);\n\t}\n\n\t/**\n\t * Register all the DCAT data types with their JSON schemas.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.Resource}`, () => ({\n\t\t\tcontext: DcatContexts.ContextRoot,\n\t\t\ttype: DcatClasses.Resource,\n\t\t\tjsonSchema: async () => ResourceSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.Catalog}`, () => ({\n\t\t\tcontext: DcatContexts.ContextRoot,\n\t\t\ttype: DcatClasses.Catalog,\n\t\t\tjsonSchema: async () => CatalogSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.Dataset}`, () => ({\n\t\t\tcontext: DcatContexts.ContextRoot,\n\t\t\ttype: DcatClasses.Dataset,\n\t\t\tjsonSchema: async () => DatasetSchema as IJsonSchema\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${DcatContexts.ContextRoot}${DcatClasses.Distribution}`,\n\t\t\t() => ({\n\t\t\t\tcontext: DcatContexts.ContextRoot,\n\t\t\t\ttype: DcatClasses.Distribution,\n\t\t\t\tjsonSchema: async () => DistributionSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${DcatContexts.ContextRoot}${DcatClasses.DataService}`,\n\t\t\t() => ({\n\t\t\t\tcontext: DcatContexts.ContextRoot,\n\t\t\t\ttype: DcatClasses.DataService,\n\t\t\t\tjsonSchema: async () => DataServiceSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${DcatContexts.ContextRoot}${DcatClasses.DatasetSeries}`,\n\t\t\t() => ({\n\t\t\t\tcontext: DcatContexts.ContextRoot,\n\t\t\t\ttype: DcatClasses.DatasetSeries,\n\t\t\t\tjsonSchema: async () => DatasetSeriesSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${DcatContexts.ContextRoot}${DcatClasses.CatalogRecord}`,\n\t\t\t() => ({\n\t\t\t\tcontext: DcatContexts.ContextRoot,\n\t\t\t\ttype: DcatClasses.CatalogRecord,\n\t\t\t\tjsonSchema: async () => CatalogRecordSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${DcatContexts.ContextRoot}${DcatClasses.Relationship}`,\n\t\t\t() => ({\n\t\t\t\tcontext: DcatContexts.ContextRoot,\n\t\t\t\ttype: DcatClasses.Relationship,\n\t\t\t\tjsonSchema: async () => RelationshipSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(`${DcatContexts.ContextRoot}${DcatClasses.Role}`, () => ({\n\t\t\tcontext: DcatContexts.ContextRoot,\n\t\t\ttype: DcatClasses.Role,\n\t\t\tjsonSchema: async () => RoleSchema as IJsonSchema\n\t\t}));\n\t}\n}\n"]}
|
package/dist/es/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright 2025 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
export * from "./dataTypes/dcatDataTypes.js";
|
|
4
|
+
export * from "./models/dcatClasses.js";
|
|
5
|
+
export * from "./models/dcatContexts.js";
|
|
6
|
+
export * from "./models/dcatContextType.js";
|
|
7
|
+
export * from "./models/dcatRelationshipTypes.js";
|
|
8
|
+
export * from "./models/ICatalog.js";
|
|
9
|
+
export * from "./models/ICatalogRecord.js";
|
|
10
|
+
export * from "./models/IDataService.js";
|
|
11
|
+
export * from "./models/IDataset.js";
|
|
12
|
+
export * from "./models/IDatasetSeries.js";
|
|
13
|
+
export * from "./models/IDistribution.js";
|
|
14
|
+
export * from "./models/IRelationship.js";
|
|
15
|
+
export * from "./models/IResource.js";
|
|
16
|
+
export * from "./models/IRole.js";
|
|
17
|
+
export * from "./models/types/dcatPropertyTypes.js";
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\nexport * from \"./dataTypes/dcatDataTypes.js\";\nexport * from \"./models/dcatClasses.js\";\nexport * from \"./models/dcatContexts.js\";\nexport * from \"./models/dcatContextType.js\";\nexport * from \"./models/dcatRelationshipTypes.js\";\nexport * from \"./models/ICatalog.js\";\nexport * from \"./models/ICatalogRecord.js\";\nexport * from \"./models/IDataService.js\";\nexport * from \"./models/IDataset.js\";\nexport * from \"./models/IDatasetSeries.js\";\nexport * from \"./models/IDistribution.js\";\nexport * from \"./models/IRelationship.js\";\nexport * from \"./models/IResource.js\";\nexport * from \"./models/IRole.js\";\nexport * from \"./models/types/dcatPropertyTypes.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICatalog.js","sourceRoot":"","sources":["../../../src/models/ICatalog.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { DcatClasses } from \"./dcatClasses.js\";\nimport type { ICatalogRecord } from \"./ICatalogRecord.js\";\nimport type { IDataService } from \"./IDataService.js\";\nimport type { IDataset } from \"./IDataset.js\";\nimport type { IResource } from \"./IResource.js\";\n\n/**\n * Interface for DCAT Catalog.\n * A curated collection of metadata about resources (datasets and data services).\n * Note: dcat:Catalog is a sub-class of dcat:Dataset per the W3C spec.\n * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog\n */\nexport interface ICatalog extends IDataset {\n\t/**\n\t * The type identifier, typically \"Catalog\".\n\t */\n\t\"@type\": typeof DcatClasses.Catalog;\n\n\t/**\n\t * A homepage of the catalog (a public Web document usually available in HTML).\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_homepage\n\t */\n\t\"foaf:homepage\"?: string;\n\n\t/**\n\t * A knowledge organization system (KOS) used to classify the resources in the catalog.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_themes\n\t */\n\t\"dcat:themeTaxonomy\"?: ObjectOrArray<IResource>;\n\n\t/**\n\t * A resource that is listed in the catalog.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_resource\n\t */\n\t\"dcat:resource\"?: ObjectOrArray<IResource>;\n\n\t/**\n\t * A dataset that is listed in the catalog.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_dataset\n\t */\n\t\"dcat:dataset\"?: ObjectOrArray<IDataset>;\n\n\t/**\n\t * A data service that is listed in the catalog.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_service\n\t */\n\t\"dcat:service\"?: ObjectOrArray<IDataService>;\n\n\t/**\n\t * A catalog that is listed in the catalog.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_catalog\n\t */\n\t\"dcat:catalog\"?: ObjectOrArray<ICatalog>;\n\n\t/**\n\t * A record describing the registration of a single resource in the catalog.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:catalog_catalog_record\n\t */\n\t\"dcat:record\"?: ObjectOrArray<ICatalogRecord>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICatalogRecord.js","sourceRoot":"","sources":["../../../src/models/ICatalogRecord.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { DcatClasses } from \"./dcatClasses.js\";\nimport type { DcatContextType } from \"./dcatContextType.js\";\nimport type { IResource } from \"./IResource.js\";\nimport type { DateTimeType, LiteralType } from \"./types/dcatPropertyTypes.js\";\n\n/**\n * Interface for DCAT Catalog Record.\n * A record in a catalog, describing the registration of a single dataset or data\n * service.\n * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog_Record\n */\nexport interface ICatalogRecord extends IJsonLdNodeObject {\n\t/**\n\t * The JSON-LD context for the resource.\n\t */\n\t\"@context\"?: DcatContextType;\n\n\t/**\n\t * The type identifier, typically \"CatalogRecord\".\n\t */\n\t\"@type\": typeof DcatClasses.CatalogRecord;\n\n\t/**\n\t * A name given to the catalog record.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_title\n\t */\n\t\"dcterms:title\"?: LiteralType;\n\n\t/**\n\t * A free-text account of the catalog record.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_description\n\t */\n\t\"dcterms:description\"?: LiteralType;\n\n\t/**\n\t * The date of listing of the catalog record in the catalog.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_listing_date\n\t */\n\t\"dcterms:issued\"?: DateTimeType;\n\n\t/**\n\t * Most recent date on which the catalog record entry was changed or modified.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_update_date\n\t */\n\t\"dcterms:modified\"?: DateTimeType;\n\n\t/**\n\t * An established standard to which the catalog record conforms.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_conforms_to\n\t */\n\t\"dcterms:conformsTo\"?: ObjectOrArray<string>;\n\n\t/**\n\t * The dataset or data service described in the catalog record.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:record_primary_topic\n\t */\n\t\"foaf:primaryTopic\"?: IResource;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDataService.js","sourceRoot":"","sources":["../../../src/models/IDataService.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { DcatClasses } from \"./dcatClasses.js\";\nimport type { IResource } from \"./IResource.js\";\n\n/**\n * Interface for DCAT Data Service.\n * A collection of operations that provides access to one or more datasets or data\n * processing functions.\n * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Data_Service\n */\nexport interface IDataService extends IResource {\n\t/**\n\t * The type identifier, typically \"DataService\".\n\t */\n\t\"@type\": typeof DcatClasses.DataService;\n\n\t/**\n\t * The root location or primary endpoint of the service (a Web-resolvable IRI).\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:data_service_endpoint_url\n\t */\n\t\"dcat:endpointURL\"?: string;\n\n\t/**\n\t * A description of the services available via the end-points, including their\n\t * operations, parameters, etc.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:data_service_endpoint_description\n\t */\n\t\"dcat:endpointDescription\"?: string;\n\n\t/**\n\t * A collection of data that this data service can distribute.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:data_service_serves_dataset\n\t */\n\t\"dcat:servesDataset\"?: ObjectOrArray<string>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDataset.js","sourceRoot":"","sources":["../../../src/models/IDataset.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IPeriodOfTime } from \"@twin.org/standards-dublin-core\";\nimport type { DcatClasses } from \"./dcatClasses.js\";\nimport type { IDistribution } from \"./IDistribution.js\";\nimport type { IResource } from \"./IResource.js\";\nimport type { DecimalType, DurationType } from \"./types/dcatPropertyTypes.js\";\n\n/**\n * Interface for DCAT Dataset.\n * A collection of data, published or curated by a single agent, and available\n * for access or download in one or more representations.\n * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset\n */\nexport interface IDataset extends IResource {\n\t/**\n\t * The type identifier, typically \"Dataset\".\n\t * Can also be \"Catalog\" or \"DatasetSeries\" for subclasses.\n\t */\n\t\"@type\":\n\t\t| typeof DcatClasses.Dataset\n\t\t| typeof DcatClasses.Catalog\n\t\t| typeof DcatClasses.DatasetSeries;\n\n\t/**\n\t * An available distribution of the dataset.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_distribution\n\t */\n\t\"dcat:distribution\"?: ObjectOrArray<IDistribution>;\n\n\t/**\n\t * The frequency at which the dataset is published.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_frequency\n\t */\n\t\"dcterms:accrualPeriodicity\"?: string;\n\n\t/**\n\t * A dataset series of which the dataset is part.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_in_series\n\t */\n\t\"dcat:inSeries\"?: string;\n\n\t/**\n\t * The geographical area covered by the dataset.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_spatial\n\t */\n\t\"dcterms:spatial\"?: IJsonLdNodeObject | ObjectOrArray<string>;\n\n\t/**\n\t * Minimum spatial separation resolvable in a dataset, measured in meters.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_spatial_resolution\n\t */\n\t\"dcat:spatialResolutionInMeters\"?: DecimalType;\n\n\t/**\n\t * The temporal period that the dataset covers.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_temporal\n\t */\n\t\"dcterms:temporal\"?: IPeriodOfTime;\n\n\t/**\n\t * Minimum time period resolvable in the dataset.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_temporal_resolution\n\t */\n\t\"dcat:temporalResolution\"?: DurationType;\n\n\t/**\n\t * An activity that generated, or provides the business context for, the creation of the dataset.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_was_generated_by\n\t */\n\t\"prov:wasGeneratedBy\"?: IJsonLdNodeObject | string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDatasetSeries.js","sourceRoot":"","sources":["../../../src/models/IDatasetSeries.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { DcatClasses } from \"./dcatClasses.js\";\nimport type { IDataset } from \"./IDataset.js\";\n\n/**\n * Interface for DCAT Dataset Series.\n * A collection of datasets that are published separately, but share some common\n * characteristics that enable them to be grouped together.\n * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset_Series\n */\nexport interface IDatasetSeries extends IDataset {\n\t/**\n\t * The type identifier, typically \"DatasetSeries\".\n\t */\n\t\"@type\": typeof DcatClasses.DatasetSeries;\n\n\t/**\n\t * A dataset that is part of this dataset series.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_series_first\n\t */\n\t\"dcat:first\"?: string;\n\n\t/**\n\t * A dataset that is part of this dataset series.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_series_last\n\t */\n\t\"dcat:last\"?: string;\n\n\t/**\n\t * A dataset that is part of this dataset series.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:dataset_series_member\n\t */\n\t\"dcat:seriesMember\"?: ObjectOrArray<string>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IDistribution.js","sourceRoot":"","sources":["../../../src/models/IDistribution.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IOdrlPolicy } from \"@twin.org/standards-w3c-odrl\";\nimport type { DcatClasses } from \"./dcatClasses.js\";\nimport type { DcatContextType } from \"./dcatContextType.js\";\nimport type {\n\tDateTimeType,\n\tDecimalType,\n\tDurationType,\n\tLiteralType,\n\tNonNegativeIntegerType\n} from \"./types/dcatPropertyTypes.js\";\n\n/**\n * Interface for DCAT Distribution.\n * A specific representation of a dataset. A dataset might be available in multiple\n * serializations that may differ in various ways.\n * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Distribution\n */\nexport interface IDistribution extends IJsonLdNodeObject {\n\t/**\n\t * The JSON-LD context for the resource.\n\t */\n\t\"@context\"?: DcatContextType;\n\n\t/**\n\t * The type identifier, typically \"Distribution\".\n\t */\n\t\"@type\": typeof DcatClasses.Distribution;\n\n\t/**\n\t * A name given to the distribution.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_title\n\t */\n\t\"dcterms:title\"?: LiteralType;\n\n\t/**\n\t * A free-text account of the distribution.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_description\n\t */\n\t\"dcterms:description\"?: LiteralType;\n\n\t/**\n\t * Date of formal issuance of the distribution.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_release_date\n\t */\n\t\"dcterms:issued\"?: DateTimeType;\n\n\t/**\n\t * Most recent date on which the distribution was changed, updated or modified.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_update_date\n\t */\n\t\"dcterms:modified\"?: DateTimeType;\n\n\t/**\n\t * A legal document under which the distribution is made available.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_license\n\t */\n\t\"dcterms:license\"?: string;\n\n\t/**\n\t * Information about who can access the distribution.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_access_rights\n\t */\n\t\"dcterms:accessRights\"?: string;\n\n\t/**\n\t * Information about rights held in and over the distribution.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_rights\n\t */\n\t\"dcterms:rights\"?: string;\n\n\t/**\n\t * A URL of the resource that gives access to a distribution of the dataset.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_access_url\n\t */\n\t\"dcat:accessURL\"?: string;\n\n\t/**\n\t * A data service that gives access to the distribution.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_access_service\n\t */\n\t\"dcat:accessService\"?: string;\n\n\t/**\n\t * The URL of the downloadable file in a given format.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_download_url\n\t */\n\t\"dcat:downloadURL\"?: string;\n\n\t/**\n\t * The size of the distribution in bytes.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_byte_size\n\t */\n\t\"dcat:byteSize\"?: NonNegativeIntegerType;\n\n\t/**\n\t * The minimum spatial separation resolvable in a distribution, measured in meters.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_spatial_resolution\n\t */\n\t\"dcat:spatialResolutionInMeters\"?: DecimalType;\n\n\t/**\n\t * Minimum time period resolvable in the distribution.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_temporal_resolution\n\t */\n\t\"dcat:temporalResolution\"?: DurationType;\n\n\t/**\n\t * An established standard to which the distribution conforms.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_conforms_to\n\t */\n\t\"dcterms:conformsTo\"?: ObjectOrArray<string>;\n\n\t/**\n\t * The media type of the distribution as defined by IANA.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_media_type\n\t */\n\t\"dcat:mediaType\"?: string;\n\n\t/**\n\t * The file format of the distribution.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_format\n\t */\n\t\"dcterms:format\"?: string;\n\n\t/**\n\t * The compression format of the distribution.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_compression_format\n\t */\n\t\"dcat:compressFormat\"?: string;\n\n\t/**\n\t * The package format of the distribution.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_packaging_format\n\t */\n\t\"dcat:packageFormat\"?: string;\n\n\t/**\n\t * The checksum property provides a mechanism to verify the data integrity.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_checksum\n\t */\n\t\"spdx:checksum\"?: string;\n\n\t/**\n\t * An ODRL conformant policy expressing the rights associated with the distribution.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_has_policy\n\t */\n\t\"odrl:hasPolicy\"?: IOdrlPolicy;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRelationship.js","sourceRoot":"","sources":["../../../src/models/IRelationship.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { DcatClasses } from \"./dcatClasses.js\";\nimport type { DcatContextType } from \"./dcatContextType.js\";\nimport type { IRole } from \"./IRole.js\";\n\n/**\n * Interface for DCAT Relationship.\n * An association class for attaching additional information to a relationship\n * between DCAT Resources.\n * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Relationship\n */\nexport interface IRelationship extends IJsonLdNodeObject {\n\t/**\n\t * The JSON-LD context for the resource.\n\t */\n\t\"@context\": DcatContextType;\n\n\t/**\n\t * The type identifier, typically \"Relationship\".\n\t */\n\t\"@type\": typeof DcatClasses.Relationship;\n\n\t/**\n\t * The link to a related resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:relationship_relation\n\t */\n\t\"dcterms:relation\"?: string;\n\n\t/**\n\t * The function of an entity or agent with respect to another resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:relationship_hadRole\n\t */\n\t\"dcat:hadRole\"?: IRole;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IResource.js","sourceRoot":"","sources":["../../../src/models/IResource.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ObjectOrArray } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { IAgent } from \"@twin.org/standards-foaf\";\nimport type { IOdrlPolicy } from \"@twin.org/standards-w3c-odrl\";\nimport type { DcatClasses } from \"./dcatClasses.js\";\nimport type { DcatContextType } from \"./dcatContextType.js\";\nimport type { IRelationship } from \"./IRelationship.js\";\nimport type { DateTimeType, LiteralType } from \"./types/dcatPropertyTypes.js\";\n\n/**\n * Base interface for DCAT catalogued resources.\n * This is the parent class of dcat:Dataset, dcat:DataService, and dcat:Catalog.\n * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Resource\n */\nexport interface IResource extends IJsonLdNodeObject {\n\t/**\n\t * The JSON-LD context for the resource.\n\t */\n\t\"@context\"?: DcatContextType;\n\n\t/**\n\t * The type of the resource.\n\t * Typically \"Catalog\", \"Dataset\", \"DataService\", \"DatasetSeries\", or the base \"Resource\".\n\t */\n\t\"@type\":\n\t\t| typeof DcatClasses.Resource\n\t\t| typeof DcatClasses.Dataset\n\t\t| typeof DcatClasses.DataService\n\t\t| typeof DcatClasses.Catalog\n\t\t| typeof DcatClasses.DatasetSeries;\n\n\t/**\n\t * A name given to the resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_title\n\t */\n\t\"dcterms:title\"?: LiteralType;\n\n\t/**\n\t * A free-text account of the resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_description\n\t */\n\t\"dcterms:description\"?: LiteralType;\n\n\t/**\n\t * A unique identifier of the resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_identifier\n\t */\n\t\"dcterms:identifier\"?: LiteralType;\n\n\t/**\n\t * Date of formal issuance (publication) of the resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_release_date\n\t */\n\t\"dcterms:issued\"?: DateTimeType;\n\n\t/**\n\t * Most recent date on which the resource was changed, updated or modified.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_update_date\n\t */\n\t\"dcterms:modified\"?: DateTimeType;\n\n\t/**\n\t * A language of the resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_language\n\t */\n\t\"dcterms:language\"?: ObjectOrArray<string>;\n\n\t/**\n\t * An entity responsible for making the resource available.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_publisher\n\t */\n\t\"dcterms:publisher\"?: IAgent | string;\n\n\t/**\n\t * An entity responsible for producing the resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_creator\n\t */\n\t\"dcterms:creator\"?: IAgent;\n\n\t/**\n\t * Information about who can access the resource or an indication of its security status.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_access_rights\n\t */\n\t\"dcterms:accessRights\"?: IJsonLdNodeObject | string;\n\n\t/**\n\t * A legal document under which the resource is made available.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_license\n\t */\n\t\"dcterms:license\"?: IJsonLdNodeObject | string;\n\n\t/**\n\t * Information about rights held in and over the resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_rights\n\t */\n\t\"dcterms:rights\"?: IJsonLdNodeObject | string;\n\n\t/**\n\t * An established standard to which the resource conforms.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_conforms_to\n\t */\n\t\"dcterms:conformsTo\"?: ObjectOrArray<string>;\n\n\t/**\n\t * The nature or genre of the resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_type\n\t */\n\t\"dcterms:type\"?: string;\n\n\t/**\n\t * Relevant contact information for the catalogued resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_contact_point\n\t */\n\t\"dcat:contactPoint\"?: IJsonLdNodeObject | string;\n\n\t/**\n\t * A keyword or tag describing the resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_keyword\n\t */\n\t\"dcat:keyword\"?: LiteralType;\n\n\t/**\n\t * A main category of the resource. A resource can have multiple themes.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_theme\n\t */\n\t\"dcat:theme\"?: ObjectOrArray<string>;\n\n\t/**\n\t * A Web page that can be navigated to gain access to the resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_landing_page\n\t */\n\t\"dcat:landingPage\"?: ObjectOrArray<string>;\n\n\t/**\n\t * Link to a description of a relationship with another resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_qualified_relation\n\t */\n\t\"dcat:qualifiedRelation\"?: IRelationship | string;\n\n\t/**\n\t * An ODRL conformant policy expressing the rights associated with the resource.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_has_policy\n\t */\n\t\"odrl:hasPolicy\"?: IOdrlPolicy;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRole.js","sourceRoot":"","sources":["../../../src/models/IRole.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { DcatClasses } from \"./dcatClasses.js\";\nimport type { DcatContextType } from \"./dcatContextType.js\";\nimport type { LiteralType } from \"./types/dcatPropertyTypes.js\";\n\n/**\n * Interface for DCAT Role.\n * A role is the function of a resource or agent with respect to another resource,\n * in the context of resource attribution or resource relationships.\n * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Role\n */\nexport interface IRole extends IJsonLdNodeObject {\n\t/**\n\t * The JSON-LD context for the resource.\n\t */\n\t\"@context\"?: DcatContextType;\n\n\t/**\n\t * The type identifier, typically \"Role\".\n\t */\n\t\"@type\": typeof DcatClasses.Role;\n\n\t/**\n\t * A name given to the distribution.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_title\n\t */\n\t\"dcterms:title\"?: LiteralType;\n}\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Copyright 2025 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* DCAT core classes representing the main entities in the Data Catalog Vocabulary.
|
|
5
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#classes
|
|
6
|
+
*/
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
8
|
+
export const DcatClasses = {
|
|
9
|
+
/**
|
|
10
|
+
* A curated collection of metadata about resources (e.g., datasets and data services in the context of a data catalog).
|
|
11
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog
|
|
12
|
+
*/
|
|
13
|
+
Catalog: "Catalog",
|
|
14
|
+
/**
|
|
15
|
+
* Resource published or curated by a single agent.
|
|
16
|
+
* This is an abstract class and should not be used directly.
|
|
17
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Resource
|
|
18
|
+
*/
|
|
19
|
+
Resource: "Resource",
|
|
20
|
+
/**
|
|
21
|
+
* A collection of data, published or curated by a single agent, and available for access or download in one or more representations.
|
|
22
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset
|
|
23
|
+
*/
|
|
24
|
+
Dataset: "Dataset",
|
|
25
|
+
/**
|
|
26
|
+
* A specific representation of a dataset. A dataset might be available in multiple serializations that may differ in various ways.
|
|
27
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Distribution
|
|
28
|
+
*/
|
|
29
|
+
Distribution: "Distribution",
|
|
30
|
+
/**
|
|
31
|
+
* A collection of operations that provides access to one or more datasets or data processing functions.
|
|
32
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Data_Service
|
|
33
|
+
*/
|
|
34
|
+
DataService: "DataService",
|
|
35
|
+
/**
|
|
36
|
+
* A collection of datasets that are published separately, but share some common characteristics.
|
|
37
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset_Series
|
|
38
|
+
*/
|
|
39
|
+
DatasetSeries: "DatasetSeries",
|
|
40
|
+
/**
|
|
41
|
+
* A record in a data catalog, describing the registration of a single dataset or data service.
|
|
42
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog_Record
|
|
43
|
+
*/
|
|
44
|
+
CatalogRecord: "CatalogRecord",
|
|
45
|
+
/**
|
|
46
|
+
* An association class for attaching additional information to a relationship between DCAT Resources.
|
|
47
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Relationship
|
|
48
|
+
*/
|
|
49
|
+
Relationship: "Relationship",
|
|
50
|
+
/**
|
|
51
|
+
* A role is the function of a resource or agent with respect to another resource, in the context of resource attribution or resource relationships..
|
|
52
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Role
|
|
53
|
+
*/
|
|
54
|
+
Role: "Role"
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=dcatClasses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dcatClasses.js","sourceRoot":"","sources":["../../../src/models/dcatClasses.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;;GAGG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B;;;OAGG;IACH,OAAO,EAAE,SAAS;IAElB;;;;OAIG;IACH,QAAQ,EAAE,UAAU;IAEpB;;;OAGG;IACH,OAAO,EAAE,SAAS;IAElB;;;OAGG;IACH,YAAY,EAAE,cAAc;IAE5B;;;OAGG;IACH,WAAW,EAAE,aAAa;IAE1B;;;OAGG;IACH,aAAa,EAAE,eAAe;IAE9B;;;OAGG;IACH,aAAa,EAAE,eAAe;IAE9B;;;OAGG;IACH,YAAY,EAAE,cAAc;IAE5B;;;OAGG;IACH,IAAI,EAAE,MAAM;CACH,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * DCAT core classes representing the main entities in the Data Catalog Vocabulary.\n * @see https://www.w3.org/TR/vocab-dcat-3/#classes\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const DcatClasses = {\n\t/**\n\t * A curated collection of metadata about resources (e.g., datasets and data services in the context of a data catalog).\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog\n\t */\n\tCatalog: \"Catalog\",\n\n\t/**\n\t * Resource published or curated by a single agent.\n\t * This is an abstract class and should not be used directly.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Resource\n\t */\n\tResource: \"Resource\",\n\n\t/**\n\t * A collection of data, published or curated by a single agent, and available for access or download in one or more representations.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset\n\t */\n\tDataset: \"Dataset\",\n\n\t/**\n\t * A specific representation of a dataset. A dataset might be available in multiple serializations that may differ in various ways.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Distribution\n\t */\n\tDistribution: \"Distribution\",\n\n\t/**\n\t * A collection of operations that provides access to one or more datasets or data processing functions.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Data_Service\n\t */\n\tDataService: \"DataService\",\n\n\t/**\n\t * A collection of datasets that are published separately, but share some common characteristics.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset_Series\n\t */\n\tDatasetSeries: \"DatasetSeries\",\n\n\t/**\n\t * A record in a data catalog, describing the registration of a single dataset or data service.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog_Record\n\t */\n\tCatalogRecord: \"CatalogRecord\",\n\n\t/**\n\t * An association class for attaching additional information to a relationship between DCAT Resources.\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Relationship\n\t */\n\tRelationship: \"Relationship\",\n\n\t/**\n\t * A role is the function of a resource or agent with respect to another resource, in the context of resource attribution or resource relationships..\n\t * @see https://www.w3.org/TR/vocab-dcat-3/#Class:Role\n\t */\n\tRole: \"Role\"\n} as const;\n\n/**\n * The classes for DCAT.\n */\nexport type DcatClasses = (typeof DcatClasses)[keyof typeof DcatClasses];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dcatContextType.js","sourceRoot":"","sources":["../../../src/models/dcatContextType.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinition } from \"@twin.org/data-json-ld\";\nimport type { DublinCoreContexts } from \"@twin.org/standards-dublin-core\";\nimport type { DcatContexts } from \"./dcatContexts.js\";\n\n/**\n * The DCAT JSON-LD context type.\n * Supports the DCAT context URL or arrays with additional context definitions.\n */\nexport type DcatContextType = {\n\tdcat: typeof DcatContexts.ContextRoot;\n\tdcterms: typeof DublinCoreContexts.ContextTerms;\n} & IJsonLdContextDefinition;\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright 2025 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* DCAT (Data Catalog Vocabulary) namespace contexts.
|
|
5
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/
|
|
6
|
+
*/
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
8
|
+
export const DcatContexts = {
|
|
9
|
+
/**
|
|
10
|
+
* The context root for DCAT vocabulary.
|
|
11
|
+
*/
|
|
12
|
+
ContextRoot: "http://www.w3.org/ns/dcat#",
|
|
13
|
+
/**
|
|
14
|
+
* The redirect URL for the DCAT context, used for JSON-LD processing.
|
|
15
|
+
*/
|
|
16
|
+
ContextRedirect: "https://www.w3.org/ns/dcat.jsonld",
|
|
17
|
+
/**
|
|
18
|
+
* The context for RDF vocabulary.
|
|
19
|
+
* @see https://www.w3.org/TR/rdf-schema/
|
|
20
|
+
*/
|
|
21
|
+
ContextRdf: "http://www.w3.org/2000/01/rdf-schema#",
|
|
22
|
+
/**
|
|
23
|
+
* The context for RDF vocabulary Json-LD.
|
|
24
|
+
* @see https://www.w3.org/TR/rdf-schema/
|
|
25
|
+
*/
|
|
26
|
+
ContextRdfRedirect: "https://schema.twindev.org/w3c-rdf/types.jsonld",
|
|
27
|
+
/**
|
|
28
|
+
* The context for SPDX (Software Package Data Exchange) vocabulary.
|
|
29
|
+
* @see https://spdx.org/rdf/terms
|
|
30
|
+
*/
|
|
31
|
+
ContextSpdx: "http://spdx.org/rdf/terms#",
|
|
32
|
+
/**
|
|
33
|
+
* The context for PROV (Provenance) vocabulary.
|
|
34
|
+
* @see https://www.w3.org/ns/prov
|
|
35
|
+
*/
|
|
36
|
+
ContextProv: "http://www.w3.org/ns/prov#"
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=dcatContexts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dcatContexts.js","sourceRoot":"","sources":["../../../src/models/dcatContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;;GAGG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B;;OAEG;IACH,WAAW,EAAE,4BAA4B;IAEzC;;OAEG;IACH,eAAe,EAAE,mCAAmC;IAEpD;;;OAGG;IACH,UAAU,EAAE,uCAAuC;IAEnD;;;OAGG;IACH,kBAAkB,EAAE,iDAAiD;IAErE;;;OAGG;IACH,WAAW,EAAE,4BAA4B;IAEzC;;;OAGG;IACH,WAAW,EAAE,4BAA4B;CAChC,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * DCAT (Data Catalog Vocabulary) namespace contexts.\n * @see https://www.w3.org/TR/vocab-dcat-3/\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const DcatContexts = {\n\t/**\n\t * The context root for DCAT vocabulary.\n\t */\n\tContextRoot: \"http://www.w3.org/ns/dcat#\",\n\n\t/**\n\t * The redirect URL for the DCAT context, used for JSON-LD processing.\n\t */\n\tContextRedirect: \"https://www.w3.org/ns/dcat.jsonld\",\n\n\t/**\n\t * The context for RDF vocabulary.\n\t * @see https://www.w3.org/TR/rdf-schema/\n\t */\n\tContextRdf: \"http://www.w3.org/2000/01/rdf-schema#\",\n\n\t/**\n\t * The context for RDF vocabulary Json-LD.\n\t * @see https://www.w3.org/TR/rdf-schema/\n\t */\n\tContextRdfRedirect: \"https://schema.twindev.org/w3c-rdf/types.jsonld\",\n\n\t/**\n\t * The context for SPDX (Software Package Data Exchange) vocabulary.\n\t * @see https://spdx.org/rdf/terms\n\t */\n\tContextSpdx: \"http://spdx.org/rdf/terms#\",\n\n\t/**\n\t * The context for PROV (Provenance) vocabulary.\n\t * @see https://www.w3.org/ns/prov\n\t */\n\tContextProv: \"http://www.w3.org/ns/prov#\"\n} as const;\n\n/**\n * The contexts for DCAT.\n */\nexport type DcatContexts = (typeof DcatContexts)[keyof typeof DcatContexts];\n"]}
|