Skip to content

Update fromRdf algorithm to consider list nodes that are in multiple graphs #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 21 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ <h3>Algorithm</h3>
<code>@vocab</code> key.</li>
<li>If <var>value</var> is <a>null</a>, remove
any <a>vocabulary mapping</a> from <var>result</var>.</li>
<li class="changed">Otherewise, if <var>value</var>
<li class="changed">Otherwise, if <var>value</var>
the empty string (<code>&quot;&quot;</code>),
the effective value is the current <a>base IRI</a>.</li>
<li>Otherwise, if <var>value</var> is
Expand Down Expand Up @@ -4022,7 +4022,7 @@ <h2>Algorithm</h2>
<li>Initialize <var>graph map</var> to a <a class="changed">dictionary</a> consisting
of a single member <code>@default</code> whose value references
<var>default graph</var>.</li>
<li>Initialize <var>node usage map</var> to an empty <a class="changed">dictionary</a>.</li>
<li class="changed">Initialize <var>referenced once</var> to an empty <a>dictionary</a>.</li>
<li>For each <var>graph</var> in <var>dataset</var>:
<ol>
<li>If <var>graph</var> is the <a>default graph</a>,
Expand Down Expand Up @@ -4069,19 +4069,24 @@ <h2>Algorithm</h2>
associated with the <var>predicate</var> member of <var>node</var>, append a
reference to <var>value</var> to the <a>array</a>. Two JSON objects
are considered equal if they have equivalent key-value pairs.</li>
<li>If <var>object</var> is a <a>blank node identifier</a> or <a>IRI</a>,
it might represent the list node:
<li class="changed">If <var>object</var> is <code>rdf:nil</code>, it represents
the termination of an <a>RDF collection</a>:
<ol>
<li>If the <var>object</var> member of <var>node usage map</var> does not exist,
initialize it to a new empty <a>array</a>.</li>
<li>Append the value of the <code>@id</code> member of <code>node</code> to
the <var>object</var> member of <var>node usage map</var>.</li>
<li>If the <var>object</var> member of <var>node map</var> has no
<code>usages</code> member, create one and initialize it to
an empty <a>array</a>.</li>
<li>Reference the <code>usages</code> member of the <var>object</var>
member of <var>node map</var> using the variable <var>usages</var>.</li>
<li>Append a new <a class="changed">dictionary</a> consisting of three
<li>Append a new <a>dictionary</a> consisting of three
members, <code>node</code>, <code>property</code>, and <code>value</code>
to the <var>usages</var> <a>array</a>. The <code>node</code> member
is set to a reference to <var>node</var>, <code>property</code> to <var>predicate</var>,
and <code>value</code> to a reference to <var>value</var>.</li>
</ol>
</li>
<li class="changed">Otherwise, if <var>referenced once</var> has an entry for <var>object</var>,
set the <var>object</var> member of <var>referenced once</var> to <code>false</code>.</li>
<li class="changed">Otherwise, if <var>object</var> is a <a>blank node identifier</a>,
it might represent a list node:
<ol>
<li>Set the <var>object</var> member of <var>referenced once</var> to a new <a>dictionary</a> consisting of three
members, <code>node</code>, <code>property</code>, and <code>value</code>
to the <var>usages</var> <a>array</a>. The <code>node</code> member
is set to a reference to <var>node</var>, <code>property</code> to <var>predicate</var>,
Expand Down Expand Up @@ -4112,11 +4117,8 @@ <h2>Algorithm</h2>
<li>While <var>property</var> equals <code>rdf:rest</code>,
<span class="changed">the value of the <code>@id</code> member
of <var>node</var> is a <a>blank node identifier</a>,</span>
the <a>array</a> value of the member of <var>node usage map</var> associated with the <code>@id</code>
member of <code>node</code> has only one member,
<span class="changed">
the value associated to the <code>usages</code> member of <i>node</i> has
exactly 1 entry,</span>
the value of the member of <var>referenced once</var> associated with the <code>@id</code>
member of <code>node</code> is a <a>dictionary</a>,
<var>node</var> has a <code>rdf:first</code> and <code>rdf:rest</code> property,
both of which have as value an <a>array</a> consisting of a single element,
and <var>node</var> has no other members apart from an optional <code>@type</code>
Expand All @@ -4129,8 +4131,8 @@ <h2>Algorithm</h2>
<var>node</var> to the <var>list</var> <a>array</a>.</li>
<li>Append the value of the <code>@id</code> member of
<var>node</var> to the <var>list nodes</var> <a>array</a>.</li>
<li>Initialize <var>node usage</var> to the only item of the
<code>usages</code> member of <var>node</var>.</li>
<li>Initialize <var>node usage</var> to the value of the member of <var>referenced once</var> associated with the <code>@id</code>
member of <code>node</code>.</li>
<li>Set <var>node</var> to the value of the <code>node</code> member
of <var>node usage</var>, <var>property</var> to the value of the
<code>property</code> member of <var>node usage</var>, and
Expand Down