On 7/15/12 1:21 PM, Melanie Reiplinger wrote:
hmm, ok, so one could assume that it works analogously for the rules/find/recipes. But when doing

curl -H "Accept: text/turtle" http://<stanbol>/rules/find/recipes?name=r2
or
curl -H "Accept: text/turtle" http://<stanbol>/rules/find/recipes?name=http://www.dfki.de/mere01/recipe/r2

I get a 404 Not Found.
(for a recipe named 'r2', created by
curl -i -X PUT http://lnv-89012.dfki.uni-sb.de:9001/rules/recipe/http://www.dfki.de/mere01/recipe/r2
)

what am I doing wrong?

Nothing, except for assuming (with good reason) that it worked exactly the same. The rules/find/recipes resource does not support the "name" parameter at present, it only supports "description".

This means that if you want a recipe to be found, it must have been created with a comment, such as

curl -i -X PUT http://lnv-89012.dfki.uni-sb.de:9001/rules/recipe/http://www.dfki.de/mere01/recipe/r2?description=Test%20recipe

(not sure what happens with the URLencoded value for "description", though)

then

curl -H "Accept: text/turtle" http://lnv-89012.dfki.uni-sb.de:9001/rules/find/recipes?description=est

Sorry for not finding this out earlier and misleading you.

Also: How do we then remove rules from a recipe, if we cannot address them simply by attaching their URI or name to the endpoint's URL?

(again by checking the code) The recipe/rule path is currently in the form

/rules/recipe/{recipeId}?rule={ruleId}

and the DELETE works the same way, depending on "rule" having a value or not.

It might be better to have something like

/rules/recipe/{recipeId}/{ruleId}

but before that we should make sure that recipeId allows simple non-URI identifiers and refactoring works with non-URIs (which maybe now does).

And one more: For the refactoring functionality I didn't get very far. First thing I wanted to give some minimal toy RDF graph as an input and refactor via the RESTful Interface. This gives me the (not very informative) message:
"The site <stanbol> says: Error".
(in the form of an alert window). This error might be due to virtually anything. My toy example is

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    xmlns:dbpedia="http://dbpedia.org/property/";>
    <rdf:Description rdf:about="urn:example:person:ernie">
        <dbpedia:Person>Ernie</dbpedia:Person>
        <dbpedia:profession>Friend of Bert</dbpedia:profession>
    </rdf:Description>
</rdf:RDF>

and I was hoping for something like an application of the "peopleProfessionRule" rule or something. (I already checked on http://www.w3.org/RDF/Validator/ to make sure it is well-formed).

Here you're entering a realm I know even less, so I'm afraid I'm going to need some more info.

What does the rule look like? Remember with that RDF there (with literal triples / datatype assertions in OWL) the rules must be of the form values() instead of has()

Did you use an HTML interface somewhere? Seems like the refactor endpoint doesn't have one at the moment. Did you try it through the tutorial in the /rules endpoint?

What response did you get by issuing the equivalent request to /refactor via curl?

best
-- Alessandro


You can also ask for:

text/turtle
text/owl-manchester
text/owl-functional
application/owl+xml
application/rdf+json

Theoretically, it should also support

application/json (JSON-LD)
text/plain

but I don't see a body writer registered with rule lists so it didn't work for me.

Best,
Alessandro


To check if it has been stored (and therefore parsed), you can do a GET on

http://[stanbol]/rules/recipe/http://www.dfki.de/mere01/recipe/r1

requesting text/plain or some KR format such as

text/turtle
application/rdf+xml
text/owl-manchester

Hope this helps,

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

Reply via email to