Instance of OWL-class with unionOf (n3)

483 views Asked by At

Suppose i have an OWL-class as following:

:picture    rdf:type owl:Class ;
            owl:unionOf(:creator :theme :title :date) .

With :creator, :theme, :title and :date either an owl:ObjectProperty or owl:DataProperty.

For example:

:creator    rdf:type owl:ObjectProperty ;
            rdfs:comment "The creator of this picture." ;
            rdfs:domain :picture ;
            rdfs:range foaf:Person .

How can i create an instance of this picture class ?

(I understand how i create an instance of an easy thing such as : <http://dbpedia.org/resource/Paris> rdf:type :location . would be an instance of a location)

1

There are 1 answers

0
citxx On

If you want to describe the class which may contain properties :creator, :theme, :title, and :date you should just describe the domain for all properties (no additional definitions in picture class are necessary):

:picture a owl:Class .

:creator rdfs:domain :picture ;
         rdfs:range foaf:Person .

And so on.

If you want to describe the class which must contain these properties, cardinality constraints should be added:

:picture a owl:Class ;
         rdfs:subClassOf [
             a owl:Restriction ;
             owl:onProperty creator ;
             owl:minCardinality "1"^^<http://www.w3.org/2001/XMLSchema#int>
         ]
         rdfs:subClassOf [
             a owl:Restriction ;
             owl:onProperty theme ;
             owl:cardinality "1"^^<http://www.w3.org/2001/XMLSchema#int>
         ]
         ... etc ...

In both cases the definition of an instance looks like following:

:monaLisa a :picture ;
          :creator :LeonardoDaVinci ;
          ...
          :date "1503-01-01"^^<http://www.w3.org/2001/XMLSchema#date>

More about restriction you can learn, for example, from this document.