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 to use concept definition as part of SQWRL query?

Mudunuri, Venkata Rajashekar Varma Raj.Mudunuri at medizin.uni-leipzig.de
Fri Jan 29 12:09:58 PST 2010


Thanks Martin... I however want to query at the conceptual level, without getting into individuals... 

>> University(?u) ^ hasFaculty(?u, ?f) ^ hasCourse(?f, ?c) ^ hasSubject(?c, 
Microprocessor) -> sqwrl:select(?u, ?f, ?c)

This query works fine when there are individuals... but I want to simply ask for the concept that has so and so description...

I'm just wondering whether there is any way to query for the concepts based on concept descriptions, using SQWRL or any other query (DLquery, RQL,...) language... 

As I have mentioned below (in previous mail), sparql did the job for me in this case, but I'm exploring if there are better ways to do it...

Cheers,
Raj


-----Ursprüngliche Nachricht-----
Von: protege-owl-bounces at lists.stanford.edu [mailto:protege-owl-bounces at lists.stanford.edu] Im Auftrag von Martin O'Connor
Gesendet: Mittwoch, 27. Januar 2010 02:20
An: User support for the Protege-OWL editor
Betreff: Re: [protege-owl] how to use concept definition as part of SQWRL query?


I am not sure how EngineeringFaculty could be a subclass of University 
(or course a subclass of faculty). Surely these should be modeled using 
object properties?

You could then write something like:

University(?u) ^ hasFaculty(?u, ?f) ^ hasCourse(?f, ?c) ^ (hasSubject 
some Microprocessor)(?c) -> sqwrl:select(?u, ?f, ?c)

to find individual courses that have a particular subject. (The SWRLTab 
does not yet support the use of class descriptions in rules, however, so 
you would have to replace (hasSubject some Microprocessor) with a named 
class.)

If you modeled your domain slightly differently, you could write:

University(?u) ^ hasFaculty(?u, ?f) ^ hasCourse(?f, ?c) ^ hasSubject(?c, 
Microprocessor) -> sqwrl:select(?u, ?f, ?c)

where Microprocessor is an individual of the class Subject.

You could also use the TBox built-in library but it does not yet have 
all the necessary built-ins to work with OWL restrictions. I plan to 
extend the set of available built-ins in the next few months. However, 
the TBox built-ins are designed to answer low-level queries about the 
structure of an ontology. Ideally, you should model your domain in a way 
that would not require their use.

Martin

Mudunuri, Venkata Rajashekar Varma wrote:
>
> Hi,
>
>  
>
> is there any source to find out how SQWRL queries are framed when 
> asserted conditions are used as part of the queries? I have the 
> following example… suppose I have the following simple knowledgebase…
>
>  
>
> University
>
>     EngineeringFaculty
>
>         Mechanical => (hasSubject some Thermodynamics)
>
>         Electronics => (hasSubject some Microprocessors)
>
>     Subject
>
>         Thermodynamics
>
>         Microprocessors
>
>  
>
> Now, I want to extract the information, where I want to find out the 
> Faculty that is conceptually defined in terms of the Subjects (with 
> the hasSubject property)… I could get what I want with the following 
> sparql query…
>
>  
>
> SELECT ?faculty ?course
>
> WHERE {
>
>     ?faculty rdfs:subClassOf :University .
>
>     ?course rdfs:subClassOf ?faculty .
>
>     ?course rdfs:subClassOf ?restriction .
>
>     ?restriction rdf:type owl:Restriction .
>
>     ?restriction owl:onProperty :hasSubject .
>
>     ?restriction owl:someValuesFrom :Microprocessors .
>
> }
>
>  
>
> However, I was trying to achieve the same with SQWRL but I don’t know 
> how to put the RHS of the concept definition as a condition in the 
> query… I tried this way but did not return any result…
>
>  
>
> tbox:isDirectSubClassOf(?x, University)  ^  
> tbox:isDirectSubClassOf(?y, ?x)  ^  hasSubject(?y, Microprocessors) → 
> sqwrl:select(?x, ?y)
>
>  
>
> my question is, how do we use the complex concept definitions (that 
> might involve multiple object properties) as part of the SQWRL 
> queries!! I’m looking out for the semantic richness that SQWRL queries 
> provide…
>
>  
>
> cheers,
>
> Raj
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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
>   

_______________________________________________
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