Search Mailing List Archives
[protege-discussion] Bad interaction between Facet Constraints Tab, template values in slots?
Richard Dunlap
rdunlap at asinc.com
Mon Nov 13 14:10:47 PST 2006
To follow up with a diagnosis and fix:
The problem occurred when the slot had multiplicity 1; when multiple
values were allowed, the problem went away. This suggested that in the
single-value case, the template value was being pulled twice, once as a
template value and once as an own value: changing
FacetConstraintsValidator.GetTemplateAndOwnSlotValues, which reads
{
Collection val, val2, t, t2;
t = c.getTemplateSlotValues(st);
val = new ArrayList(t);
t2 = i.getOwnSlotAndSubslotValues(st);
val2 = new ArrayList(t2);
val2.addAll(val);
return val2;
}
to read
{ return i.getOwnSlotAndSubslotValues(st); }
appears to have solved the problem.
-- Richard Dunlap
Richard Dunlap wrote:
> In a new Protege-Frames project:
>
> * Create a class TestClass.
>
> * Add to TestClass a new template slot testSlot, leaving the value type
> as String, and set a template value for the slot (e.g. "testValue").
>
> * Create an instance of TestClass -- as expected (I hope :-) ), the
> instance has one value slot with the unchangeable value "testValue".
> Good so far.
>
> * Open up the Facet Constraints Tab and check the facet constraints of
> all classes. The previously created instance is tagged as an instance
> with a violation. Not so good.
>
> Has anyone run across this behavior or something related before? Is
> there a reason, perhaps, that the observed behavior is correct?
>
> We've also noticed that the FacetConstraintsTab is marked as no longer
> supported on the Wiki and that the source code apparently needs to be
> downloaded separately from the various packages. Is there a different,
> better tab widget to solve the problem "give me a list of my red boxes"?
>
> Thanks!
>
> -- Richard Dunlap
>
>
>
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
>
>
More information about the protege-discussion
mailing list