Sorry, this message slipped over.

On 8/8/12 3:28 PM, Melanie Reiplinger wrote:
is there any reference for the
rules/adapters
( and rules/adapters/recipe)
?

I'm afraid I don't know much about them because they're the newest addition to the rules API as far as I know.

But from the code I see, the RESTful API should be handled like this (in GET methods)

curl [-X GET] http://[stanbol]/rules/adapters/{recipeID}?format={returnType}

The adapted recipe should be wrapped in a JSON object with the fields
- "recipe" (the original recipe)
- "adaptedTo" (the format)
- "result" (the content)

"returnType" is the canonical name of the Java class. From what I can see the supported types should be:

* com.hp.hpl.jena.reasoner.rulesys.Rule
* org.apache.clerezza.rdf.core.sparql.query.ConstructQuery
* org.apache.stanbol.rules.base.api.SPARQLObject
* org.semanticweb.owlapi.model.SWRLRule

However this isn't working for me, since every time I tried these classes, a java.lang.ClassNotFoundException was logged on a class.forName() method call.

Either the classes cannot be found because they are registered with the classloaders of other OSGi bundles, and the rules.web bundle doesn't have them in its classloader, or I am doing something wrong. Hope someone behind this feature knows better.

Sorry for not being of so much help here.

Best
-- Alessandro


Am 06.08.2012 17:33, schrieb Alessandro Adamou:
On 8/6/12 10:10 AM, Melanie Reiplinger wrote:
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).

for which paths was it that you added the CORS support?

/refactor/apply and /refactor/applyfile, but neither has PUT or DELETE methods so perhaps it was not necessary.

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