@twin.org/standards-dublin-core 0.0.1-next.35 → 0.0.1-next.37

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.
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var dataJsonLd = require('@twin.org/data-json-ld');
4
+
3
5
  // Copyright 2024 IOTA Stiftung.
4
6
  // SPDX-License-Identifier: Apache-2.0.
5
7
  /**
@@ -8,10 +10,23 @@
8
10
  // eslint-disable-next-line @typescript-eslint/naming-convention
9
11
  const DublinCoreContexts = {
10
12
  /**
11
- * The context root for Dublin Core Terms.
12
- * @see http://purl.org/dc/terms/
13
+ * The LD context for Dublin Core Terms vocabulary.
14
+ * @see https://www.dublincore.org/specifications/dublin-core/dcmi-terms/
15
+ */
16
+ ContextTerms: "http://purl.org/dc/terms/",
17
+ /**
18
+ * The LD context for Dublin Core DCMI Types vocabulary.
19
+ * @see https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#section-7
20
+ */
21
+ ContextDcmiType: "http://purl.org/dc/dcmitype/",
22
+ /**
23
+ * Redirection URL for terms
24
+ */
25
+ ContextTermsRedirect: "https://schema.twindev.org/dublin-core/terms.jsonld",
26
+ /**
27
+ * Redirection URLs
13
28
  */
14
- Context: "http://purl.org/dc/terms/"
29
+ ContextDcmiTypeRedirect: "https://schema.twindev.org/dublin-core/dcmitype.jsonld"
15
30
  };
16
31
 
17
32
  // Copyright 2024 IOTA Stiftung.
@@ -67,8 +82,45 @@ const DublinCorePropertyType = {
67
82
  * The identifier of a Policy that supersedes this Policy.
68
83
  * Using "@id" references is preferred for comparison purposes.
69
84
  */
70
- IsReplacedBy: "isReplacedBy"
85
+ IsReplacedBy: "isReplacedBy",
86
+ /**
87
+ * See Description at
88
+ * https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/hasPart
89
+ */
90
+ HasPart: "hasPart"
71
91
  };
72
92
 
93
+ // Copyright 2024 IOTA Stiftung.
94
+ // SPDX-License-Identifier: Apache-2.0.
95
+ /**
96
+ * Dublin Core classes.
97
+ * Based on http://purl.org/dc/dcmitype
98
+ */
99
+ // eslint-disable-next-line @typescript-eslint/naming-convention
100
+ const DublinCoreClasses = {
101
+ /**
102
+ * See Description at
103
+ * https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/dcmitype/Collection
104
+ */
105
+ Collection: "Collection"
106
+ };
107
+
108
+ // Copyright 2024 IOTA Stiftung.
109
+ // SPDX-License-Identifier: Apache-2.0.
110
+ /**
111
+ * Handle all the data types for Dublin Core.
112
+ */
113
+ class DublinCoreDataTypes {
114
+ /**
115
+ * Register the JSON-LD Redirects.
116
+ */
117
+ static registerRedirects() {
118
+ dataJsonLd.JsonLdProcessor.addRedirect(/https?:\/\/purl.org\/dc\/terms\/?/, DublinCoreContexts.ContextTermsRedirect);
119
+ dataJsonLd.JsonLdProcessor.addRedirect(/https?:\/\/purl.org\/dc\/dcmitype\/?/, DublinCoreContexts.ContextDcmiTypeRedirect);
120
+ }
121
+ }
122
+
123
+ exports.DublinCoreClasses = DublinCoreClasses;
73
124
  exports.DublinCoreContexts = DublinCoreContexts;
125
+ exports.DublinCoreDataTypes = DublinCoreDataTypes;
74
126
  exports.DublinCorePropertyType = DublinCorePropertyType;
@@ -1,3 +1,5 @@
1
+ import { JsonLdProcessor } from '@twin.org/data-json-ld';
2
+
1
3
  // Copyright 2024 IOTA Stiftung.
2
4
  // SPDX-License-Identifier: Apache-2.0.
