It returns EnumerationPropertyLiteral[TRANSIENT] or similar, corresponding to the .toString() on a CDOObject.
This can be fixed with the following code:
def get_p_v_value(elem, PVName):
"""
status: OK
"""
for group in elem.get_java_object().getOwnedPropertyValueGroups():
for pv in group.getOwnedPropertyValues():
if PVName == pv.getName():
if pv.eClass().getName() == "BooleanPropertyValue":
return str(pv.isValue())
elif pv.eClass().getName() == "EnumerationPropertyValue":
if pv.getValue() is not None:
return pv.getValue().getName()
else:
return None
else:
return str(pv.getValue())
return None
It returns EnumerationPropertyLiteral[TRANSIENT] or similar, corresponding to the .toString() on a CDOObject.
This can be fixed with the following code: