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?

Martin O'Connor martin.oconnor at stanford.edu
Tue Jan 26 17:20:29 PST 2010


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
>   




More information about the protege-owl mailing list