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

Andy Seaborne commented on JENA-553:
------------------------------------

Here is an alternative implementation of {{DatasetGraphAltDefaultGraph}} that 
copies and changes the structure of the dataset, hence avoiding all the 
problems of consistently intercepting methods.

However, it requires {{listGraphNodes}} which is potentially expensive. As a 
common case will be to access and change just one of the named  graph, finding 
all graphs is potentially expensive for no real value.  Better would be a 
{{DatasetGraph}} that derives from {{DatasetGraphCollection}} (as does 
{{DatasetGraphMap}}).

{noformat}
    static class DatasetGraphAltDefaultGraph extends DatasetGraphMap
    {
        public DatasetGraphAltDefaultGraph(DatasetGraph dsg, Graph dftGraph) {
            super(dftGraph) ;
            Iterator<Node> gNames = dsg.listGraphNodes() ;
            while(gNames.hasNext()) {
                Node gn = gNames.next() ;
                addGraph(gn, dsg.getGraph(gn)) ;
            }
        }
    } 
{noformat}

> Handling of WITH keyword in SPARQL UPDATE seems to broken in Fuseki 1.0.0.
> --------------------------------------------------------------------------
>
>                 Key: JENA-553
>                 URL: https://issues.apache.org/jira/browse/JENA-553
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ
>    Affects Versions: Jena 2.11.0, Fuseki 1.0.0
>            Reporter: Michael Brunnbauer
>
> This does not generate the triple with "test1" as object:
> {noformat}
> drop graph <http://mytest>;
> insert data { graph <http://mytest> { _:b0 <http://test> "test" }};
> WITH <http://mytest>
> DELETE { ?s ?p "test" }
> INSERT { ?s ?p "test1" }
> WHERE { ?s ?p "test" }
> {noformat}
> But this does (without WITH on default graph):
> {noformat}
> drop DEFAULT;
> insert data { _:b0 <http://test> "test" };
> DELETE { ?s ?p "test" }
> INSERT { ?s ?p "test1" }
> WHERE { ?s ?p "test" }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to