@twin.org/data-json-ld 0.0.3-next.17 → 0.0.3-next.19
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/schemas/JsonLdContainerType.json +17 -7
- package/dist/es/schemas/JsonLdContainerTypeArray.json +129 -142
- package/dist/es/schemas/JsonLdContextDefinition.json +75 -16
- package/dist/es/schemas/JsonLdContextDefinitionElement.json +1 -0
- package/dist/es/schemas/JsonLdContextDefinitionRoot.json +1 -0
- package/dist/es/schemas/JsonLdDocument.json +2 -1
- package/dist/es/schemas/JsonLdExpandedTermDefinition.json +101 -87
- package/dist/es/schemas/JsonLdGraphObject.json +1 -0
- package/dist/es/schemas/JsonLdIdMap.json +1 -0
- package/dist/es/schemas/JsonLdIncludedBlock.json +1 -0
- package/dist/es/schemas/JsonLdIndexMap.json +2 -1
- package/dist/es/schemas/JsonLdIndexMapItem.json +1 -0
- package/dist/es/schemas/JsonLdJsonArray.json +1 -0
- package/dist/es/schemas/JsonLdJsonObject.json +2 -8
- package/dist/es/schemas/JsonLdJsonPrimitive.json +14 -5
- package/dist/es/schemas/JsonLdJsonValue.json +1 -0
- package/dist/es/schemas/JsonLdLanguageMap.json +1 -0
- package/dist/es/schemas/JsonLdListObject.json +1 -0
- package/dist/es/schemas/JsonLdListOrSetItem.json +1 -0
- package/dist/es/schemas/JsonLdNodeObject.json +12 -72
- package/dist/es/schemas/JsonLdNodePrimitive.json +1 -0
- package/dist/es/schemas/JsonLdObject.json +2 -1
- package/dist/es/schemas/JsonLdSetObject.json +1 -0
- package/dist/es/schemas/JsonLdTypeMap.json +1 -0
- package/dist/es/schemas/JsonLdValueObject.json +99 -84
- package/docs/changelog.md +28 -0
- package/docs/reference/classes/JsonLdDataTypes.md +1 -1
- package/docs/reference/classes/JsonLdHelper.md +11 -11
- package/docs/reference/classes/JsonLdProcessor.md +22 -32
- package/docs/reference/interfaces/IJsonLdContextDefinition.md +20 -20
- package/docs/reference/interfaces/IJsonLdGraphObject.md +7 -7
- package/docs/reference/interfaces/IJsonLdIdMap.md +1 -1
- package/docs/reference/interfaces/IJsonLdIndexMap.md +1 -1
- package/docs/reference/interfaces/IJsonLdJsonObject.md +1 -1
- package/docs/reference/interfaces/IJsonLdLanguageMap.md +1 -1
- package/docs/reference/interfaces/IJsonLdListObject.md +3 -3
- package/docs/reference/interfaces/IJsonLdNodeObject.md +17 -17
- package/docs/reference/interfaces/IJsonLdObject.md +16 -16
- package/docs/reference/interfaces/IJsonLdSetObject.md +3 -3
- package/docs/reference/interfaces/IJsonLdTypeMap.md +1 -1
- package/docs/reference/type-aliases/IJsonLdExpandedTermDefinition.md +7 -7
- package/docs/reference/type-aliases/IJsonLdValueObject.md +2 -2
- package/docs/reference/type-aliases/JsonLdObjectWithOptionalAtId.md +1 -1
- package/docs/reference/type-aliases/JsonLdObjectWithOptionalAtType.md +1 -1
- package/docs/reference/type-aliases/JsonLdObjectWithOptionalContext.md +1 -1
- package/docs/reference/type-aliases/JsonLdObjectWithOptionalId.md +1 -1
- package/docs/reference/type-aliases/JsonLdObjectWithOptionalType.md +1 -1
- package/docs/reference/variables/JsonLdContexts.md +3 -3
- package/docs/reference/variables/JsonLdTypes.md +26 -26
- package/package.json +2 -2
|
@@ -1,72 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/json-ld/JsonLdExpandedTermDefinition",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
4
|
+
"title": "JsonLdExpandedTermDefinition",
|
|
5
|
+
"description": "An expanded term definition is used to describe the mapping between a term\nand its expanded identifier, as well as other properties of the value\nassociated with the term when it is used as key in a node object.",
|
|
6
|
+
"allOf": [
|
|
6
7
|
{
|
|
7
8
|
"type": "object",
|
|
8
9
|
"properties": {
|
|
9
|
-
"@
|
|
10
|
-
"anyOf": [
|
|
11
|
-
{
|
|
12
|
-
"type": "string"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"type": "array",
|
|
16
|
-
"items": {
|
|
17
|
-
"type": "string"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"type": "null"
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
"@nest": {
|
|
26
|
-
"type": "string"
|
|
27
|
-
},
|
|
28
|
-
"@container": {
|
|
10
|
+
"@type": {
|
|
29
11
|
"anyOf": [
|
|
30
12
|
{
|
|
31
|
-
"
|
|
32
|
-
"const": "@list"
|
|
13
|
+
"const": "@id"
|
|
33
14
|
},
|
|
34
15
|
{
|
|
35
|
-
"
|
|
36
|
-
"const": "@set"
|
|
16
|
+
"const": "@json"
|
|
37
17
|
},
|
|
38
18
|
{
|
|
39
|
-
"
|
|
19
|
+
"const": "@none"
|
|
40
20
|
},
|
|
41
21
|
{
|
|
42
|
-
"
|
|
43
|
-
"items": {
|
|
44
|
-
"anyOf": [
|
|
45
|
-
{
|
|
46
|
-
"type": "string",
|
|
47
|
-
"const": "@list"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"type": "string",
|
|
51
|
-
"const": "@set"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContainerType"
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContainerTypeArray"
|
|
22
|
+
"const": "@vocab"
|
|
61
23
|
},
|
|
62
24
|
{
|
|
63
|
-
"type": "
|
|
25
|
+
"type": "string"
|
|
64
26
|
}
|
|
65
27
|
]
|
|
66
28
|
},
|
|
67
|
-
"@type": {
|
|
68
|
-
"type": "string"
|
|
69
|
-
},
|
|
70
29
|
"@language": {
|
|
71
30
|
"type": "string"
|
|
72
31
|
},
|
|
@@ -88,46 +47,101 @@
|
|
|
88
47
|
}
|
|
89
48
|
},
|
|
90
49
|
{
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
50
|
+
"anyOf": [
|
|
51
|
+
{
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"@id": {
|
|
55
|
+
"anyOf": [
|
|
56
|
+
{
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "null"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"@nest": {
|
|
71
|
+
"anyOf": [
|
|
72
|
+
{
|
|
73
|
+
"const": "@nest"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "string"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"@container": {
|
|
81
|
+
"anyOf": [
|
|
82
|
+
{
|
|
83
|
+
"anyOf": [
|
|
84
|
+
{
|
|
85
|
+
"const": "@list"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"const": "@set"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContainerType"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": {
|
|
98
|
+
"anyOf": [
|
|
99
|
+
{
|
|
100
|
+
"const": "@list"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"const": "@set"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContainerType"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdContainerTypeArray"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "null"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
}
|
|
95
120
|
},
|
|
96
|
-
|
|
97
|
-
"type":
|
|
98
|
-
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"@
|
|
103
|
-
|
|
104
|
-
|
|
121
|
+
{
|
|
122
|
+
"type": "object",
|
|
123
|
+
"properties": {
|
|
124
|
+
"@reverse": {
|
|
125
|
+
"type": "string"
|
|
126
|
+
},
|
|
127
|
+
"@container": {
|
|
128
|
+
"anyOf": [
|
|
129
|
+
{
|
|
130
|
+
"const": "@set"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"const": "@index"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "null"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"required": [
|
|
142
|
+
"@reverse"
|
|
105
143
|
]
|
|
106
|
-
},
|
|
107
|
-
"@type": {
|
|
108
|
-
"type": "string"
|
|
109
|
-
},
|
|
110
|
-
"@language": {
|
|
111
|
-
"type": "string"
|
|
112
|
-
},
|
|
113
|
-
"@index": {
|
|
114
|
-
"type": "string"
|
|
115
|
-
},
|
|
116
|
-
"@context": {
|
|
117
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinition"
|
|
118
|
-
},
|
|
119
|
-
"@prefix": {
|
|
120
|
-
"type": "boolean"
|
|
121
|
-
},
|
|
122
|
-
"@propagate": {
|
|
123
|
-
"type": "boolean"
|
|
124
|
-
},
|
|
125
|
-
"@protected": {
|
|
126
|
-
"type": "boolean"
|
|
127
144
|
}
|
|
128
|
-
},
|
|
129
|
-
"required": [
|
|
130
|
-
"@reverse"
|
|
131
145
|
]
|
|
132
146
|
}
|
|
133
147
|
]
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/json-ld/JsonLdGraphObject",
|
|
4
|
+
"title": "JsonLdGraphObject",
|
|
4
5
|
"description": "A graph object represents a named graph, which MAY include an explicit graph name.",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"properties": {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/json-ld/JsonLdIdMap",
|
|
4
|
+
"title": "JsonLdIdMap",
|
|
4
5
|
"description": "An id map is used to associate an IRI with a value that allows easy programmatic access.",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"additionalProperties": {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/json-ld/JsonLdIndexMap",
|
|
4
|
-
"
|
|
4
|
+
"title": "JsonLdIndexMap",
|
|
5
|
+
"description": "An index map allows keys that have no semantic meaning, but should be preserved regardless,\nto be used in JSON-LD documents.",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"additionalProperties": {
|
|
7
8
|
"anyOf": [
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/json-ld/JsonLdJsonObject",
|
|
4
|
+
"title": "JsonLdJsonObject",
|
|
4
5
|
"description": "JSON Type for object.",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"additionalProperties": {
|
|
7
|
-
"
|
|
8
|
-
{
|
|
9
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonValue"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"not": {}
|
|
13
|
-
}
|
|
14
|
-
]
|
|
8
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonValue"
|
|
15
9
|
}
|
|
16
10
|
}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/json-ld/JsonLdJsonPrimitive",
|
|
4
|
+
"title": "JsonLdJsonPrimitive",
|
|
4
5
|
"description": "JSON Primitive.",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"type": "number"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "boolean"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "null"
|
|
18
|
+
}
|
|
10
19
|
]
|
|
11
20
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/json-ld/JsonLdLanguageMap",
|
|
4
|
+
"title": "JsonLdLanguageMap",
|
|
4
5
|
"description": "A language map is used to associate a language with a value in a way that allows easy programmatic access.",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"additionalProperties": {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/json-ld/JsonLdListOrSetItem",
|
|
4
|
+
"title": "JsonLdListOrSetItem",
|
|
4
5
|
"description": "A list or set item can be a null, boolean, number, string, node object, or value object.",
|
|
5
6
|
"anyOf": [
|
|
6
7
|
{
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
|
|
4
|
-
"
|
|
4
|
+
"title": "JsonLdNodeObject",
|
|
5
|
+
"description": "A node object represents zero or more properties of a node\nin the graph serialized by the JSON-LD document.",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"additionalProperties": {
|
|
7
8
|
"anyOf": [
|
|
8
9
|
{
|
|
9
10
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
|
|
10
11
|
},
|
|
12
|
+
{
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
11
18
|
{
|
|
12
19
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
|
|
13
20
|
},
|
|
@@ -22,79 +29,12 @@
|
|
|
22
29
|
},
|
|
23
30
|
{
|
|
24
31
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"type": "array"
|
|
28
32
|
}
|
|
29
33
|
]
|
|
30
34
|
},
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
"$ref": "https://schema.twindev.org/json-ld/
|
|
34
|
-
},
|
|
35
|
-
"@id": {
|
|
36
|
-
"anyOf": [
|
|
37
|
-
{
|
|
38
|
-
"type": "string"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"type": "array",
|
|
42
|
-
"items": {
|
|
43
|
-
"type": "string"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
"@included": {
|
|
49
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
|
|
50
|
-
},
|
|
51
|
-
"@graph": {
|
|
52
|
-
"anyOf": [
|
|
53
|
-
{
|
|
54
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"type": "array",
|
|
58
|
-
"items": {
|
|
59
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
"@nest": {
|
|
65
|
-
"anyOf": [
|
|
66
|
-
{
|
|
67
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"type": "array",
|
|
71
|
-
"items": {
|
|
72
|
-
"$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
},
|
|
77
|
-
"@type": {
|
|
78
|
-
"anyOf": [
|
|
79
|
-
{
|
|
80
|
-
"type": "string"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"type": "array",
|
|
84
|
-
"items": {
|
|
85
|
-
"type": "string"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
]
|
|
89
|
-
},
|
|
90
|
-
"@reverse": {
|
|
91
|
-
"type": "object",
|
|
92
|
-
"additionalProperties": {
|
|
93
|
-
"type": "string"
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
"@index": {
|
|
97
|
-
"type": "string"
|
|
35
|
+
"allOf": [
|
|
36
|
+
{
|
|
37
|
+
"$ref": "https://schema.twindev.org/json-ld/JsonLdObject"
|
|
98
38
|
}
|
|
99
|
-
|
|
39
|
+
]
|
|
100
40
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive",
|
|
4
|
+
"title": "JsonLdNodePrimitive",
|
|
4
5
|
"description": "A node primitive is a JSON-LD value which is not one of the defined NodeObject properties.",
|
|
5
6
|
"anyOf": [
|
|
6
7
|
{
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/json-ld/JsonLdObject",
|
|
4
|
-
"
|
|
4
|
+
"title": "JsonLdObject",
|
|
5
|
+
"description": "An object represents the pre-defined properties of the node object\nin the graph serialized by the JSON-LD document.",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"properties": {
|
|
7
8
|
"@context": {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/json-ld/JsonLdTypeMap",
|
|
4
|
+
"title": "JsonLdTypeMap",
|
|
4
5
|
"description": "A type map is used to associate an IRI with a value that allows easy programmatic access.",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"additionalProperties": {
|