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

Adam Jacobs commented on JENA-1499:
-----------------------------------

>From the API side, I've noticed empty graphs are consistently treated as 
>"unimportant" and are often created superfluously.

 

{{Dataset ds = DatasetFactory.create();}}
{{ds.containsNamedModel("foo");}}
{{ds.removeNamedModel("bar");}}
{{Iterator<String> iterator = ds.listNames();}}
{{System.out.println(iterator.next());}}
{{System.out.println(iterator.next());}}

 

As mentioned, this is significant when serializing to TRIG.

> 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