Author: jakob
Date: Thu Apr 10 09:16:01 2014
New Revision: 1586248

URL: http://svn.apache.org/r1586248
Log:
Some documentation on the new sesame-tools

Modified:
    marmotta/site/trunk/content/markdown/sesame.md.vm

Modified: marmotta/site/trunk/content/markdown/sesame.md.vm
URL: 
http://svn.apache.org/viewvc/marmotta/site/trunk/content/markdown/sesame.md.vm?rev=1586248&r1=1586247&r2=1586248&view=diff
==============================================================================
--- marmotta/site/trunk/content/markdown/sesame.md.vm (original)
+++ marmotta/site/trunk/content/markdown/sesame.md.vm Thu Apr 10 09:16:01 2014
@@ -7,10 +7,81 @@
 
 Marmotta comes with a set of generic tools that extend [Sesame OpenRDF 
API](http://www.openrdf.org/).
 
+<h2>RDF Patch</h2>
+
+The module marmotta-util-rdfpatch allows to create and apply 
[rdf-patches](http://afs.github.io/rdf-patch/)
+to a Sesame Repository or RepositoryConnection.
+
+<pre class="prettyprint">
+// Prepare
+RepositoryConnection connection = repository.getConnection();
+String patch = "...";
+
+// Apply a patch to the repository
+RdfPatchUtil.applyPatch(connection, patch);
+</pre>
+
+<pre class="prettyprint">
+&lt;dependency&gt;
+    &lt;groupId&gt;org.apache.marmotta&lt;/groupId&gt;
+    &lt;artifactId&gt;marmotta-rio-ical&lt;/artifactId&gt;
+    &lt;version&gt;${projectVersion}&lt;/version&gt;
+&lt;/dependency&gt;
+</pre>
+
+<h2>Sesame RIO</h2>
+
+Apache Marmotta comes with RIO modules for *ical*, *rss* and *vcard*.
+
+<pre class="prettyprint">
+&lt;dependency&gt;
+    &lt;groupId&gt;org.apache.marmotta&lt;/groupId&gt;
+    &lt;artifactId&gt;marmotta-rio-ical&lt;/artifactId&gt;
+    &lt;version&gt;${projectVersion}&lt;/version&gt;
+&lt;/dependency&gt;
+&lt;dependency&gt;
+    &lt;groupId&gt;org.apache.marmotta&lt;/groupId&gt;
+    &lt;artifactId&gt;marmotta-rio-rss&lt;/artifactId&gt;
+    &lt;version&gt;${projectVersion}&lt;/version&gt;
+&lt;/dependency&gt;
+&lt;dependency&gt;
+    &lt;groupId&gt;org.apache.marmotta&lt;/groupId&gt;
+    &lt;artifactId&gt;marmotta-rio-vcard&lt;/artifactId&gt;
+    &lt;version&gt;${projectVersion}&lt;/version&gt;
+&lt;/dependency&gt;
+</pre>
+
+
+<h2>Hamcrest Matchers</h2>
+
+The Sesame Hamcrest Matchers allows easy integration of repository tests into 
JUnit.
+
+<pre class="prettyprint">
+Repository repo = getReopsitory();
+// operate on the repo
+//   - add/delete statements, etc...
+
+// Test
+RepositoryConnection con = repo.getConnection();
+Assert.assertThat("subject is not a skos:Concept", con, 
+    SesameMatchers.hasStatement(subject, RDF.TYPE, SKOS.Concept, context));
+</pre>
+
+There are convenience wrappers that directly operate on a Repository 
(RepositoryMatcher) 
+or even serialized RDF formats (RdfStringMatcher).
+
+<pre class="prettyprint">
+&lt;dependency&gt;
+    &lt;groupId&gt;org.apache.marmotta&lt;/groupId&gt;
+    &lt;artifactId&gt;marmotta-sesame-matchers&lt;/artifactId&gt;
+    &lt;version&gt;${projectVersion}&lt;/version&gt;
+&lt;/dependency&gt;
+</pre>
+
 <h2>Sesame Façading</h2>
 
 Sesame Façading allows using annotated Java interfaces (façades) to access 
an underlying 
-Sesame repository, in a similar to JPA.
+Sesame repository, similar to JPA.
 
 To use the Sesame Façading, include the following artifact in your Maven 
build file
 in your Marmotta module:
@@ -18,7 +89,7 @@ in your Marmotta module:
 <pre class="prettyprint">
 &lt;dependency&gt;
     &lt;groupId&gt;org.apache.marmotta&lt;/groupId&gt;
-    &lt;artifactId&gt;sesame-tools-facading&lt;/artifactId&gt;
+    &lt;artifactId&gt;marmotta-util-facading&lt;/artifactId&gt;
     &lt;version&gt;${projectVersion}&lt;/version&gt;
 &lt;/dependency&gt;
 </pre>


Reply via email to