Properties with a quantity

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Properties with a quantity

Ken Keefe
I am trying to do something that I expect is a common pattern. I'd like to have an object property that also has a numerical quantity associated with the relation. For example, let's say I have a class called Vehicle, a subclass of Vehicle called Sedan, another class called Seat, and a property called Contains. I want to be able to express that Contains(Sedan, Seat, 4). 

What's the right way to do something like this?

Ken

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Properties with a quantity

Matthew Horridge-2
Administrator
Hi Ken,

In the class description view for Sedan,  you can state that it is a subclass of “contains exactly 4 Seat”.  Where contains is an object property.


Cheers,

Matthew

p.s. by convention, property names in OWL start with a lower case letter.
p.p.s quantifies refer to units plus a magnitude e.g. 80 miles per hour.  In your case, you’re using a qualified cardinality restriction.

On 28 Feb 2014, at 10:27, Ken Keefe <[hidden email]> wrote:

I am trying to do something that I expect is a common pattern. I'd like to have an object property that also has a numerical quantity associated with the relation. For example, let's say I have a class called Vehicle, a subclass of Vehicle called Sedan, another class called Seat, and a property called Contains. I want to be able to express that Contains(Sedan, Seat, 4). 

What's the right way to do something like this?

Ken
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Properties with a quantity

samsontu
In reply to this post by Ken Keefe
You probably want to use a cardinality constraint in this situation:

Sedan SubclassOf (contains exactly 4 Seat)


With best regards,
Samson


On Feb 28, 2014, at 10:27 AM, Ken Keefe <[hidden email]> wrote:

I am trying to do something that I expect is a common pattern. I'd like to have an object property that also has a numerical quantity associated with the relation. For example, let's say I have a class called Vehicle, a subclass of Vehicle called Sedan, another class called Seat, and a property called Contains. I want to be able to express that Contains(Sedan, Seat, 4). 

What's the right way to do something like this?

Ken
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Properties with a quantity

Steve Wartik

Ken,

 

In the event Samson’s and Matthew’s answers don’t fit your needs – like if you have a relation with 4 variables – the usual pattern is to reify the relationship. You create a class named “Contains”. An individual of that class is expected to be the subject of two assertions: one for the numerical value, and one for the contained thing. Thusly:

 

:Contains rdf:type owl:Class .

:value rdf:type owl:DatatypeProperty .

:containedThing rdf:type owl:ObjectProperty .

 

:c rdf:type :Contains .

:c :value 4 ; :containedThing :seat .

 

Then you assert some object property relationship between “Sedan” and the “Contains” individual.

 

This is a more general-purpose pattern than using a cardinality constraint, but it often reduces your ontology’s entailments.

 

Regards,

 

Steve Wartik

 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Use Ontology design pattern 1

Valery DONFACK
In reply to this post by Ken Keefe
Hi
 
To express that (Contains(Sedan, Seat, 4)), you need to use n arity relation because your relation "contains"  has 3 arity
http://www.w3.org/TR/swbp-n-aryRelations/
 
 
Cordialement.
 
Valéry
 

 

From: [hidden email]
Date: Fri, 28 Feb 2014 12:27:38 -0600
To: [hidden email]
Subject: [protege-user] Properties with a quantity

I am trying to do something that I expect is a common pattern. I'd like to have an object property that also has a numerical quantity associated with the relation. For example, let's say I have a class called Vehicle, a subclass of Vehicle called Sedan, another class called Seat, and a property called Contains. I want to be able to express that Contains(Sedan, Seat, 4). 

What's the right way to do something like this?

Ken

_______________________________________________ protege-user mailing list [hidden email] https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user