3
5
  /**
@@ -6,10 +8,23 @@
6
8
  // eslint-disable-next-line @typescript-eslint/naming-convention
7
9
  const DublinCoreContexts = {
8
10
  /**
9
- * The context root for Dublin Core Terms.
10
- * @see http://purl.org/dc/terms/
11
+ * The LD context for Dublin Core Terms vocabulary.
12
+ * @see https://www.dublincore.org/specifications/dublin-core/dcmi-terms/
13
+ */
14
+ ContextTerms: "http://purl.org/dc/terms/",
15
+ /**
16
+ * The LD context for Dublin Core DCMI Types vocabulary.
17
+ * @see https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#section-7
18
+ */
19
+ ContextDcmiType: "http://purl.org/dc/dcmitype/",
20
+ /**
21
+ * Redirection URL for terms
22
+ */
23
+ ContextTermsRedirect: "https://schema.twindev.org/dublin-core/terms.jsonld",
24
+ /**
25
+ * Redirection URLs
11
26
  */
12
- Context: "http://purl.org/dc/terms/"
27
+ ContextDcmiTypeRedirect: "https://schema.twindev.org/dublin-core/dcmitype.jsonld"
13
28
  };
14
29
 
15
30
  // Copyright 2024 IOTA Stiftung.
@@ -65,7 +80,42 @@ const DublinCorePropertyType = {
65
80
  * The identifier of a Policy that supersedes this Policy.
66
81
  * Using "@id" references is preferred for comparison purposes.
67
82
  */
68
- IsReplacedBy: "isReplacedBy"
83
+ IsReplacedBy: "isReplacedBy",
84
+ /**
85
+ * See Description at
86
+ * https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/hasPart
87
+ */
88
+ HasPart: "hasPart"
69
89
  };
70
90
 
71
- export { DublinCoreContexts, DublinCorePropertyType };
91
+ // Copyright 2024 IOTA Stiftung.
92
+ // SPDX-License-Identifier: Apache-2.0.
93
+ /**
94
+ * Dublin Core classes.
95
+ * Based on http://purl.org/dc/dcmitype
96
+ */
97
+ // eslint-disable-next-line @typescript-eslint/naming-convention
98
+ const DublinCoreClasses = {
99
+ /**
100
+ * See Description at
101
+ * https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/dcmitype/Collection
102
+ */
103
+ Collection: "Collection"
104
+ };
105
+
106
+ // Copyright 2024 IOTA Stiftung.
107
+ // SPDX-License-Identifier: Apache-2.0.
108
+ /**
109
+ * Handle all the data types for Dublin Core.
110
+ */
111
+ class DublinCoreDataTypes {
112
+ /**
113
+ * Register the JSON-LD Redirects.
114
+ */
115
+ static registerRedirects() {
116
+ JsonLdProcessor.addRedirect(/https?:\/\/purl.org\/dc\/terms\/?/, DublinCoreContexts.ContextTermsRedirect);
117
+ JsonLdProcessor.addRedirect(/https?:\/\/purl.org\/dc\/dcmitype\/?/, DublinCoreContexts.ContextDcmiTypeRedirect);
118
+ }
119
+ }
120
+
121
+ export { DublinCoreClasses, DublinCoreContexts, DublinCoreDataTypes, DublinCorePropertyType };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Handle all the data types for Dublin Core.
3
+ */
4
+ export declare class DublinCoreDataTypes {
5
+ /**
6
+ * Register the JSON-LD Redirects.
7
+ */
8
+ static registerRedirects(): void;
9
+ }
@@ -1,2 +1,4 @@
1
1
  export * from "./models/dublinCoreContexts";
2
- export * from "./models/dublinCoreTypes";
2
+ export * from "./models/dublinCorePropertyType";
3
+ export * from "./models/dublinCoreClasses";
4
+ export * from "./dataTypes/dublinCoreDataTypes";
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Dublin Core classes.
3
+ * Based on http://purl.org/dc/dcmitype
4
+ */
5
+ export declare const DublinCoreClasses: {
6
+ /**
7
+ * See Description at
8
+ * https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/dcmitype/Collection
9
+ */
10
+ readonly Collection: "Collection";
11
+ };
12
+ /**
13
+ * Dublin Core classes
14
+ */
15
+ export type DublinCoreClasses = (typeof DublinCoreClasses)[keyof typeof DublinCoreClasses];
@@ -3,10 +3,23 @@
3
3
  */
