Hi Melanie,
On 8/2/12 10:38 AM, Melanie Reiplinger wrote:
curl -X POST -H "Content-Type: multipart/form-data" -H "Accept:
application/turtle" -F recipe="is(http://dbpedia.org/ontology/Person,
?x) -> is(http://rdf.data-vocabulary.org/Person, ?x)" -F
[email protected] http://lnv-89012.dfki.uni-sb.de:9001/refactor/apply
For this, I get HTTP ERROR 406 Problem accessing /refactor/apply.
Reason: Not Acceptable.
Do not use "application/turtle" for Turtle Syntax. Either use
"text/turtle" (normative MIME type) or "application/x-turtle"
(pre-registration MIME type). For the latter you should svn update and
reinstall rules/web now (I also added some additional CORS support for
that endpoint and fixed some wrong media type headers).
Also, do not forget that 1) full IRIs must be enclosed in <>, and the
rules must be named and enclosed in square brackets, e.g.
personTypes[is(<http://dbpedia.org/ontology/Person>, ?x) ->
is(<http://rdf.data-vocabulary.org/Person>, ?x)]
curl -X POST -H "Accept: application/rdf+xml" -F [email protected]
-F
recipe="http://<stanbol>/rules/recipe/http://www.dfki.de/mere01/recipe/TestRecipe"
http://<stanbol>/refactor
for an existing recipe with at least one rule in it gives me 'HTTP
ERROR 404 Problem accessing /refactor/. Reason: Not Found
Perhaps the recipe was not found. You need to use the recipe ID, not the
full URL e.g. "recipe=http://www.dfki.de/mere01/recipe/TestRecipe"
(you can try if simpler recipe IDs work as well)
Or does it have to be curl -d for /refactor ? (because in one of the
versions on the RESTful API it is also shown with GET -G -d). But for
this I also get the Not Found error.
No it doesn't look like there's any methods that accepts URLencoded
forms so I think there's no need for -d .
Btw: how do I get namespace specification into my recipes? (like the
google or dbpedia shorthands shown in the tutorial) Do I simply add
them in the rules body?
At the beginning of the recipe, like this:
dbpont = <http://dbpedia.org/ontology/> .
datavoc = <http://rdf.data-vocabulary.org/> .
personTypes[is(dbpont:Person, ?x) -> is(datavoc:Person, ?x)]
Note that you must not enclose resources in the rule body with "<" ">"
when you use prefixes.
hth
Alessandro
--
M.Sc. Alessandro Adamou
Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna - Italy
Semantic Technology Laboratory (STLab)
Institute for Cognitive Science and Technology (ISTC)
National Research Council (CNR)
Via Nomentana 56, 00161 Rome - Italy
"I will give you everything, just don't demand anything."
(Ettore Petrolini, 1917)
Not sent from my iSnobTechDevice