commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (COMMONSRDF-55) Stream of Jena quads use wrong IRI for default graph
Date Fri, 27 Jan 2017 17:30:25 GMT


ASF GitHub Bot commented on COMMONSRDF-55:

GitHub user stain opened a pull request:

    COMMONSRDF-55: Handle Jena's urn:x-arq:DefaultGraph and friends

    This fixes [COMMONSRDF-55]( by adding
special testing of Jena's `urn:x-arq:DefaultGraph` and friends when creating a Quad.
    It also fixes a NullPointerException as previously we wrongly  did `Quad.create(null,
s,p,o)` with Jena, but `null` is not a valid graph name - `Quad.defaultGraphIRI` should be
used instead.
    Note that I did not hard-code `urn:x-arq:DefaultGraph` but use `IRI.equals()` against
`Quad.defaultGraphIRI` and `Quad.defaultGraphNodeGenerated`.

You can merge this pull request into a Git repository by running:

    $ git pull COMMONSRDF-55

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #32
commit bb264738aa0e3c3a8e9ae8bba0d7109cfb59adaa
Author: Stian Soiland-Reyes <>
Date:   2017-01-27T17:26:59Z

    COMMONSRDF-55: Handle Jena's urn:x-arq:DefaultGraph and friends


> Stream of Jena quads use wrong IRI for default graph
> ----------------------------------------------------
>                 Key: COMMONSRDF-55
>                 URL:
>             Project: Apache Commons RDF
>          Issue Type: Bug
>          Components: jena
>    Affects Versions: 0.3.0
>            Reporter: Stian Soiland-Reyes
>             Fix For: 1.0.0
> See
> {code}
> org.apache.commons.rdf.jena.DatasetJenaTest
> streamLanguageTagsCaseInsensitive(org.apache.commons.rdf.jena.DatasetJenaTest)  Time
elapsed: 0.012 sec  <<< FAILURE!
> java.lang.AssertionError: expected:<<> <>
"Hello"@EN-GB <urn:x-arq:DefaultGraph>.> but was:<<>
<> "Hello"@en-GB .>
> {code}
> Jena uses the IRI `<urn:x-arq:DefaultGraph>` internally to represent the default
graph within datasets - we need to recognize that on the way out of a ``
and possibly in the `asQuad(JenaQuad)` converter and replace it with `Optional.empty()` so
the default graph appears the same across implementations.
> The `AbstractDatasetTest`  should be augmented to do more tests on the default graph,
including `.stream()`, `.iterate()`, `.contains()` and `.remove()`1.

This message was sent by Atlassian JIRA

View raw message