few questions

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

few questions

Dan Barbata

I have been through the Protégé tutorial, and studied the users guide, and have
been able to self-learn a great deal. However, there are still a few conceptual
things that I have questions on:

(1) If you choose to have a slot value as a symbol (i.e. values that are
instances of another class), is there any way to restrict from the list of those
instances, which ones can be selected? e.g. For a class called Electric Toys,
which runs on Instances of the class Batteries, can I restrict the values to AA,
AAA, C, and D (because I don't want photo lithium batteries as possible values
for toys)?

(2) Is there any way to link one slot value to another, or have one slot value
dependent on another in some way? e.g. If you have a slot value for "Red" and
"White" wine, can you have another slot called tanin that only appears if the
value "Red" is chosen? The only way I can think of accomplishing this is to make
"Red" a class, but is it possible when "Red" is a slot value (or Instance for
that matter)?

Thx very much.

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: few questions

Tania Tudorache

Hi Dan,

please see my answers inline.

Tania

>(1) If you choose to have a slot value as a symbol (i.e. values that are
>instances of another class), is there any way to restrict from the list of those
>instances, which ones can be selected? e.g. For a class called Electric Toys,
>which runs on Instances of the class Batteries, can I restrict the values to AA,
>AAA, C, and D (because I don't want photo lithium batteries as possible values
>for toys)?
>
>  
>
First, a clarification. In Protege frames, slots of type Symbols are not
instances of another class. The allowed values for a symbol slot are
actually Strings and they represent the possible values that the slot
can take. For example, you could define a slot color of type Symbol and
have the allowed values "red","rosee" and "white" and attach it to the
class Wine. Then, for the class of RedWine (a subclass of Wine) you can
constrain values of the color slot by defining that the template value
of the color slot is "red" which means that all instances of RedWine
will have the value "red" for the color slot, and you cannot change this
in any instance of RedWine. Another way to constrain the values, would
be to customize the color slot at class RedWine and delete "rosee" and
"white" from the allowed values of the color slot. This is a less harder
restriction than the template slot value.
Now, back to your question. With slots of type instance (like the
example that you gave)  you can also restrict the allowed classes of the
slot in a subclass. For example, if you have the following situation:

ElectricThing           runs_with       Batteries
    |_ElectricToy      runs_with            |_ AA, AAA, C, D

Here ElectricToy is a subclass of ElectricThing and AA, AAA, C, D are
subclasses of Batteries. You can restrict the allowed classes for the
slot runs_with at the level of class ElectricToy. However, in a subclass
you can only restrict the allowed classes, you cannot add values that
are not allowed for the superclass.
The template slot customization at class level you find described here:  
http://protege.stanford.edu/doc/users_guide/slots/override_slot.htm

>(2) Is there any way to link one slot value to another, or have one slot value
>dependent on another in some way? e.g. If you have a slot value for "Red" and
>"White" wine, can you have another slot called tanin that only appears if the
>value "Red" is chosen? The only way I can think of accomplishing this is to make
>"Red" a class, but is it possible when "Red" is a slot value (or Instance for
>that matter)?
>
>  
>
There are always different ways of modeling the same thing or situation.
In your example, if tannin property only applies to red wines, then it
makes sense to add it only to the class RedWine. However, in a different
situation where the value of one slot depends on the value of another
slot, you can express this using PAL constraints, for example. Here you
find documentation about PALTab:
http://protege.stanford.edu/plugins/paltabs/PAL_tabs.html
The PAL constraints are not enforced at instance aquisition time. You
need to check if the defined constraints hold in the PAL Constraints Tab.


-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html