commonsrdf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [18/50] incubator-commonsrdf git commit: getTriples() -> stream()
Date Mon, 03 Oct 2016 16:40:14 GMT
getTriples() -> stream()


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

Branch: refs/heads/master
Commit: f8b6594d224bba664345c084bde8ca0c95069e95
Parents: 06a44b9
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Thu Sep 8 15:34:33 2016 +0100
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Thu Sep 8 15:34:33 2016 +0100

----------------------------------------------------------------------
 .../org/apache/commons/rdf/jsonldjava/JsonLdGraph.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/f8b6594d/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
----------------------------------------------------------------------
diff --git a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
index 0fe3690..c31ad71 100644
--- a/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
+++ b/jsonld-java/src/main/java/org/apache/commons/rdf/jsonldjava/JsonLdGraph.java
@@ -126,12 +126,12 @@ public class JsonLdGraph implements Graph {
 	
 	@Override
 	public boolean contains(BlankNodeOrIRI subject, IRI predicate, RDFTerm object) {
-		return getTriples(subject, predicate, object).findAny().isPresent();
+		return stream(subject, predicate, object).findAny().isPresent();
 	}
 
 	@Override
 	public boolean contains(Triple triple) {
-		return getTriples().anyMatch(Predicate.isEqual(triple));
+		return stream().anyMatch(Predicate.isEqual(triple));
 	}
 
 	public RDFTermFactory getContext() {
@@ -145,7 +145,7 @@ public class JsonLdGraph implements Graph {
 	}
 
 	@Override
-	public Stream<? extends Triple> getTriples() {
+	public Stream<? extends Triple> stream() {
 		if (! unionGraph) {
 			return rdfDataSet.getQuads("@default").parallelStream().map(this::asTriple);
 		}
@@ -153,9 +153,9 @@ public class JsonLdGraph implements Graph {
 	}
 
 	@Override
-	public Stream<? extends Triple> getTriples(BlankNodeOrIRI subject, IRI predicate,
RDFTerm object) {
+	public Stream<? extends Triple> stream(BlankNodeOrIRI subject, IRI predicate, RDFTerm
object) {
 		// RDFDataSet has no optimizations to help us, so we'll dispatch to filter()
-        return getTriples().filter(t -> {
+        return stream().filter(t -> {
             if (subject != null && !t.getSubject().equals(subject)) {
                 return false;
             }


Mime
View raw message