SyndFeedOutput output = new SyndFeedOutput(); output.output(feed, response.getWriter());
SyndFeedOutput output = new SyndFeedOutput(); output.output(feed, response.getWriter());
SyndFeedOutput output = new SyndFeedOutput(); output.output(feed, response.getWriter());
protected String syndFeedToXml(SyndFeed feed) throws FeedException { SyndFeedOutput feedOutput = new SyndFeedOutput(); return feedOutput.outputString(feed); }
final SyndFeedOutput output = new SyndFeedOutput(); final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final SyndFeedOutput output = new SyndFeedOutput(); final ByteArrayOutputStream baos = new ByteArrayOutputStream();
/** * Dispatch the view using ROME * * @param request the request * @param response the resopnse * @param context the the servlet context * @throws ServletException */ public void dispatch(HttpServletRequest request, HttpServletResponse response, ServletContext context) throws ServletException { SyndFeed syndFeed = getFeed(); syndFeed.setFeedType(getFeedType().getFeedType()); SyndFeedOutput output = new SyndFeedOutput(); try { output.output(syndFeed, response.getWriter()); } catch (IOException e) { throw new ServletException("Error generating feed", e); } catch (FeedException e) { throw new ServletException("Error generating feed", e); } }
/** * This method will take a SyndFeed object with a SimpleListExtension on it and populate the * entries with current SleEntry values for sorting and grouping. <b>NB</b>: This basically does * this by re-generating the XML for all the entries then re-parsing them into the SLE data * structures. It is a very heavy operation and should not be called frequently! */ public static void initializeForSorting(final SyndFeed feed) throws FeedException { // TODO: the null parameter below will break delegating parsers and generators // final ModuleGenerators g = new ModuleGenerators(feed.getFeedType() + // ITEM_MODULE_GENERATORS_POSFIX_KEY, null); final SyndFeedOutput output = new SyndFeedOutput(); final Document document = output.outputJDom(feed); final SyndFeed copy = new SyndFeedInput().build(document); feed.copyFrom(copy); }
/** * This method will take a SyndFeed object with a SimpleListExtension on it and populate the * entries with current SleEntry values for sorting and grouping. <b>NB</b>: This basically does * this by re-generating the XML for all the entries then re-parsing them into the SLE data * structures. It is a very heavy operation and should not be called frequently! */ public static void initializeForSorting(final SyndFeed feed) throws FeedException { // TODO: the null parameter below will break delegating parsers and generators // final ModuleGenerators g = new ModuleGenerators(feed.getFeedType() + // ITEM_MODULE_GENERATORS_POSFIX_KEY, null); final SyndFeedOutput output = new SyndFeedOutput(); final Document document = output.outputJDom(feed); final SyndFeed copy = new SyndFeedInput().build(document); feed.copyFrom(copy); }
feed.setFeedType(feedType); SyndFeedOutput output = new SyndFeedOutput();
@Override protected void get(IServletRequest req, IServletResponse res) throws IOException { try { SyndFeed feed = getFeed(req); String feedType = req.getParameter(FEED_TYPE); feedType = (feedType != null) ? feedType : defaultFeedType; feed.setFeedType(feedType); HttpUtil.setContentType(res, MIME_TYPE); SyndFeedOutput output = new SyndFeedOutput(); output.output(feed, res.writer()); } catch (FeedException | ParseException ex) { GlobalConfig.ASTERIX_LOGGER.log(Level.WARN, ex.getMessage(), ex); String msg = COULD_NOT_GENERATE_FEED_ERROR; res.writer().print(msg); res.setStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR); } }