}
if (field instanceof DateField) {
DateField dateField = (DateField)field;
addText(element, DateSerializer.toString(dateFormat, dateField.getDate()));
} else if (field instanceof FileField) {
FileField fileField = (FileField)field;
if (fileField.getEditMediaLink() != null) {
Element link = element(Namespace.ATOM.getUrl(), "link",
attribute("href", fileField.getEditMediaLink().getHref()),
attribute("type", fileField.getEditMediaLink().getType()),
attribute("size", fileField.getEditMediaLink().getSize()));
appendChildren(element, link);
}
} else if (field instanceof LinkField) {
LinkField linkField = (LinkField)field;
Element link = element(Namespace.ATOM.getUrl(), "link",