pubsubhubbub link with Project Rome
- by itsadok
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?