Skip to content

Instantly share code, notes, and snippets.

@AlBaker
Created August 27, 2015 04:09
Show Gist options
  • Save AlBaker/1989a7453fe321927e78 to your computer and use it in GitHub Desktop.
Save AlBaker/1989a7453fe321927e78 to your computer and use it in GitHub Desktop.
@GrabResolver(name='stardog', root='http://maven.stardog.com/')
@Grab('com.complexible.stardog:stardog-groovy:3.1.4')
import com.complexible.stardog.ext.groovy.Stardog
def stardog = new Stardog([url: "snarl://localhost:5820/", to:"testdb", username:"admin", password:"admin", reasoning:true])
def list = []
stardog.query("select ?s ?p ?o WHERE { ?s a <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#Person> }", { list << it } )
println list.size() // 719 using the Lehigh data set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment