> Hello all.
>
> I wish I could create a RDFS schema and declare a property's domain to
> be either class A or class B.
> I wrote such a sample:
> <owl:DatatypeProperty rdf:about="http://xmlns.com/foaf/0.1/name">
> <rdfs:domain rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
> <rdfs:range
> rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
> </owl:DatatypeProperty>
>
> <owl:DatatypeProperty rdf:about="http://xmlns.com/foaf/0.1/name">
> <rdfs:domain
> rdf:resource="http://purl.org/net/schemas/space/Spacecraft"/>
> <rdfs:range
> rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
> </owl:DatatypeProperty>
>
>
> This RDFS snippet, once loaded in Jena, leads to the "name" not to be
> listed for neither
> class Person nor Spacecraft.
> FYI, I use the OntClass.listDeclaredProperties(false) method on a model
> with OntModelSpec.RDFS_MEM_RDFS_INF profile.
>
> If I remove the second statement (the one where domain is Spacecraft),
> then Person retrieves "name"
> as one of its properties.
>
> Here are my questions:
> Is it possible to declare in RDFS a property's domain to be either
> class A or B?
> Or must I really switch to OWL and say that owl:unionOf (A, B) is the
> domain of my property?
> If I must use owl:unionOf, which minimum Jena profile will process
> that unionOf? OWL_LITE_MEM?
>
> Your help, and dedication, are highly appreciated.
>
> Cheers.