Permalink
Browse files

Imported doc/examples/sdk-jena/update.java as a trivial example of

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...
1 parent 5a9185f commit 7c9f5163e78a367aa351823096626e5ec2836b93 @bendiken bendiken committed Mar 5, 2013
Showing with 17 additions and 0 deletions.
  1. +17 −0 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.