for (String f : getFileFormats(item)) {
doc.addField("metadata.dc.format.mimetype", f);
}
ByteArrayOutputStream out = new ByteArrayOutputStream();
XmlOutputContext context = XmlOutputContext.emptyContext(out, Second);
retrieveMetadata(item).write(context);
context.getWriter().flush();
context.getWriter().close();
doc.addField("item.compile", out.toString());
if (verbose) {
println("Item with handle " + handle + " indexed");
}