You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 8, 2020. It is now read-only.
// Triples filtered by subject ( "http://dbpedia.org/resource/Charles_Dickens" )
31
-
println("All triples related to Dickens:\n"+rdfgraph.find(Some("http://commons.dbpedia.org/resource/Category:Places"), None, None).collect().mkString("\n"))
33
+
println("All triples related to Dickens:\n"+triples.find(Some(NodeFactory.createURI("http://commons.dbpedia.org/resource/Category:Places")), None, None).collect().mkString("\n"))
32
34
33
35
// Triples filtered by predicate ( "http://dbpedia.org/ontology/influenced" )
34
-
println("All triples for predicate influenced:\n"+rdfgraph.find(None, Some("http://dbpedia.org/ontology/influenced"), None).collect().mkString("\n"))
36
+
println("All triples for predicate influenced:\n"+triples.find(None, Some(NodeFactory.createURI("http://dbpedia.org/ontology/influenced")), None).collect().mkString("\n"))
35
37
36
38
// Triples filtered by object ( <http://dbpedia.org/resource/Henry_James> )
37
-
println("All triples influenced by Henry_James:\n"+rdfgraph.find(None, None, Some("<http://dbpedia.org/resource/Henry_James>")).collect().mkString("\n"))
39
+
println("All triples influenced by Henry_James:\n"+triples.find(None, None, Some(NodeFactory.createURI("<http://dbpedia.org/resource/Henry_James>"))).collect().mkString("\n"))
38
40
39
41
// println("Number of triples: " + rdfgraph.triples.distinct.count())
40
-
println("Number of subjects: "+rdfgraph.getSubjects.map(_.toString).distinct().count)
41
-
println("Number of predicates: "+rdfgraph.getPredicates.map(_.toString).distinct.count())
42
-
println("Number of objects: "+rdfgraph.getPredicates.map(_.toString).distinct.count())
42
+
println("Number of subjects: "+triples.getSubjects.map(_.toString).distinct().count)
43
+
println("Number of predicates: "+triples.getPredicates.map(_.toString).distinct.count())
44
+
println("Number of objects: "+triples.getPredicates.map(_.toString).distinct.count())
0 commit comments