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] Request for Enhancement: hasValue restrictions in multi-slot display.

Tania Tudorache tudorache at stanford.edu
Fri Aug 31 12:59:11 PDT 2007


Hi Thomas,

We have considered the enhancement request. It is hard to say what the 
"right" behavior for the browser text should be. One could argue that 
displaying the asserted values, rather than the inferred ones, is the 
only correct behavior. On the other hand, Protege does different 
(incomplete) inferences in the UI, that are useful to the users, but 
they may also be misleading.

I do agree with you that showing the values from the hasValue 
restrictions in the slot widgets and not showing them in the browser 
text is inconsistent behavior. Our preference would be not to show them 
in the slot widgets as well, but this might upset several of our users.

The biggest concern with using your solution is that it might impact the 
performance of Protege in a considerable way especially for the database 
and client-server ontologies. The call to retrieve the hasValue 
restriction is expanded into several other calls on the knowledge base. 
And this is done almost continuously because the getBrowserText() method 
is called by the UI renderers.

So, we have two suggestions for possible solutions:

1. You could implement your own browser slot pattern. This can be done 
in a project plugin, in the afterShow method. There is an example on how 
this could be implemented in the method 
OWLUI.fixBrowserSlotPatterns(Project project).

2. We could make the browser slot pattern configurable, so that the user 
can set a flag in the UI for enabling the hasValue restrictions in the 
browser text. This can even be the default configuration. For database 
projects and client-server projects, this flag can be disabled, if it 
impacts the performance.

In case we should implement solution 2, I cannot promise that it will 
get in the next Protege build.

Cheers,
Tania



Thomas Russ wrote:
> Hi,
>
>    Right now one can specify display slots or multi-slot patterns for  
> displaying instances.  But the values of the slots only reflect the  
> directly asserted property values and not any that are specified by  
> hasValue restrictions.  Unfortunately, this is not as useful (to us)  
> as also being able to use the restriction-implied values.  It also  
> causes a bit of disconnect between the property value display widget,  
> which includes the hasValue values, and the display slots, which don't
>
> So:  We would find it convenient if the code for displaying slot  
> values when a slot or multi-slot pattern were chosen would also  
> include values from hasValue restrictions (if any) in case there are  
> no direct values.
>
>
>
> This would require changing code in the OWLBrowserSlotPattern.getText 
> (Slot,Instance) method.
> Specifically, it would entail modifying the "else" clause (~ line  
> 126) labeled "// single value" along the following lines:
>
> Current:
> ========================================================
>         } else { // single value
>          Object o = CollectionUtilities.getFirstItem(values);
>
>          text = getText(o, instance, defaultLang);
>          if (text == null) {
>            //text = instance.getName();
>            text = "";
>          }
>        }
> ========================================================
>
> New:
> ========================================================
>        } else if (values.size() == 0)  { // single value
>          Object o = CollectionUtilities.getFirstItem(values);
>
>          text = getText(o, instance, defaultLang);
>          if (text == null) {
>            //text = instance.getName();
>            text = "";
>          }
>       } else if (instance instanceof OWLIndividual) { // No direct  
> values
>            values = ((OWLIndividual) instance).getHasValuesOnTypes 
> ((RDFProperty) slot);
>            Object o = CollectionUtilities.getFirstItem(values);
>          text = getText(o, instance, defaultLang);
>          if (text == null) {
>            //text = instance.getName();
>            text = "";
>          }
>       } else {
>            text = "";
>       }
> ========================================================
>
> I'm not sure if the single slot display goes through this code or if  
> it has a separate implementation that would also need to be updated.
>
> -Tom.
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>
>   




More information about the protege-owl mailing list