Reputation: 29342
I want to use Project Rome to create an RSS feed, using the code from the tutorial as base. I would like to add a pubsubhubbub discovery link, but there doesn't seem to be a general way to do so.
I can use a Link
object if I create an atom feed (which I don't want to limit myself to), or I can just add foreign markup, like this:
// import org.jdom.Element
Element element = new Element("link");
element.setAttribute("rel", "hub");
element.setAttribute("href", "https://myhub.example.com/endpoint");
feed.setForeignMarkup(Arrays.asList(element));
But it feels ugly.
Is this really the best way to do this?
Upvotes: 0
Views: 751
Reputation: 5316
Project rome has moved to http://rometools.org. It has a incubator project certiorem for pubsubhubbub that looks promising as it is already mavenized:
Upvotes: 1
Reputation: 32982
I'm not very familiar with Rome, but I guess it works. If you indeed your RSS (and not ATOM), make sure you:
<link>
item (which isn't part of the RSS2.0 specrel = "self"
which points to the corresponding url.Finally, you may want to edit your title by adding "hubbub" to "pubsub", since PubSub is more general and is more often used in the context of XMPP XEP 060.
Upvotes: 1