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)
pull/77/head
reger 8 years ago
parent 5027912f30
commit 862f28eaa6

@ -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) {

@ -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();

@ -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, "");

Loading…
Cancel
Save