Hi Melanie,
On 8/1/12 11:26 AM, Melanie Reiplinger wrote:
ok so I tried this. I first created a recipe r2 and then uploaded a
rule by
curl -X POST -F "rules=transitivity[has(?r, ?x, ?z) . has(?r, ?z, ?y)
-> has(?r, ?x, ?y)]" -F "description=transitivity"
http://dev.iks-project.eu:8081/rules/recipe/http://www.dfki.de/mere01/recipe/r2
This works fine, by GET I can see that the rule has been integrated
into the recipe. Now I try to delete:
curl -i -X DELETE
http://dev.iks-project.eu:8081/rules/recipe/http://www.dfki.de/mere01/recipe/r2?rule=transitivity
and I get '200 OK'. But when checking with GET, the 'transitivity'
rule is still part of the r2 recipe. Seems it was not deleted.
I haven't dug this as I'm not very rule store savvy, but it might be a
bug in the Clerezza rule store. Maybe you could open a ticket on
https://issues.apache.org/jira/browse/STANBOL ? (be sure to include
Rules in the component field).
Also, submitting the very same rule twice to this recipe does not
throw any error.
From what I can see, Rule does not override equals() or hashCode() so
in general if two rules have the same body, they won't be recognized as
equal unless their names are. But I guess you're right, it should at
least return a 409 Conflict if the rule names matched.
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?
It doesn't have an interface??? I was trying on the /rules/ RESTful
interface. You can load an RDF file and then click at 'refactor'. I
thought that would do the job while only testing the default
transformation patterns.
Yes that's the "hands-on" form, it's intended for the live tutorial but
I'm sure a 'regular' GUI will be added too at some point. In the
meantime, I guess you can use that form for testing.
What I meant is that literally the "[stanbol]/refactor" endpoint doesn't
have a GUI yet (returns 500 on me), but that's okay because I think that
endpoint should be moved to a sub-endpoint of /rules.
Sorry, I didn't try that since it requires that I pass a recipe ID
there, and I don't know by which ID these default rules go. So I'll
report on that as soon as I have my own recipe to use for transformation.
I think it doesn't have one. It is also possible to refactor by passing
the recipe in the payload without storing it with an ID. I think the
tutorial does exactly that.
HTH
--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