You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by st...@apache.org on 2016/10/14 12:17:52 UTC

[6/8] incubator-commonsrdf git commit: getTriples() -> stream()

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/740c65e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/740c65e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/740c65e3

Branch: refs/heads/master
Commit: 740c65e3c652970e7a2e804a4a1901d0f54a1dc8
Parents: 6e694fc
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Fri Oct 14 13:13:42 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Fri Oct 14 13:13:42 2016 +0100

----------------------------------------------------------------------
 .../simple/experimental/AbstractRDFParserTest.java    | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/740c65e3/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java b/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
index f263029..7f3822b 100644
--- a/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
+++ b/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
@@ -83,8 +83,8 @@ public class AbstractRDFParserTest {
 		assertTrue(g.size() > 0);		
 		IRI greeting = factory.createIRI("http://example.com/greeting");	
 		// Should only have parsed once!
-		assertEquals(1, g.getTriples(null, greeting, null).count());
-		Triple triple = g.getTriples(null, greeting, null).findAny().get();
+		assertEquals(1, g.stream(null, greeting, null).count());
+		Triple triple = g.stream(null, greeting, null).findAny().get();
 		assertTrue(triple.getSubject() instanceof IRI);
 		IRI parsing = (IRI) triple.getSubject();
 		assertTrue(parsing.getIRIString().startsWith("urn:uuid:"));
@@ -99,12 +99,12 @@ public class AbstractRDFParserTest {
 		
 		// Check uniqueness of properties that are always present
 		assertEquals(1, 
-				g.getTriples(null, factory.createIRI("http://example.com/source"), null).count());
+				g.stream(null, factory.createIRI("http://example.com/source"), null).count());
 		
 		// Check optional properties that are unique
-		assertTrue(2 > g.getTriples(null, factory.createIRI("http://example.com/base"), null).count());
-		assertTrue(2 > g.getTriples(null, factory.createIRI("http://example.com/contentType"), null).count());
-		assertTrue(2 > g.getTriples(null, factory.createIRI("http://example.com/contentTypeSyntax"), null).count());
+		assertTrue(2 > g.stream(null, factory.createIRI("http://example.com/base"), null).count());
+		assertTrue(2 > g.stream(null, factory.createIRI("http://example.com/contentType"), null).count());
+		assertTrue(2 > g.stream(null, factory.createIRI("http://example.com/contentTypeSyntax"), null).count());
 	}
 	
 	@Test
@@ -171,7 +171,7 @@ public class AbstractRDFParserTest {
 	}
 
 	private String firstPredicate(Graph g, String pred) {
-		return g.getTriples(null, factory.createIRI("http://example.com/" + pred), null)
+		return g.stream(null, factory.createIRI("http://example.com/" + pred), null)
 				.map(Triple::getObject).map(RDFTerm::ntriplesString).findAny().orElse(null);
 	}