Skip to content

Commit

Permalink
Imported doc/examples/sdk-jena/update.java as a trivial example of
Browse files Browse the repository at this point in the history
how to execute SPARQL 1.1 Update operations on a Dydra repository
using the SDK's convenience wrappers for Jena 2.10.
  • Loading branch information
artob committed Mar 5, 2013
1 parent 5a9185f commit 7c9f516
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/examples/sdk-jena/update.java
@@ -0,0 +1,17 @@
import com.dydra.Repository;
import com.dydra.Session;
import com.hp.hpl.jena.sparql.modify.request.UpdateClear;
import com.hp.hpl.jena.update.UpdateProcessor;

public class update {
public static final String REPOSITORY = "jhacker/foaf"; // TODO: change this to your own repository

public static void main(String[] args) {
Session session = new Session("username", "password"); // TODO: change these to your own credentials

UpdateProcessor update = new Repository(REPOSITORY, session)
.prepareUpdate(new UpdateClear("http://example.org/")); // CLEAR GRAPH <http://example.org/>

update.execute();
}
}

0 comments on commit 7c9f516

Please sign in to comment.