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] How can I use SQWRL to combine individuals?

Martin O'Connor martin.oconnor at
Tue Jan 8 17:51:04 PST 2008

This is not currently possible in SQWRL because all atoms must be 
satisfied. You will have to write two queries - though I am working on a 
mechanism to support this directly in one query.

I think SPARQL has a so-called OPTION clause to support this. BTW, you 
need to make sure that ?x and ?y are different in this query [1].



Ely Edison Matos wrote:

>Suppose I have this definitions:
>AComponent hasColor blue
>AComponent hasSymbol S
>BComponent hasColor red
>BComponent hasSymbol S
>CComponent hasSymbol S
>DComponent hasSymbol S
>EComponent hasColor red
>EComponent hasSymbol S
>I need list combinations of Components which has (same colors and symbols) 
>_OR_ just (same symbols) if (and only if) hasColor has no definition. I 
>Component(?x)  ^
>Component(?y)  ^
>hasColor(?x, ?c1)  ^
>hasColor(?y, ?c2)  ^
>swrlb:equal(?c1, ?c2)  ^
>hasSymbol(?x, ?s1)  ^
>hasSymbol(?y, ?s2)  ^
>swrlb:equal(?s1, ?s2)  ^
>-> sqwrl:selectDistinct(?x, ?y)
>But it don't works, because for Components without Color, hasColor return 
>false, and the rule don't fire at all... It works just for both matches 
>(components B and E, at sample).
>Some suggestions about this? Is it possible? Can SPARQL help me in this 
>protege-owl mailing list
>protege-owl at
>Instructions for unsubscribing: 

More information about the protege-owl mailing list