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 2017/12/21 10:59:49 UTC

[GitHub] jena pull request #333: JENA-1451: "contains" for special graphs

GitHub user afs opened a pull request:

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

    JENA-1451: "contains" for special graphs

    

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

    $ git pull https://github.com/afs/jena contains-special-graphs

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

    https://github.com/apache/jena/pull/333.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 #333
    
----
commit 178b03cbe81c11e0123b0ded0fd17402896257a2
Author: Andy Seaborne <an...@...>
Date:   2017-12-21T10:53:20Z

    JENA-1451: "contains" for special graphs

----


---

[GitHub] jena pull request #333: JENA-1451: "contains" for special graphs

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

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


---

[GitHub] jena pull request #333: JENA-1451: "contains" for special graphs

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

    https://github.com/apache/jena/pull/333#discussion_r158256408
  
    --- Diff: jena-arq/src/test/java/org/apache/jena/sparql/core/AbstractTestDataset.java ---
    @@ -116,4 +116,24 @@
             ds.addNamedModel(graphName, model1) ;
             assertFalse("Dataset should not be empty after a named graph has been added!", ds.isEmpty());
         }
    +    
    +    @Test public void dataset_07()
    +    {
    +        String graphName = "http://example/" ;
    +        Dataset ds = createDataset() ;
    +        ds.addNamedModel(graphName, model1) ;
    +        assertTrue("Named graph not found", ds.containsNamedModel(graphName));
    +    }
    +    
    +    // Even if empty, union and named default graph exist (sort of).
    +
    +    @Test public void dataset_08() {
    +        Dataset ds = createDataset();
    +        assertTrue("Union named graph not found", ds.containsNamedModel(Quad.unionGraph.getURI()));
    +    }
    +
    +    @Test public void dataset_09() {
    +        Dataset ds = createDataset();
    +        assertTrue("Named default graph not found", ds.containsNamedModel(Quad.defaultGraphIRI.getURI()));
    --- End diff --
    
    This message seems a little confusing to me (`Named default graph`), maybe:
    ```
    Default graph not found under its URI ( "+Quad.defaultGraphIRI.getURI()+" )"
    ```
    is verbose, but very clear.


---