1 17 package com.sun.syndication.io.impl; 18 19 import com.sun.syndication.feed.rss.Item; 20 import org.jdom.Element; 21 22 import java.util.Date ; 23 import java.util.List ; 24 25 26 33 public class RSS093Generator extends RSS092Generator { 34 35 public RSS093Generator() { 36 this("rss_0.93","0.93"); 37 } 38 39 protected RSS093Generator(String feedType,String version) { 40 super(feedType,version); 41 } 42 43 protected void populateItem(Item item, Element eItem, int index) { 44 super.populateItem(item,eItem, index); 45 46 Date pubDate = item.getPubDate(); 47 if (pubDate != null) { 48 eItem.addContent(generateSimpleElement("pubDate", DateParser.formatRFC822(pubDate))); 49 } 50 51 Date expirationDate = item.getExpirationDate(); 52 if (expirationDate != null) { 53 eItem.addContent(generateSimpleElement("expirationDate", DateParser.formatRFC822(expirationDate))); 54 } 55 } 56 57 protected int getNumberOfEnclosures(List enclosures) { 59 return enclosures.size(); 60 } 61 62 } 63 | Popular Tags |