mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
remove workaround for #39 as it's not valid rdf 0.9 according to the spec
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
package com.commafeed.backend.rome;
|
||||
|
||||
import com.rometools.rome.feed.rss.Description;
|
||||
import com.rometools.rome.feed.rss.Item;
|
||||
import com.rometools.rome.feed.synd.SyndContentImpl;
|
||||
import com.rometools.rome.feed.synd.SyndEntry;
|
||||
import com.rometools.rome.feed.synd.impl.ConverterForRSS090;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
/**
|
||||
* Support description tag for RSS09
|
||||
*
|
||||
*/
|
||||
@RegisterForReflection
|
||||
public class RSS090DescriptionConverter extends ConverterForRSS090 {
|
||||
|
||||
@Override
|
||||
protected SyndEntry createSyndEntry(Item item, boolean preserveWireItem) {
|
||||
SyndEntry entry = super.createSyndEntry(item, preserveWireItem);
|
||||
Description desc = item.getDescription();
|
||||
if (desc != null) {
|
||||
SyndContentImpl syndDesc = new SyndContentImpl();
|
||||
syndDesc.setValue(desc.getValue());
|
||||
entry.setDescription(syndDesc);
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.commafeed.backend.rome;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.jdom2.Element;
|
||||
|
||||
import com.rometools.rome.feed.rss.Description;
|
||||
import com.rometools.rome.feed.rss.Item;
|
||||
import com.rometools.rome.io.impl.RSS090Parser;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
/**
|
||||
* Support description tag for RSS09
|
||||
*
|
||||
*/
|
||||
@RegisterForReflection
|
||||
public class RSS090DescriptionParser extends RSS090Parser {
|
||||
|
||||
@Override
|
||||
protected Item parseItem(Element rssRoot, Element eItem, Locale locale) {
|
||||
Item item = super.parseItem(rssRoot, eItem, locale);
|
||||
Element e = eItem.getChild("description", getRSSNamespace());
|
||||
if (e != null) {
|
||||
Description desc = new Description();
|
||||
desc.setValue(e.getText());
|
||||
item.setDescription(desc);
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user