You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2015/11/16 13:05:10 UTC

[jira] [Created] (JENA-1069) Simpify the internal naming of the default graph (Quad constants)

Andy Seaborne created JENA-1069:
-----------------------------------

             Summary: Simpify the internal naming of the default graph (Quad constants)
                 Key: JENA-1069
                 URL: https://issues.apache.org/jira/browse/JENA-1069
             Project: Apache Jena
          Issue Type: Improvement
          Components: ARQ
    Affects Versions: Jena 3.0.0
            Reporter: Andy Seaborne
            Assignee: Andy Seaborne


There are two different constants for the default graph for what seemed at the time, slightly different situations. The idea was that quads from the default graph of a dataset would be {{Quad.defaultGraphIRI}} and quads created by parsers, would be {{Quad.defaultGraphNodeGenerated}}. The idea was that the output of the parser was "default graph" but it was being redirected into a named graph. This does not now seem useful.

{{Quad.defaultGraphIRI}} = {{<urn:x-arq:DefaultGraph>}}

{{Quad.defaultGraphNodeGenerated}} = {{<urn:x-arq:DefaultGraphNode>}}

In SPARQL, the application is using {{GRAPH <urn:x-arq:DefaultGraph>}}. Using {{<urn:x-arq:DefaultGraphNode>}} wil not work consistently.

The proposal is to combine these two as {{Quad.defaultGraphIRI}}, possible migrate to {{Quad.defaultGraph}}, or even a class or enum for the graph naming constants.

These constants should never have been written to disk in database, certainly not {{<urn:x-arq:DefaultGraphNode>}}, but just to make sure, the operation {{Quad.isDefaultGraph(Node)}} can take the old name into account for a release cycle.

Nearly all the changes are in tests where the expected output has been explicitly written into test results.

There is another, little used, constant -- {{Quad.tripleInQuad}} -- for when a triple is in a quad just to be transported around, meaning "meaningless", "unknown" or "doesn't matter".  This would not change. It exists to be different from {{Quad.defaultGraphIRI}}.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)