Author: anuzzolese
Date: Thu Sep 13 15:09:12 2012
New Revision: 1384360
URL: http://svn.apache.org/viewvc?rev=1384360&view=rev
Log:
Editing documentation for Rules.
Modified:
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/components/rules/refactor.mdtext
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/components/rules/store.mdtext
Modified:
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/components/rules/refactor.mdtext
URL:
http://svn.apache.org/viewvc/incubator/stanbol/site/trunk/content/stanbol/docs/trunk/components/rules/refactor.mdtext?rev=1384360&r1=1384359&r2=1384360&view=diff
==============================================================================
---
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/components/rules/refactor.mdtext
(original)
+++
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/components/rules/refactor.mdtext
Thu Sep 13 15:09:12 2012
@@ -70,7 +70,37 @@ _(Please note, that the following links
### Refactor Engine ("/refactor"):
-- The Refactor Engine __@/refactor__ performs a refactoring applying an
existing recipe in the rule store to the provided RDF graph.
+- The Refactor Engine __@/refactor__ performs a refactoring applying an
existing recipe in the rule store to the provided RDF graph. The RDF graph can
be either in the Stanbol triplestore or provided as a file.
+In the first case the output of the refactoring is stored in the triplestore.
The request should be done as it follows:
+
+* Method: POST
+* Parameters:
+ * input-graph: the ID of RDF graph in the triplestore provided as input
+ * output-graph: the ID of RDF graph in the triplestore in which we want to
store the result.
+ * recipe: the ID of the recipe in the rule store
+
+Example:
+
+ :::bash
+ curl -G -X GET \
+ -d input-graph=stored_graph -d recipe=myTestRecipeA -d
output-graph=result_graph \
+ http://localhost:8080/refactor
+
+In the case we want to refactor an external RDF graph provided as file the
request should be done as follows:
+
+* Method: POST
+* Parameters:
+ * recipe: the ID of the recipe (MANDATORY)
+ * input: the RDF graph to which the refactoring has to be applied. The
graph has to be provided as a binary file (MANDATORY)
+
+Example:
+
+ :::bash
+ curl -X POST -H "Content-type: multipart/form-data" \
+ -F description=recipeTestA -F [email protected] \
+ http://localhost:8080/refactor
+
+
### Refactor Engine ("/refactor/apply"):
Modified:
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/components/rules/store.mdtext
URL:
http://svn.apache.org/viewvc/incubator/stanbol/site/trunk/content/stanbol/docs/trunk/components/rules/store.mdtext?rev=1384360&r1=1384359&r2=1384360&view=diff
==============================================================================
---
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/components/rules/store.mdtext
(original)
+++
incubator/stanbol/site/trunk/content/stanbol/docs/trunk/components/rules/store.mdtext
Thu Sep 13 15:09:12 2012
@@ -5,7 +5,7 @@ Title: Rule Store
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.
-### Recipe management
+### Recipe and rule management
#### How to create a recipe
@@ -58,7 +58,7 @@ Example:
Example:
:::bash
- curl -X GET -H "Accept: text/turtle" \
+ curl -G -X GET -H "Accept: text/turtle" \
-d rule=recipeTestA_rule1 \
http://localhost:8080/rules/recipe/recipeTestA
@@ -75,4 +75,54 @@ Example:
:::bash
curl -X DELETE \
-d rule=recipeTestA_rule1 \
- http://localhost:8080/rules/recipe/recipeTestA
\ No newline at end of file
+ http://localhost:8080/rules/recipe/recipeTestA
+
+ #### How to find a recipe in the store
+
+* Service: __/rules/find/recipes__
+* Method: GET
+* Parameters:
+ * description: some word describing the recipe. This parameter is used as
search field.
+* Accepts:
+ * application/rdf+xml
+ * text/html
+ * text/plain
+ * application/owl+xml
+ * text/owl-functional
+ * text/owl-manchester
+ * application/rdf+json,
+ * text/turle
+
+Example:
+
+ :::bash
+ curl -G -X GET \
+ -d description="test recipe" \
+ http://localhost:8080/rules/find/recipes
+
+
+#### How to find a rule in the store
+
+* Service: __/rules/find/rules__
+* Method: GET
+* Parameters:
+ * description: some word describing the rule. This parameter is used as
search field.
+* Accepts:
+ * application/rdf+xml
+ * text/html
+ * text/plain
+ * application/owl+xml
+ * text/owl-functional
+ * text/owl-manchester
+ * application/rdf+json,
+ * text/turle
+
+Example:
+
+ :::bash
+ curl -G -X GET \
+ -d description="My rules" \
+ http://localhost:8080/rules/find/rules
+
+____
+_[Back to Stanbol Rules](../rules.html)_
\ No newline at end of file