@twin.org/standards-w3c-dcat 0.0.3-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +21 -0
- package/dist/es/dataTypes/dcatDataTypes.js +77 -0
- package/dist/es/dataTypes/dcatDataTypes.js.map +1 -0
- package/dist/es/index.js +18 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/ICatalog.js +2 -0
- package/dist/es/models/ICatalog.js.map +1 -0
- package/dist/es/models/ICatalogRecord.js +2 -0
- package/dist/es/models/ICatalogRecord.js.map +1 -0
- package/dist/es/models/IDataService.js +2 -0
- package/dist/es/models/IDataService.js.map +1 -0
- package/dist/es/models/IDataset.js +2 -0
- package/dist/es/models/IDataset.js.map +1 -0
- package/dist/es/models/IDatasetSeries.js +2 -0
- package/dist/es/models/IDatasetSeries.js.map +1 -0
- package/dist/es/models/IDistribution.js +2 -0
- package/dist/es/models/IDistribution.js.map +1 -0
- package/dist/es/models/IRelationship.js +2 -0
- package/dist/es/models/IRelationship.js.map +1 -0
- package/dist/es/models/IResource.js +2 -0
- package/dist/es/models/IResource.js.map +1 -0
- package/dist/es/models/IRole.js +2 -0
- package/dist/es/models/IRole.js.map +1 -0
- package/dist/es/models/dcatClasses.js +56 -0
- package/dist/es/models/dcatClasses.js.map +1 -0
- package/dist/es/models/dcatContextType.js +2 -0
- package/dist/es/models/dcatContextType.js.map +1 -0
- package/dist/es/models/dcatContexts.js +38 -0
- package/dist/es/models/dcatContexts.js.map +1 -0
- package/dist/es/models/dcatRelationshipTypes.js +57 -0
- package/dist/es/models/dcatRelationshipTypes.js.map +1 -0
- package/dist/es/models/types/dcatPropertyTypes.js +4 -0
- package/dist/es/models/types/dcatPropertyTypes.js.map +1 -0
- package/dist/es/schemas/Catalog.json +491 -0
- package/dist/es/schemas/CatalogRecord.json +212 -0
- package/dist/es/schemas/DataService.json +358 -0
- package/dist/es/schemas/Dataset.json +407 -0
- package/dist/es/schemas/DatasetSeries.json +425 -0
- package/dist/es/schemas/Distribution.json +268 -0
- package/dist/es/schemas/Relationship.json +187 -0
- package/dist/es/schemas/Resource.json +342 -0
- package/dist/es/schemas/Role.json +182 -0
- package/dist/types/dataTypes/dcatDataTypes.d.ts +14 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/models/ICatalog.d.ts +53 -0
- package/dist/types/models/ICatalogRecord.d.ts +52 -0
- package/dist/types/models/IDataService.d.ts +31 -0
- package/dist/types/models/IDataset.d.ts +60 -0
- package/dist/types/models/IDatasetSeries.d.ts +30 -0
- package/dist/types/models/IDistribution.d.ts +122 -0
- package/dist/types/models/IRelationship.d.ts +30 -0
- package/dist/types/models/IResource.d.ts +119 -0
- package/dist/types/models/IRole.d.ts +25 -0
- package/dist/types/models/dcatClasses.d.ts +56 -0
- package/dist/types/models/dcatContextType.d.ts +11 -0
- package/dist/types/models/dcatContexts.d.ts +38 -0
- package/dist/types/models/dcatRelationshipTypes.d.ts +57 -0
- package/dist/types/models/types/dcatPropertyTypes.d.ts +29 -0
- package/docs/changelog.md +22 -0
- package/docs/examples.md +1 -0
- package/docs/reference/classes/DcatDataTypes.md +38 -0
- package/docs/reference/index.md +36 -0
- package/docs/reference/interfaces/ICatalog.md +557 -0
- package/docs/reference/interfaces/ICatalogRecord.md +113 -0
- package/docs/reference/interfaces/IDataService.md +382 -0
- package/docs/reference/interfaces/IDataset.md +447 -0
- package/docs/reference/interfaces/IDatasetSeries.md +509 -0
- package/docs/reference/interfaces/IDistribution.md +281 -0
- package/docs/reference/interfaces/IRelationship.md +65 -0
- package/docs/reference/interfaces/IResource.md +274 -0
- package/docs/reference/interfaces/IRole.md +53 -0
- package/docs/reference/type-aliases/DateTimeType.md +6 -0
- package/docs/reference/type-aliases/DcatClasses.md +5 -0
- package/docs/reference/type-aliases/DcatContextType.md +16 -0
- package/docs/reference/type-aliases/DcatContexts.md +5 -0
- package/docs/reference/type-aliases/DcatRelationshipType.md +5 -0
- package/docs/reference/type-aliases/DecimalType.md +5 -0
- package/docs/reference/type-aliases/DurationType.md +5 -0
- package/docs/reference/type-aliases/IriType.md +5 -0
- package/docs/reference/type-aliases/LiteralType.md +5 -0
- package/docs/reference/type-aliases/NonNegativeIntegerType.md +5 -0
- package/docs/reference/variables/DcatClasses.md +102 -0
- package/docs/reference/variables/DcatContexts.md +63 -0
- package/docs/reference/variables/DcatRelationshipType.md +103 -0
- package/locales/en.json +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
|
+
import type { IAgent } from "@twin.org/standards-foaf";
|
|
4
|
+
import type { IOdrlPolicy } from "@twin.org/standards-w3c-odrl";
|
|
5
|
+
import type { DcatClasses } from "./dcatClasses.js";
|
|
6
|
+
import type { DcatContextType } from "./dcatContextType.js";
|
|
7
|
+
import type { IRelationship } from "./IRelationship.js";
|
|
8
|
+
import type { DateTimeType, LiteralType } from "./types/dcatPropertyTypes.js";
|
|
9
|
+
/**
|
|
10
|
+
* Base interface for DCAT catalogued resources.
|
|
11
|
+
* This is the parent class of dcat:Dataset, dcat:DataService, and dcat:Catalog.
|
|
12
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Resource
|
|
13
|
+
*/
|
|
14
|
+
export interface IResource extends IJsonLdNodeObject {
|
|
15
|
+
/**
|
|
16
|
+
* The JSON-LD context for the resource.
|
|
17
|
+
*/
|
|
18
|
+
"@context"?: DcatContextType;
|
|
19
|
+
/**
|
|
20
|
+
* The type of the resource.
|
|
21
|
+
* Typically "Catalog", "Dataset", "DataService", "DatasetSeries", or the base "Resource".
|
|
22
|
+
*/
|
|
23
|
+
"@type": typeof DcatClasses.Resource | typeof DcatClasses.Dataset | typeof DcatClasses.DataService | typeof DcatClasses.Catalog | typeof DcatClasses.DatasetSeries;
|
|
24
|
+
/**
|
|
25
|
+
* A name given to the resource.
|
|
26
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_title
|
|
27
|
+
*/
|
|
28
|
+
"dcterms:title"?: LiteralType;
|
|
29
|
+
/**
|
|
30
|
+
* A free-text account of the resource.
|
|
31
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_description
|
|
32
|
+
*/
|
|
33
|
+
"dcterms:description"?: LiteralType;
|
|
34
|
+
/**
|
|
35
|
+
* A unique identifier of the resource.
|
|
36
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_identifier
|
|
37
|
+
*/
|
|
38
|
+
"dcterms:identifier"?: LiteralType;
|
|
39
|
+
/**
|
|
40
|
+
* Date of formal issuance (publication) of the resource.
|
|
41
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_release_date
|
|
42
|
+
*/
|
|
43
|
+
"dcterms:issued"?: DateTimeType;
|
|
44
|
+
/**
|
|
45
|
+
* Most recent date on which the resource was changed, updated or modified.
|
|
46
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_update_date
|
|
47
|
+
*/
|
|
48
|
+
"dcterms:modified"?: DateTimeType;
|
|
49
|
+
/**
|
|
50
|
+
* A language of the resource.
|
|
51
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_language
|
|
52
|
+
*/
|
|
53
|
+
"dcterms:language"?: ObjectOrArray<string>;
|
|
54
|
+
/**
|
|
55
|
+
* An entity responsible for making the resource available.
|
|
56
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_publisher
|
|
57
|
+
*/
|
|
58
|
+
"dcterms:publisher"?: IAgent | string;
|
|
59
|
+
/**
|
|
60
|
+
* An entity responsible for producing the resource.
|
|
61
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_creator
|
|
62
|
+
*/
|
|
63
|
+
"dcterms:creator"?: IAgent;
|
|
64
|
+
/**
|
|
65
|
+
* Information about who can access the resource or an indication of its security status.
|
|
66
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_access_rights
|
|
67
|
+
*/
|
|
68
|
+
"dcterms:accessRights"?: IJsonLdNodeObject | string;
|
|
69
|
+
/**
|
|
70
|
+
* A legal document under which the resource is made available.
|
|
71
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_license
|
|
72
|
+
*/
|
|
73
|
+
"dcterms:license"?: IJsonLdNodeObject | string;
|
|
74
|
+
/**
|
|
75
|
+
* Information about rights held in and over the resource.
|
|
76
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_rights
|
|
77
|
+
*/
|
|
78
|
+
"dcterms:rights"?: IJsonLdNodeObject | string;
|
|
79
|
+
/**
|
|
80
|
+
* An established standard to which the resource conforms.
|
|
81
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_conforms_to
|
|
82
|
+
*/
|
|
83
|
+
"dcterms:conformsTo"?: ObjectOrArray<string>;
|
|
84
|
+
/**
|
|
85
|
+
* The nature or genre of the resource.
|
|
86
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_type
|
|
87
|
+
*/
|
|
88
|
+
"dcterms:type"?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Relevant contact information for the catalogued resource.
|
|
91
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_contact_point
|
|
92
|
+
*/
|
|
93
|
+
"dcat:contactPoint"?: IJsonLdNodeObject | string;
|
|
94
|
+
/**
|
|
95
|
+
* A keyword or tag describing the resource.
|
|
96
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_keyword
|
|
97
|
+
*/
|
|
98
|
+
"dcat:keyword"?: LiteralType;
|
|
99
|
+
/**
|
|
100
|
+
* A main category of the resource. A resource can have multiple themes.
|
|
101
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_theme
|
|
102
|
+
*/
|
|
103
|
+
"dcat:theme"?: ObjectOrArray<string>;
|
|
104
|
+
/**
|
|
105
|
+
* A Web page that can be navigated to gain access to the resource.
|
|
106
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_landing_page
|
|
107
|
+
*/
|
|
108
|
+
"dcat:landingPage"?: ObjectOrArray<string>;
|
|
109
|
+
/**
|
|
110
|
+
* Link to a description of a relationship with another resource.
|
|
111
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_qualified_relation
|
|
112
|
+
*/
|
|
113
|
+
"dcat:qualifiedRelation"?: IRelationship | string;
|
|
114
|
+
/**
|
|
115
|
+
* An ODRL conformant policy expressing the rights associated with the resource.
|
|
116
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_has_policy
|
|
117
|
+
*/
|
|
118
|
+
"odrl:hasPolicy"?: IOdrlPolicy;
|
|
119
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { DcatClasses } from "./dcatClasses.js";
|
|
3
|
+
import type { DcatContextType } from "./dcatContextType.js";
|
|
4
|
+
import type { LiteralType } from "./types/dcatPropertyTypes.js";
|
|
5
|
+
/**
|
|
6
|
+
* Interface for DCAT Role.
|
|
7
|
+
* A role is the function of a resource or agent with respect to another resource,
|
|
8
|
+
* in the context of resource attribution or resource relationships.
|
|
9
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Role
|
|
10
|
+
*/
|
|
11
|
+
export interface IRole extends IJsonLdNodeObject {
|
|
12
|
+
/**
|
|
13
|
+
* The JSON-LD context for the resource.
|
|
14
|
+
*/
|
|
15
|
+
"@context"?: DcatContextType;
|
|
16
|
+
/**
|
|
17
|
+
* The type identifier, typically "Role".
|
|
18
|
+
*/
|
|
19
|
+
"@type": typeof DcatClasses.Role;
|
|
20
|
+
/**
|
|
21
|
+
* A name given to the distribution.
|
|
22
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:distribution_title
|
|
23
|
+
*/
|
|
24
|
+
"dcterms:title"?: LiteralType;
|
|
25
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DCAT core classes representing the main entities in the Data Catalog Vocabulary.
|
|
3
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#classes
|
|
4
|
+
*/
|
|
5
|
+
export declare const DcatClasses: {
|
|
6
|
+
/**
|
|
7
|
+
* A curated collection of metadata about resources (e.g., datasets and data services in the context of a data catalog).
|
|
8
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog
|
|
9
|
+
*/
|
|
10
|
+
readonly Catalog: "Catalog";
|
|
11
|
+
/**
|
|
12
|
+
* Resource published or curated by a single agent.
|
|
13
|
+
* This is an abstract class and should not be used directly.
|
|
14
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Resource
|
|
15
|
+
*/
|
|
16
|
+
readonly Resource: "Resource";
|
|
17
|
+
/**
|
|
18
|
+
* A collection of data, published or curated by a single agent, and available for access or download in one or more representations.
|
|
19
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset
|
|
20
|
+
*/
|
|
21
|
+
readonly Dataset: "Dataset";
|
|
22
|
+
/**
|
|
23
|
+
* A specific representation of a dataset. A dataset might be available in multiple serializations that may differ in various ways.
|
|
24
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Distribution
|
|
25
|
+
*/
|
|
26
|
+
readonly Distribution: "Distribution";
|
|
27
|
+
/**
|
|
28
|
+
* A collection of operations that provides access to one or more datasets or data processing functions.
|
|
29
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Data_Service
|
|
30
|
+
*/
|
|
31
|
+
readonly DataService: "DataService";
|
|
32
|
+
/**
|
|
33
|
+
* A collection of datasets that are published separately, but share some common characteristics.
|
|
34
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Dataset_Series
|
|
35
|
+
*/
|
|
36
|
+
readonly DatasetSeries: "DatasetSeries";
|
|
37
|
+
/**
|
|
38
|
+
* A record in a data catalog, describing the registration of a single dataset or data service.
|
|
39
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Catalog_Record
|
|
40
|
+
*/
|
|
41
|
+
readonly CatalogRecord: "CatalogRecord";
|
|
42
|
+
/**
|
|
43
|
+
* An association class for attaching additional information to a relationship between DCAT Resources.
|
|
44
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Relationship
|
|
45
|
+
*/
|
|
46
|
+
readonly Relationship: "Relationship";
|
|
47
|
+
/**
|
|
48
|
+
* A role is the function of a resource or agent with respect to another resource, in the context of resource attribution or resource relationships..
|
|
49
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Class:Role
|
|
50
|
+
*/
|
|
51
|
+
readonly Role: "Role";
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* The classes for DCAT.
|
|
55
|
+
*/
|
|
56
|
+
export type DcatClasses = (typeof DcatClasses)[keyof typeof DcatClasses];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IJsonLdContextDefinition } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { DublinCoreContexts } from "@twin.org/standards-dublin-core";
|
|
3
|
+
import type { DcatContexts } from "./dcatContexts.js";
|
|
4
|
+
/**
|
|
5
|
+
* The DCAT JSON-LD context type.
|
|
6
|
+
* Supports the DCAT context URL or arrays with additional context definitions.
|
|
7
|
+
*/
|
|
8
|
+
export type DcatContextType = {
|
|
9
|
+
dcat: typeof DcatContexts.ContextRoot;
|
|
10
|
+
dcterms: typeof DublinCoreContexts.ContextTerms;
|
|
11
|
+
} & IJsonLdContextDefinition;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DCAT (Data Catalog Vocabulary) namespace contexts.
|
|
3
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/
|
|
4
|
+
*/
|
|
5
|
+
export declare const DcatContexts: {
|
|
6
|
+
/**
|
|
7
|
+
* The context root for DCAT vocabulary.
|
|
8
|
+
*/
|
|
9
|
+
readonly ContextRoot: "http://www.w3.org/ns/dcat#";
|
|
10
|
+
/**
|
|
11
|
+
* The redirect URL for the DCAT context, used for JSON-LD processing.
|
|
12
|
+
*/
|
|
13
|
+
readonly ContextRedirect: "https://www.w3.org/ns/dcat.jsonld";
|
|
14
|
+
/**
|
|
15
|
+
* The context for RDF vocabulary.
|
|
16
|
+
* @see https://www.w3.org/TR/rdf-schema/
|
|
17
|
+
*/
|
|
18
|
+
readonly ContextRdf: "http://www.w3.org/2000/01/rdf-schema#";
|
|
19
|
+
/**
|
|
20
|
+
* The context for RDF vocabulary Json-LD.
|
|
21
|
+
* @see https://www.w3.org/TR/rdf-schema/
|
|
22
|
+
*/
|
|
23
|
+
readonly ContextRdfRedirect: "https://schema.twindev.org/w3c-rdf/types.jsonld";
|
|
24
|
+
/**
|
|
25
|
+
* The context for SPDX (Software Package Data Exchange) vocabulary.
|
|
26
|
+
* @see https://spdx.org/rdf/terms
|
|
27
|
+
*/
|
|
28
|
+
readonly ContextSpdx: "http://spdx.org/rdf/terms#";
|
|
29
|
+
/**
|
|
30
|
+
* The context for PROV (Provenance) vocabulary.
|
|
31
|
+
* @see https://www.w3.org/ns/prov
|
|
32
|
+
*/
|
|
33
|
+
readonly ContextProv: "http://www.w3.org/ns/prov#";
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The contexts for DCAT.
|
|
37
|
+
*/
|
|
38
|
+
export type DcatContexts = (typeof DcatContexts)[keyof typeof DcatContexts];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DCAT relationship types for describing qualified relationships between resources.
|
|
3
|
+
* These are used with the dcat:qualifiedRelation property.
|
|
4
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#qualified-forms
|
|
5
|
+
*/
|
|
6
|
+
export declare const DcatRelationshipType: {
|
|
7
|
+
/**
|
|
8
|
+
* The function of an entity with respect to another resource.
|
|
9
|
+
* Used in qualified relationships to specify the role.
|
|
10
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:relationship_had_role
|
|
11
|
+
*/
|
|
12
|
+
readonly HadRole: "hadRole";
|
|
13
|
+
/**
|
|
14
|
+
* A related resource that is supplanted, displaced, or superseded by the described resource.
|
|
15
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_replaces
|
|
16
|
+
*/
|
|
17
|
+
readonly Replaces: "replaces";
|
|
18
|
+
/**
|
|
19
|
+
* A related resource that supplants, displaces, or supersedes the described resource.
|
|
20
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_is_replaced_by
|
|
21
|
+
*/
|
|
22
|
+
readonly IsReplacedBy: "isReplacedBy";
|
|
23
|
+
/**
|
|
24
|
+
* A related resource that is a version, edition, or adaptation of the described resource.
|
|
25
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_has_version
|
|
26
|
+
*/
|
|
27
|
+
readonly HasVersion: "hasVersion";
|
|
28
|
+
/**
|
|
29
|
+
* A related resource of which the described resource is a version, edition, or adaptation.
|
|
30
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_is_version_of
|
|
31
|
+
*/
|
|
32
|
+
readonly IsVersionOf: "isVersionOf";
|
|
33
|
+
/**
|
|
34
|
+
* A related resource that references, cites, or otherwise points to the described resource.
|
|
35
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_is_referenced_by
|
|
36
|
+
*/
|
|
37
|
+
readonly IsReferencedBy: "isReferencedBy";
|
|
38
|
+
/**
|
|
39
|
+
* A related resource that is referenced, cited, or otherwise pointed to by the described resource.
|
|
40
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_references
|
|
41
|
+
*/
|
|
42
|
+
readonly References: "references";
|
|
43
|
+
/**
|
|
44
|
+
* A related resource that requires the described resource to support its function, delivery, or coherence.
|
|
45
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_requires
|
|
46
|
+
*/
|
|
47
|
+
readonly Requires: "requires";
|
|
48
|
+
/**
|
|
49
|
+
* A related resource that is required by the described resource to support its function, delivery, or coherence.
|
|
50
|
+
* @see https://www.w3.org/TR/vocab-dcat-3/#Property:resource_is_required_by
|
|
51
|
+
*/
|
|
52
|
+
readonly IsRequiredBy: "isRequiredBy";
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* The relationship types for DCAT.
|
|
56
|
+
*/
|
|
57
|
+
export type DcatRelationshipType = (typeof DcatRelationshipType)[keyof typeof DcatRelationshipType];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common type aliases for DCAT properties.
|
|
3
|
+
* These provide type safety while maintaining flexibility for JSON-LD data.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Literal values can be strings or arrays of strings (for multi-valued properties).
|
|
7
|
+
*/
|
|
8
|
+
export type LiteralType = string | string[];
|
|
9
|
+
/**
|
|
10
|
+
* IRI references - can be a single IRI or array of IRIs.
|
|
11
|
+
*/
|
|
12
|
+
export type IriType = string | string[];
|
|
13
|
+
/**
|
|
14
|
+
* Date/time values in ISO 8601 format.
|
|
15
|
+
* Can be xsd:date, xsd:dateTime, or xsd:gYear.
|
|
16
|
+
*/
|
|
17
|
+
export type DateTimeType = string;
|
|
18
|
+
/**
|
|
19
|
+
* Duration values in ISO 8601 duration format (xsd:duration).
|
|
20
|
+
*/
|
|
21
|
+
export type DurationType = string;
|
|
22
|
+
/**
|
|
23
|
+
* Decimal number values (xsd:decimal).
|
|
24
|
+
*/
|
|
25
|
+
export type DecimalType = number;
|
|
26
|
+
/**
|
|
27
|
+
* Non-negative integer values (xsd:nonNegativeInteger).
|
|
28
|
+
*/
|
|
29
|
+
export type NonNegativeIntegerType = number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# @twin.org/standards-w3c-dcat - Changelog
|
|
2
|
+
|
|
3
|
+
## [0.0.3-next.3](https://github.com/twinfoundation/standards/compare/standards-w3c-dcat-v0.0.3-next.2...standards-w3c-dcat-v0.0.3-next.3) (2025-11-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add w3c dcat standards package ([#68](https://github.com/twinfoundation/standards/issues/68)) ([85746c6](https://github.com/twinfoundation/standards/commit/85746c673464498a52e9c30ce498fd88b81a7434))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/standards-dublin-core bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
16
|
+
* @twin.org/standards-foaf bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
17
|
+
* @twin.org/standards-w3c-odrl bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
18
|
+
* @twin.org/standards-w3c-vcard bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
19
|
+
|
|
20
|
+
## v0.0.3-next.1
|
|
21
|
+
|
|
22
|
+
- Initial Release
|
package/docs/examples.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @twin.org/standards-w3c-dcat - Examples
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Class: DcatDataTypes
|
|
2
|
+
|
|
3
|
+
Class providing DCAT data type utilities and JSON-LD redirect registration.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new DcatDataTypes**(): `DcatDataTypes`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`DcatDataTypes`
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
### registerRedirects()
|
|
18
|
+
|
|
19
|
+
> `static` **registerRedirects**(): `void`
|
|
20
|
+
|
|
21
|
+
Register redirects for DCAT namespace to enable offline JSON-LD processing.
|
|
22
|
+
This maps the W3C DCAT namespace to a local redirect URL for faster resolution.
|
|
23
|
+
|
|
24
|
+
#### Returns
|
|
25
|
+
|
|
26
|
+
`void`
|
|
27
|
+
|
|
28
|
+
***
|
|
29
|
+
|
|
30
|
+
### registerTypes()
|
|
31
|
+
|
|
32
|
+
> `static` **registerTypes**(): `void`
|
|
33
|
+
|
|
34
|
+
Register all the DCAT data types with their JSON schemas.
|
|
35
|
+
|
|
36
|
+
#### Returns
|
|
37
|
+
|
|
38
|
+
`void`
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# @twin.org/standards-w3c-dcat
|
|
2
|
+
|
|
3
|
+
## Classes
|
|
4
|
+
|
|
5
|
+
- [DcatDataTypes](classes/DcatDataTypes.md)
|
|
6
|
+
|
|
7
|
+
## Interfaces
|
|
8
|
+
|
|
9
|
+
- [ICatalog](interfaces/ICatalog.md)
|
|
10
|
+
- [ICatalogRecord](interfaces/ICatalogRecord.md)
|
|
11
|
+
- [IDataService](interfaces/IDataService.md)
|
|
12
|
+
- [IDataset](interfaces/IDataset.md)
|
|
13
|
+
- [IDatasetSeries](interfaces/IDatasetSeries.md)
|
|
14
|
+
- [IDistribution](interfaces/IDistribution.md)
|
|
15
|
+
- [IRelationship](interfaces/IRelationship.md)
|
|
16
|
+
- [IResource](interfaces/IResource.md)
|
|
17
|
+
- [IRole](interfaces/IRole.md)
|
|
18
|
+
|
|
19
|
+
## Type Aliases
|
|
20
|
+
|
|
21
|
+
- [DcatClasses](type-aliases/DcatClasses.md)
|
|
22
|
+
- [DcatContextType](type-aliases/DcatContextType.md)
|
|
23
|
+
- [DcatContexts](type-aliases/DcatContexts.md)
|
|
24
|
+
- [DcatRelationshipType](type-aliases/DcatRelationshipType.md)
|
|
25
|
+
- [LiteralType](type-aliases/LiteralType.md)
|
|
26
|
+
- [IriType](type-aliases/IriType.md)
|
|
27
|
+
- [DateTimeType](type-aliases/DateTimeType.md)
|
|
28
|
+
- [DurationType](type-aliases/DurationType.md)
|
|
29
|
+
- [DecimalType](type-aliases/DecimalType.md)
|
|
30
|
+
- [NonNegativeIntegerType](type-aliases/NonNegativeIntegerType.md)
|
|
31
|
+
|
|
32
|
+
## Variables
|
|
33
|
+
|
|
34
|
+
- [DcatClasses](variables/DcatClasses.md)
|
|
35
|
+
- [DcatContexts](variables/DcatContexts.md)
|
|
36
|
+
- [DcatRelationshipType](variables/DcatRelationshipType.md)
|