You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by st...@apache.org on 2016/10/07 15:01:46 UTC

[43/50] incubator-commonsrdf git commit: Support Option also for asRDFTermGraphUnion

Support Option also for asRDFTermGraphUnion


Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/850b29c3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/850b29c3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/850b29c3

Branch: refs/heads/master
Commit: 850b29c3fe0932882534ab829607e8ac8fb0b5d5
Parents: 45faf6e
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Fri Oct 7 15:36:38 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Fri Oct 7 15:36:38 2016 +0100

----------------------------------------------------------------------
 .../org/apache/commons/rdf/rdf4j/RDF4JTermFactory.java | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/850b29c3/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTermFactory.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTermFactory.java b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTermFactory.java
index 634648a..2456714 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTermFactory.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/RDF4JTermFactory.java
@@ -333,7 +333,7 @@ public final class RDF4JTermFactory implements RDFTermFactory {
 		return rdf4j.createRepositoryGraphImpl(repository, 
 				opts.contains(Option.handleInitAndShutdown), 
 				opts.contains(Option.includeInferred), 
-				new Resource[0]);
+				new Resource[]{null}); // default graph
 	}
 
 	/**
@@ -345,10 +345,17 @@ public final class RDF4JTermFactory implements RDFTermFactory {
 	 *
 	 * @param repository
 	 *            RDF4J {@link Repository} to connect to.
+	 * @param options
+	 *            Zero or more {@link Option}
 	 * @return A union {@link Graph} backed by the RDF4J repository.
 	 */
-	public RDF4JGraph asRDFTermGraphUnion(Repository repository) {
-		return rdf4j.createRepositoryGraphImpl(repository, false, true);
+	public RDF4JGraph asRDFTermGraphUnion(Repository repository, Option... options) {
+		EnumSet<Option> opts = optionSet(options);
+		return rdf4j.createRepositoryGraphImpl(repository, 
+				opts.contains(Option.handleInitAndShutdown), 
+				opts.contains(Option.includeInferred),
+				new Resource[]{}); // union graph 
+		
 	}
 
 	/**