throw new ValueFormatException(safeGetJCRPath()
+ " is multi-valued and can therefore only be retrieved as an array of values");
}
PropertyState state = (PropertyState) getItemState();
InternalValue val = state.getValues()[0];
if (val.getType() == PropertyType.REFERENCE) {
// reference, i.e. target UUID
UUID targetUUID = (UUID) val.internalValue();
return (Node) itemMgr.getItem(new NodeId(targetUUID));
} else {
throw new ValueFormatException("property must be of type REFERENCE");
}
}