mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
remove workaround for #140 that is no longer needed
This commit is contained in:
@@ -1,48 +0,0 @@
|
|||||||
package com.commafeed.backend.rome;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.jdom2.Document;
|
|
||||||
import org.jdom2.Element;
|
|
||||||
import org.jdom2.Namespace;
|
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import com.rometools.rome.io.impl.RSS10Parser;
|
|
||||||
|
|
||||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
|
||||||
|
|
||||||
@RegisterForReflection
|
|
||||||
public class RSSRDF10Parser extends RSS10Parser {
|
|
||||||
|
|
||||||
private static final String RSS_URI = "http://purl.org/rss/1.0/";
|
|
||||||
private static final Namespace RSS_NS = Namespace.getNamespace(RSS_URI);
|
|
||||||
|
|
||||||
public RSSRDF10Parser() {
|
|
||||||
super("rss_1.0", RSS_NS);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isMyType(Document document) {
|
|
||||||
boolean ok;
|
|
||||||
|
|
||||||
Element rssRoot = document.getRootElement();
|
|
||||||
Namespace defaultNS = rssRoot.getNamespace();
|
|
||||||
List<Namespace> additionalNSs = Lists.newArrayList(rssRoot.getAdditionalNamespaces());
|
|
||||||
List<Element> children = rssRoot.getChildren();
|
|
||||||
if (CollectionUtils.isNotEmpty(children)) {
|
|
||||||
Element child = children.get(0);
|
|
||||||
additionalNSs.add(child.getNamespace());
|
|
||||||
additionalNSs.addAll(child.getAdditionalNamespaces());
|
|
||||||
}
|
|
||||||
|
|
||||||
ok = defaultNS != null && defaultNS.equals(getRDFNamespace());
|
|
||||||
if (ok) {
|
|
||||||
ok = false;
|
|
||||||
for (int i = 0; !ok && i < additionalNSs.size(); i++) {
|
|
||||||
ok = getRSSNamespace().equals(additionalNSs.get(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ok;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
WireFeedParser.classes= com.commafeed.backend.rome.OPML11Parser \
|
WireFeedParser.classes=com.commafeed.backend.rome.OPML11Parser \
|
||||||
com.commafeed.backend.rome.RSSRDF10Parser \
|
|
||||||
com.commafeed.backend.rome.RSS090DescriptionParser
|
com.commafeed.backend.rome.RSS090DescriptionParser
|
||||||
|
|
||||||
|
|
||||||
Converter.classes= com.commafeed.backend.rome.RSS090DescriptionConverter
|
|
||||||
|
|
||||||
WireFeedGenerator.classes= com.commafeed.backend.rome.OPML11Generator
|
|
||||||
|
Converter.classes=com.commafeed.backend.rome.RSS090DescriptionConverter
|
||||||
|
|
||||||
|
WireFeedGenerator.classes=com.commafeed.backend.rome.OPML11Generator
|
||||||
Reference in New Issue
Block a user