commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [5/8] incubator-commonsrdf git commit: RepositoryDatasetImpl constructors
Date Tue, 14 Jun 2016 15:45:05 GMT
RepositoryDatasetImpl constructors


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

Branch: refs/heads/rdf4j
Commit: b6e938c54c5d45a79f5d88b0661688bd60dc7315
Parents: ccd9e97
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Fri Jun 3 17:48:38 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Fri Jun 3 17:48:38 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/b6e938c5/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/RepositoryDatasetImpl.java
----------------------------------------------------------------------
diff --git a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/RepositoryDatasetImpl.java
b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/RepositoryDatasetImpl.java
index 50c7d20..7e18e5e 100644
--- a/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/RepositoryDatasetImpl.java
+++ b/rdf4j/src/main/java/org/apache/commons/rdf/rdf4j/impl/RepositoryDatasetImpl.java
@@ -29,16 +29,23 @@ import org.apache.commons.rdf.api.Quad;
 import org.apache.commons.rdf.api.RDFTerm;
 import org.apache.commons.rdf.rdf4j.RDF4JDataset;
 import org.apache.commons.rdf.rdf4j.RDF4JQuad;
-import org.apache.commons.rdf.rdf4j.RDF4JTriple;
 import org.eclipse.rdf4j.common.iteration.Iterations;
 import org.eclipse.rdf4j.model.Resource;
 import org.eclipse.rdf4j.model.Statement;
 import org.eclipse.rdf4j.model.Value;
+import org.eclipse.rdf4j.repository.Repository;
 import org.eclipse.rdf4j.repository.RepositoryConnection;
 import org.eclipse.rdf4j.repository.RepositoryResult;
 
 public class RepositoryDatasetImpl extends AbstractRepositoryGraphLike<Quad> implements
RDF4JDataset, Dataset {
 
+	public RepositoryDatasetImpl(Repository repository, boolean includeInferred) {
+		super(repository, includeInferred);
+	}
+
+	public RepositoryDatasetImpl(Repository repository) {
+		super(repository);
+	}
 
 	@Override
 	public void add(BlankNodeOrIRI graphName, BlankNodeOrIRI subject, IRI predicate, RDFTerm
object) {
@@ -127,8 +134,8 @@ public class RepositoryDatasetImpl extends AbstractRepositoryGraphLike<Quad>
imp
 
 	@Override
 	public Optional<Graph> getGraph(BlankNodeOrIRI graphName) {
-		Resource context = (Resource) rdf4jTermFactory.asValue(graphName);
-		return new RepositoryGraphImpl(repository, includeInferred, context);		
+		Resource context = (Resource) rdf4jTermFactory.asValue(graphName);		
+		return Optional.of(new RepositoryGraphImpl(repository, includeInferred, context));		
 	}
 
 	@Override


Mime
View raw message