Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

display number of documents/rss-items for label "docs" in load_rss_p servlet (as replacement for the rarely used "docs" rss-tag for a url to the rss-specification)

reger862f28eaa60e
diff --git a/htroot/Load_RSS_p.java b/htroot/Load_RSS_p.java
index 18a209da5..98befe885 100644
--- a/htroot/Load_RSS_p.java
+++ b/htroot/Load_RSS_p.java
@@ -337,7 +337,7 @@ public class Load_RSS_p {
prop.putHTML("showitems_language", channel == null ? "" : channel.getLanguage());
prop.putHTML("showitems_date", (pubDate == null) ? "" : DateFormat.getDateTimeInstance().format(pubDate));
prop.putHTML("showitems_ttl", channel == null ? "" : channel.getTTL());
- prop.putHTML("showitems_docs", channel == null ? "" : channel.getDocs());
+ prop.put("showitems_docs", feed.size()); // number of documents
Map<String, DigestURL> urls = new HashMap<String, DigestURL>();
for (final Hit item: feed) {
diff --git a/source/net/yacy/cora/document/feed/Hit.java b/source/net/yacy/cora/document/feed/Hit.java
index a9c1ec746..34f486ddd 100644
--- a/source/net/yacy/cora/document/feed/Hit.java
+++ b/source/net/yacy/cora/document/feed/Hit.java
@@ -77,7 +77,7 @@ public interface Hit {
public String getGuid();
- public String getDocs();
+ public String getDocs(); // A URL that points to the documentation for the format used in the RSS file.
public String[] getSubject();
diff --git a/source/net/yacy/cora/document/feed/RSSMessage.java b/source/net/yacy/cora/document/feed/RSSMessage.java
index 4ea98cc6e..291897663 100644
--- a/source/net/yacy/cora/document/feed/RSSMessage.java
+++ b/source/net/yacy/cora/document/feed/RSSMessage.java
@@ -58,7 +58,7 @@ public class RSSMessage implements Hit, Comparable<RSSMessage>, Comparator<RSSMe
language(new String[]{"language",DublinCore.Language.getURIref()}),
guid(new String[]{"guid"}),
ttl(new String[]{"ttl"}),
- docs(new String[]{"docs"}),
+ docs(new String[]{"docs"}), // url to the documentation for the format used in the RSS file
size(new String[]{"size","length","yacy:size"}),
lon(new String[]{"geo:lon", Geo.Long.getURIref()}),
lat(new String[]{"geo:lat", Geo.Lat.getURIref()});
@@ -249,6 +249,10 @@ public class RSSMessage implements Hit, Comparable<RSSMessage>, Comparator<RSSMe
return Token.ttl.valueFrom(this.map, "");
}
+ /**
+ * A URL that points to the documentation for the format used in the RSS file.
+ * @return url string
+ */
@Override
public String getDocs() {
return Token.docs.valueFrom(this.map, "");