[
https://issues.apache.org/jira/browse/JENA-553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13786512#comment-13786512
]
Andy Seaborne commented on JENA-553:
------------------------------------
This is a better approach: it catches all graph level operations. I'll commit
this to the code base.
{noformat}
static class DatasetGraphAltDefaultGraph extends DatasetGraphCollection {
private Graph defaultGraph ;
private final DatasetGraph dsg ;
public DatasetGraphAltDefaultGraph(DatasetGraph dsg, Graph
defaultGraph) {
this.defaultGraph = defaultGraph ;
this.dsg = dsg ;
}
@Override
public Iterator<Node> listGraphNodes() {
return dsg.listGraphNodes() ;
}
@Override
public Graph getDefaultGraph() {
return defaultGraph ;
}
@Override
public Graph getGraph(Node graphNode) {
return dsg.getGraph(graphNode) ;
}
@Override
public void addGraph(Node graphName, Graph graph) {
dsg.addGraph(graphName, graph); }
@Override
public void removeGraph(Node graphName) {
dsg.removeGraph(graphName); }
}
{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)