forked from ruzyysmartt/json-ld-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalgorithm-terms.html
More file actions
111 lines (111 loc) · 6.9 KB
/
algorithm-terms.html
File metadata and controls
111 lines (111 loc) · 6.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<dl class="termlist" data-sort>
<dt><dfn data-cite="JSON-LD11-API#dfn-active-graph">active graph</dfn></dt><dd>
The name of the currently active graph that the processor should use when processing.</dd>
<dt><dfn data-cite="JSON-LD11-API#dfn-active-object">active object</dfn></dt><dd>
The currently active object that the processor should use when processing.</dd>
<dt><dfn data-cite="JSON-LD11-API#dfn-active-property">active property</dfn></dt><dd>
The currently active <a>property</a> or <a>keyword</a> that the processor should use when processing.
The <a>active property</a> is represented in the original lexical form,
which is used for finding coercion mappings in the <a>active context</a>.</dd>
<dt><dfn data-cite="JSON-LD11-API#dfn-active-subject">active subject</dfn></dt><dd>
The currently active subject that the processor should use when processing.</dd>
<dt class="changed"><dfn data-cite="JSON-LD11-API#add-value">add value</dfn></dt>
<dd class="algorithm changed">
Used as a macro within various algorithms as a way to add a <var>value</var>
to an <a>entry</a> in a <a>map</a> (<var>object</var>) using a specified <var>key</var>.
The invocation may include an <var>as array</var> flag defaulting to <code>false</code>.
<ol>
<li>If <var>as array</var> is <code>true</code>,
and <var>value</var> is not an <a>array</a>,
set it to an <a>array</a> containing <var>value</var>.</li>
<li>If <var>key</var> is not an entry in <var>object</var>,
add <var>value</var> as the value of <var>key</var> in <var>object</var>.</li>
<li>Otherwise
<ol>
<li>If the value of <var>key</var> <a>entry</a> in <var>object</var> is not an <a>array</a>,
set it to a new <a>array</a> containing the original value.</li>
<li>If <var>value</var> is an <a>array</a>, concatenate <var>value</var>
to that <a>entry</a>.</li>
<li>Otherwise, append <var>value</var> to that <a>entry</a>.</li>
</ol>
</ol>
</dd>
<dt><dfn data-cite="JSON-LD11-FRAMING#dfn-expicit-inclusion-flag">explicit inclusion flag</dfn></dt><dd>
A flag specifying that for <a>properties</a> to be included in the output,
they must be explicitly declared in the matching <a>frame</a>.</dd>
<dt><dfn data-cite="JSON-LD11-FRAMING#dfn-framing-state">framing state</dfn></dt><dd>
A <a>map</a> containing values for
the <a>object embed flag</a>,
the <a>require all flag</a>,
<span class="changed">the <a data-cite="JSON-LD11-FRAMING#dfn-embedded-flag">embedded flag</a>,
used internally to help determine if object embedding is appropriate,</span>
the <a>explicit inclusion flag</a>,
and the <a>omit default flag</a>.</dd>
<dt class="changed"><dfn data-cite="JSON-LD11-API#dfn-iri-compacting">IRI compacting</dfn></dt>
<dd class="algorithm changed">
Used as a macro within various algorithms as to reduce the language used to describe
the process of compacting a <a>string</a> <var>var</var> representing an <a>IRI</a> or <a>keyword</a>
using an <var>active context</var> either specified directly, or coming from the scope of
the algorithm step using this term.
An optional <var>value</var> is used, if explicitly provided.
Unless specified, the <var>vocab</var> flag defaults to `true`,
and the <var>reverse</var> flag defaults to `false`.
<ol>
<li>Return the result of using the <a data-cite="JSON-LD11-API#iri-compaction">IRI Compaction algorithm</a>,
passing <var>active context</var>,
<var>var</var>,
<var>value</var> (if supplied),
<var>vocab</var>,
and <var>result</var>.</li>
</ol>
</dd>
<dt class="changed"><dfn data-cite="JSON-LD11-API#dfn-iri-expanding">IRI expanding</dfn></dt>
<dd class="algorithm changed">
Used as a macro within various algorithms as to reduce the language used to describe
the process of expanding a <a>string</a> <var>value</var> representing an <a>IRI</a> or <a>keyword</a>
using an <var>active context</var> either specified directly, or coming from the scope of
the algorithm step using this term.
Optional <var>defined</var> and <var>local context</var> arguments are used, if explicitly provided.
Unless specified,
the <var>document relative</var> flag defaults to `false`,
and the <var>vocab</var> flag defaults to `true`.
<ol>
<li>Return the result of using the <a href="#iri-expansion">IRI Expansion algorithm</a>,
passing <var>active context</var>,
<var>value</var>,
<var>local context</var> (if supplied),
<var>defined</var> (if supplied),
<var>document relative</var>,
and <var>vocab</var>.</li>
</ol>
</dd>
<dt><dfn data-cite="JSON-LD11-FRAMING#dfn-input-frame">input frame</dfn></dt><dd>
The initial <a>Frame</a> provided to the framing algorithm.</dd>
<dt><dfn data-cite="JSON-LD11-API#dfn-json-ld-input">JSON-LD input</dfn></dt><dd>
The JSON-LD data structure that is provided as input to the algorithm.</dd>
<dt><dfn data-cite="JSON-LD11-API#dfn-json-ld-output">JSON-LD output</dfn></dt><dd>
The JSON-LD data structure that is produced as output by the algorithm.</dd>
<dt><dfn data-cite="JSON-LD11-FRAMING#dfn-map-of-flattened-subjects">map of flattened subjects</dfn></dt><dd>
A map of subjects that is the result of the
<a data-cite="JSON-LD11-API#node-map-generation">Node Map Generation algorithm</a>.</dd>
<dt><dfn data-cite="JSON-LD11-FRAMING#dfn-object-embed-flag">object embed flag</dfn></dt><dd>
A flag specifying that <a>node objects</a> should be directly embedded in the output,
instead of being referred to by their <a>IRI</a>.</dd>
<dt><dfn data-cite="JSON-LD11-FRAMING#dfn-omit-default-flag">omit default flag</dfn></dt><dd>
A flag specifying that properties that are missing from the <a>JSON-LD input</a>,
but present in the <a>input frame</a>,
should be omitted from the output.</dd>
<dt class="changed"><dfn data-cite="JSON-LD11-FRAMING#dfn-omit-graph-flag">omit graph flag</dfn></dt><dd class="changed">
A flag that determines if framing output is always contained within a <code>@graph</code> <a>entry</a>,
or only if required to represent multiple <a>node objects</a>.</dd>
<dt><dfn data-cite="JSON-LD11-API#dfn-processor-state">processor state</dfn></dt><dd>
The <a>processor state</a>,
which includes the <a>active context</a>, <a>active subject</a>, and <a>active property</a>.
The <a>processor state</a> is managed as a stack with elements from the previous <a>processor state</a>
copied into a new <a>processor state</a> when entering a new <a>JSON object</a>.</dd>
<dt><dfn data-cite="JSON-LD11-FRAMING#dfn-require-all-flag">require all flag</dfn></dt><dd>
A flag specifying that all properties present in the <a>input frame</a>
must either have a default value
or be present in the <a>JSON-LD input</a>
for the frame to match.</dd>
</dl>