4
4
  export declare const DublinCoreContexts: {
5
5
  /**
6
- * The context root for Dublin Core Terms.
7
- * @see http://purl.org/dc/terms/
6
+ * The LD context for Dublin Core Terms vocabulary.
7
+ * @see https://www.dublincore.org/specifications/dublin-core/dcmi-terms/
8
8
  */
9
- readonly Context: "http://purl.org/dc/terms/";
9
+ readonly ContextTerms: "http://purl.org/dc/terms/";
10
+ /**
11
+ * The LD context for Dublin Core DCMI Types vocabulary.
12
+ * @see https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#section-7
13
+ */
14
+ readonly ContextDcmiType: "http://purl.org/dc/dcmitype/";
15
+ /**
16
+ * Redirection URL for terms
17
+ */
18
+ readonly ContextTermsRedirect: "https://schema.twindev.org/dublin-core/terms.jsonld";
19
+ /**
20
+ * Redirection URLs
21
+ */
22
+ readonly ContextDcmiTypeRedirect: "https://schema.twindev.org/dublin-core/dcmitype.jsonld";
10
23
  };
11
24
  /**
12
25
  * The contexts for Dublin Core.
@@ -49,6 +49,11 @@ export declare const DublinCorePropertyType: {
49
49
  * Using "@id" references is preferred for comparison purposes.
50
50
  */
51
51
  readonly IsReplacedBy: "isReplacedBy";
52
+ /**
53
+ * See Description at
54
+ * https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/hasPart
55
+ */
56
+ readonly HasPart: "hasPart";
52
57
  };
