Package com.sun.syndication.feed.synd

Examples of com.sun.syndication.feed.synd.SyndFeed


    }
    return new FeedCrawlResult(entries,feedLastUpdated,feedPubDate);
  }
 
  private SyndFeed fetchFeed(String feedUrl){   
    SyndFeed feed = null;
    try{
      SyndFeedInput input = new SyndFeedInput();
      feed = input.build(new XmlReader(new URL(feedUrl)));
    }catch(Exception e){
      logger.error("error reading feed: " + feedUrl);
View Full Code Here


    return jsonResult;
  }

  @Override
  protected String go() throws Exception {
    SyndFeed feed = readAtomData(getSearchUrl());
    if(feed != null){
      jsonResult = createJsonResult(feed);
    }else{
      jsonResult = null;
    }
View Full Code Here

    }
    return SUCCESS;
  }
 
  private SyndFeed readAtomData(String url){
    SyndFeed feed = null;   
    SyndFeedInput input = new SyndFeedInput();
    try {
      feed = input.build(new XmlReader(new URL(url)));
    } catch(Exception e){
      logger.debug("error reading feed: " + url,e);
View Full Code Here

    String title = "Gnizr Search Result for '" + getQueryString() + "'";
    String author = "gnizr";
    String link = getGnizrConfiguration().getWebApplicationUrl();
    String feedUri = GnizrDaoUtil.getRandomURI();
    Date pubDate = GnizrDaoUtil.getNow();
    SyndFeed syndFeed = SyndFeedFactory.create(getBookmarks(),author,title,link,pubDate,feedUri);
    syndFeed = SyndFeedFactory.addOpenSearchModule(syndFeed,getPerPageCount(),computeOffset(getPage()),getTotalMatched(), null);
    return syndFeed;
  }
View Full Code Here

    String title = "Gnizr Search Result for '" + getQueryString() + "'";
    String author = "gnizr";
    String link = getGnizrConfiguration().getWebApplicationUrl();
    String feedUri = GnizrDaoUtil.getRandomURI();
    Date pubDate = GnizrDaoUtil.getNow();
    SyndFeed syndFeed = SyndFeedFactory.createFromBookmarkDoc(getBookmarks(),author,title,link,pubDate,feedUri);
    syndFeed = SyndFeedFactory.addOpenSearchModule(syndFeed,getPerPageCount(),computeOffset(getPage()),getTotalMatched(), null);
    return syndFeed;
  }
View Full Code Here

    syndFeed = SyndFeedFactory.addOpenSearchModule(syndFeed,getPerPageCount(),computeOffset(getPage()),getTotalMatched(), null);
    return syndFeed;
  }

  public JSONObject getJsonResult(){
    SyndFeed feed = getOpenSearchResult();
    if(feed != null){
      return OpenSearchProxy.createJsonResult(feed);
    }
    return null;
  }
View Full Code Here

    String title = "Gnizr search result for '" + getQueryString() + "' -- saved by " + getUser().getFullname();
    String author = "gnizr";
    String link = getGnizrConfiguration().getWebApplicationUrl();
    String feedUri = GnizrDaoUtil.getRandomURI();
    Date pubDate = GnizrDaoUtil.getNow();
    SyndFeed syndFeed = SyndFeedFactory.createFromBookmarkDoc(getBookmarks(),author,title,link,pubDate,feedUri);
    syndFeed = SyndFeedFactory.addOpenSearchModule(syndFeed,getPerPageCount(),computeOffset(getPage()),getTotalMatched(), null);
    return syndFeed;
  }
View Full Code Here

    syndFeed = SyndFeedFactory.addOpenSearchModule(syndFeed,getPerPageCount(),computeOffset(getPage()),getTotalMatched(), null);
    return syndFeed;
  }
 
  public JSONObject getJsonResult(){
    SyndFeed feed = getOpenSearchResult();
    if(feed != null){
      return OpenSearchProxy.createJsonResult(feed);
    }
    return null;
  }
View Full Code Here

      return this.rssTitle;
    }

    public void run() {
      try {
        SyndFeed feed = null;
        SyndFeedInput input = new SyndFeedInput();
        feed = input.build(new XmlReader(new URL(feedUrl)));
        rssTitle = feed.getTitle();
      } catch (Exception e) {
        logger.debug(e);
      }

    }
View Full Code Here

        }

        // don't forget to set the content to the correct mimetype
        ServletActionContext.getResponse().setContentType(mimeType);
        // get the feed from the stack that can be found by the feedName
        SyndFeed feed = (SyndFeed) actionInvocation.getStack().findValue(feedName);

        if (feed != null) {
            if (encoding == null)
                encoding = feed.getEncoding();    // second choice is whatever the feed specifies
            if (encoding != null)
                ServletActionContext.getResponse().setCharacterEncoding(encoding);
            // If neither of the above work, we'll get the platform default.

            if (logger.isDebugEnabled())
                logger.debug("Found object on stack with expression '" + feedName + "': " + feed);

            if (feedType != null) // if the feedType is specified, we'll override the one set in the feed object
                feed.setFeedType(feedType);

            SyndFeedOutput output = new SyndFeedOutput();
            // we'll need the writer since Rome doesn't support writing to an outputStream yet
            Writer out = null;
            try {
View Full Code Here

TOP

Related Classes of com.sun.syndication.feed.synd.SyndFeed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.