jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [7/9] jena git commit: JENA-1074: Provide Dataset.getUnionModel()
Date Thu, 08 Jun 2017 14:38:25 GMT
JENA-1074: Provide Dataset.getUnionModel()

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/8a6ad81c
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/8a6ad81c
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/8a6ad81c

Branch: refs/heads/master
Commit: 8a6ad81cb4692790b6afe2268c2d7310da035cda
Parents: a016916
Author: Andy Seaborne <andy@apache.org>
Authored: Sun Jun 4 09:57:34 2017 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Sun Jun 4 09:58:46 2017 +0100

----------------------------------------------------------------------
 jena-arq/src/main/java/org/apache/jena/query/Dataset.java       | 3 +++
 .../src/main/java/org/apache/jena/sparql/core/DatasetImpl.java  | 5 +++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/8a6ad81c/jena-arq/src/main/java/org/apache/jena/query/Dataset.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/query/Dataset.java b/jena-arq/src/main/java/org/apache/jena/query/Dataset.java
index 4ab06f5..db88642 100644
--- a/jena-arq/src/main/java/org/apache/jena/query/Dataset.java
+++ b/jena-arq/src/main/java/org/apache/jena/query/Dataset.java
@@ -35,6 +35,9 @@ public interface Dataset extends Transactional
     /** Get the default graph as a Jena Model */
     public Model getDefaultModel() ;
     
+    /** Get the graph which is teh unionof all named graphs as a Jena Model */
+    public Model getUnionModel() ;
+
     /** Set the default graph.  Can be set to null for none. */ 
     public void  setDefaultModel(Model model) ;
 

http://git-wip-us.apache.org/repos/asf/jena/blob/8a6ad81c/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java
index 60fa30f..2216d2f 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetImpl.java
@@ -83,6 +83,11 @@ public class DatasetImpl implements Dataset
     }
 
     @Override
+    public Model getUnionModel() {
+        return ModelFactory.createModelForGraph(dsg.getUnionGraph()) ;
+    }
+
+    @Override
     public Lock getLock() { return dsg.getLock() ; }
 
     @Override


Mime
View raw message