@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/README.md +1 -1
- package/dist/es/dataTypes/dublinCoreDataTypes.js +2 -2
- package/dist/es/dataTypes/dublinCoreDataTypes.js.map +1 -1
- package/dist/es/models/IDublinCorePeriodOfTime.js.map +1 -1
- package/dist/es/models/dublinCoreClasses.js +6 -6
- package/dist/es/models/dublinCoreClasses.js.map +1 -1
- package/dist/es/models/dublinCoreContexts.js +19 -9
- package/dist/es/models/dublinCoreContexts.js.map +1 -1
- package/dist/es/models/dublinCorePropertyType.js +3 -3
- package/dist/es/models/dublinCorePropertyType.js.map +1 -1
- package/dist/types/models/IDublinCorePeriodOfTime.d.ts +1 -2
- package/dist/types/models/dublinCoreClasses.d.ts +7 -7
- package/dist/types/models/dublinCoreContexts.d.ts +19 -9
- package/dist/types/models/dublinCorePropertyType.d.ts +3 -3
- package/docs/changelog.md +549 -72
- package/docs/examples.md +31 -1
- package/docs/reference/classes/DublinCoreDataTypes.md +1 -1
- package/docs/reference/interfaces/IDublinCorePeriodOfTime.md +10 -22
- package/docs/reference/type-aliases/DublinCoreClasses.md +1 -1
- package/docs/reference/variables/DublinCoreClasses.md +15 -6
- package/docs/reference/variables/DublinCoreContexts.md +24 -16
- package/docs/reference/variables/DublinCorePropertyType.md +18 -12
- package/package.json +6 -6
package/docs/examples.md
CHANGED
|
@@ -1 +1,31 @@
|
|
|
1
|
-
#
|
|
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
|
+
```
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
58
|
+
> `optional` **time:hasEnd?**: `string`
|
|
71
59
|
|
|
72
60
|
The end of a period or interval.
|
|
73
61
|
|
|
@@ -2,21 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
> `const` **DublinCoreClasses**: `object`
|
|
4
4
|
|
|
5
|
-
Dublin Core
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
9
|
+
### NamespaceTerms {#namespaceterms}
|
|
10
10
|
|
|
11
|
-
> `readonly` **
|
|
11
|
+
> `readonly` **NamespaceTerms**: `"http://purl.org/dc/terms/"` = `"http://purl.org/dc/terms/"`
|
|
12
12
|
|
|
13
|
-
The
|
|
13
|
+
The canonical RDF namespace URI for Dublin Core Terms.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### ContextTerms {#contextterms}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
> `readonly` **ContextTerms**: `"http://purl.org/dc/terms/"` = `"http://purl.org/dc/terms/"`
|
|
18
18
|
|
|
19
|
-
|
|
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
|
-
|
|
23
|
+
### JsonLdContextTerms {#jsonldcontextterms}
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
> `readonly` **JsonLdContextTerms**: `"https://schema.twindev.org/dublin-core/terms.jsonld"` = `"https://schema.twindev.org/dublin-core/terms.jsonld"`
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
JSON-LD Context URL for Dublin Core Terms.
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
### NamespaceDcmiType {#namespacedcmitype}
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
> `readonly` **NamespaceDcmiType**: `"http://purl.org/dc/dcmitype/"` = `"http://purl.org/dc/dcmitype/"`
|
|
30
32
|
|
|
31
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
43
|
+
### JsonLdContextDcmiType {#jsonldcontextdcmitype}
|
|
36
44
|
|
|
37
|
-
> `readonly` **
|
|
45
|
+
> `readonly` **JsonLdContextDcmiType**: `"https://schema.twindev.org/dublin-core/dcmitype.jsonld"` = `"https://schema.twindev.org/dublin-core/dcmitype.jsonld"`
|
|
38
46
|
|
|
39
|
-
|
|
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
|
-
|
|
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
|
|
4
|
-
"description": "
|
|
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/
|
|
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": "
|
|
18
|
-
"@twin.org/web": "
|
|
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/
|
|
50
|
+
"url": "git+https://github.com/iotaledger/twin-standards/issues"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://twindev.org"
|
|
53
53
|
}
|