[
https://issues.apache.org/jira/browse/JENA-1158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15368093#comment-15368093
]
ASF GitHub Bot commented on JENA-1158:
--------------------------------------
Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/152#discussion_r70116076
--- Diff: jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphOps.java
---
@@ -29,60 +29,49 @@
import org.apache.jena.sparql.core.Quad ;
// Combine with Jena GraphUtils.
-public class GraphOps
-{
-
- public static boolean containsGraph(DatasetGraph dsg, Node gn)
- {
- // [[DynDS]]
- if ( Quad.isDefaultGraph(gn))
+public class GraphOps {
+ public static boolean containsGraph(DatasetGraph dsg, Node gn) {
+ if ( Quad.isDefaultGraph(gn) )
return true ;
- if ( Quad.isUnionGraph(gn))
+ if ( Quad.isUnionGraph(gn) )
return true ;
return dsg.containsGraph(gn) ;
}
-
- public static Graph getGraph(DatasetGraph dsg, Node gn)
- {
- // [[DynDS]]
+
+ public static Graph getGraph(DatasetGraph dsg, Node gn) {
if ( gn == null )
return dsg.getDefaultGraph() ;
if ( Quad.isDefaultGraph(gn) )
// Explicit or generated.
return dsg.getDefaultGraph() ;
- if ( Quad.isUnionGraph(gn))
+ if ( Quad.isUnionGraph(gn) )
return unionGraph(dsg) ;
return dsg.getGraph(gn) ;
}
-
- public static Graph unionGraph(DatasetGraph dsg)
- {
+
+ public static Graph unionGraph(DatasetGraph dsg) {
+ // Snapshot it now.
--- End diff --
How come a snapshot here? I have no objection to it (other than the cost of
rolling up), just wondering. Is it because of potential
`ConcurrentModificationException`s?
> Provide unionDefaultGraph for all graphs.
> -----------------------------------------
>
> Key: JENA-1158
> URL: https://issues.apache.org/jira/browse/JENA-1158
> Project: Apache Jena
> Issue Type: Improvement
> Components: ARQ
> Affects Versions: Jena 3.0.1
> Reporter: Andy Seaborne
>
> Provide "unionDefaultGraph" for all graphs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)