addField(HEADER_XML, headerXml, false, false);
}
// Resource contents
for (ResourceContent content : resource.contents()) {
Language l = content.getLanguage();
addField(getLocalizedFieldName(CONTENT_XML, l), content.toXml(), false, false);
addField(getLocalizedFieldName(CONTENT_CREATED, l), IndexUtils.serializeDate(content.getCreationDate()), false, false);
addField(getLocalizedFieldName(CONTENT_CREATED_BY, l), IndexUtils.serializeUserId(content.getCreator()), false, false);
addField(CONTENT_SOURCE, content.getSource(), true, false);
addField(CONTENT_EXTERNAL_REPRESENTATION, content.getExternalLocation(), true, false);