Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OWL restrictions - defining classes that only contains properties with a specific property value

I'm currently playing a bit with the OWL and especially with restrictions. I'm trying to create a query that does the following:

Suppose that I have a class 'Cinema' that has a property 'movies' (that contains objects of type 'Movie'). The class 'Movie' contains a property named 'genre'. Now I want to create a class ActionCinemas that only has movies with the genre 'action'.

I'm really not sure how to do this. I was thinking about doing something with intersections or the cardinality but I'm not sure of that.

Could anyone give me a hand in this?

like image 866
Devos50 Avatar asked Oct 28 '12 16:10

Devos50


People also ask

What is an OWL class?

owl:equivalentClass is a built-in property that links a class description to another class description. The meaning of such a class axiom is that the two class descriptions involved have the same class extension (i.e., both class extensions contain exactly the same set of individuals).

What is an OWL property?

An OWL property connects two items. They are datatype properties ( owl:DatatypeProperty ) if they are relations between instances of classes and RDF literals and XML Schema datatypes. object properties ( owl:ObjectProperty )if they are relations between instances of two classes.

What is object property Intology?

In an ontology, the class hierarchy framework can be extended with more open-ended relationships, called object and data properties. Object properties connect two individuals (a subject and object) with a predicate, while with data properties the predicate connects a single subject with some form of attribute data.


1 Answers

You need a combination of an allValuesFrom restriction and a hasValue restriction, e.g like this:

Turtle syntax:

 my:ActionCinema a owl:Class ;
      rdfs:subClassOf my:Cinema,
                      [ a owl:Restriction; 
                        owl:onProperty my:hasMovie ;
                        owl:allValuesFrom [ a owl:Restriction ; 
                                            owl:onProperty my:hasGenre ;
                                            owl:hasValue my:Action ]
                      ] .

Manchester OWL syntax:

Class: ActionCinema
   SubClassOf: Cinema that hasMovie only ( hasGenre value Action )
like image 193
Jeen Broekstra Avatar answered Sep 28 '22 13:09

Jeen Broekstra