You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by afs <gi...@git.apache.org> on 2018/03/15 11:33:33 UTC

[GitHub] jena pull request #384: JENA-1158: Make the union graph a graphView(Quad.uni...

GitHub user afs opened a pull request:

    https://github.com/apache/jena/pull/384

    JENA-1158: Make the union graph a graphView(Quad.unionGraph).

    Don't rely on the default implementation in DatasetGraphBase.

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

    $ git pull https://github.com/afs/jena union-quad-graph

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

    https://github.com/apache/jena/pull/384.patch

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

    This closes #384
    
----
commit edb66959c5d8a0ca8ab7578bf1258e6d4e1eb9d7
Author: Andy Seaborne <an...@...>
Date:   2018-03-15T11:31:46Z

    JENA-1158: Make the union graph a graphView(Quad.unionGraph).
    
    Don't rely on the default implementation in DatasetGraphBase.

----


---

[GitHub] jena pull request #384: JENA-1158: Make the union graph a graphView(Quad.uni...

Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:

    https://github.com/apache/jena/pull/384#discussion_r174826544
  
    --- Diff: jena-arq/src/main/java/org/apache/jena/sparql/core/GraphView.java ---
    @@ -146,7 +148,7 @@ private static Node graphNode(Node gn) {
         public void performAdd( Triple t ) { 
             Node g = graphNode(gn) ;
             if ( Quad.isUnionGraph(g) )
    -            throw new GraphViewException("Can't update the default union graph of a dataset") ; 
    +            throw new AddDeniedException("Can't update the union graph of a dataset") ; 
    --- End diff --
    
    Holy moly, I had no idea we had these. II'm going to remember these, they are way more specific than `UnsupportedOperationException`.


---

[GitHub] jena pull request #384: JENA-1158: Make the union graph a graphView(Quad.uni...

Posted by afs <gi...@git.apache.org>.
Github user afs commented on a diff in the pull request:

    https://github.com/apache/jena/pull/384#discussion_r174896205
  
    --- Diff: jena-arq/src/main/java/org/apache/jena/sparql/core/GraphView.java ---
    @@ -146,7 +148,7 @@ private static Node graphNode(Node gn) {
         public void performAdd( Triple t ) { 
             Node g = graphNode(gn) ;
             if ( Quad.isUnionGraph(g) )
    -            throw new GraphViewException("Can't update the default union graph of a dataset") ; 
    +            throw new AddDeniedException("Can't update the union graph of a dataset") ; 
    --- End diff --
    
    It's pushing the "contract". "Denied" suggests to me that it could work in other circumstances but the tests said this was expected so this is what you get.


---

[GitHub] jena pull request #384: JENA-1158: Make the union graph a graphView(Quad.uni...

Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:

    https://github.com/apache/jena/pull/384#discussion_r174825806
  
    --- Diff: jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphBase.java ---
    @@ -69,9 +69,11 @@ public boolean containsGraph(Node graphNode) {
         @Override
         public Graph getUnionGraph() {
             // Implementations are encouraged to implement an efficent
    -        // {@code DatasetGraphBase.findQuadsInUnionGraph} or
    +        // named graph for Quad.unionGraph, and this operation that
    --- End diff --
    
    Does this belong in a Javadoc, like maybe `@apiNote`?


---

[GitHub] jena pull request #384: JENA-1158: Make the union graph a graphView(Quad.uni...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/jena/pull/384


---