Hi,
I'm using RDFReactor to generate Java objects against the
schema.org RDF/XML ontology although it seems to have difficulty relating the domain properties to the classes. The problem seems to be that the domain is always defined as part of a collection as when I generate a single domain reference the class seems to pick up the property correctly...
Here is an example of the OWL schema in
schema.org that fails to get picked up in the code generation:
<owl:ObjectProperty rdf:about="&schema;addressCountry">
<rdfs:label xml:lang="en">addressCountry</rdfs:label>
<rdfs:comment xml:lang="en">The country. For example, USA. You can also provide the two-letter <a href="
http://en.wikipedia.org/wiki/ISO_3166-1" target="new">ISO 3166-1 alpha-2 country code</a>.</rdfs:comment>
<rdfs:domain>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="&schema;PostalAddress"/>
</owl:unionOf>
</owl:Class>
</rdfs:domain>
<rdfs:range>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="&schema;Country"/>
</owl:unionOf>
</owl:Class>
</rdfs:range>
</owl:ObjectProperty>
if I amend the OWL so that the property domain is not part of a collection (as below) it seems to work and is connected to the correct class (in this case PostalAddress):
<owl:ObjectProperty rdf:about="&schema;address">
<rdfs:label xml:lang="en">address</rdfs:label>
<rdfs:comment xml:lang="en">Physical address of the item.</rdfs:comment>
<rdfs:range>
<owl:Class>
<owl:unionOf rdf:parseType="Collection">
<rdf:Description rdf:about="&schema;PostalAddress"/>
</owl:unionOf>
</owl:Class>
</rdfs:range>
<rdfs:domain rdf:resource="&schema;PostalAddress" />
</owl:ObjectProperty>
Apologies if this has already been raised or if indeed i'm doing something incorrectly but any help would be greatly appreciated.
Thanks Gareth