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 stanford.edu
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].

Martin

[1] http://protege.cim3.net/cgi-bin/wiki.pl?SWRLLanguageFAQ#nid9KT

Ely Edison Matos wrote:

>Hello,
>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 
>tried:
>
>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 
>case?
>
>Thanks,
>Ely
>
>_______________________________________________
>protege-owl mailing list
>protege-owl at lists.stanford.edu
>https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
>Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>
>  
>




More information about the protege-owl mailing list