@twin.org/standards-dublin-core 0.0.3-next.9 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/examples.md CHANGED
@@ -1 +1,31 @@
1
- # @twin.org/standards-dublin-core - Examples
1
+ # Standards Dublin Core Examples
2
+
3
+ These snippets show how to register redirects and build metadata with shared context and property constants.
4
+
5
+ ## DublinCoreDataTypes
6
+
7
+ ```typescript
8
+ import {
9
+ DublinCoreClasses,
10
+ DublinCoreContexts,
11
+ DublinCoreDataTypes,
12
+ DublinCorePropertyType,
13
+ type IDublinCorePeriodOfTime
14
+ } from '@twin.org/standards-dublin-core';
15
+
16
+ DublinCoreDataTypes.registerRedirects();
17
+
18
+ const period: IDublinCorePeriodOfTime = {
19
+ startDate: '2026-01-01',
20
+ endDate: '2026-12-31'
21
+ };
22
+
23
+ const record = {
24
+ '@context': DublinCoreContexts.Context,
25
+ type: DublinCoreClasses.Dataset,
26
+ [DublinCorePropertyType.Title]: 'Milestone Events',
27
+ [DublinCorePropertyType.Temporal]: period
28
+ };
29
+
30
+ console.log(record.type); // dcat:Dataset
31
+ ```
@@ -14,7 +14,7 @@ Handle all the data types for Dublin Core.
14
14
 
15
15
  ## Methods
16
16
 
17
- ### registerRedirects()
17
+ ### registerRedirects() {#registerredirects}
18
18
 
19
19
  > `static` **registerRedirects**(): `void`
20
20
 
@@ -7,31 +7,19 @@ An interval of time that is named or defined by its start and end dates.
7
7
 
8
8
  https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/PeriodOfTime
9
9
 
10
- ## Extends
11
-
12
- - `IJsonLdNodeObject`
13
-
14
- ## Indexable
15
-
16
- \[`key`: `string`\]: `string` \| `number` \| `boolean` \| `IJsonLdNodeObject` \| `IJsonLdGraphObject` \| `object` & `object` \| `object` & `object` \| `object` & `object` \| `IJsonLdListObject` \| `IJsonLdSetObject` \| `IJsonLdNodePrimitive`[] \| `IJsonLdLanguageMap` \| `IJsonLdIndexMap` \| `IJsonLdNodeObject`[] \| `IJsonLdIdMap` \| `IJsonLdTypeMap` \| `IJsonLdContextDefinition` \| `IJsonLdContextDefinitionElement`[] \| `string`[] \| `IJsonLdJsonObject` \| `IJsonLdJsonObject`[] \| \{\[`key`: `string`\]: `string`; \} \| `null` \| `undefined`
17
-
18
10
  ## Properties
19
11
 
20
- ### @type?
12
+ ### @type? {#type}
21
13
 
22
- > `optional` **@type**: `"PeriodOfTime"`
14
+ > `optional` **@type?**: `"PeriodOfTime"`
23
15
 
24
16
  The type identifier for PeriodOfTime.
25
17
 
26
- #### Overrides
27
-
28
- `IJsonLdNodeObject.@type`
29
-
30
18
  ***
31
19
 
32
- ### dcat:startDate?
20
+ ### dcat:startDate? {#dcatstartdate}
33
21
 
34
- > `optional` **dcat:startDate**: `string`
22
+ > `optional` **dcat:startDate?**: `string`
35
23
 
36
24
  The start date of the period.
37
25
 
@@ -41,9 +29,9 @@ https://www.w3.org/TR/vocab-dcat-3/#Property:period_start_date
41
29
 
42
30
  ***
43
31
 
44
- ### dcat:endDate?
32
+ ### dcat:endDate? {#dcatenddate}
45
33
 
46
- > `optional` **dcat:endDate**: `string`
34
+ > `optional` **dcat:endDate?**: `string`
47
35
 
48
36
  The end date of the period.
49
37
 
@@ -53,9 +41,9 @@ https://www.w3.org/TR/vocab-dcat-3/#Property:period_end_date
53
41
 
54
42
  ***
55
43
 
56
- ### time:hasBeginning?
44
+ ### time:hasBeginning? {#timehasbeginning}
57
45
 
58
- > `optional` **time:hasBeginning**: `string`
46
+ > `optional` **time:hasBeginning?**: `string`
59
47
 
60
48
  The beginning of a period or interval.
61
49
 
@@ -65,9 +53,9 @@ https://www.w3.org/TR/owl-time/#time:hasBeginning
65
53
 
66
54
  ***
67
55
 
68
- ### time:hasEnd?
56
+ ### time:hasEnd? {#timehasend}
69
57
 
70
- > `optional` **time:hasEnd**: `string`
58
+ > `optional` **time:hasEnd?**: `string`
71
59
 
72
60
  The end of a period or interval.
73
61
 
@@ -2,4 +2,4 @@
2
2
 
3
3
  > **DublinCoreClasses** = *typeof* [`DublinCoreClasses`](../variables/DublinCoreClasses.md)\[keyof *typeof* [`DublinCoreClasses`](../variables/DublinCoreClasses.md)\]
