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

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

The other case is the default in-memory dataset ({{DatasetFactory.create()}}.

It's a one line change to {{DatasetGraphMap.listGraphNodes}} to make not reveal 
empty graphs.

{{containsGraph}} already works - it looks for quads not for graph in the map. 
(It could be slightly done as an override.)

{nofomat}
== default
Contains: false
-- listGraphNodes
(none)
-- dump
(empty)

== general
Contains: true
-- listGraphNodes
        http://example/g
-- dump
<http://example/g> {
}
{nofomat}

With PR 374, TIM and TDB are the same as "default".


> 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
>            Assignee: A. Soroka
>            Priority: Minor
>
> 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