commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [1/7] incubator-commonsrdf git commit: Support Option also for asRDFTermGraphUnion
Date Fri, 07 Oct 2016 15:00:25 GMT
Repository: incubator-commonsrdf
Updated Branches:
  refs/heads/rdf4j 45faf6ee8 -> 3134a2d1d


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/rdf4j
Commit: 850b29c3fe0932882534ab829607e8ac8fb0b5d5
Parents: 45faf6e
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Fri Oct 7 15:36:38 2016 +0100
Committer: Stian Soiland-Reyes <stain@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 
+		
 	}
 
 	/**


Mime
View raw message