4
4
 
5
- Dublin Core classes
5
+ Union of all Dublin Core class identifier values.
@@ -2,21 +2,30 @@
2
2
 
3
3
  > `const` **DublinCoreClasses**: `object`
4
4
 
5
- Dublin Core classes.
6
- Based on http://purl.org/dc/dcmitype
5
+ Dublin Core DCMI type class identifiers.
7
6
 
8
7
  ## Type Declaration
9
8
 
10
- ### Collection
9
+ ### Collection {#collection}
11
10
 
12
11
  > `readonly` **Collection**: `"Collection"` = `"Collection"`
13
12
 
14
- See Description at
13
+ A collection of resources.
14
+
15
+ #### See
16
+
15
17
  https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/dcmitype/Collection
16
18
 
17
- ### PeriodOfTime
19
+ ### PeriodOfTime {#periodoftime}
18
20
 
19
21
  > `readonly` **PeriodOfTime**: `"PeriodOfTime"` = `"PeriodOfTime"`
20
22
 
21
- See Description at
23
+ An interval of time named or defined by its start and end dates.
24
+
25
+ #### See
26
+
22
27
  https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/PeriodOfTime
28
+
29
+ ## See
30
+
31
+ http://purl.org/dc/dcmitype
@@ -6,34 +6,42 @@ The contexts for Dublin Core.
6
6
 
7
7
  ## Type Declaration
8
8
 
9
- ### ContextTerms
9
+ ### NamespaceTerms {#namespaceterms}
10
10
 
11
- > `readonly` **ContextTerms**: `"http://purl.org/dc/terms/"` = `"http://purl.org/dc/terms/"`
11
+ > `readonly` **NamespaceTerms**: `"http://purl.org/dc/terms/"` = `"http://purl.org/dc/terms/"`
12
12
 
13
- The LD context for Dublin Core Terms vocabulary.
13
+ The canonical RDF namespace URI for Dublin Core Terms.
14
14
 
15
- #### See
15
+ ### ContextTerms {#contextterms}
16
16
 
17
- https://www.dublincore.org/specifications/dublin-core/dcmi-terms/
17
+ > `readonly` **ContextTerms**: `"http://purl.org/dc/terms/"` = `"http://purl.org/dc/terms/"`
18
18
 
19
- ### ContextDcmiType
19
+ The value to use in JSON-LD context for Dublin Core Terms.
20
+ Note: ContextTerms matches NamespaceTerms (both include trailing slash) as per Dublin Core specification.
21
+ The Dublin Core Terms JSON-LD context URL format includes a trailing slash.
20
22
 
21
- > `readonly` **ContextDcmiType**: `"http://purl.org/dc/dcmitype/"` = `"http://purl.org/dc/dcmitype/"`
23
+ ### JsonLdContextTerms {#jsonldcontextterms}
22
24
 
23
- The LD context for Dublin Core DCMI Types vocabulary.
25
+ > `readonly` **JsonLdContextTerms**: `"https://schema.twindev.org/dublin-core/terms.jsonld"` = `"https://schema.twindev.org/dublin-core/terms.jsonld"`
24
26
 
25
- #### See
27
+ JSON-LD Context URL for Dublin Core Terms.
26
28
 
27
- https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#section-7
29
+ ### NamespaceDcmiType {#namespacedcmitype}
28
30
 
29
- ### ContextTermsRedirect
31
+ > `readonly` **NamespaceDcmiType**: `"http://purl.org/dc/dcmitype/"` = `"http://purl.org/dc/dcmitype/"`
30
32
 
31
- > `readonly` **ContextTermsRedirect**: `"https://schema.twindev.org/dublin-core/terms.jsonld"` = `"https://schema.twindev.org/dublin-core/terms.jsonld"`
33
+ The canonical RDF namespace URI for Dublin Core DCMI Types.
34
+
35
+ ### ContextDcmiType {#contextdcmitype}
36
+
37
+ > `readonly` **ContextDcmiType**: `"http://purl.org/dc/dcmitype/"` = `"http://purl.org/dc/dcmitype/"`
32
38
 
33
- Redirection URL for terms
39
+ The value to use in JSON-LD context for Dublin Core DCMI Types.
40
+ Note: ContextDcmiType matches NamespaceDcmiType (both include trailing slash) as per Dublin Core specification.
41
+ The Dublin Core DCMI Types JSON-LD context URL format includes a trailing slash.
34
42
 
35
- ### ContextDcmiTypeRedirect
43
+ ### JsonLdContextDcmiType {#jsonldcontextdcmitype}
36
44
 
37
- > `readonly` **ContextDcmiTypeRedirect**: `"https://schema.twindev.org/dublin-core/dcmitype.jsonld"` = `"https://schema.twindev.org/dublin-core/dcmitype.jsonld"`
45
+ > `readonly` **JsonLdContextDcmiType**: `"https://schema.twindev.org/dublin-core/dcmitype.jsonld"` = `"https://schema.twindev.org/dublin-core/dcmitype.jsonld"`
38
46
 
