Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] SQWRL query help needed

Przemek W teonacatl at tlen.pl
Mon Oct 27 07:19:13 PDT 2008


I am trying to extract "Dry" wines from the wine ontology. The SQWRL query :

wine:Wine(?wine:x) ∧ wine:hasSugar(?wine:x, ?wine:y) ∧ swrlb:equal(?wine:y,
"Dry") → sqwrl:select(?wine:x)

returns an exception:

Exception running SQWRL queries: error running SQWRL queries: Jess reported
an error in routine invokeSWRLBuiltIn
	while executing (invokeSWRLBuiltIn
"http://www.w3.org/TR/2003/PR-owl-guide-20031209/sqwrlSweetWines"
"http://www.w3.org/2003/11/swrlb#equal" 0 false
?http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#y(0,0,1) "Dry")
	while executing rule LHS (Node2)
	while executing rule LHS (Node2)
	while executing rule LHS (MTELN)
	while executing rule LHS (TECT)
	while executing (assert
(MAIN::http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar
http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MariettaPetiteSyrah
http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry)).
  Message: error invoking built-in from Jess: exception thrown by built-in
'swrlb:equal' in rule
'http://www.w3.org/TR/2003/PR-owl-guide-20031209/sqwrlSweetWines': expecting
string, got individual with name
'http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry' for (0-offset)
argument #0.
  Program text: ( assert (
http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#hasSugar
http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#MariettaPetiteSyrah
http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry ) )  at line 1 in
file <eval pipe>.

I am assuming I can't use "swrlb:equal(?wine:y, "Dry")" here, because "Dry"
is a string.
I was trying to use Built-ins from
http://www.daml.org/2004/04/swrl/builtins.html#8.4 but non of them worked
for me.

I think my problem is similar to this one:
http://www.nabble.com/Res%3A--Simple-SQWRL-query-tt15841748.html#a15841748 ,
however when I reconstrunt my query into:

wine:Wine(?wine:x)  ∧  wine:hasSugar(?wine:x, ?Dry) → sqwrl:select(?wine:x),
it lists all the wines there are, it doesn't matter if I write ?Dry or
?Sweet it always returns the same result.

Any hints?
-- 
View this message in context: http://www.nabble.com/SQWRL-query-help-needed-tp20188665p20188665.html
Sent from the Protege - OWL mailing list archive at Nabble.com.




More information about the protege-owl mailing list