if ((!isIcon && !isLogo) || !(parent instanceof Source)) {
return super.startElement(xw, parent, e, metadata);
}
Source source = (Source) parent;
if (isIcon && source.hasElement(Source.LOGO)) {
// atom:logo takes precedence
return false;
}
xw.startElement(Namespaces.rssNs, "image", null, null);
xw.simpleElement(Namespaces.rssNs, "url", null,
String.valueOf(e.getTextValue()));
TextContent title = source.getTitle();
if (title != null) {
xw.simpleElement(Namespaces.rssNs, "title", null,
title.getPlainText());
}
Link htmlLink = source.getHtmlLink();
if (htmlLink != null) {
xw.simpleElement(Namespaces.rssNs, "link", null, htmlLink.getHref());
}
xw.endElement(Namespaces.rssNs, "image");