}
String text;
try {
text = ContentItemHelper.getText(contentPart.getValue());
} catch (IOException e) {
throw new InvalidContentException(String.format("Unable to extract "
+" text from ContentPart %s of ContentItem %s!",
contentPart.getKey(),ci.getUri()),e);
}
if (text.trim().length() == 0) {
// TODO: make the length of the data a field of the ContentItem