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

Post Reply
User avatar
tkinte
Posts: 145
Joined: 18 Nov 2014, 08:24
Location: https://www.linkedin.com/in/tshitshi-kia-ntoni
Contact:

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
jasonp
Posts: 70
Joined: 01 Jul 2017, 07:05

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
Post Reply