Examples of SyndFeedInput


Examples of com.sun.syndication.io.SyndFeedInput

                }
            }

            for(String url : urls){
                URL feedSource = new URL(url);
                SyndFeedInput input = new SyndFeedInput();
                SyndFeed feed = input.build(new XmlReader(feedSource));
                feeds.add(feed);
            }

            manager.completeWorkItem(workItem.getId(), null);
        } catch (IOException ex) {
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

  public FeedBot(String host, int port, String nick, String pass, String channel, boolean ssl, int minInterval, int maxInterval, ArrayList<String> sources)
  {
    super(host, port, nick, pass, channel, ssl, minInterval, maxInterval);

    this.sources = sources;
    this.input = new SyndFeedInput();
  }
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

    protected SyndFeed loadOrCreateFeed() throws IllegalArgumentException, FeedException, IOException {
        if (isLoadOnStartup()) {
            File file = getFeedFile();
            if (file.exists() && file.isFile()) {
                SyndFeedInput input = new SyndFeedInput();
                XmlReader xmlReader = new XmlReader(file);
                return input.build(xmlReader);
            }
        }
        return createFeed();
    }
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

        }
    }

    protected List getLastesEntries() {
        List result = new ArrayList();
        SyndFeedInput input = new SyndFeedInput();
        for (int i = 0;i < urls.size();i++) {
            URL inputUrl = (URL) urls.get(i);
            SyndFeed inFeed;
            try {
                inFeed = input.build(new XmlReader(inputUrl));
                List entries = inFeed.getEntries();
                for (int k = 0;k < entries.size();k++) {
                    SyndEntry entry = (SyndEntry) entries.get(k);
                    if (entry.getPublishedDate().after(getLastPolledDate())) {
                        result.add(entry);
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

       
        File file = getFile(layer);
        if ( file.exists() ) {
            //read the feed from disk filtering as need be
            synchronized ( this ) {
                SyndFeedInput input = new SyndFeedInput();
                feed = input.build(new XmlReader(getFile(layer)));   
            }
        }
        else {
            //create a new empty feed
            feed = new SyndFeedImpl();
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

    Vector<SyndicationEntryInfo> vector = new Vector<SyndicationEntryInfo>();
    it = urls.iterator();
    while (it.hasNext()) {
      String url = (String) it.next();
      try {
              SyndFeedInput input = new SyndFeedInput();
              SyndFeed feed = input.build(new XmlReader(new URL(url)));
              List<?> list = feed.getEntries();
              Iterator<?> iterator = list.iterator();
              while (iterator.hasNext()) {
                SyndEntry entry = (SyndEntry) iterator.next();
                SyndicationEntryInfo syndicationEntryInfo = new SyndicationEntryInfo();
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

            Metadata metadata, ParseContext context) throws IOException,
            SAXException, TikaException {
        SyndFeed feed = null;
        // set the encoding?
        try {
            SyndFeedInput feedInput = new SyndFeedInput();
            InputSource input = new InputSource(stream);
            feed = feedInput.build(input);
        } catch (Exception e) {
            throw new TikaException(e.getMessage());
        }

        String feedLink = feed.getLink();
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

            InputStream stream, ContentHandler handler,
            Metadata metadata, ParseContext context)
            throws IOException, SAXException, TikaException {
        // set the encoding?
        try {
            SyndFeed feed = new SyndFeedInput().build(
                    new InputSource(new CloseShieldInputStream(stream)));

            String title = stripTags(feed.getTitleEx());
            String description = stripTags(feed.getDescriptionEx());
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

                        "An error occured while getting the feed at " + targetURL +
                                ". Reason :" +
                                method.getStatusLine());
            }
            InputStream response = method.getResponseBodyAsStream();
            SyndFeedInput input = new SyndFeedInput();
            SyndFeed feed = input.build(new XmlReader(response));
            retFeed = (Feed) cx.newObject(feedReaderObject, "Feed", new Object[0]);
            retFeed.setFeed(feed);
        } catch (SSLHandshakeException e) {
            if (e.getMessage().indexOf(
                    "sun.security.validator.ValidatorException: PKIX path building failed") > -1) {
View Full Code Here

Examples of com.sun.syndication.io.SyndFeedInput

   */
  @SuppressWarnings("unchecked")
  public JSONObject process(String feedUrl, String feedXml,
      boolean getSummaries, int numEntries) throws GadgetException {
    try {
      SyndFeed feed = new SyndFeedInput().build(new StringReader(feedXml));
      JSONObject json = new JSONObject();
      json.put("Title", feed.getTitle());
      json.put("URL", feedUrl);
      json.put("Description", feed.getDescription());
      json.put("Link", feed.getLink());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.