commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject incubator-commonsrdf git commit: COMMONSRDF-33 javadoc for JenaDataset
Date Mon, 03 Oct 2016 14:08:57 GMT
Repository: incubator-commonsrdf
Updated Branches:
  refs/heads/jena cfbe28fcb -> e569efe0e


COMMONSRDF-33 javadoc for JenaDataset

.getUnionGraph() and .asJenaDatasetGraph()


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

Branch: refs/heads/jena
Commit: e569efe0ec0f77a0a80232ebdadef6fa403dc0bf
Parents: cfbe28f
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Mon Oct 3 14:55:58 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Mon Oct 3 14:55:58 2016 +0100

----------------------------------------------------------------------
 .../apache/commons/rdf/jena/JenaDataset.java    | 21 +++++++++++++++++++-
 .../commons/rdf/jena/impl/JenaDatasetImpl.java  |  3 ++-
 2 files changed, 22 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/e569efe0/jena/src/main/java/org/apache/commons/rdf/jena/JenaDataset.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/JenaDataset.java b/jena/src/main/java/org/apache/commons/rdf/jena/JenaDataset.java
index 98fb840..f312c2a 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/JenaDataset.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/JenaDataset.java
@@ -23,8 +23,27 @@ import org.apache.jena.sparql.core.DatasetGraph;
 
 /** Access the Jena graph backing this object */
 public interface JenaDataset extends org.apache.commons.rdf.api.Dataset {
+	
+
+	/**
+	 * Return the underlying Jena {@link DatasetGraph}.
+	 * <p>
+	 * Changes to the Jena <em>dataset graph</em> are reflected in the Commons
+	 * RDF dataset and vice versa.
+	 * 
+	 * @return A Jena {@link DatasetGraph}
+	 */	
 	public DatasetGraph asJenaDatasetGraph();
 	
-	public Graph getUnionGraph();
+	/**
+	 * Return a union graph view of this dataset. <p The <em>union graph</em>
+	 * contains triples in any graph (including the default graph).
+	 * <p>
+	 * Changes in the union graph are reflected in the Commons RDF dataset and
+	 * vice versa. Triples added to the graph are added to the default graph.
+	 * 
+	 * @return A union {@link Graph}
+	 */
+	public JenaGraph getUnionGraph();
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/e569efe0/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java
----------------------------------------------------------------------
diff --git a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java
index b756526..45d753d 100644
--- a/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java
+++ b/jena/src/main/java/org/apache/commons/rdf/jena/impl/JenaDatasetImpl.java
@@ -31,6 +31,7 @@ import org.apache.commons.rdf.api.IRI;
 import org.apache.commons.rdf.api.Quad;
 import org.apache.commons.rdf.api.RDFTerm;
 import org.apache.commons.rdf.jena.JenaDataset;
+import org.apache.commons.rdf.jena.JenaGraph;
 import org.apache.commons.rdf.jena.JenaRDFTermFactory;
 import org.apache.jena.atlas.iterator.Iter;
 import org.apache.jena.graph.Node;
@@ -159,7 +160,7 @@ public class JenaDatasetImpl implements JenaDataset {
 	}
 
 	@Override
-	public Graph getUnionGraph() {
+	public JenaGraph getUnionGraph() {
 		GraphView gv = GraphView.createUnionGraph(graph);
 		return new JenaGraphImpl(gv, salt);
 	}


Mime
View raw message