@twin.org/data-json-ld 0.0.1-next.10
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/LICENSE +201 -0
- package/README.md +21 -0
- package/dist/cjs/index.cjs +1750 -0
- package/dist/esm/index.mjs +1745 -0
- package/dist/types/dataTypes/jsonLdDataTypes.d.ts +9 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/models/IJsonLdDocument.d.ts +222 -0
- package/dist/types/models/jsonLdTypes.d.ts +109 -0
- package/dist/types/utils/jsonLdHelper.d.ts +16 -0
- package/dist/types/utils/jsonLdProcessor.d.ts +65 -0
- package/docs/changelog.md +5 -0
- package/docs/examples.md +1 -0
- package/docs/reference/classes/JsonLdDataTypes.md +25 -0
- package/docs/reference/classes/JsonLdHelper.md +45 -0
- package/docs/reference/classes/JsonLdProcessor.md +199 -0
- package/docs/reference/index.md +44 -0
- package/docs/reference/interfaces/IJsonLdContextDefinition.md +73 -0
- package/docs/reference/interfaces/IJsonLdGraphObject.md +31 -0
- package/docs/reference/interfaces/IJsonLdIdMap.md +11 -0
- package/docs/reference/interfaces/IJsonLdIndexMap.md +12 -0
- package/docs/reference/interfaces/IJsonLdJsonObject.md +5 -0
- package/docs/reference/interfaces/IJsonLdLanguageMap.md +11 -0
- package/docs/reference/interfaces/IJsonLdListObject.md +19 -0
- package/docs/reference/interfaces/IJsonLdNodeObject.md +100 -0
- package/docs/reference/interfaces/IJsonLdObject.md +64 -0
- package/docs/reference/interfaces/IJsonLdSetObject.md +19 -0
- package/docs/reference/interfaces/IJsonLdTypeMap.md +11 -0
- package/docs/reference/type-aliases/IJsonLdContainerType.md +3 -0
- package/docs/reference/type-aliases/IJsonLdContainerTypeArray.md +3 -0
- package/docs/reference/type-aliases/IJsonLdContextDefinitionElement.md +5 -0
- package/docs/reference/type-aliases/IJsonLdContextDefinitionRoot.md +5 -0
- package/docs/reference/type-aliases/IJsonLdDocument.md +11 -0
- package/docs/reference/type-aliases/IJsonLdExpandedTermDefinition.md +41 -0
- package/docs/reference/type-aliases/IJsonLdIncludedBlock.md +9 -0
- package/docs/reference/type-aliases/IJsonLdIndexMapItem.md +5 -0
- package/docs/reference/type-aliases/IJsonLdJsonArray.md +3 -0
- package/docs/reference/type-aliases/IJsonLdJsonPrimitive.md +3 -0
- package/docs/reference/type-aliases/IJsonLdJsonValue.md +3 -0
- package/docs/reference/type-aliases/IJsonLdKeyword.md +105 -0
- package/docs/reference/type-aliases/IJsonLdListOrSetItem.md +5 -0
- package/docs/reference/type-aliases/IJsonLdNodePrimitive.md +5 -0
- package/docs/reference/type-aliases/IJsonLdValueObject.md +20 -0
- package/docs/reference/type-aliases/JsonLdTypes.md +5 -0
- package/docs/reference/variables/JsonLdTypes.md +157 -0
- package/locales/en.json +7 -0
- package/package.json +44 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# Class: JsonLdProcessor
|
|
2
|
+
|
|
3
|
+
JSON-LD Processor.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### new JsonLdProcessor()
|
|
8
|
+
|
|
9
|
+
> **new JsonLdProcessor**(): [`JsonLdProcessor`](JsonLdProcessor.md)
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
[`JsonLdProcessor`](JsonLdProcessor.md)
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
### DOCUMENT\_LOADER()
|
|
18
|
+
|
|
19
|
+
> `static` **DOCUMENT\_LOADER**(`url`): `Promise`\<`RemoteDocument`\>
|
|
20
|
+
|
|
21
|
+
The document loader to use.
|
|
22
|
+
|
|
23
|
+
#### Parameters
|
|
24
|
+
|
|
25
|
+
• **url**: `string`
|
|
26
|
+
|
|
27
|
+
#### Returns
|
|
28
|
+
|
|
29
|
+
`Promise`\<`RemoteDocument`\>
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### compact()
|
|
34
|
+
|
|
35
|
+
> `static` **compact**(`document`, `context`?): `Promise`\<[`IJsonLdDocument`](../type-aliases/IJsonLdDocument.md)\>
|
|
36
|
+
|
|
37
|
+
Compact a document according to a particular context.
|
|
38
|
+
|
|
39
|
+
#### Parameters
|
|
40
|
+
|
|
41
|
+
• **document**: [`IJsonLdDocument`](../type-aliases/IJsonLdDocument.md)
|
|
42
|
+
|
|
43
|
+
The JSON-LD document to compact.
|
|
44
|
+
|
|
45
|
+
• **context?**: [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
46
|
+
|
|
47
|
+
The context to compact the document to, if not provided will try and gather from the object.
|
|
48
|
+
|
|
49
|
+
#### Returns
|
|
50
|
+
|
|
51
|
+
`Promise`\<[`IJsonLdDocument`](../type-aliases/IJsonLdDocument.md)\>
|
|
52
|
+
|
|
53
|
+
The compacted JSON-LD document.
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### expand()
|
|
58
|
+
|
|
59
|
+
> `static` **expand**(`compacted`): `Promise`\<[`IJsonLdDocument`](../type-aliases/IJsonLdDocument.md)\>
|
|
60
|
+
|
|
61
|
+
Expand a document, removing its context.
|
|
62
|
+
|
|
63
|
+
#### Parameters
|
|
64
|
+
|
|
65
|
+
• **compacted**: [`IJsonLdDocument`](../type-aliases/IJsonLdDocument.md)
|
|
66
|
+
|
|
67
|
+
The compacted JSON-LD document to expand.
|
|
68
|
+
|
|
69
|
+
#### Returns
|
|
70
|
+
|
|
71
|
+
`Promise`\<[`IJsonLdDocument`](../type-aliases/IJsonLdDocument.md)\>
|
|
72
|
+
|
|
73
|
+
The expanded JSON-LD document.
|
|
74
|
+
|
|
75
|
+
***
|
|
76
|
+
|
|
77
|
+
### addRedirect()
|
|
78
|
+
|
|
79
|
+
> `static` **addRedirect**(`from`, `to`): `void`
|
|
80
|
+
|
|
81
|
+
Add a redirect to use during document resolution.
|
|
82
|
+
|
|
83
|
+
#### Parameters
|
|
84
|
+
|
|
85
|
+
• **from**: `RegExp`
|
|
86
|
+
|
|
87
|
+
The URL to redirect from.
|
|
88
|
+
|
|
89
|
+
• **to**: `string`
|
|
90
|
+
|
|
91
|
+
The URL to redirect to.
|
|
92
|
+
|
|
93
|
+
#### Returns
|
|
94
|
+
|
|
95
|
+
`void`
|
|
96
|
+
|
|
97
|
+
***
|
|
98
|
+
|
|
99
|
+
### extractProperty()
|
|
100
|
+
|
|
101
|
+
> `static` **extractProperty**\<`T`\>(`nodeObject`, `propertyNames`, `deleteProperty`): `undefined` \| `T`
|
|
102
|
+
|
|
103
|
+
Extract a property from the JSON-LD.
|
|
104
|
+
|
|
105
|
+
#### Type Parameters
|
|
106
|
+
|
|
107
|
+
• **T**
|
|
108
|
+
|
|
109
|
+
#### Parameters
|
|
110
|
+
|
|
111
|
+
• **nodeObject**: [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md)
|
|
112
|
+
|
|
113
|
+
The JSON-LD node object to extract from.
|
|
114
|
+
|
|
115
|
+
• **propertyNames**: `string`[]
|
|
116
|
+
|
|
117
|
+
The possible names for the property.
|
|
118
|
+
|
|
119
|
+
• **deleteProperty**: `boolean` = `true`
|
|
120
|
+
|
|
121
|
+
Delete the property from the object, defaults to true.
|
|
122
|
+
|
|
123
|
+
#### Returns
|
|
124
|
+
|
|
125
|
+
`undefined` \| `T`
|
|
126
|
+
|
|
127
|
+
The properties if available.
|
|
128
|
+
|
|
129
|
+
***
|
|
130
|
+
|
|
131
|
+
### combineContexts()
|
|
132
|
+
|
|
133
|
+
> `static` **combineContexts**(`context1`, `context2`): `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
134
|
+
|
|
135
|
+
Combine contexts.
|
|
136
|
+
|
|
137
|
+
#### Parameters
|
|
138
|
+
|
|
139
|
+
• **context1**: `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
140
|
+
|
|
141
|
+
The first JSON-LD context to combine.
|
|
142
|
+
|
|
143
|
+
• **context2**: `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
144
|
+
|
|
145
|
+
The second JSON-LD context to combine.
|
|
146
|
+
|
|
147
|
+
#### Returns
|
|
148
|
+
|
|
149
|
+
`undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
150
|
+
|
|
151
|
+
The combined context.
|
|
152
|
+
|
|
153
|
+
***
|
|
154
|
+
|
|
155
|
+
### gatherContexts()
|
|
156
|
+
|
|
157
|
+
> `static` **gatherContexts**(`element`, `initial`?): `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
158
|
+
|
|
159
|
+
Gather all the contexts from the element and it's children.
|
|
160
|
+
|
|
161
|
+
#### Parameters
|
|
162
|
+
|
|
163
|
+
• **element**
|
|
164
|
+
|
|
165
|
+
The element to gather the contexts from.
|
|
166
|
+
|
|
167
|
+
• **initial?**: [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
168
|
+
|
|
169
|
+
The initial context.
|
|
170
|
+
|
|
171
|
+
#### Returns
|
|
172
|
+
|
|
173
|
+
`undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
174
|
+
|
|
175
|
+
The combined contexts.
|
|
176
|
+
|
|
177
|
+
***
|
|
178
|
+
|
|
179
|
+
### removeContexts()
|
|
180
|
+
|
|
181
|
+
> `static` **removeContexts**(`context`, `match`?): `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
182
|
+
|
|
183
|
+
Remove all the contexts that match the pattern.
|
|
184
|
+
|
|
185
|
+
#### Parameters
|
|
186
|
+
|
|
187
|
+
• **context**: `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
188
|
+
|
|
189
|
+
The context to remove the entries from.
|
|
190
|
+
|
|
191
|
+
• **match?**: [`IJsonLdContextDefinitionElement`](../type-aliases/IJsonLdContextDefinitionElement.md)[]
|
|
192
|
+
|
|
193
|
+
The element to try and match.
|
|
194
|
+
|
|
195
|
+
#### Returns
|
|
196
|
+
|
|
197
|
+
`undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
198
|
+
|
|
199
|
+
The updated contexts.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @twin.org/data-json-ld
|
|
2
|
+
|
|
3
|
+
## Classes
|
|
4
|
+
|
|
5
|
+
- [JsonLdDataTypes](classes/JsonLdDataTypes.md)
|
|
6
|
+
- [JsonLdHelper](classes/JsonLdHelper.md)
|
|
7
|
+
- [JsonLdProcessor](classes/JsonLdProcessor.md)
|
|
8
|
+
|
|
9
|
+
## Interfaces
|
|
10
|
+
|
|
11
|
+
- [IJsonLdNodeObject](interfaces/IJsonLdNodeObject.md)
|
|
12
|
+
- [IJsonLdObject](interfaces/IJsonLdObject.md)
|
|
13
|
+
- [IJsonLdGraphObject](interfaces/IJsonLdGraphObject.md)
|
|
14
|
+
- [IJsonLdListObject](interfaces/IJsonLdListObject.md)
|
|
15
|
+
- [IJsonLdSetObject](interfaces/IJsonLdSetObject.md)
|
|
16
|
+
- [IJsonLdLanguageMap](interfaces/IJsonLdLanguageMap.md)
|
|
17
|
+
- [IJsonLdIndexMap](interfaces/IJsonLdIndexMap.md)
|
|
18
|
+
- [IJsonLdIdMap](interfaces/IJsonLdIdMap.md)
|
|
19
|
+
- [IJsonLdTypeMap](interfaces/IJsonLdTypeMap.md)
|
|
20
|
+
- [IJsonLdContextDefinition](interfaces/IJsonLdContextDefinition.md)
|
|
21
|
+
- [IJsonLdJsonObject](interfaces/IJsonLdJsonObject.md)
|
|
22
|
+
|
|
23
|
+
## Type Aliases
|
|
24
|
+
|
|
25
|
+
- [IJsonLdDocument](type-aliases/IJsonLdDocument.md)
|
|
26
|
+
- [IJsonLdNodePrimitive](type-aliases/IJsonLdNodePrimitive.md)
|
|
27
|
+
- [IJsonLdValueObject](type-aliases/IJsonLdValueObject.md)
|
|
28
|
+
- [IJsonLdIndexMapItem](type-aliases/IJsonLdIndexMapItem.md)
|
|
29
|
+
- [IJsonLdIncludedBlock](type-aliases/IJsonLdIncludedBlock.md)
|
|
30
|
+
- [IJsonLdContextDefinitionElement](type-aliases/IJsonLdContextDefinitionElement.md)
|
|
31
|
+
- [IJsonLdContextDefinitionRoot](type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
32
|
+
- [IJsonLdExpandedTermDefinition](type-aliases/IJsonLdExpandedTermDefinition.md)
|
|
33
|
+
- [IJsonLdKeyword](type-aliases/IJsonLdKeyword.md)
|
|
34
|
+
- [IJsonLdListOrSetItem](type-aliases/IJsonLdListOrSetItem.md)
|
|
35
|
+
- [IJsonLdContainerType](type-aliases/IJsonLdContainerType.md)
|
|
36
|
+
- [IJsonLdContainerTypeArray](type-aliases/IJsonLdContainerTypeArray.md)
|
|
37
|
+
- [IJsonLdJsonPrimitive](type-aliases/IJsonLdJsonPrimitive.md)
|
|
38
|
+
- [IJsonLdJsonArray](type-aliases/IJsonLdJsonArray.md)
|
|
39
|
+
- [IJsonLdJsonValue](type-aliases/IJsonLdJsonValue.md)
|
|
40
|
+
- [JsonLdTypes](type-aliases/JsonLdTypes.md)
|
|
41
|
+
|
|
42
|
+
## Variables
|
|
43
|
+
|
|
44
|
+
- [JsonLdTypes](variables/JsonLdTypes.md)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Interface: IJsonLdContextDefinition
|
|
2
|
+
|
|
3
|
+
A context definition defines a local context in a node object.
|
|
4
|
+
|
|
5
|
+
## See
|
|
6
|
+
|
|
7
|
+
https://www.w3.org/TR/json-ld11/#context-definitions
|
|
8
|
+
|
|
9
|
+
## Indexable
|
|
10
|
+
|
|
11
|
+
\[`key`: `string`\]: `null` \| `string` \| [`IJsonLdExpandedTermDefinition`](../type-aliases/IJsonLdExpandedTermDefinition.md) \| [`IJsonLdContextDefinition`](IJsonLdContextDefinition.md)\[keyof [`IJsonLdContextDefinition`](IJsonLdContextDefinition.md)\]
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### @base?
|
|
16
|
+
|
|
17
|
+
> `optional` **@base**: `null` \| `string`
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### @direction?
|
|
22
|
+
|
|
23
|
+
> `optional` **@direction**: `null` \| `"ltr"` \| `"rtl"`
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### @import?
|
|
28
|
+
|
|
29
|
+
> `optional` **@import**: `string`
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### @language?
|
|
34
|
+
|
|
35
|
+
> `optional` **@language**: `string`
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### @propagate?
|
|
40
|
+
|
|
41
|
+
> `optional` **@propagate**: `boolean`
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### @protected?
|
|
46
|
+
|
|
47
|
+
> `optional` **@protected**: `boolean`
|
|
48
|
+
|
|
49
|
+
***
|
|
50
|
+
|
|
51
|
+
### @type?
|
|
52
|
+
|
|
53
|
+
> `optional` **@type**: `object`
|
|
54
|
+
|
|
55
|
+
#### @container
|
|
56
|
+
|
|
57
|
+
> **@container**: `"@set"`
|
|
58
|
+
|
|
59
|
+
#### @protected?
|
|
60
|
+
|
|
61
|
+
> `optional` **@protected**: `boolean`
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
### @version?
|
|
66
|
+
|
|
67
|
+
> `optional` **@version**: `"1.1"`
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### @vocab?
|
|
72
|
+
|
|
73
|
+
> `optional` **@vocab**: `null` \| `string`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Interface: IJsonLdGraphObject
|
|
2
|
+
|
|
3
|
+
A graph object represents a named graph, which MAY include an explicit graph name.
|
|
4
|
+
|
|
5
|
+
## See
|
|
6
|
+
|
|
7
|
+
https://www.w3.org/TR/json-ld11/#graph-objects
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### @graph
|
|
12
|
+
|
|
13
|
+
> **@graph**: [`IJsonLdNodeObject`](IJsonLdNodeObject.md) \| [`IJsonLdNodeObject`](IJsonLdNodeObject.md)[]
|
|
14
|
+
|
|
15
|
+
***
|
|
16
|
+
|
|
17
|
+
### @index?
|
|
18
|
+
|
|
19
|
+
> `optional` **@index**: `string`
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### @id?
|
|
24
|
+
|
|
25
|
+
> `optional` **@id**: `string` \| `string`[]
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### @context?
|
|
30
|
+
|
|
31
|
+
> `optional` **@context**: [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Interface: IJsonLdIdMap
|
|
2
|
+
|
|
3
|
+
An id map is used to associate an IRI with a value that allows easy programmatic access.
|
|
4
|
+
|
|
5
|
+
## See
|
|
6
|
+
|
|
7
|
+
https://www.w3.org/TR/json-ld11/#id-maps
|
|
8
|
+
|
|
9
|
+
## Indexable
|
|
10
|
+
|
|
11
|
+
\[`key`: `string`\]: [`IJsonLdNodeObject`](IJsonLdNodeObject.md)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Interface: IJsonLdIndexMap
|
|
2
|
+
|
|
3
|
+
An index map allows keys that have no semantic meaning, but should be preserved regardless,
|
|
4
|
+
to be used in JSON-LD documents.
|
|
5
|
+
|
|
6
|
+
## See
|
|
7
|
+
|
|
8
|
+
https://www.w3.org/TR/json-ld11/#index-maps
|
|
9
|
+
|
|
10
|
+
## Indexable
|
|
11
|
+
|
|
12
|
+
\[`key`: `string`\]: [`IJsonLdIndexMapItem`](../type-aliases/IJsonLdIndexMapItem.md) \| [`IJsonLdIndexMapItem`](../type-aliases/IJsonLdIndexMapItem.md)[]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Interface: IJsonLdLanguageMap
|
|
2
|
+
|
|
3
|
+
A language map is used to associate a language with a value in a way that allows easy programmatic access.
|
|
4
|
+
|
|
5
|
+
## See
|
|
6
|
+
|
|
7
|
+
https://www.w3.org/TR/json-ld11/#language-maps
|
|
8
|
+
|
|
9
|
+
## Indexable
|
|
10
|
+
|
|
11
|
+
\[`key`: `string`\]: `null` \| `string` \| `string`[]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Interface: IJsonLdListObject
|
|
2
|
+
|
|
3
|
+
A list represents an ordered set of values.
|
|
4
|
+
|
|
5
|
+
## See
|
|
6
|
+
|
|
7
|
+
https://www.w3.org/TR/json-ld11/#lists-and-sets
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### @list
|
|
12
|
+
|
|
13
|
+
> **@list**: [`IJsonLdListOrSetItem`](../type-aliases/IJsonLdListOrSetItem.md) \| [`IJsonLdListOrSetItem`](../type-aliases/IJsonLdListOrSetItem.md)[]
|
|
14
|
+
|
|
15
|
+
***
|
|
16
|
+
|
|
17
|
+
### @index?
|
|
18
|
+
|
|
19
|
+
> `optional` **@index**: `string`
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Interface: IJsonLdNodeObject
|
|
2
|
+
|
|
3
|
+
A node object represents zero or more properties of a node
|
|
4
|
+
in the graph serialized by the JSON-LD document.
|
|
5
|
+
|
|
6
|
+
## See
|
|
7
|
+
|
|
8
|
+
https://www.w3.org/TR/json-ld11/#node-objects
|
|
9
|
+
|
|
10
|
+
## Extends
|
|
11
|
+
|
|
12
|
+
- [`IJsonLdObject`](IJsonLdObject.md)
|
|
13
|
+
|
|
14
|
+
## Indexable
|
|
15
|
+
|
|
16
|
+
\[`key`: `string`\]: [`IJsonLdNodePrimitive`](../type-aliases/IJsonLdNodePrimitive.md) \| [`IJsonLdNodePrimitive`](../type-aliases/IJsonLdNodePrimitive.md)[] \| [`IJsonLdLanguageMap`](IJsonLdLanguageMap.md) \| [`IJsonLdIndexMap`](IJsonLdIndexMap.md) \| [`IJsonLdIncludedBlock`](../type-aliases/IJsonLdIncludedBlock.md) \| [`IJsonLdIdMap`](IJsonLdIdMap.md) \| [`IJsonLdTypeMap`](IJsonLdTypeMap.md) \| [`IJsonLdNodeObject`](IJsonLdNodeObject.md)\[keyof [`IJsonLdNodeObject`](IJsonLdNodeObject.md)\]
|
|
17
|
+
|
|
18
|
+
## Properties
|
|
19
|
+
|
|
20
|
+
### @context?
|
|
21
|
+
|
|
22
|
+
> `optional` **@context**: [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
23
|
+
|
|
24
|
+
#### Inherited from
|
|
25
|
+
|
|
26
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@context`](IJsonLdObject.md#@context)
|
|
27
|
+
|
|
28
|
+
***
|
|
29
|
+
|
|
30
|
+
### @id?
|
|
31
|
+
|
|
32
|
+
> `optional` **@id**: `string` \| `string`[]
|
|
33
|
+
|
|
34
|
+
#### Inherited from
|
|
35
|
+
|
|
36
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@id`](IJsonLdObject.md#@id)
|
|
37
|
+
|
|
38
|
+
***
|
|
39
|
+
|
|
40
|
+
### @included?
|
|
41
|
+
|
|
42
|
+
> `optional` **@included**: [`IJsonLdIncludedBlock`](../type-aliases/IJsonLdIncludedBlock.md)
|
|
43
|
+
|
|
44
|
+
#### Inherited from
|
|
45
|
+
|
|
46
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@included`](IJsonLdObject.md#@included)
|
|
47
|
+
|
|
48
|
+
***
|
|
49
|
+
|
|
50
|
+
### @graph?
|
|
51
|
+
|
|
52
|
+
> `optional` **@graph**: [`IJsonLdNodeObject`](IJsonLdNodeObject.md) \| [`IJsonLdNodeObject`](IJsonLdNodeObject.md)[]
|
|
53
|
+
|
|
54
|
+
#### Inherited from
|
|
55
|
+
|
|
56
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@graph`](IJsonLdObject.md#@graph)
|
|
57
|
+
|
|
58
|
+
***
|
|
59
|
+
|
|
60
|
+
### @nest?
|
|
61
|
+
|
|
62
|
+
> `optional` **@nest**: [`IJsonLdJsonObject`](IJsonLdJsonObject.md) \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md)[]
|
|
63
|
+
|
|
64
|
+
#### Inherited from
|
|
65
|
+
|
|
66
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@nest`](IJsonLdObject.md#@nest)
|
|
67
|
+
|
|
68
|
+
***
|
|
69
|
+
|
|
70
|
+
### @type?
|
|
71
|
+
|
|
72
|
+
> `optional` **@type**: `string` \| `string`[]
|
|
73
|
+
|
|
74
|
+
#### Inherited from
|
|
75
|
+
|
|
76
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@type`](IJsonLdObject.md#@type)
|
|
77
|
+
|
|
78
|
+
***
|
|
79
|
+
|
|
80
|
+
### @reverse?
|
|
81
|
+
|
|
82
|
+
> `optional` **@reverse**: `object`
|
|
83
|
+
|
|
84
|
+
#### Index Signature
|
|
85
|
+
|
|
86
|
+
\[`key`: `string`\]: [`IJsonLdKeyword`](../type-aliases/IJsonLdKeyword.md)\[`"@reverse"`\]
|
|
87
|
+
|
|
88
|
+
#### Inherited from
|
|
89
|
+
|
|
90
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@reverse`](IJsonLdObject.md#@reverse)
|
|
91
|
+
|
|
92
|
+
***
|
|
93
|
+
|
|
94
|
+
### @index?
|
|
95
|
+
|
|
96
|
+
> `optional` **@index**: `string`
|
|
97
|
+
|
|
98
|
+
#### Inherited from
|
|
99
|
+
|
|
100
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@index`](IJsonLdObject.md#@index)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Interface: IJsonLdObject
|
|
2
|
+
|
|
3
|
+
An object represents the pre-defined properties of the node object
|
|
4
|
+
in the graph serialized by the JSON-LD document.
|
|
5
|
+
|
|
6
|
+
## See
|
|
7
|
+
|
|
8
|
+
https://www.w3.org/TR/json-ld11/#node-objects
|
|
9
|
+
|
|
10
|
+
## Extended by
|
|
11
|
+
|
|
12
|
+
- [`IJsonLdNodeObject`](IJsonLdNodeObject.md)
|
|
13
|
+
|
|
14
|
+
## Properties
|
|
15
|
+
|
|
16
|
+
### @context?
|
|
17
|
+
|
|
18
|
+
> `optional` **@context**: [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
19
|
+
|
|
20
|
+
***
|
|
21
|
+
|
|
22
|
+
### @id?
|
|
23
|
+
|
|
24
|
+
> `optional` **@id**: `string` \| `string`[]
|
|
25
|
+
|
|
26
|
+
***
|
|
27
|
+
|
|
28
|
+
### @included?
|
|
29
|
+
|
|
30
|
+
> `optional` **@included**: [`IJsonLdIncludedBlock`](../type-aliases/IJsonLdIncludedBlock.md)
|
|
31
|
+
|
|
32
|
+
***
|
|
33
|
+
|
|
34
|
+
### @graph?
|
|
35
|
+
|
|
36
|
+
> `optional` **@graph**: [`IJsonLdNodeObject`](IJsonLdNodeObject.md) \| [`IJsonLdNodeObject`](IJsonLdNodeObject.md)[]
|
|
37
|
+
|
|
38
|
+
***
|
|
39
|
+
|
|
40
|
+
### @nest?
|
|
41
|
+
|
|
42
|
+
> `optional` **@nest**: [`IJsonLdJsonObject`](IJsonLdJsonObject.md) \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md)[]
|
|
43
|
+
|
|
44
|
+
***
|
|
45
|
+
|
|
46
|
+
### @type?
|
|
47
|
+
|
|
48
|
+
> `optional` **@type**: `string` \| `string`[]
|
|
49
|
+
|
|
50
|
+
***
|
|
51
|
+
|
|
52
|
+
### @reverse?
|
|
53
|
+
|
|
54
|
+
> `optional` **@reverse**: `object`
|
|
55
|
+
|
|
56
|
+
#### Index Signature
|
|
57
|
+
|
|
58
|
+
\[`key`: `string`\]: [`IJsonLdKeyword`](../type-aliases/IJsonLdKeyword.md)\[`"@reverse"`\]
|
|
59
|
+
|
|
60
|
+
***
|
|
61
|
+
|
|
62
|
+
### @index?
|
|
63
|
+
|
|
64
|
+
> `optional` **@index**: `string`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Interface: IJsonLdSetObject
|
|
2
|
+
|
|
3
|
+
A set represents an unordered set of values.
|
|
4
|
+
|
|
5
|
+
## See
|
|
6
|
+
|
|
7
|
+
https://www.w3.org/TR/json-ld11/#lists-and-sets
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### @set
|
|
12
|
+
|
|
13
|
+
> **@set**: [`IJsonLdListOrSetItem`](../type-aliases/IJsonLdListOrSetItem.md) \| [`IJsonLdListOrSetItem`](../type-aliases/IJsonLdListOrSetItem.md)[]
|
|
14
|
+
|
|
15
|
+
***
|
|
16
|
+
|
|
17
|
+
### @index?
|
|
18
|
+
|
|
19
|
+
> `optional` **@index**: `string`
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Interface: IJsonLdTypeMap
|
|
2
|
+
|
|
3
|
+
A type map is used to associate an IRI with a value that allows easy programmatic access.
|
|
4
|
+
|
|
5
|
+
## See
|
|
6
|
+
|
|
7
|
+
https://www.w3.org/TR/json-ld11/#type-maps
|
|
8
|
+
|
|
9
|
+
## Indexable
|
|
10
|
+
|
|
11
|
+
\[`key`: `string`\]: `string` \| [`IJsonLdNodeObject`](IJsonLdNodeObject.md)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# Type Alias: IJsonLdContainerTypeArray
|
|
2
|
+
|
|
3
|
+
> **IJsonLdContainerTypeArray**: [`"@graph"`, `"@id"`] \| [`"@id"`, `"@graph"`] \| [`"@set"`, `"@graph"`, `"@id"`] \| [`"@set"`, `"@id"`, `"@graph"`] \| [`"@graph"`, `"@set"`, `"@id"`] \| [`"@id"`, `"@set"`, `"@graph"`] \| [`"@graph"`, `"@id"`, `"@set"`] \| [`"@id"`, `"@graph"`, `"@set"`] \| [`"@set"`, [`IJsonLdContainerType`](IJsonLdContainerType.md)] \| [[`IJsonLdContainerType`](IJsonLdContainerType.md), `"@set"`]
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Type Alias: IJsonLdContextDefinitionRoot
|
|
2
|
+
|
|
3
|
+
> **IJsonLdContextDefinitionRoot**: [`IJsonLdContextDefinitionElement`](IJsonLdContextDefinitionElement.md) \| [`IJsonLdContextDefinitionElement`](IJsonLdContextDefinitionElement.md)[]
|
|
4
|
+
|
|
5
|
+
A context definition root is used to define the root of a context definition.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Type Alias: IJsonLdDocument
|
|
2
|
+
|
|
3
|
+
> **IJsonLdDocument**: [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md)[] \| `object`
|
|
4
|
+
|
|
5
|
+
A JSON-LD document MUST be valid JSON text as described in [RFC8259],
|
|
6
|
+
or some format that can be represented in the JSON-LD internal representation
|
|
7
|
+
that is equivalent to valid JSON text.
|
|
8
|
+
|
|
9
|
+
## See
|
|
10
|
+
|
|
11
|
+
https://www.w3.org/TR/json-ld11/#json-ld-grammar
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Type Alias: IJsonLdExpandedTermDefinition
|
|
2
|
+
|
|
3
|
+
> **IJsonLdExpandedTermDefinition**: `object` & `object` \| `object`
|
|
4
|
+
|
|
5
|
+
An expanded term definition is used to describe the mapping between a term
|
|
6
|
+
and its expanded identifier, as well as other properties of the value
|
|
7
|
+
associated with the term when it is used as key in a node object.
|
|
8
|
+
|
|
9
|
+
## Type declaration
|
|
10
|
+
|
|
11
|
+
### @type?
|
|
12
|
+
|
|
13
|
+
> `optional` **@type**: `"@id"` \| `"@json"` \| `"@none"` \| `"@vocab"` \| `string`
|
|
14
|
+
|
|
15
|
+
### @language?
|
|
16
|
+
|
|
17
|
+
> `optional` **@language**: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@language"`\]
|
|
18
|
+
|
|
19
|
+
### @index?
|
|
20
|
+
|
|
21
|
+
> `optional` **@index**: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@index"`\]
|
|
22
|
+
|
|
23
|
+
### @context?
|
|
24
|
+
|
|
25
|
+
> `optional` **@context**: [`IJsonLdContextDefinition`](../interfaces/IJsonLdContextDefinition.md)
|
|
26
|
+
|
|
27
|
+
### @prefix?
|
|
28
|
+
|
|
29
|
+
> `optional` **@prefix**: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@prefix"`\]
|
|
30
|
+
|
|
31
|
+
### @propagate?
|
|
32
|
+
|
|
33
|
+
> `optional` **@propagate**: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@propagate"`\]
|
|
34
|
+
|
|
35
|
+
### @protected?
|
|
36
|
+
|
|
37
|
+
> `optional` **@protected**: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@protected"`\]
|
|
38
|
+
|
|
39
|
+
## See
|
|
40
|
+
|
|
41
|
+
https://www.w3.org/TR/json-ld11/#expanded-term-definition
|