You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by bu...@apache.org on 2012/09/12 16:47:54 UTC

svn commit: r831816 - in /websites/staging/stanbol/trunk/content: ./ stanbol/docs/trunk/components/rules/store.html

Author: buildbot
Date: Wed Sep 12 14:47:54 2012
New Revision: 831816

Log:
Staging update by buildbot for stanbol

Modified:
    websites/staging/stanbol/trunk/content/   (props changed)
    websites/staging/stanbol/trunk/content/stanbol/docs/trunk/components/rules/store.html

Propchange: websites/staging/stanbol/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Sep 12 14:47:54 2012
@@ -1 +1 @@
-1383982
+1383983

Modified: websites/staging/stanbol/trunk/content/stanbol/docs/trunk/components/rules/store.html
==============================================================================
--- websites/staging/stanbol/trunk/content/stanbol/docs/trunk/components/rules/store.html (original)
+++ websites/staging/stanbol/trunk/content/stanbol/docs/trunk/components/rules/store.html Wed Sep 12 14:47:54 2012
@@ -85,7 +85,68 @@
       <ul> <li><a href="/">Home</a></li> <li class="item"><a href="/stanbol/">Stanbol</a></li> <li class="item"><a href="/stanbol/docs/">Docs</a></li> <li class="item"><a href="/stanbol/docs/trunk/">Trunk</a></li> <li class="item"><a href="/stanbol/docs/trunk/components/">Components</a></li> <li class="item"><a href="/stanbol/docs/trunk/components/rules/">Rules</a></li> </ul>
     </div>
     <h1 class="title">Rule Store</h1>
-    
+    <h2 id="service-endpoints">Service Endpoints</h2>
+<p>The Rule Store provides a RESTful API that allows to persistently manage rules in Stanbol.
+Rules organized into containers called recipes, which identify set of rules that share the same business logic.</p>
+<h3 id="how-to-create-a-recipe">How to create a recipe</h3>
+<ul>
+<li>Service: <strong>/rules/recipe/</strong></li>
+<li>Method: PUT</li>
+<li>Parameters:<ul>
+<li>recipe (Path parameter): the ID of the recipe as a path parameter(MANDATORY)</li>
+<li>description: the textual description of the recipe (OPTIONAL)</li>
+</ul>
+</li>
+</ul>
+<p>Example:</p>
+<div class="codehilite"><pre>curl -G -X PUT -d <span class="nv">description</span><span class="o">=</span><span class="s2">&quot;A test recipe.&quot;</span> <span class="se">\</span>
+http://localhost:8080/rules/recipe/recipeTestA
+</pre></div>
+
+
+<h3 id="how-to-add-rules-to-a-recipe">How to add rules to a recipe</h3>
+<ul>
+<li>Service: <strong>/rules/recipe/</strong></li>
+<li>Method: POST</li>
+<li>Parameters:<ul>
+<li>recipe (Path parameter): the ID of the recipe as a path parameter (MANDATORY)</li>
+<li>rules: the rules in Stanbol syntax (MANDATORY)</li>
+<li>description: the textual description of the rules (OPTIONAL)</li>
+</ul>
+</li>
+</ul>
+<p>Example:</p>
+<div class="codehilite"><pre>curl -X POST -H <span class="s2">&quot;Content-type: multipart/form-data&quot;</span> <span class="se">\</span>
+-F <span class="nv">rules</span><span class="o">=</span>@myRules -F <span class="nv">description</span><span class="o">=</span><span class="s2">&quot;My rules in the recipe.&quot;</span> <span class="se">\</span>
+http://localhost:8080/rules/recipe/recipeTestA
+</pre></div>
+
+
+<h3 id="how-to-get-a-recipe-or-a-recipe-from-the-store">How to get a recipe or a recipe from the store</h3>
+<ul>
+<li>Service: <strong>/rules/recipe/</strong></li>
+<li>Method: GET</li>
+<li>Parameters:<ul>
+<li>recipe (Path parameter): the ID of the recipe as a path parameter(MANDATORY)</li>
+<li>rule: the ID of the rule (OPTIONAL). If it is null than the whole recipe is returned. Otherwise it is returned the single rule identified by the parameter value</li>
+</ul>
+</li>
+<li>Accepts:<ul>
+<li>application/rdf+xml</li>
+<li>text/html</li>
+<li>text/plain</li>
+<li>application/owl+xml</li>
+<li>text/owl-functional</li>
+<li>text/owl-manchester</li>
+<li>application/rdf+json,</li>
+<li>text/turle</li>
+</ul>
+</li>
+</ul>
+<p>Example:</p>
+<div class="codehilite"><pre>curl -X GET -H <span class="s2">&quot;Accept: text/turtle&quot;</span> http://localhost:8080/rules/recipe/recipeTestA <span class="se">\</span>
+-d <span class="nv">rule</span><span class="o">=</span>recipeTestA_rule1
+</pre></div>
   </div>
   
   <div id="footer">