Page 1 of 1

[Import_Utility_2.5.3] How to define an derived Boolean value for a slot : java.lang.ClassCastException

Posted: 30 Jun 2022, 09:34
by tkinte
Hi.

I have an import specification with a boolean slot value defined by the mean of a derived simple slot : Missing derived primitive slot.
The DUP file result causes the following error when imported to the protégé project via the essential update widget.

Code: Select all

WARNING: java.lang.ClassCastException: 
java.lang.String cannot be cast to java.lang.Boolean at setting the widget values for 
instance SimpleInstance(..._Class4 of [Cls(Data_Object)]) and 
Slot(data_object_is_abstract) -- AbstractSlotWidget.setWidgetValues()
Is there a workaround or a solution other than via the boolean value in the spreedsheet ?

Best regards,

Tshitshi

Re: [Import_Utility_2.5.3] How to define an derived Boolean value for a slot : java.lang.ClassCastException

Posted: 14 Jul 2022, 08:31
by jasonp
Hi Tshitshi,

at present, I am afraid that this is not possible directly in the Import Utility as defining the column as being a Simple Slot tells the Import Utility that the value is of type String. A possible approach could be to define a separate column in the spreadsheet that is mapped to a Primitive (Boolean) Slot, but is conditionally populated based on logic in your spreadsheet.

Regards,

Jason