You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by Adrian Gschwend <ml...@netlabs.org> on 2012/09/10 22:41:02 UTC

Rules Endpoint using SWRL rules

Hi,

I'm trying to figure out how to use the rules endpoint, I ran into
several issues.

I'm trying:

curl -i -X POST -H "Accept: application/rdf+xml" -F input=@foaf.rdf -F
recipe=@domain2.rule http://my.host.ch:9090/refactor/apply

See domain2.rule and foaf.rdf as attachment.

With domain2.rule I get:

--
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Content-Length: 0
Server: Jetty(6.1.x)
--

but no output. The domains should match IMHO, at least grep thinks it
does :-D

Also the example with "prefix uvc = <...>" results in an error of the
endpoint:

--
Error 500 org.apache.stanbol.rules.manager.parse.ParseException:
Encountered " &lt;VAR&gt; "uvc "" at line 1, column 8.
Was expecting one of:
    "=" ...
    "[" ...
--

I got that from the example here:

https://incubator.apache.org/stanbol/docs/trunk/components/rules/refactor.html

Anyone got some ideas what I am doing wrong? Was compiling from latest
SVN today (10.9.2012)

Where can I find the documentation of the rules stuff in SVN? I will
extend the documentation with the stuff I get to work so it gets a bit
easier for others.

thanks

Adrian


Re: Rules Endpoint using SWRL rules

Posted by Adrian Gschwend <ml...@netlabs.org>.
On 11.09.12 11:53, Andrea Giovanni Nuzzolese wrote:

Hi Andrea,

> the problem is in the prefix declaration that should be 

Great tnx that did the trick with the parsing. Note that your example in
the documentation does say "prefix kn = ..." :-)

Did you try my example on a Stanbol endpoint? With SVN trunk from
yesterday and the foaf.rdf file I've attached in my posting I don't get
any results back, which is IMHO wrong :)

cu

Adrian

Re: Rules Endpoint using SWRL rules

Posted by Andrea Giovanni Nuzzolese <nu...@cs.unibo.it>.
Hi Adrian,

the problem is in the prefix declaration that should be 

	uvc = <http://vocab.uduvudu.org/control#> .
	rdfs = <http://www.w3.org/2000/01/rdf-schema#> .
	...

instead of

	prefix uvc = <http://vocab.uduvudu.org/control#> .
	prefix rdfs = <http://www.w3.org/2000/01/rdf-schema#> .
	...

Andrea

On Sep 10, 2012, at 10:41 PM, Adrian Gschwend wrote:

> Hi,
> 
> I'm trying to figure out how to use the rules endpoint, I ran into
> several issues.
> 
> I'm trying:
> 
> curl -i -X POST -H "Accept: application/rdf+xml" -F input=@foaf.rdf -F
> recipe=@domain2.rule http://my.host.ch:9090/refactor/apply
> 
> See domain2.rule and foaf.rdf as attachment.
> 
> With domain2.rule I get:
> 
> --
> HTTP/1.1 100 Continue
> 
> HTTP/1.1 200 OK
> Content-Type: text/plain; charset=utf-8
> Content-Length: 0
> Server: Jetty(6.1.x)
> --
> 
> but no output. The domains should match IMHO, at least grep thinks it
> does :-D
> 
> Also the example with "prefix uvc = <...>" results in an error of the
> endpoint:
> 
> --
> Error 500 org.apache.stanbol.rules.manager.parse.ParseException:
> Encountered " &lt;VAR&gt; "uvc "" at line 1, column 8.
> Was expecting one of:
>   "=" ...
>   "[" ...
> --
> 
> I got that from the example here:
> 
> https://incubator.apache.org/stanbol/docs/trunk/components/rules/refactor.html
> 
> Anyone got some ideas what I am doing wrong? Was compiling from latest
> SVN today (10.9.2012)
> 
> Where can I find the documentation of the rules stuff in SVN? I will
> extend the documentation with the stuff I get to work so it gets a bit
> easier for others.
> 
> thanks
> 
> Adrian
> 
> <domain.rule><domain2.rule><foaf.rdf>