added rdf data structure for rss feeds

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7297 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 84f2953cd8
commit 04932dc268

@ -42,7 +42,7 @@ public class RSSReader extends DefaultHandler {
private final RSSFeed theChannel; private final RSSFeed theChannel;
private Type type; private Type type;
public enum Type { rss, atom, none }; public enum Type { rss, atom, rdf, none };
private RSSReader(int maxsize) { private RSSReader(int maxsize) {
theChannel = new RSSFeed(maxsize); theChannel = new RSSFeed(maxsize);
@ -99,8 +99,9 @@ public class RSSReader extends DefaultHandler {
} }
final String end = new String(a, a.length - 80, 80); final String end = new String(a, a.length - 80, 80);
Type type = Type.none; Type type = Type.none;
if (end.indexOf("rss") > 0) type = Type.rss; if (end.indexOf("rss") > 0) type = Type.rss;
if (end.indexOf("feed") > 0) type = Type.atom; if (end.indexOf("feed") > 0) type = Type.atom;
if (end.indexOf("rdf") > 0) type = Type.rdf;
if (type == Type.none) { if (type == Type.none) {
throw new IOException("response incomplete"); throw new IOException("response incomplete");
} }

Loading…
Cancel
Save