jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject [08/44] jena git commit: Cleaner threading of Context through constructors and statics
Date Sat, 06 Jan 2018 15:17:32 GMT
Cleaner threading of Context through constructors and statics


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

Branch: refs/heads/master
Commit: a533aefa8e5483abf74d18f6f5a2046ef58d6705
Parents: d0101ac
Author: ajs6f <ajs6f@apache.org>
Authored: Sat Nov 4 14:02:07 2017 -0400
Committer: ajs6f <ajs6f@apache.org>
Committed: Fri Jan 5 09:26:07 2018 -0500

----------------------------------------------------------------------
 .../java/org/apache/jena/query/util/DatasetLib.java   | 14 +++-----------
 .../jena/sparql/util/DifferenceDatasetGraph.java      |  4 ----
 .../jena/sparql/util/IntersectionDatasetGraph.java    |  4 ----
 .../apache/jena/sparql/util/UnionDatasetGraph.java    |  8 ++------
 .../org/apache/jena/sparql/util/ViewDatasetGraph.java |  4 ----
 5 files changed, 5 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/a533aefa/jena-arq/src/main/java/org/apache/jena/query/util/DatasetLib.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/query/util/DatasetLib.java b/jena-arq/src/main/java/org/apache/jena/query/util/DatasetLib.java
index 9501375..4ac9482 100644
--- a/jena-arq/src/main/java/org/apache/jena/query/util/DatasetLib.java
+++ b/jena-arq/src/main/java/org/apache/jena/query/util/DatasetLib.java
@@ -4,25 +4,17 @@ import org.apache.jena.query.Dataset;
 import org.apache.jena.query.DatasetFactory;
 import org.apache.jena.sparql.util.Context;
 import org.apache.jena.sparql.util.DifferenceDatasetGraph;
+import org.apache.jena.sparql.util.IntersectionDatasetGraph;
 import org.apache.jena.sparql.util.UnionDatasetGraph;
 
 public class DatasetLib {
 
-	public static Dataset union(final Dataset d1, final Dataset d2) {
-		return DatasetFactory.wrap(new UnionDatasetGraph(d1.asDatasetGraph(), d2.asDatasetGraph()));
-	}
-
 	public static Dataset union(final Dataset d1, final Dataset d2, Context c) {
 		return DatasetFactory.wrap(new UnionDatasetGraph(d1.asDatasetGraph(), d2.asDatasetGraph(),
c));
 	}
 
-	public static Dataset intersection(final Dataset d1, final Dataset d2) {
-		// TODO
-		throw new UnsupportedOperationException();
-	}
-
-	public static Dataset difference(final Dataset d1, final Dataset d2) {
-		return DatasetFactory.wrap(new DifferenceDatasetGraph(d1.asDatasetGraph(), d2.asDatasetGraph()));
+	public static Dataset intersection(final Dataset d1, final Dataset d2, Context c) {
+		return DatasetFactory.wrap(new IntersectionDatasetGraph(d1.asDatasetGraph(), d2.asDatasetGraph(),
c));
 	}
 
 	public static Dataset difference(final Dataset d1, final Dataset d2, Context c) {

http://git-wip-us.apache.org/repos/asf/jena/blob/a533aefa/jena-arq/src/main/java/org/apache/jena/sparql/util/DifferenceDatasetGraph.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/util/DifferenceDatasetGraph.java
b/jena-arq/src/main/java/org/apache/jena/sparql/util/DifferenceDatasetGraph.java
index 9df3622..bf51da8 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/util/DifferenceDatasetGraph.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/util/DifferenceDatasetGraph.java
@@ -12,10 +12,6 @@ import org.apache.jena.sparql.core.DatasetGraph;
 
 public class DifferenceDatasetGraph extends ViewDatasetGraph {
 
-	public DifferenceDatasetGraph(DatasetGraph left, DatasetGraph right) {
-		this(left, right, Context.emptyContext);
-	}
-
 	public DifferenceDatasetGraph(DatasetGraph left, DatasetGraph right, Context c) {
 		super(left, right, c);
 	}

http://git-wip-us.apache.org/repos/asf/jena/blob/a533aefa/jena-arq/src/main/java/org/apache/jena/sparql/util/IntersectionDatasetGraph.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/util/IntersectionDatasetGraph.java
b/jena-arq/src/main/java/org/apache/jena/sparql/util/IntersectionDatasetGraph.java
index 32cc847..3d845b5 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/util/IntersectionDatasetGraph.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/util/IntersectionDatasetGraph.java
@@ -12,10 +12,6 @@ import org.apache.jena.sparql.core.DatasetGraph;
 
 public class IntersectionDatasetGraph extends ViewDatasetGraph {
 
-	public IntersectionDatasetGraph(DatasetGraph left, DatasetGraph right) {
-		super(left, right);
-	}
-
 	public IntersectionDatasetGraph(DatasetGraph left, DatasetGraph right, Context c) {
 		super(left, right, c);
 	}

http://git-wip-us.apache.org/repos/asf/jena/blob/a533aefa/jena-arq/src/main/java/org/apache/jena/sparql/util/UnionDatasetGraph.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/util/UnionDatasetGraph.java b/jena-arq/src/main/java/org/apache/jena/sparql/util/UnionDatasetGraph.java
index cc83b81..16d18be 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/util/UnionDatasetGraph.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/util/UnionDatasetGraph.java
@@ -12,12 +12,8 @@ import org.apache.jena.sparql.core.Quad;
 
 public class UnionDatasetGraph extends ViewDatasetGraph {
 
-    public UnionDatasetGraph(DatasetGraph left, DatasetGraph right) {
-        this(left, right, Context.emptyContext);
-    }
-
-    public UnionDatasetGraph(DatasetGraph left, DatasetGraph right, Context context) {
-        super(left, right);
+    public UnionDatasetGraph(DatasetGraph left, DatasetGraph right, Context c) {
+        super(left, right, c);
     }
 
     private Graph union(Function<DatasetGraph, Graph> op) {

http://git-wip-us.apache.org/repos/asf/jena/blob/a533aefa/jena-arq/src/main/java/org/apache/jena/sparql/util/ViewDatasetGraph.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/util/ViewDatasetGraph.java b/jena-arq/src/main/java/org/apache/jena/sparql/util/ViewDatasetGraph.java
index 6d07cb0..cb48560 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/util/ViewDatasetGraph.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/util/ViewDatasetGraph.java
@@ -25,10 +25,6 @@ public abstract class ViewDatasetGraph extends Pair.OfSameType<DatasetGraph>
imp
 
 	private final Lock lock;
 
-	public ViewDatasetGraph(DatasetGraph left, DatasetGraph right) {
-		this(left, right, Context.emptyContext);
-	}
-
 	public ViewDatasetGraph(DatasetGraph left, DatasetGraph right, Context c) {
 		super(left, right);
 		this.context = c;


Mime
View raw message