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.

Thomas Russ tar at ISI.EDU
Mon Aug 27 16:41:51 PDT 2007


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.




More information about the protege-owl mailing list