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 formulate OWL unions (owl:unionOf) in SPARQL

Pierre Nugues Pierre.Nugues at cs.lth.se
Mon Jan 21 05:24:05 PST 2008


Dear All,

I would like to extract the members of a property domain, when this  
domain is a union of OWL classes. Here is an excerpt of the ontology:

  <owl:ObjectProperty rdf:ID="hasProperty">
    <rdfs:range rdf:resource="#MyRange"/>
    <rdfs:domain>
      <owl:Class>
        <owl:unionOf rdf:parseType="Collection">
          <owl:Class rdf:about="#MyDomain1"/>
          <owl:Class rdf:about="#MyDomain2"/>
        </owl:unionOf>
      </owl:Class>
    </rdfs:domain>
  </owl:ObjectProperty>

Using SPARQL, I extract the range using this query:
SELECT ?prop ?range
WHERE {
    ?prop rdf:type owl:ObjectProperty .
    ?prop rdfs:range ?range .
}

How do I extract the two classes corresponding to the domain? In fact,  
I would like to write a constraint so that MyDomain1 is included in  
the property domain. (I could restate it this way: I would like to  
find all properties whose domain contains MyDomain1)

Is that possible with a SPARQL query?

Thank you for your help.

Pierre
--
Pierre Nugues, Lunds Tekniska Högskola, Institutionen för  
datavetenskap, Box 118, S-221 00 Lund, Suède.
Tél. (0046) 46 222 96 40, http://www.cs.lth.se/~pierre
Visiteurs: Lunds Tekniska Högskola, E-huset, rum 4134A, Ole Römers väg  
3, S-223 63 Lund.
Mon livre/My book: http://www.cs.lth.se/home/Pierre_Nugues/ilppp/



More information about the protege-owl mailing list