53
58
  /**
54
59
  * Common Dublin Core property types.
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @twin.org/standards-dublin-core - Changelog
2
2
 
3
+ ## [0.0.1-next.37](https://github.com/twinfoundation/standards/compare/standards-dublin-core-v0.0.1-next.36...standards-dublin-core-v0.0.1-next.37) (2025-05-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * dublin core refactor ([548db75](https://github.com/twinfoundation/standards/commit/548db75600d44a0ab8f7bff2f07261552dc2b0b1))
9
+
10
+ ## [0.0.1-next.36](https://github.com/twinfoundation/standards/compare/standards-dublin-core-v0.0.1-next.35...standards-dublin-core-v0.0.1-next.36) (2025-04-30)
11
+
12
+
13
+ ### Features
14
+
15
+ * add Collection and hasPart to Dublin Core ([#13](https://github.com/twinfoundation/standards/issues/13)) ([867ddbc](https://github.com/twinfoundation/standards/commit/867ddbcad0c4afec3c112b113eb97ab431cf84b1))
16
+
3
17
  ## [0.0.1-next.35](https://github.com/twinfoundation/standards/compare/standards-dublin-core-v0.0.1-next.34...standards-dublin-core-v0.0.1-next.35) (2025-04-17)
4
18
 
5
19
 
@@ -0,0 +1,25 @@
1
+ # Class: DublinCoreDataTypes
2
+
3
+ Handle all the data types for Dublin Core.
4
+
5
+ ## Constructors
6
+
7
+ ### Constructor
8
+
9
+ > **new DublinCoreDataTypes**(): `DublinCoreDataTypes`
10
+
11
+ #### Returns
12
+
13
+ `DublinCoreDataTypes`
14
+
15
+ ## Methods
16
+
17
+ ### registerRedirects()
18
+
19
+ > `static` **registerRedirects**(): `void`
20
+
21
+ Register the JSON-LD Redirects.
22
+
23
+ #### Returns
24
+
25
+ `void`
@@ -1,11 +1,17 @@
1
1
  # @twin.org/standards-dublin-core
2
2
 
3
+ ## Classes
4
+
5
+ - [DublinCoreDataTypes](classes/DublinCoreDataTypes.md)
6
+
3
7
  ## Type Aliases
4
8
 
9
+ - [DublinCoreClasses](type-aliases/DublinCoreClasses.md)
5
10
  - [DublinCoreContexts](type-aliases/DublinCoreContexts.md)
6
11
  - [DublinCorePropertyType](type-aliases/DublinCorePropertyType.md)
7
12
 
8
13
  ## Variables
9
14
 
15
+ - [DublinCoreClasses](variables/DublinCoreClasses.md)
10
16
  - [DublinCoreContexts](variables/DublinCoreContexts.md)
11
17
  - [DublinCorePropertyType](variables/DublinCorePropertyType.md)
@@ -0,0 +1,5 @@
1
+ # Type Alias: DublinCoreClasses
2
+
3
+ > **DublinCoreClasses** = *typeof* [`DublinCoreClasses`](../variables/DublinCoreClasses.md)\[keyof *typeof* [`DublinCoreClasses`](../variables/DublinCoreClasses.md)\]
4
+
5
+ Dublin Core classes
@@ -0,0 +1,15 @@
1
+ # Variable: DublinCoreClasses
2
+
3
+ > `const` **DublinCoreClasses**: `object`
4
+
5
+ Dublin Core classes.
6
+ Based on http://purl.org/dc/dcmitype
7
+
8
+ ## Type declaration
9
+
10
+ ### Collection
11
+
12
+ > `readonly` **Collection**: `"Collection"` = `"Collection"`
13
+
14
+ See Description at
15
+ https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/dcmitype/Collection
@@ -6,12 +6,34 @@ The contexts for Dublin Core.
6
6
 
7
7
  ## Type declaration
8
8
 
9
- ### Context
9
+ ### ContextTerms
10
10
 
11
- > `readonly` **Context**: `"http://purl.org/dc/terms/"` = `"http://purl.org/dc/terms/"`
11
+ > `readonly` **ContextTerms**: `"http://purl.org/dc/terms/"` = `"http://purl.org/dc/terms/"`
12
12
 
13
- The context root for Dublin Core Terms.
13
+ The LD context for Dublin Core Terms vocabulary.
14
14
 
15
15
  #### See
16
16
 
17
- http://purl.org/dc/terms/
17
+ https://www.dublincore.org/specifications/dublin-core/dcmi-terms/
18
+
19
+ ### ContextDcmiType
20
+
21
+ > `readonly` **ContextDcmiType**: `"http://purl.org/dc/dcmitype/"` = `"http://purl.org/dc/dcmitype/"`
22
+
23
+ The LD context for Dublin Core DCMI Types vocabulary.
24
+
25
+ #### See
26
+
27
+ https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#section-7
28
+
29
+ ### ContextTermsRedirect
30
+
31
+ > `readonly` **ContextTermsRedirect**: `"https://schema.twindev.org/dublin-core/terms.jsonld"` = `"https://schema.twindev.org/dublin-core/terms.jsonld"`
32
+
33
+ Redirection URL for terms
34
+
35
+ ### ContextDcmiTypeRedirect
36
+
37
+ > `readonly` **ContextDcmiTypeRedirect**: `"https://schema.twindev.org/dublin-core/dcmitype.jsonld"` = `"https://schema.twindev.org/dublin-core/dcmitype.jsonld"`
38
+
39
+ Redirection URLs
@@ -70,3 +70,10 @@ Using "@id" references is preferred for comparison purposes.
70
70
 
71
71
  The identifier of a Policy that supersedes this Policy.
72
72
  Using "@id" references is preferred for comparison purposes.
73
+
74
+ ### HasPart
75
+
76
+ > `readonly` **HasPart**: `"hasPart"` = `"hasPart"`
77
+
78
+ See Description at
79
+ https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/hasPart
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/standards-dublin-core",
3
- "version": "0.0.1-next.35",
3
+ "version": "0.0.1-next.37",
4
4
  "description": "Models which define the structure of Dublin Core Standard",
5
5
  "repository": {
6
6
  "type": "git",