@SuppressWarnings("unchecked")
  public String getFeedContent(Feed feed) {
    if (feed == null) {
      LOGGER.warning("Feed is unknown!");
      return null;
    }

    Date updated = new Date(System.currentTimeMillis());
    feed.setUpdated(updated);
    List<Module> modules = feed.getModules();
    if (!ListUtil.isEmpty(modules)) {
      for (Module module : modules) {
        if (module instanceof DCModule) {
          ((DCModule) module).setDate(updated);
        }
      }
    }

    try {
      return wfo.outputString(feed);
    } catch (Exception e) {
      LOGGER.log(Level.WARNING, "Error while outputing feed to string: " + feed, e);
      return null;
    }
  }
 protected void addFeed(Feed feed, Element parent) throws FeedException {
   Element eFeed = parent;
   populateFeedHeader(feed, eFeed);
   generateForeignMarkup(eFeed, (List) feed.getForeignMarkup());
   checkFeedHeaderConstraints(eFeed);
   generateFeedModules(feed.getModules(), eFeed);
 }