@twin.org/standards-dublin-core 0.9.2 → 0.9.3-next.2
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/dist/es/dataTypes/dublinCoreDataTypes.js +16 -0
- package/dist/es/dataTypes/dublinCoreDataTypes.js.map +1 -1
- package/dist/es/models/dublinCoreContexts.js +5 -1
- package/dist/es/models/dublinCoreContexts.js.map +1 -1
- package/dist/es/schemas/DublinCorePeriodOfTime.json +29 -0
- package/dist/types/dataTypes/dublinCoreDataTypes.d.ts +4 -0
- package/dist/types/models/dublinCoreContexts.d.ts +4 -0
- package/docs/changelog.md +37 -0
- package/docs/reference/classes/DublinCoreDataTypes.md +12 -0
- package/docs/reference/variables/DublinCoreContexts.md +6 -0
- package/package.json +4 -3
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
// Copyright 2024 IOTA Stiftung.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { DataTypeHelper } from "@twin.org/data-core";
|
|
3
4
|
import { JsonLdProcessor } from "@twin.org/data-json-ld";
|
|
5
|
+
import { DublinCoreClasses } from "../models/dublinCoreClasses.js";
|
|
4
6
|
import { DublinCoreContexts } from "../models/dublinCoreContexts.js";
|
|
7
|
+
import PeriodOfTimeSchema from "../schemas/DublinCorePeriodOfTime.json" with { type: "json" };
|
|
5
8
|
/**
|
|
6
9
|
* Handle all the data types for Dublin Core.
|
|
7
10
|
*/
|
|
@@ -13,5 +16,18 @@ export class DublinCoreDataTypes {
|
|
|
13
16
|
JsonLdProcessor.addRedirect(/https?:\/\/purl.org\/dc\/terms\/?/, DublinCoreContexts.JsonLdContextTerms);
|
|
14
17
|
JsonLdProcessor.addRedirect(/https?:\/\/purl.org\/dc\/dcmitype\/?/, DublinCoreContexts.JsonLdContextDcmiType);
|
|
15
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Register all the data types.
|
|
21
|
+
*/
|
|
22
|
+
static registerTypes() {
|
|
23
|
+
const types = [
|
|
24
|
+
{
|
|
25
|
+
type: DublinCoreClasses.PeriodOfTime,
|
|
26
|
+
schema: PeriodOfTimeSchema
|
|
27
|
+
}
|
|
28
|
+
];
|
|
29
|
+
DataTypeHelper.registerTypes(DublinCoreContexts.NamespaceTerms, DublinCoreContexts.JsonLdContextTerms, types);
|
|
30
|
+
DataTypeHelper.registerTypes(DublinCoreContexts.JsonSchemaNamespace, DublinCoreContexts.JsonLdContextTerms, types.map(t => ({ type: `DublinCore${t.type}`, schema: t.schema })));
|
|
31
|
+
}
|
|
16
32
|
}
|
|
17
33
|
//# sourceMappingURL=dublinCoreDataTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dublinCoreDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/dublinCoreDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"dublinCoreDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/dublinCoreDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,kBAAkB,MAAM,wCAAwC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE9F;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAC/B;;OAEG;IACI,MAAM,CAAC,iBAAiB;QAC9B,eAAe,CAAC,WAAW,CAC1B,mCAAmC,EACnC,kBAAkB,CAAC,kBAAkB,CACrC,CAAC;QACF,eAAe,CAAC,WAAW,CAC1B,sCAAsC,EACtC,kBAAkB,CAAC,qBAAqB,CACxC,CAAC;IACH,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,MAAM,KAAK,GAAG;YACb;gBACC,IAAI,EAAE,iBAAiB,CAAC,YAAY;gBACpC,MAAM,EAAE,kBAAkB;aAC1B;SACD,CAAC;QAEF,cAAc,CAAC,aAAa,CAC3B,kBAAkB,CAAC,cAAc,EACjC,kBAAkB,CAAC,kBAAkB,EACrC,KAAK,CACL,CAAC;QAEF,cAAc,CAAC,aAAa,CAC3B,kBAAkB,CAAC,mBAAmB,EACtC,kBAAkB,CAAC,kBAAkB,EACrC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CACnE,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHelper } from \"@twin.org/data-core\";\nimport { JsonLdProcessor } from \"@twin.org/data-json-ld\";\nimport { DublinCoreClasses } from \"../models/dublinCoreClasses.js\";\nimport { DublinCoreContexts } from \"../models/dublinCoreContexts.js\";\nimport PeriodOfTimeSchema from \"../schemas/DublinCorePeriodOfTime.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for Dublin Core.\n */\nexport class DublinCoreDataTypes {\n\t/**\n\t * Register the JSON-LD Redirects.\n\t */\n\tpublic static registerRedirects(): void {\n\t\tJsonLdProcessor.addRedirect(\n\t\t\t/https?:\\/\\/purl.org\\/dc\\/terms\\/?/,\n\t\t\tDublinCoreContexts.JsonLdContextTerms\n\t\t);\n\t\tJsonLdProcessor.addRedirect(\n\t\t\t/https?:\\/\\/purl.org\\/dc\\/dcmitype\\/?/,\n\t\t\tDublinCoreContexts.JsonLdContextDcmiType\n\t\t);\n\t}\n\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tconst types = [\n\t\t\t{\n\t\t\t\ttype: DublinCoreClasses.PeriodOfTime,\n\t\t\t\tschema: PeriodOfTimeSchema\n\t\t\t}\n\t\t];\n\n\t\tDataTypeHelper.registerTypes(\n\t\t\tDublinCoreContexts.NamespaceTerms,\n\t\t\tDublinCoreContexts.JsonLdContextTerms,\n\t\t\ttypes\n\t\t);\n\n\t\tDataTypeHelper.registerTypes(\n\t\t\tDublinCoreContexts.JsonSchemaNamespace,\n\t\t\tDublinCoreContexts.JsonLdContextTerms,\n\t\t\ttypes.map(t => ({ type: `DublinCore${t.type}`, schema: t.schema }))\n\t\t);\n\t}\n}\n"]}
|
|
@@ -32,6 +32,10 @@ export const DublinCoreContexts = {
|
|
|
32
32
|
/**
|
|
33
33
|
* JSON-LD Context URL for DCMI Types
|
|
34
34
|
*/
|
|
35
|
-
JsonLdContextDcmiType: "https://schema.twindev.org/dublin-core/dcmitype.jsonld"
|
|
35
|
+
JsonLdContextDcmiType: "https://schema.twindev.org/dublin-core/dcmitype.jsonld",
|
|
36
|
+
/**
|
|
37
|
+
* The namespace location of the hosted version of the JSON Schema.
|
|
38
|
+
*/
|
|
39
|
+
JsonSchemaNamespace: "https://schema.twindev.org/dublin-core/"
|
|
36
40
|
};
|
|
37
41
|
//# sourceMappingURL=dublinCoreContexts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dublinCoreContexts.js","sourceRoot":"","sources":["../../../src/models/dublinCoreContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC;;OAEG;IACH,cAAc,EAAE,2BAA2B;IAE3C;;;;OAIG;IACH,YAAY,EAAE,2BAA2B;IAEzC;;OAEG;IACH,kBAAkB,EAAE,qDAAqD;IAEzE;;OAEG;IACH,iBAAiB,EAAE,8BAA8B;IAEjD;;;;OAIG;IACH,eAAe,EAAE,8BAA8B;IAE/C;;OAEG;IACH,qBAAqB,EAAE,wDAAwD;
|
|
1
|
+
{"version":3,"file":"dublinCoreContexts.js","sourceRoot":"","sources":["../../../src/models/dublinCoreContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC;;OAEG;IACH,cAAc,EAAE,2BAA2B;IAE3C;;;;OAIG;IACH,YAAY,EAAE,2BAA2B;IAEzC;;OAEG;IACH,kBAAkB,EAAE,qDAAqD;IAEzE;;OAEG;IACH,iBAAiB,EAAE,8BAA8B;IAEjD;;;;OAIG;IACH,eAAe,EAAE,8BAA8B;IAE/C;;OAEG;IACH,qBAAqB,EAAE,wDAAwD;IAE/E;;OAEG;IACH,mBAAmB,EAAE,yCAAyC;CACrD,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts for Dublin Core.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const DublinCoreContexts = {\n\t/**\n\t * The canonical RDF namespace URI for Dublin Core Terms.\n\t */\n\tNamespaceTerms: \"http://purl.org/dc/terms/\",\n\n\t/**\n\t * The value to use in JSON-LD context for Dublin Core Terms.\n\t * Note: ContextTerms matches NamespaceTerms (both include trailing slash) as per Dublin Core specification.\n\t * The Dublin Core Terms JSON-LD context URL format includes a trailing slash.\n\t */\n\tContextTerms: \"http://purl.org/dc/terms/\",\n\n\t/**\n\t * JSON-LD Context URL for Dublin Core Terms.\n\t */\n\tJsonLdContextTerms: \"https://schema.twindev.org/dublin-core/terms.jsonld\",\n\n\t/**\n\t * The canonical RDF namespace URI for Dublin Core DCMI Types.\n\t */\n\tNamespaceDcmiType: \"http://purl.org/dc/dcmitype/\",\n\n\t/**\n\t * The value to use in JSON-LD context for Dublin Core DCMI Types.\n\t * Note: ContextDcmiType matches NamespaceDcmiType (both include trailing slash) as per Dublin Core specification.\n\t * The Dublin Core DCMI Types JSON-LD context URL format includes a trailing slash.\n\t */\n\tContextDcmiType: \"http://purl.org/dc/dcmitype/\",\n\n\t/**\n\t * JSON-LD Context URL for DCMI Types\n\t */\n\tJsonLdContextDcmiType: \"https://schema.twindev.org/dublin-core/dcmitype.jsonld\",\n\n\t/**\n\t * The namespace location of the hosted version of the JSON Schema.\n\t */\n\tJsonSchemaNamespace: \"https://schema.twindev.org/dublin-core/\"\n} as const;\n\n/**\n * The contexts for Dublin Core.\n */\nexport type DublinCoreContexts = (typeof DublinCoreContexts)[keyof typeof DublinCoreContexts];\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.twindev.org/dublin-core/DublinCorePeriodOfTime",
|
|
4
|
+
"title": "DublinCorePeriodOfTime",
|
|
5
|
+
"description": "Interface for Dublin Core Terms Period of Time.\nAn interval of time that is named or defined by its start and end dates.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"@type": {
|
|
9
|
+
"const": "PeriodOfTime",
|
|
10
|
+
"description": "The type identifier for PeriodOfTime."
|
|
11
|
+
},
|
|
12
|
+
"dcat:startDate": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The start date of the period."
|
|
15
|
+
},
|
|
16
|
+
"dcat:endDate": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The end date of the period."
|
|
19
|
+
},
|
|
20
|
+
"time:hasBeginning": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The beginning of a period or interval."
|
|
23
|
+
},
|
|
24
|
+
"time:hasEnd": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "The end of a period or interval."
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -30,6 +30,10 @@ export declare const DublinCoreContexts: {
|
|
|
30
30
|
* JSON-LD Context URL for DCMI Types
|
|
31
31
|
*/
|
|
32
32
|
readonly JsonLdContextDcmiType: "https://schema.twindev.org/dublin-core/dcmitype.jsonld";
|
|
33
|
+
/**
|
|
34
|
+
* The namespace location of the hosted version of the JSON Schema.
|
|
35
|
+
*/
|
|
36
|
+
readonly JsonSchemaNamespace: "https://schema.twindev.org/dublin-core/";
|
|
33
37
|
};
|
|
34
38
|
/**
|
|
35
39
|
* The contexts for Dublin Core.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.3-next.2](https://github.com/iotaledger/twin-standards/compare/standards-dublin-core-v0.9.3-next.1...standards-dublin-core-v0.9.3-next.2) (2026-09-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* improve type definitions ([#278](https://github.com/iotaledger/twin-standards/issues/278)) ([bf3f37e](https://github.com/iotaledger/twin-standards/commit/bf3f37e1c191770f2a88b65bec3d59506c93c263))
|
|
9
|
+
|
|
10
|
+
## [0.9.3-next.1](https://github.com/iotaledger/twin-standards/compare/standards-dublin-core-v0.9.3-next.0...standards-dublin-core-v0.9.3-next.1) (2026-08-25)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add Collection and hasPart to Dublin Core ([#13](https://github.com/iotaledger/twin-standards/issues/13)) ([867ddbc](https://github.com/iotaledger/twin-standards/commit/867ddbcad0c4afec3c112b113eb97ab431cf84b1))
|
|
16
|
+
* add context id features ([#64](https://github.com/iotaledger/twin-standards/issues/64)) ([e68bb87](https://github.com/iotaledger/twin-standards/commit/e68bb87a215f3c3956cfd6400a5e1e2a16256085))
|
|
17
|
+
* add validate-locales ([838389c](https://github.com/iotaledger/twin-standards/commit/838389c1daf62ed42397d5758d267c3d1a37fa4d))
|
|
18
|
+
* add w3c dcat standards package ([#68](https://github.com/iotaledger/twin-standards/issues/68)) ([85746c6](https://github.com/iotaledger/twin-standards/commit/85746c673464498a52e9c30ce498fd88b81a7434))
|
|
19
|
+
* dublin core refactor ([548db75](https://github.com/iotaledger/twin-standards/commit/548db75600d44a0ab8f7bff2f07261552dc2b0b1))
|
|
20
|
+
* eslint migration to flat config ([648c1a1](https://github.com/iotaledger/twin-standards/commit/648c1a1e69d99b6b0cf69358ec6bdeecdbe3a5ea))
|
|
21
|
+
* export unece schemas ([ef9af8d](https://github.com/iotaledger/twin-standards/commit/ef9af8db9931d1b7ca3a77c15b17bba6a3e7badc))
|
|
22
|
+
* improved namespaces and contexts ([#102](https://github.com/iotaledger/twin-standards/issues/102)) ([c74c370](https://github.com/iotaledger/twin-standards/commit/c74c370cd8145d6166ca4454353f3774c302ac3b))
|
|
23
|
+
* remove IJsonLdNodeObject base interfaces ([#172](https://github.com/iotaledger/twin-standards/issues/172)) ([8ff8d7a](https://github.com/iotaledger/twin-standards/commit/8ff8d7a2892d626879b76ba5da912469ff899954))
|
|
24
|
+
* typescript 6 update ([79bfb52](https://github.com/iotaledger/twin-standards/commit/79bfb52e3dcb24689cec7b201dde822bcee970c5))
|
|
25
|
+
* update dependencies ([e422ed3](https://github.com/iotaledger/twin-standards/commit/e422ed351fb09e2deea5ef741326c37b0802af3a))
|
|
26
|
+
* update framework core ([58c0c3d](https://github.com/iotaledger/twin-standards/commit/58c0c3dd6cea0e4c2393dc0e3e1eb33a6d06f617))
|
|
27
|
+
* update to latest JSON schema spec ([7a23930](https://github.com/iotaledger/twin-standards/commit/7a2393032d7f48bfb20d3a484f981fb6dd83a92c))
|
|
28
|
+
* update to new ts-ts-schema and generic constructs ([4dff991](https://github.com/iotaledger/twin-standards/commit/4dff991fb70de4320668641ed94abf8e9b06acad))
|
|
29
|
+
* update ts-to-schema generation ([ba4e76d](https://github.com/iotaledger/twin-standards/commit/ba4e76d677556a1817092f8079d4cce67dee94bc))
|
|
30
|
+
* update ts-to-schema generation ([0905daa](https://github.com/iotaledger/twin-standards/commit/0905daa4a344ed35fc37b7f12fcf9ce9d34e4bd6))
|
|
31
|
+
* update type names ([#89](https://github.com/iotaledger/twin-standards/issues/89)) ([6fdef47](https://github.com/iotaledger/twin-standards/commit/6fdef4792151f89d1a95a07da8309d05a7b6de3d))
|
|
32
|
+
* use shared store mechanism ([#11](https://github.com/iotaledger/twin-standards/issues/11)) ([96fa237](https://github.com/iotaledger/twin-standards/commit/96fa23735f69c1fc7e3d0019b527634fa0a042d9))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* updating the missing packages ([#114](https://github.com/iotaledger/twin-standards/issues/114)) ([90b03f8](https://github.com/iotaledger/twin-standards/commit/90b03f8bdcd81506284d74a445840386c2da2d35))
|
|
38
|
+
* when a prefix is declared in an [@context](https://github.com/context) it should be Namespace and not Context ([#119](https://github.com/iotaledger/twin-standards/issues/119)) ([110cc50](https://github.com/iotaledger/twin-standards/commit/110cc5039394c7fcfada0e3ca001013cb503f31a))
|
|
39
|
+
|
|
3
40
|
## [0.9.2](https://github.com/iotaledger/twin-standards/compare/standards-dublin-core-v0.9.2...standards-dublin-core-v0.9.2) (2026-08-24)
|
|
4
41
|
|
|
5
42
|
|
|
@@ -45,3 +45,9 @@ The Dublin Core DCMI Types JSON-LD context URL format includes a trailing slash.
|
|
|
45
45
|
> `readonly` **JsonLdContextDcmiType**: `"https://schema.twindev.org/dublin-core/dcmitype.jsonld"` = `"https://schema.twindev.org/dublin-core/dcmitype.jsonld"`
|
|
46
46
|
|
|
47
47
|
JSON-LD Context URL for DCMI Types
|
|
48
|
+
|
|
49
|
+
### JsonSchemaNamespace {#jsonschemanamespace}
|
|
50
|
+
|
|
51
|
+
> `readonly` **JsonSchemaNamespace**: `"https://schema.twindev.org/dublin-core/"` = `"https://schema.twindev.org/dublin-core/"`
|
|
52
|
+
|
|
53
|
+
The namespace location of the hosted version of the JSON Schema.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/standards-dublin-core",
|
|
3
|
-
"version": "0.9.2",
|
|
3
|
+
"version": "0.9.3-next.2",
|
|
4
4
|
"description": "Data models for Dublin Core metadata terms.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
"node": ">=24.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/data-
|
|
18
|
-
"@twin.org/
|
|
17
|
+
"@twin.org/data-core": "next",
|
|
18
|
+
"@twin.org/data-json-ld": "next",
|
|
19
|
+
"@twin.org/web": "next"
|
|
19
20
|
},
|
|
20
21
|
"main": "./dist/es/index.js",
|
|
21
22
|
"types": "./dist/types/index.d.ts",
|