Skip to content

Instantly share code, notes, and snippets.

@AlBaker
Created July 1, 2013 16:21
Show Gist options
  • Save AlBaker/5902292 to your computer and use it in GitHub Desktop.
Save AlBaker/5902292 to your computer and use it in GitHub Desktop.
Use Stardog Groovy to add namespaces
def db = new Stardog(home:"/opt/stardog", url: "snarl://localhost:5820/",to:"testdb", username:"admin", password:"admin")
db.withConnection { Connection c ->
c.namespaces().add("ns", "http://mydomain/data/")
c.namespaces().add("dcterms", "http://purl.org/dc/terms/")
c.namespaces().add("org", "http://mydomain/org/")
c.namespaces().add("per", "http://mydomain/people/")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment