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] Problem with SQWRL query

Martin O'Connor martin.oconnor at stanford.edu
Mon Nov 29 12:45:10 PST 2010


You need to group per set [1]:

enod:FP(?x) ^ bad:mode(?x, ?o) ˚
sqwrl:makeBag(?sp, ?o) ^ sqwrl:groupBy(?sp, ?p)  ˚
sqwrl:size(?s, ?sp) ^ swrlb:greaterThan(?s, 1) →  sqwrl:select(?x)

Martin

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

On 11/29/2010 12:38 PM, Rodolfo Rieckhof wrote:
>
> Hello,
> i want to get from an ontology all individuals from a type, that have more than 1 OP. For example, the following 
> Ontology have 2 Individuals from Type FP, indi1 and indi2. indi1 have 2 OP mode to oder individuals and indi2 have 
> only one OP mode to other individual.
>
> I want to get all individuals from type FP that have more than 1 OP mode. I tried it with the following Query, but i 
> still get the 2 Individuals.  Why is this and how could i make a query that gets me the desired result.
>
> enod:FP(?x) ∧ bad:mode(?x, ?o) ˚  sqwrl:makeBag(?sp, ?o) ˚  sqwrl:size(?s, ?sp) ∧ swrlb:greaterThan(?s, 1) →  
> sqwrl:select(?x)
>
> regards,
> Rodolfo
>
>
> _______________________________________________
> 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