39
- Redirection URLs
47
+ JSON-LD Context URL for DCMI Types
@@ -3,53 +3,52 @@
3
3
  > `const` **DublinCorePropertyType**: `object`
4
4
 
5
5
  Common Dublin Core property types for ODRL Policy Metadata.
6
- Based on http://purl.org/dc/terms/
7
6
 
8
7
  ## Type Declaration
9
8
 
10
- ### Creator
9
+ ### Creator {#creator}
11
10
 
12
11
  > `readonly` **Creator**: `"creator"` = `"creator"`
13
12
 
14
13
  The individual, agent, or organisation that authored the Policy.
15
14
  Note: String values may not be normalized and should not be used for direct comparison.
16
15
 
17
- ### Description
16
+ ### Description {#description}
18
17
 
19
18
  > `readonly` **Description**: `"description"` = `"description"`
20
19
 
21
20
  A human-readable representation or summary of the Policy.
22
21
  Note: String values may not be normalized and should not be used for direct comparison.
23
22
 
24
- ### Issued
23
+ ### Issued {#issued}
25
24
 
26
25
  > `readonly` **Issued**: `"issued"` = `"issued"`
27
26
 
28
27
  The date (and time) the Policy was first issued.
29
28
  Note: String values may not be normalized and should not be used for direct comparison.
30
29
 
31
- ### Modified
30
+ ### Modified {#modified}
32
31
 
33
32
  > `readonly` **Modified**: `"modified"` = `"modified"`
34
33
 
35
34
  The date (and time) the Policy was updated.
36
35
  Note: String values may not be normalized and should not be used for direct comparison.
37
36
 
38
- ### Publisher
37
+ ### Publisher {#publisher}
39
38
 
40
39
  > `readonly` **Publisher**: `"publisher"` = `"publisher"`
41
40
 
42
41
  The publisher of the Policy.
43
42
  Note: String values may not be normalized and should not be used for direct comparison.
44
43
 
45
- ### Subject
44
+ ### Subject {#subject}
46
45
 
47
46
  > `readonly` **Subject**: `"subject"` = `"subject"`
48
47
 
49
48
  The subject of the Policy.
50
49
  Note: String values may not be normalized and should not be used for direct comparison.
51
50
 
52
- ### Coverage
51
+ ### Coverage {#coverage}
53
52
 
54
53
  > `readonly` **Coverage**: `"coverage"` = `"coverage"`
55
54
 
@@ -57,23 +56,30 @@ The jurisdiction under which the Policy is relevant.
57
56
  Note: When using string values, they may not be normalized and should not be used for direct comparison.
58
57
  Using "@id" references is preferred for comparison purposes.
59
58
 
60
- ### Replaces
59
+ ### Replaces {#replaces}
61
60
 
62
61
  > `readonly` **Replaces**: `"replaces"` = `"replaces"`
63
62
 
64
63
  The identifier of a Policy that this Policy supersedes.
65
64
  Using "@id" references is preferred for comparison purposes.
66
65
 
67
- ### IsReplacedBy
66
+ ### IsReplacedBy {#isreplacedby}
68
67
 
69
68
  > `readonly` **IsReplacedBy**: `"isReplacedBy"` = `"isReplacedBy"`
70
69
 
71
70
  The identifier of a Policy that supersedes this Policy.
72
71
  Using "@id" references is preferred for comparison purposes.
73
72
 
74
- ### HasPart
73
+ ### HasPart {#haspart}
75
74
 
76
75
  > `readonly` **HasPart**: `"hasPart"` = `"hasPart"`
77
76
 
78
- See Description at
77
+ A related resource that is included either physically or logically in the described resource.
78
+
79
+ #### See
80
+
79
81
  https://www.dublincore.org/specifications/dublin-core/dcmi-terms/#http://purl.org/dc/terms/hasPart
82
+
83
+ ## See
84
+
85
+ http://purl.org/dc/terms/
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@twin.org/standards-dublin-core",
3
- "version": "0.0.3-next.9",
4
- "description": "Models which define the structure of Dublin Core Standard",
3
+ "version": "0.9.0",
4
+ "description": "Data models for Dublin Core metadata terms.",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/twinfoundation/standards.git",
7
+ "url": "git+https://github.com/iotaledger/twin-standards.git",
8
8
  "directory": "packages/standards-dublin-core"
9
9
  },
10
10
  "author": "cornel.filip@iota.org",
@@ -14,8 +14,8 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/data-json-ld": "next",
18
- "@twin.org/web": "next"
17
+ "@twin.org/data-json-ld": "^0.9.0",
18
+ "@twin.org/web": "^0.9.0"
19
19
  },
20
20
  "main": "./dist/es/index.js",
21
21
  "types": "./dist/types/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  "utilities"
48
48
  ],
49
49
  "bugs": {
50
- "url": "git+https://github.com/twinfoundation/standards/issues"
50
+ "url": "git+https://github.com/iotaledger/twin-standards/issues"
51
51
  },
52
52
  "homepage": "https://twindev.org"
53
53
  }