Skip to content

cosminbasca/sparqlclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

a scala port of the excellent SPARQLWrapper python module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published