@twin.org/data-json-ld 0.0.1-next.3 → 0.0.1-next.31
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/cjs/index.cjs +631 -351
- package/dist/esm/index.mjs +633 -354
- package/dist/types/index.d.ts +26 -0
- package/dist/types/models/IJsonLdContainerType.d.ts +8 -0
- package/dist/types/models/IJsonLdContainerTypeArray.d.ts +9 -0
- package/dist/types/models/IJsonLdContextDefinition.d.ts +25 -0
- package/dist/types/models/IJsonLdContextDefinitionElement.d.ts +9 -0
- package/dist/types/models/IJsonLdContextDefinitionRoot.d.ts +9 -0
- package/dist/types/models/IJsonLdDocument.d.ts +2 -189
- package/dist/types/models/IJsonLdExpandedTermDefinition.d.ts +28 -0
- package/dist/types/models/IJsonLdGraphObject.d.ts +16 -0
- package/dist/types/models/IJsonLdIdMap.d.ts +12 -0
- package/dist/types/models/IJsonLdIncludedBlock.d.ts +10 -0
- package/dist/types/models/IJsonLdIndexMap.d.ts +13 -0
- package/dist/types/models/IJsonLdIndexMapItem.d.ts +12 -0
- package/dist/types/models/IJsonLdJsonArray.d.ts +9 -0
- package/dist/types/models/IJsonLdJsonObject.d.ts +11 -0
- package/dist/types/models/IJsonLdJsonPrimitive.d.ts +8 -0
- package/dist/types/models/IJsonLdJsonValue.d.ts +11 -0
- package/dist/types/models/IJsonLdKeyword.d.ts +42 -0
- package/dist/types/models/IJsonLdLanguageMap.d.ts +11 -0
- package/dist/types/models/IJsonLdListObject.d.ts +13 -0
- package/dist/types/models/IJsonLdListOrSetItem.d.ts +10 -0
- package/dist/types/models/IJsonLdNodeObject.d.ts +19 -0
- package/dist/types/models/IJsonLdNodePrimitive.d.ts +13 -0
- package/dist/types/models/IJsonLdObject.d.ts +24 -0
- package/dist/types/models/IJsonLdSetObject.d.ts +13 -0
- package/dist/types/models/IJsonLdTypeMap.d.ts +12 -0
- package/dist/types/models/IJsonLdValueObject.d.ts +26 -0
- package/dist/types/models/jsonLdContexts.d.ts +13 -0
- package/dist/types/models/jsonLdTypes.d.ts +27 -23
- package/dist/types/utils/jsonLdProcessor.d.ts +86 -8
- package/docs/changelog.md +43 -1
- package/docs/reference/classes/JsonLdDataTypes.md +3 -3
- package/docs/reference/classes/JsonLdHelper.md +16 -8
- package/docs/reference/classes/JsonLdProcessor.md +322 -16
- package/docs/reference/index.md +20 -15
- package/docs/reference/interfaces/IJsonLdContextDefinition.md +1 -1
- package/docs/reference/interfaces/IJsonLdGraphObject.md +1 -1
- package/docs/reference/interfaces/IJsonLdIdMap.md +1 -1
- package/docs/reference/interfaces/IJsonLdIndexMap.md +1 -1
- package/docs/reference/interfaces/IJsonLdJsonObject.md +3 -1
- package/docs/reference/interfaces/IJsonLdLanguageMap.md +1 -1
- package/docs/reference/interfaces/IJsonLdNodeObject.md +40 -4
- package/docs/reference/interfaces/IJsonLdObject.md +64 -0
- package/docs/reference/interfaces/IJsonLdTypeMap.md +1 -1
- package/docs/reference/type-aliases/IJsonLdContainerType.md +3 -1
- package/docs/reference/type-aliases/IJsonLdContainerTypeArray.md +3 -1
- 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 +1 -1
- package/docs/reference/type-aliases/IJsonLdExpandedTermDefinition.md +1 -1
- package/docs/reference/type-aliases/IJsonLdIncludedBlock.md +1 -1
- package/docs/reference/type-aliases/IJsonLdIndexMapItem.md +1 -1
- package/docs/reference/type-aliases/IJsonLdJsonArray.md +3 -1
- package/docs/reference/type-aliases/IJsonLdJsonPrimitive.md +3 -1
- package/docs/reference/type-aliases/IJsonLdJsonValue.md +3 -1
- package/docs/reference/type-aliases/IJsonLdKeyword.md +51 -7
- package/docs/reference/type-aliases/IJsonLdListOrSetItem.md +1 -1
- package/docs/reference/type-aliases/IJsonLdNodePrimitive.md +1 -1
- package/docs/reference/type-aliases/IJsonLdValueObject.md +1 -1
- package/docs/reference/type-aliases/JsonLdContexts.md +5 -0
- package/docs/reference/type-aliases/JsonLdTypes.md +1 -1
- package/docs/reference/variables/JsonLdContexts.md +13 -0
- package/docs/reference/variables/JsonLdTypes.md +29 -23
- package/locales/en.json +8 -3
- package/package.json +7 -37
|
@@ -4,51 +4,167 @@ JSON-LD Processor.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new JsonLdProcessor**():
|
|
9
|
+
> **new JsonLdProcessor**(): `JsonLdProcessor`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`JsonLdProcessor`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### setDocumentLoader()
|
|
18
18
|
|
|
19
|
-
> `static` **
|
|
19
|
+
> `static` **setDocumentLoader**(`documentLoader`): `void`
|
|
20
20
|
|
|
21
21
|
The document loader to use.
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### documentLoader
|
|
26
|
+
|
|
27
|
+
(`url`) => `Promise`\<`RemoteDocument`\>
|
|
28
|
+
|
|
29
|
+
The document loader to use.
|
|
30
|
+
|
|
31
|
+
#### Returns
|
|
32
|
+
|
|
33
|
+
`void`
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### getDocumentLoader()
|
|
38
|
+
|
|
39
|
+
> `static` **getDocumentLoader**(): (`url`) => `Promise`\<`RemoteDocument`\>
|
|
40
|
+
|
|
41
|
+
The document loader to use for retrieving JSON-LD documents.
|
|
26
42
|
|
|
27
43
|
#### Returns
|
|
28
44
|
|
|
45
|
+
The document loader.
|
|
46
|
+
|
|
47
|
+
> (`url`): `Promise`\<`RemoteDocument`\>
|
|
48
|
+
|
|
49
|
+
##### Parameters
|
|
50
|
+
|
|
51
|
+
###### url
|
|
52
|
+
|
|
53
|
+
`string`
|
|
54
|
+
|
|
55
|
+
##### Returns
|
|
56
|
+
|
|
29
57
|
`Promise`\<`RemoteDocument`\>
|
|
30
58
|
|
|
31
59
|
***
|
|
32
60
|
|
|
61
|
+
### setCacheLimit()
|
|
62
|
+
|
|
63
|
+
> `static` **setCacheLimit**(`cacheLimitMs`): `void`
|
|
64
|
+
|
|
65
|
+
Set the cache time limit for documents.
|
|
66
|
+
|
|
67
|
+
#### Parameters
|
|
68
|
+
|
|
69
|
+
##### cacheLimitMs
|
|
70
|
+
|
|
71
|
+
`number`
|
|
72
|
+
|
|
73
|
+
The cache limit in milliseconds.
|
|
74
|
+
|
|
75
|
+
#### Returns
|
|
76
|
+
|
|
77
|
+
`void`
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
81
|
+
### getCacheLimit()
|
|
82
|
+
|
|
83
|
+
> `static` **getCacheLimit**(): `number`
|
|
84
|
+
|
|
85
|
+
Get the cache limit for documents.
|
|
86
|
+
|
|
87
|
+
#### Returns
|
|
88
|
+
|
|
89
|
+
`number`
|
|
90
|
+
|
|
91
|
+
The document loader.
|
|
92
|
+
|
|
93
|
+
***
|
|
94
|
+
|
|
95
|
+
### setRedirects()
|
|
96
|
+
|
|
97
|
+
> `static` **setRedirects**(`redirects`): `void`
|
|
98
|
+
|
|
99
|
+
Set the global redirects for JSON-LD, use addRedirect for default handling.
|
|
100
|
+
|
|
101
|
+
#### Parameters
|
|
102
|
+
|
|
103
|
+
##### redirects
|
|
104
|
+
|
|
105
|
+
`object`[]
|
|
106
|
+
|
|
107
|
+
The redirects to use.
|
|
108
|
+
|
|
109
|
+
#### Returns
|
|
110
|
+
|
|
111
|
+
`void`
|
|
112
|
+
|
|
113
|
+
***
|
|
114
|
+
|
|
115
|
+
### getRedirects()
|
|
116
|
+
|
|
117
|
+
> `static` **getRedirects**(): `object`[]
|
|
118
|
+
|
|
119
|
+
Get the global redirects for JSON-LD.
|
|
120
|
+
|
|
121
|
+
#### Returns
|
|
122
|
+
|
|
123
|
+
`object`[]
|
|
124
|
+
|
|
125
|
+
The registered redirects.
|
|
126
|
+
|
|
127
|
+
***
|
|
128
|
+
|
|
33
129
|
### compact()
|
|
34
130
|
|
|
35
|
-
> `static` **compact
|
|
131
|
+
> `static` **compact**\<`T`\>(`document`, `context?`, `options?`): `Promise`\<`T`\>
|
|
36
132
|
|
|
37
133
|
Compact a document according to a particular context.
|
|
38
134
|
|
|
135
|
+
#### Type Parameters
|
|
136
|
+
|
|
137
|
+
##### T
|
|
138
|
+
|
|
139
|
+
`T`
|
|
140
|
+
|
|
39
141
|
#### Parameters
|
|
40
142
|
|
|
41
|
-
|
|
143
|
+
##### document
|
|
144
|
+
|
|
145
|
+
`T`
|
|
42
146
|
|
|
43
147
|
The JSON-LD document to compact.
|
|
44
148
|
|
|
45
|
-
|
|
149
|
+
##### context?
|
|
150
|
+
|
|
151
|
+
[`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
152
|
+
|
|
153
|
+
The context to compact the document to, if not provided will use the one in the document.
|
|
154
|
+
|
|
155
|
+
##### options?
|
|
46
156
|
|
|
47
|
-
The
|
|
157
|
+
The options for compacting the document.
|
|
158
|
+
|
|
159
|
+
###### itemListOverride
|
|
160
|
+
|
|
161
|
+
`boolean`
|
|
162
|
+
|
|
163
|
+
Whether to override the itemListElement context with a set, defaults to true.
|
|
48
164
|
|
|
49
165
|
#### Returns
|
|
50
166
|
|
|
51
|
-
`Promise
|
|
167
|
+
`Promise`\<`T`\>
|
|
52
168
|
|
|
53
169
|
The compacted JSON-LD document.
|
|
54
170
|
|
|
@@ -56,24 +172,70 @@ The compacted JSON-LD document.
|
|
|
56
172
|
|
|
57
173
|
### expand()
|
|
58
174
|
|
|
59
|
-
> `static` **expand
|
|
175
|
+
> `static` **expand**\<`T`\>(`compacted`): `Promise`\<[`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md)[]\>
|
|
60
176
|
|
|
61
177
|
Expand a document, removing its context.
|
|
62
178
|
|
|
179
|
+
#### Type Parameters
|
|
180
|
+
|
|
181
|
+
##### T
|
|
182
|
+
|
|
183
|
+
`T`
|
|
184
|
+
|
|
63
185
|
#### Parameters
|
|
64
186
|
|
|
65
|
-
|
|
187
|
+
##### compacted
|
|
188
|
+
|
|
189
|
+
`T`
|
|
66
190
|
|
|
67
191
|
The compacted JSON-LD document to expand.
|
|
68
192
|
|
|
69
193
|
#### Returns
|
|
70
194
|
|
|
71
|
-
`Promise`\<[`
|
|
195
|
+
`Promise`\<[`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md)[]\>
|
|
72
196
|
|
|
73
197
|
The expanded JSON-LD document.
|
|
74
198
|
|
|
75
199
|
***
|
|
76
200
|
|
|
201
|
+
### canonize()
|
|
202
|
+
|
|
203
|
+
> `static` **canonize**\<`T`\>(`document`, `options?`): `Promise`\<`string`\>
|
|
204
|
+
|
|
205
|
+
Canonize a document.
|
|
206
|
+
|
|
207
|
+
#### Type Parameters
|
|
208
|
+
|
|
209
|
+
##### T
|
|
210
|
+
|
|
211
|
+
`T` *extends* [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md)
|
|
212
|
+
|
|
213
|
+
#### Parameters
|
|
214
|
+
|
|
215
|
+
##### document
|
|
216
|
+
|
|
217
|
+
`T`
|
|
218
|
+
|
|
219
|
+
The document to canonize.
|
|
220
|
+
|
|
221
|
+
##### options?
|
|
222
|
+
|
|
223
|
+
The options for canonization.
|
|
224
|
+
|
|
225
|
+
###### algorithm?
|
|
226
|
+
|
|
227
|
+
`"URDNA2015"` \| `"URGNA2012"`
|
|
228
|
+
|
|
229
|
+
The algorithm to use for canonization, defaults to URDNA2015.
|
|
230
|
+
|
|
231
|
+
#### Returns
|
|
232
|
+
|
|
233
|
+
`Promise`\<`string`\>
|
|
234
|
+
|
|
235
|
+
The canonized document.
|
|
236
|
+
|
|
237
|
+
***
|
|
238
|
+
|
|
77
239
|
### addRedirect()
|
|
78
240
|
|
|
79
241
|
> `static` **addRedirect**(`from`, `to`): `void`
|
|
@@ -82,14 +244,158 @@ Add a redirect to use during document resolution.
|
|
|
82
244
|
|
|
83
245
|
#### Parameters
|
|
84
246
|
|
|
85
|
-
|
|
247
|
+
##### from
|
|
248
|
+
|
|
249
|
+
`RegExp`
|
|
86
250
|
|
|
87
251
|
The URL to redirect from.
|
|
88
252
|
|
|
89
|
-
|
|
253
|
+
##### to
|
|
254
|
+
|
|
255
|
+
`string`
|
|
90
256
|
|
|
91
257
|
The URL to redirect to.
|
|
92
258
|
|
|
93
259
|
#### Returns
|
|
94
260
|
|
|
95
261
|
`void`
|
|
262
|
+
|
|
263
|
+
***
|
|
264
|
+
|
|
265
|
+
### combineContexts()
|
|
266
|
+
|
|
267
|
+
> `static` **combineContexts**(`context1`, `context2`): `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
268
|
+
|
|
269
|
+
Combine contexts.
|
|
270
|
+
|
|
271
|
+
#### Parameters
|
|
272
|
+
|
|
273
|
+
##### context1
|
|
274
|
+
|
|
275
|
+
The first JSON-LD context to combine.
|
|
276
|
+
|
|
277
|
+
`undefined` | [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
278
|
+
|
|
279
|
+
##### context2
|
|
280
|
+
|
|
281
|
+
The second JSON-LD context to combine.
|
|
282
|
+
|
|
283
|
+
`undefined` | [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
284
|
+
|
|
285
|
+
#### Returns
|
|
286
|
+
|
|
287
|
+
`undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
288
|
+
|
|
289
|
+
The combined context.
|
|
290
|
+
|
|
291
|
+
***
|
|
292
|
+
|
|
293
|
+
### gatherContexts()
|
|
294
|
+
|
|
295
|
+
> `static` **gatherContexts**\<`T`\>(`element`, `initial?`): `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
296
|
+
|
|
297
|
+
Gather all the contexts from the element and it's children.
|
|
298
|
+
|
|
299
|
+
#### Type Parameters
|
|
300
|
+
|
|
301
|
+
##### T
|
|
302
|
+
|
|
303
|
+
`T`
|
|
304
|
+
|
|
305
|
+
#### Parameters
|
|
306
|
+
|
|
307
|
+
##### element
|
|
308
|
+
|
|
309
|
+
`T`
|
|
310
|
+
|
|
311
|
+
The element to gather the contexts from.
|
|
312
|
+
|
|
313
|
+
##### initial?
|
|
314
|
+
|
|
315
|
+
[`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
316
|
+
|
|
317
|
+
The initial context.
|
|
318
|
+
|
|
319
|
+
#### Returns
|
|
320
|
+
|
|
321
|
+
`undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
322
|
+
|
|
323
|
+
The combined contexts.
|
|
324
|
+
|
|
325
|
+
***
|
|
326
|
+
|
|
327
|
+
### removeContexts()
|
|
328
|
+
|
|
329
|
+
> `static` **removeContexts**(`context`, `match?`): `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
330
|
+
|
|
331
|
+
Remove all the contexts that match the pattern.
|
|
332
|
+
|
|
333
|
+
#### Parameters
|
|
334
|
+
|
|
335
|
+
##### context
|
|
336
|
+
|
|
337
|
+
The context to remove the entries from.
|
|
338
|
+
|
|
339
|
+
`undefined` | [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
340
|
+
|
|
341
|
+
##### match?
|
|
342
|
+
|
|
343
|
+
[`IJsonLdContextDefinitionElement`](../type-aliases/IJsonLdContextDefinitionElement.md)[]
|
|
344
|
+
|
|
345
|
+
The element to try and match.
|
|
346
|
+
|
|
347
|
+
#### Returns
|
|
348
|
+
|
|
349
|
+
`undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
350
|
+
|
|
351
|
+
The updated contexts.
|
|
352
|
+
|
|
353
|
+
***
|
|
354
|
+
|
|
355
|
+
### documentCacheAdd()
|
|
356
|
+
|
|
357
|
+
> `static` **documentCacheAdd**(`url`, `ldContext`): `Promise`\<`void`\>
|
|
358
|
+
|
|
359
|
+
Add a context directly to the document loader cache.
|
|
360
|
+
|
|
361
|
+
#### Parameters
|
|
362
|
+
|
|
363
|
+
##### url
|
|
364
|
+
|
|
365
|
+
`string`
|
|
366
|
+
|
|
367
|
+
The url the ld context is for.
|
|
368
|
+
|
|
369
|
+
##### ldContext
|
|
370
|
+
|
|
371
|
+
`unknown`
|
|
372
|
+
|
|
373
|
+
The context to add.
|
|
374
|
+
|
|
375
|
+
#### Returns
|
|
376
|
+
|
|
377
|
+
`Promise`\<`void`\>
|
|
378
|
+
|
|
379
|
+
Nothing.
|
|
380
|
+
|
|
381
|
+
***
|
|
382
|
+
|
|
383
|
+
### documentCacheRemove()
|
|
384
|
+
|
|
385
|
+
> `static` **documentCacheRemove**(`url`): `Promise`\<`void`\>
|
|
386
|
+
|
|
387
|
+
Remove a context from the document loader cache.
|
|
388
|
+
|
|
389
|
+
#### Parameters
|
|
390
|
+
|
|
391
|
+
##### url
|
|
392
|
+
|
|
393
|
+
`string`
|
|
394
|
+
|
|
395
|
+
The url the ld context is for.
|
|
396
|
+
|
|
397
|
+
#### Returns
|
|
398
|
+
|
|
399
|
+
`Promise`\<`void`\>
|
|
400
|
+
|
|
401
|
+
Nothing.
|
package/docs/reference/index.md
CHANGED
|
@@ -8,34 +8,39 @@
|
|
|
8
8
|
|
|
9
9
|
## Interfaces
|
|
10
10
|
|
|
11
|
-
- [
|
|
11
|
+
- [IJsonLdContextDefinition](interfaces/IJsonLdContextDefinition.md)
|
|
12
12
|
- [IJsonLdGraphObject](interfaces/IJsonLdGraphObject.md)
|
|
13
|
+
- [IJsonLdIdMap](interfaces/IJsonLdIdMap.md)
|
|
14
|
+
- [IJsonLdIndexMap](interfaces/IJsonLdIndexMap.md)
|
|
15
|
+
- [IJsonLdJsonObject](interfaces/IJsonLdJsonObject.md)
|
|
16
|
+
- [IJsonLdLanguageMap](interfaces/IJsonLdLanguageMap.md)
|
|
13
17
|
- [IJsonLdListObject](interfaces/IJsonLdListObject.md)
|
|
18
|
+
- [IJsonLdNodeObject](interfaces/IJsonLdNodeObject.md)
|
|
19
|
+
- [IJsonLdObject](interfaces/IJsonLdObject.md)
|
|
14
20
|
- [IJsonLdSetObject](interfaces/IJsonLdSetObject.md)
|
|
15
|
-
- [IJsonLdLanguageMap](interfaces/IJsonLdLanguageMap.md)
|
|
16
|
-
- [IJsonLdIndexMap](interfaces/IJsonLdIndexMap.md)
|
|
17
|
-
- [IJsonLdIdMap](interfaces/IJsonLdIdMap.md)
|
|
18
21
|
- [IJsonLdTypeMap](interfaces/IJsonLdTypeMap.md)
|
|
19
|
-
- [IJsonLdContextDefinition](interfaces/IJsonLdContextDefinition.md)
|
|
20
|
-
- [IJsonLdJsonObject](interfaces/IJsonLdJsonObject.md)
|
|
21
22
|
|
|
22
23
|
## Type Aliases
|
|
23
24
|
|
|
24
|
-
- [IJsonLdDocument](type-aliases/IJsonLdDocument.md)
|
|
25
|
-
- [IJsonLdNodePrimitive](type-aliases/IJsonLdNodePrimitive.md)
|
|
26
|
-
- [IJsonLdValueObject](type-aliases/IJsonLdValueObject.md)
|
|
27
|
-
- [IJsonLdIndexMapItem](type-aliases/IJsonLdIndexMapItem.md)
|
|
28
|
-
- [IJsonLdIncludedBlock](type-aliases/IJsonLdIncludedBlock.md)
|
|
29
|
-
- [IJsonLdExpandedTermDefinition](type-aliases/IJsonLdExpandedTermDefinition.md)
|
|
30
|
-
- [IJsonLdKeyword](type-aliases/IJsonLdKeyword.md)
|
|
31
|
-
- [IJsonLdListOrSetItem](type-aliases/IJsonLdListOrSetItem.md)
|
|
32
25
|
- [IJsonLdContainerType](type-aliases/IJsonLdContainerType.md)
|
|
33
26
|
- [IJsonLdContainerTypeArray](type-aliases/IJsonLdContainerTypeArray.md)
|
|
34
|
-
- [
|
|
27
|
+
- [IJsonLdContextDefinitionElement](type-aliases/IJsonLdContextDefinitionElement.md)
|
|
28
|
+
- [IJsonLdContextDefinitionRoot](type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
29
|
+
- [IJsonLdDocument](type-aliases/IJsonLdDocument.md)
|
|
30
|
+
- [IJsonLdExpandedTermDefinition](type-aliases/IJsonLdExpandedTermDefinition.md)
|
|
31
|
+
- [IJsonLdIncludedBlock](type-aliases/IJsonLdIncludedBlock.md)
|
|
32
|
+
- [IJsonLdIndexMapItem](type-aliases/IJsonLdIndexMapItem.md)
|
|
35
33
|
- [IJsonLdJsonArray](type-aliases/IJsonLdJsonArray.md)
|
|
34
|
+
- [IJsonLdJsonPrimitive](type-aliases/IJsonLdJsonPrimitive.md)
|
|
36
35
|
- [IJsonLdJsonValue](type-aliases/IJsonLdJsonValue.md)
|
|
36
|
+
- [IJsonLdKeyword](type-aliases/IJsonLdKeyword.md)
|
|
37
|
+
- [IJsonLdListOrSetItem](type-aliases/IJsonLdListOrSetItem.md)
|
|
38
|
+
- [IJsonLdNodePrimitive](type-aliases/IJsonLdNodePrimitive.md)
|
|
39
|
+
- [IJsonLdValueObject](type-aliases/IJsonLdValueObject.md)
|
|
40
|
+
- [JsonLdContexts](type-aliases/JsonLdContexts.md)
|
|
37
41
|
- [JsonLdTypes](type-aliases/JsonLdTypes.md)
|
|
38
42
|
|
|
39
43
|
## Variables
|
|
40
44
|
|
|
45
|
+
- [JsonLdContexts](variables/JsonLdContexts.md)
|
|
41
46
|
- [JsonLdTypes](variables/JsonLdTypes.md)
|
|
@@ -8,7 +8,7 @@ https://www.w3.org/TR/json-ld11/#context-definitions
|
|
|
8
8
|
|
|
9
9
|
## Indexable
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
\[`key`: `string`\]: `undefined` \| `null` \| `string` \| `boolean` \| [`IJsonLdExpandedTermDefinition`](../type-aliases/IJsonLdExpandedTermDefinition.md) \| \{ `@container`: `"@set"`; `@protected`: `boolean`; \}
|
|
12
12
|
|
|
13
13
|
## Properties
|
|
14
14
|
|
|
@@ -28,4 +28,4 @@ https://www.w3.org/TR/json-ld11/#graph-objects
|
|
|
28
28
|
|
|
29
29
|
### @context?
|
|
30
30
|
|
|
31
|
-
> `optional` **@context**:
|
|
31
|
+
> `optional` **@context**: [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
@@ -9,4 +9,4 @@ https://www.w3.org/TR/json-ld11/#index-maps
|
|
|
9
9
|
|
|
10
10
|
## Indexable
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
\[`key`: `string`\]: [`IJsonLdIndexMapItem`](../type-aliases/IJsonLdIndexMapItem.md) \| [`IJsonLdIndexMapItem`](../type-aliases/IJsonLdIndexMapItem.md)[]
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Interface: IJsonLdJsonObject
|
|
2
2
|
|
|
3
|
+
JSON Type for object.
|
|
4
|
+
|
|
3
5
|
## Indexable
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
\[`key`: `string`\]: `undefined` \| [`IJsonLdJsonValue`](../type-aliases/IJsonLdJsonValue.md)
|
|
@@ -7,15 +7,23 @@ in the graph serialized by the JSON-LD document.
|
|
|
7
7
|
|
|
8
8
|
https://www.w3.org/TR/json-ld11/#node-objects
|
|
9
9
|
|
|
10
|
+
## Extends
|
|
11
|
+
|
|
12
|
+
- [`IJsonLdObject`](IJsonLdObject.md)
|
|
13
|
+
|
|
10
14
|
## Indexable
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
\[`key`: `string`\]: `undefined` \| `null` \| `string` \| `number` \| `boolean` \| `string`[] \| [`IJsonLdContextDefinition`](IJsonLdContextDefinition.md) \| [`IJsonLdContextDefinitionElement`](../type-aliases/IJsonLdContextDefinitionElement.md)[] \| [`IJsonLdIdMap`](IJsonLdIdMap.md) \| `IJsonLdNodeObject` \| [`IJsonLdListObject`](IJsonLdListObject.md) \| `object` & `object` \| `object` & `object` \| `object` & `object` \| [`IJsonLdSetObject`](IJsonLdSetObject.md) \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md) \| [`IJsonLdIndexMap`](IJsonLdIndexMap.md) \| [`IJsonLdLanguageMap`](IJsonLdLanguageMap.md) \| [`IJsonLdGraphObject`](IJsonLdGraphObject.md) \| `IJsonLdNodeObject`[] \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md)[] \| \{[`key`: `string`]: `string`; \} \| [`IJsonLdTypeMap`](IJsonLdTypeMap.md) \| [`IJsonLdNodePrimitive`](../type-aliases/IJsonLdNodePrimitive.md)[]
|
|
13
17
|
|
|
14
18
|
## Properties
|
|
15
19
|
|
|
16
20
|
### @context?
|
|
17
21
|
|
|
18
|
-
> `optional` **@context**:
|
|
22
|
+
> `optional` **@context**: [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
|
|
23
|
+
|
|
24
|
+
#### Inherited from
|
|
25
|
+
|
|
26
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@context`](IJsonLdObject.md#context)
|
|
19
27
|
|
|
20
28
|
***
|
|
21
29
|
|
|
@@ -23,17 +31,29 @@ https://www.w3.org/TR/json-ld11/#node-objects
|
|
|
23
31
|
|
|
24
32
|
> `optional` **@id**: `string` \| `string`[]
|
|
25
33
|
|
|
34
|
+
#### Inherited from
|
|
35
|
+
|
|
36
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@id`](IJsonLdObject.md#id)
|
|
37
|
+
|
|
26
38
|
***
|
|
27
39
|
|
|
28
40
|
### @included?
|
|
29
41
|
|
|
30
42
|
> `optional` **@included**: [`IJsonLdIncludedBlock`](../type-aliases/IJsonLdIncludedBlock.md)
|
|
31
43
|
|
|
44
|
+
#### Inherited from
|
|
45
|
+
|
|
46
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@included`](IJsonLdObject.md#included)
|
|
47
|
+
|
|
32
48
|
***
|
|
33
49
|
|
|
34
50
|
### @graph?
|
|
35
51
|
|
|
36
|
-
> `optional` **@graph**:
|
|
52
|
+
> `optional` **@graph**: `IJsonLdNodeObject` \| `IJsonLdNodeObject`[]
|
|
53
|
+
|
|
54
|
+
#### Inherited from
|
|
55
|
+
|
|
56
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@graph`](IJsonLdObject.md#graph)
|
|
37
57
|
|
|
38
58
|
***
|
|
39
59
|
|
|
@@ -41,12 +61,20 @@ https://www.w3.org/TR/json-ld11/#node-objects
|
|
|
41
61
|
|
|
42
62
|
> `optional` **@nest**: [`IJsonLdJsonObject`](IJsonLdJsonObject.md) \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md)[]
|
|
43
63
|
|
|
64
|
+
#### Inherited from
|
|
65
|
+
|
|
66
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@nest`](IJsonLdObject.md#nest)
|
|
67
|
+
|
|
44
68
|
***
|
|
45
69
|
|
|
46
70
|
### @type?
|
|
47
71
|
|
|
48
72
|
> `optional` **@type**: `string` \| `string`[]
|
|
49
73
|
|
|
74
|
+
#### Inherited from
|
|
75
|
+
|
|
76
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@type`](IJsonLdObject.md#type)
|
|
77
|
+
|
|
50
78
|
***
|
|
51
79
|
|
|
52
80
|
### @reverse?
|
|
@@ -55,10 +83,18 @@ https://www.w3.org/TR/json-ld11/#node-objects
|
|
|
55
83
|
|
|
56
84
|
#### Index Signature
|
|
57
85
|
|
|
58
|
-
|
|
86
|
+
\[`key`: `string`\]: `string`
|
|
87
|
+
|
|
88
|
+
#### Inherited from
|
|
89
|
+
|
|
90
|
+
[`IJsonLdObject`](IJsonLdObject.md).[`@reverse`](IJsonLdObject.md#reverse)
|
|
59
91
|
|
|
60
92
|
***
|
|
61
93
|
|
|
62
94
|
### @index?
|
|
63
95
|
|
|
64
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`\]: `string`
|
|
59
|
+
|
|
60
|
+
***
|
|
61
|
+
|
|
62
|
+
### @index?
|
|
63
|
+
|
|
64
|
+
> `optional` **@index**: `string`
|