/sparqlclient

a scala port of the excellent SPARQLWrapper python module

Primary LanguageScalaApache License 2.0Apache-2.0

sparqlclient

sparqlclient is a scala port of the excellent SPARQLWrapper python module

Important Notes

This software is the product of research carried out at the University of Zurich and comes with no warranty whatsoever. Have fun!

TODO's

  • (more) unit tests
  • more documentation
  • (more) examples

Gotcha's

Every time the project version information is changed, BuildInfo needs to be regenerated. To do that simply run:

$ sbt compile

Example

import com.sparqlclient.{DataFormat, SparqlClient}
import com.sparqlclient.rdf.RdfTerm

val dbpedia = SparqlClient("http://dbpedia.org/sparql")
dbpedia.setReturnFormat(DataFormat.Xml)

val query = s"""
select distinct ?Concept where {[] a ?Concept} LIMIT 100
            """
val results:Seq[Seq[RdfTerm]] = dbpedia(query, 10)._2.toSeq

Thanks a lot to