Hi Alessandro.

Sorry to bother you again, but I have a few more questions for the rules endpoint.

Am 13.07.2012 16:09, schrieb Alessandro Adamou:
On 7/13/12 3:57 PM, Melanie Reiplinger wrote:
Am 13.07.2012 15:33, schrieb Alessandro Adamou:
Here is what worked for me:

curl -X POST -F "rules=transitivity[has(?r, ?x, ?z) . has(?r, ?z, ?y) -> has(?r, ?x, ?y)]" -F "description=Test rule" http://[stanbol]/rules/recipe/http://www.dfki.de/mere01/recipe/r1

great, works fine. Now, if I want to get the rule itself, to what URL do I send the GET? I tested
<stanbol>/rules/rule/transitivity
<stanbol>/rules/transitivity
<stanbol>/rule/transitivity
<stanbol>/rules/find/rules

The last one with query parameters is correct. Try this:

curl -H "Accept: application/rdf+xml" http://[stanbol]/rules/find/rules?name=rans

curl -H "Accept: application/rdf+xml" http://[stanbol]/rules/find/rules?description=irst

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?


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?

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).

best
melanie



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








Reply via email to