Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] How to set the range of a property to some particular instance's property value ?

Tania Tudorache tudorache at
Thu Mar 19 15:41:20 PDT 2009

Hi Erkin,

I think the easiest way of doing this is to attach a property value 
listener to the homeTeam property and whenever the value changes, the 
homeTeamPlayers property values should be updated automatically. This is 
quite easy to implement and you can do it as a project plugin or slot 
plugin. Thomas suggested using a widget listener for setting the values, 
but unfortunately, there is no such listener in protege. The widgets 
will automatically update the display if the value of the property has 
changed in the knowledge base.

I've learned from other modeling experience that synchronizing values 
between properties is not trivial... For example, should it be possible 
after adding a homeTeam, to manually change the home team players (after 
they have been filled in automatically)? And if you change the home team 
players, is the home team the same as before? What if you change the 
home team and you already have overrides in the home team players, etc. 

I was wondering if it is not enough to have in FootballMatch just a 
pointer to the homeTeam, which already contains all the players. Why 
duplicate the information? Of course, there can be reasons for it, but 
if this is a purely UI issue, then it is not really worth complicating 
the modeling just because the tool does not show the information as needed.

There is actually a widget, called "ContainsWidget", that will show you 
the content of the instance value. For example, if you would attach the 
Contains widget to the homeTeam in the FootballMatch form, then you 
would actually see an embedded form of the Team that is the value of 
homeTeam, which shows the players. See attached screenshot. This 
solution would get rid of the synchronization issue and the UI would 
show the desired information and no coding needed (from your part :) ).

For some reason, the Contains Widget does not show up in OWL, but if 
this is would be helpful, I can investigate this and enable the widget 
also for OWL projects.


Thomas Russ wrote:
> On Mar 19, 2009, at 7:18 AM, Erkin Eryol wrote:
>> Dear Protege
>> While I was developing a Protege-Owl based application with many UI's
>> using Protege-Forms, I ended up with , afaik ,a limitation of the api.
>> It's a little hard to explain, so I give an example of the case that I
>> encountered.
> [snip]
>> When the "homeTeam" property is set to a value which is an instance of
>> "Team", say "team_1", I want the value of "homeTeamPlayers" to be set
>> to the value of team_1's "teamPlayers" property, which are "Player"
>> instances.
>> So If the user of my application opens the "FootballMatch" form which
>> is produced by Protege Forms Editor and sets "homeTeam" property to
>> the instance "team_1", at the same time, the value "homeTeamPlayers"
>> should be automatically filled with the player instances of that team.
>> Is there a way to do this with Protege-Owl api at run time?
> Well, there are a couple of options.
> One is to design your own interface as a plugin.  Then you can perform  
> whatever manipulations you want to.  You would also need to make sure  
> that you undid any actions if the user subsequently removes the  
> homeTeam value.
> I think that you could also attach a listener to the form element  
> widgets and use that to trigger your actions.  (I'm not quite so  
> familiar with this, though.  Perhaps one of the Stanford folks could  
> elaborate).
> A third would be to move to OWL 2.0 (necessitating Protege 4) and set  
> up a simple property chain to get the values of the homeTeamPlayers  
> property.  You could then define the chain {homeTeam teamPlayers} to  
> be a subproperty of homeTeamPlayers and have an OWL 2.0 reasoner  
> provide the answers.
> See < 
>  >
> _______________________________________________
> protege-owl mailing list
> protege-owl at
> Instructions for unsubscribing: 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: football.png
Type: image/png
Size: 36322 bytes
Desc: not available
URL: <>

More information about the protege-owl mailing list