processAuthor(child, feed);
}
}
private void processEntry(Element element, IFeed feed) {
INews news = Owl.getModelFactory().createNews(null, feed, new Date(System.currentTimeMillis() - (fNewsCounter++ * 1)));
news.setBase(feed.getBase());
/* Check wether the Attributes are to be processed by a Contribution */
processNamespaceAttributes(element, news);
/* Interpret Children */
List< ? > newsChilds = element.getChildren();
for (Iterator< ? > iter = newsChilds.iterator(); iter.hasNext();) {
Element child = (Element) iter.next();
String name = child.getName().toLowerCase();
/* Check wether this Element is to be processed by a Contribution */
if (processElementExtern(child, news))
continue;
/* Title */
else if ("title".equals(name)) { //$NON-NLS-1$
news.setTitle(getContent(child));
processNamespaceAttributes(child, news);
}
/* Content / Summary */
else if ("content".equals(name) || "summary".equals(name)) { //$NON-NLS-1$ //$NON-NLS-2$
news.setDescription(getContent(child));
processNamespaceAttributes(child, news);
}
/* Modified / Updated */
else if ("modified".equals(name) || "updated".equals(name)) { //$NON-NLS-1$ //$NON-NLS-2$
news.setModifiedDate(DateUtils.parseDate(child.getText()));
processNamespaceAttributes(child, news);
}
/* Issued / Created / Published */
else if ("issued".equals(name) || "created".equals(name) || "published".equals(name)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
news.setPublishDate(DateUtils.parseDate(child.getText()));
processNamespaceAttributes(child, news);
}
/* Id */
else if ("id".equals(name)) { //$NON-NLS-1$
IGuid guid = Owl.getModelFactory().createGuid(news, child.getText());
processNamespaceAttributes(child, guid);
}
/* Link */
else if ("link".equals(name)) { //$NON-NLS-1$
String rel = child.getAttributeValue("rel"); //$NON-NLS-1$
/* News Link */
if (rel == null || "alternate".equals(rel)) {//$NON-NLS-1$
URI uri = URIUtils.createURI(child.getAttributeValue("href")); //$NON-NLS-1$
if (uri != null)
news.setLink(uri);
processNamespaceAttributes(child, news);
}
/* Enclosure */
else if ("enclosure".equals(rel)) { //$NON-NLS-1$