I am creating an rss feed in Java using ROME, but for the life of me, i can find how a GUID on it.
public boolean addRss(String msg,String msgLink,Date date){
List<SyndEntry> entries = new ArrayList<SyndEntry>();
SyndEntry entry;
entry = new SyndEntryImpl();
entry.setTitle(msg);
if(msgLink!=null){
entry.setLink(msgLink);
}
entry.setPublishedDate(date);
entries.add(entry);
feed.setEntries(entries);
return true;
}
This code works for creating a rss item. the problem is that i need to add a timestamp as a GUID. So i tried to use a Guid object as so
Guid g=new Guid();
g.setValue(date.toString());
g.setPermaLink(false);
But I cant find a way to add this to my item, for example there is no entry.setGuid(Guid)
Edit
It turns out that Guid()
can be added to an Item()
not a SyndFeedImpl()
as i have in my case, and i cant find a way to add an Item to my SyndFeedImpl. I would rather have some way of adding a guid to a SyndFeedImpl() than re writing the whole thing