Kevin; The query will work if you define multiple domain properties
instead of using owl:unionOf.  So the property would be defined as:

  :aProp rdfs:domain :MyClass .
  :aProp rdfs:domain :MyOtherClass .

This states that a property's domain can be either members of :MyClass
or members of :MyOtherClass.

This is different from the semantics of "MyClass or MyOtherClass" (in
Manchester syntax), which states that the domain is an unnamed class
whose members are the union of :MyClass and :MyOtherClass:

  :aProp rdfs:domain
              [ a       owl:Class ;
                owl:unionOf (:MyClass :MyOtherClass)
              ]  .

Note the unnamed class - denoted by the Turtle bnode syntax ([a
owl:Class .]).  I'm thinking that the first of the two was your
original intent, and using that model your query will work across
multiple definitions of rdfs:domain for the property.

-- Scott

On Oct 14, 1:14 pm, Kevin Matthews <[email protected]> wrote:
> I have a query that returns all the subproperties of a give class:
>
> SELECT *
> WHERE {
>     :MyClass (rdfs:subClassOf)* ?parent .
>     ?property rdfs:domain ?parent .
>     ?property a owl:DatatypeProperty .
>
> }
>
> That works just fine.  However, recently, one of the subproperties of
> MyClass also became a subproperty of a new class.  So the rdfs:domain
> attribute of the subproperty is now "MyClass or MyOtherClass".  This
> has broken my query.  The clause "?property rdfs:domain ?parent"
> eliminates the subproperty from the result set because the domain is
> no longer singular.  It is a set.
>
> How can I write a query that returns all subproperties that contain
> MyClass in their rdfs:domain, even when the rdfs:domain is a set?
>
> I am fine if we have to write a separate query that only deals with
> rdfs:domains that are sets.  I can leave my old query alone, and
> append the results of the set-only query.
>
> Thanks,
>
> Kev

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to