[ 
https://issues.apache.org/jira/browse/JENA-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16389764#comment-16389764
 ] 

Andy Seaborne commented on JENA-1499:
-------------------------------------

This shows an inconsistency with {{dsg.containsGraph}}.
This _might_ have knock on effects.

{noformat}
    public static void main(String... args) throws Exception {
        dwim("general", DatasetGraphFactory.createGeneral());
        System.out.println();
        dwim("TIM", DatasetGraphFactory.createTxnMem());
        System.out.println("-- --");
        System.out.println("DONE");
        System.exit(0);
    }
    
    public static void dwim(String label, DatasetGraph dsg) throws Exception {
        System.out.println("== "+label);
        Node gn = NodeFactory.createURI("http://example/g";) ;
        Quad q = SSE.parseQuad("(:g :s :p :o)");
        dsg.add(q);
        dsg.delete(q);
//        UpdateAction.parseExecute("CREATE GRAPH <http://example/g2>", dsg);
        System.out.println("Contains: "+dsg.containsGraph(gn));
        System.out.println("-- listGraphNodes");
        Iter.print(dsg.listGraphNodes());
        System.out.println("-- dump");
        RDFDataMgr.write(System.out, dsg, Lang.TRIG);
        return;
    }
{noformat}

> The TIM dataset retains a memory of named graphs after deleting all quads.
> --------------------------------------------------------------------------
>
>                 Key: JENA-1499
>                 URL: https://issues.apache.org/jira/browse/JENA-1499
>             Project: Apache Jena
>          Issue Type: Bug
>    Affects Versions: Jena 3.6.0
>            Reporter: Andy Seaborne
>            Priority: Major
>
> Illustration:
> {noformat}
>         DatasetGraph dsg = DatasetGraphFactory.createTxnMem();
>         Quad q = SSE.parseQuad("(:g :s :p :o)");
>         dsg.add(q);
>         dsg.delete(q);
>         Iter.print(dsg.listGraphNodes());
> {noformat}
> prints {{http://example/g}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to