Examples of RSSItem


Examples of org.apache.nutch.parse.rss.structs.RSSItem

                }

                // now get the descriptions of all the underlying RSS Items and
                // then index them too
                for (int j = 0; j < r.getItems().size(); j++) {
                    RSSItem theRSSItem = (RSSItem) r.getItems().get(j);
                    indexText.append(theRSSItem.getDescription());
                    indexText.append(" ");

                    String whichLink = null;

                    if (theRSSItem.getPermalink() != null)
                        whichLink = theRSSItem.getPermalink();
                    else
                        whichLink = theRSSItem.getLink();

                    if (whichLink != null) {
                        try {
          if (theRSSItem.getDescription()!=null) {
        theOutlinks.add(new Outlink(whichLink, theRSSItem.getDescription()));
          } else {
        theOutlinks.add(new Outlink(whichLink, ""));
          }
                        } catch (MalformedURLException e) {
                            LOG.info("nutch:parse-rss:RSSParser Exception: MalformedURL: "
View Full Code Here

Examples of org.apache.nutch.parse.rss.structs.RSSItem

                }

                // now get the descriptions of all the underlying RSS Items and
                // then index them too
                for (int j = 0; j < r.getItems().size(); j++) {
                    RSSItem theRSSItem = (RSSItem) r.getItems().get(j);
                    indexText.append(theRSSItem.getDescription());
                    indexText.append(" ");

                    String whichLink = null;

                    if (theRSSItem.getPermalink() != null)
                        whichLink = theRSSItem.getPermalink();
                    else
                        whichLink = theRSSItem.getLink();

                    if (whichLink != null) {
                        try {
                            theOutlinks.add(new Outlink(whichLink, theRSSItem
                                    .getDescription()));

                        } catch (MalformedURLException e) {
                            LOG
                                    .info("nutch:parse-rss:RSSParser Exception: MalformedURL: "
View Full Code Here

Examples of org.apache.nutch.parse.rss.structs.RSSItem

                }

                // now get the descriptions of all the underlying RSS Items and
                // then index them too
                for (int j = 0; j < r.getItems().size(); j++) {
                    RSSItem theRSSItem = (RSSItem) r.getItems().get(j);
                    indexText.append(theRSSItem.getDescription());
                    indexText.append(" ");

                    String whichLink = null;

                    if (theRSSItem.getPermalink() != null)
                        whichLink = theRSSItem.getPermalink();
                    else
                        whichLink = theRSSItem.getLink();

                    if (whichLink != null) {
                        try {
          if (theRSSItem.getDescription()!=null) {
        theOutlinks.add(new Outlink(whichLink, theRSSItem.getDescription(), getConf()));
          } else {
        theOutlinks.add(new Outlink(whichLink, "", getConf()));
          }
                        } catch (MalformedURLException e) {
                            if (LOG.isWarnEnabled()) {
View Full Code Here

Examples of org.apache.nutch.parse.rss.structs.RSSItem

            String description, String permalink) throws FeedParserException {

        //System.out.println("Found a new published article: " + permalink);
        if (fCurrentChannel != null) { //should never be null
            fCurrentChannel.getItems().add(
                    new RSSItem(title, link, description, permalink));
        }

    }
View Full Code Here

Examples of org.eclipse.higgins.rsse.RssItem

  public boolean changeItem(ID itemID, String description) {
    if (feed != null) {
      List items = feed.getItems();
      for (int i = 0; i < items.size(); i++) {
        RssItem rssItem = (RssItem) items.get(i);
        ID id = createID(rssItem.getSync().getId());
        if (id != null && id.equals(itemID)) {
          rssItem.setDescription(description);
          return true;
        }
      }
    }
    return false;
View Full Code Here

Examples of org.eclipse.higgins.rsse.RssItem

  public boolean removeItem(IItem item) {
    if (feed != null) {
      if (item instanceof RssItem) {
        List items = feed.getItems();
        for (int i = 0; i < items.size(); i++) {
          RssItem rssItem = (RssItem) items.get(i);
          if (rssItem.equals(item)) {
            items.remove(i);
            return true;
          }
        }
      }
View Full Code Here

Examples of org.eclipse.higgins.rsse.RssItem

        localFeed.setVersion(RssVersion.RSS_2_0);
      }
      // merge remote feed with local one
      localFeed.merge(remoteFeed);
      // add a new item to feed
      localFeed.addItem(new RssItem("New Google Item", "This is a new item", "http://www.google.com"));
      // publish updated feed
      localFeed.save(feedFile);
      // print item titles
      final java.util.List items = localFeed.getItems();
      for (int i = 0; i < items.size(); i++) {
View Full Code Here

Examples of org.gnu.stealthp.rsslib.RSSItem

      if (i >= hand.getRSSChannel().getItems().size()) {
        break;
      }

      // add it
      final RSSItem itm = (RSSItem) hand.getRSSChannel().getItems().get(i);
      addLink(itm.getTitle(), icon + "_web", new AE() {

        @Override
        public void run() {
          SystemHelper.openUrl(itm.getLink());

        }
      });
    }
  }
View Full Code Here

Examples of org.gudy.azureus2.plugins.utils.xml.rss.RSSItem

       
        RSSItem[]  items = channel.getItems();
       
        for (int j=0;j<items.length;j++){
         
          RSSItem  item = items[j];
         
          System.out.println( "    item:" + item.getTitle() + ", desc = " + item.getDescription() + ", link = " + item.getLink());
         
          SimpleXMLParserDocumentNode  node = item.getNode();
         
          System.out.println( "        [hash] " + node.getChild( "torrent_sha1" ).getValue());
          System.out.println( "        [size] " + node.getChild( "torrent_size" ).getValue());
          System.out.println( "        [seed] " + node.getChild( "torrent_seeders" ).getValue());
          System.out.println( "        [leec] " + node.getChild( "torrent_leechers" ).getValue());
View Full Code Here

Examples of org.gudy.azureus2.plugins.utils.xml.rss.RSSItem

       
        RSSItem[] items = channel.getItems();

        for ( int j=0 ; j<items.length; j++ ){
         
          RSSItem item = items[j];
         
          WebResult result = new WebResult(this,getRootPage(),getBasePage(),getDateParser(),"");
         
          result.setPublishedDate(item.getPublicationDate());
         
          result.setNameFromHTML(item.getTitle());
         
          URL cdp_link = item.getLink();
         
          if ( cdp_link != null ){
         
            result.setCDPLink(cdp_link.toExternalForm());
          }
         
          String uid = item.getUID();
         
          if ( uid != null ){
           
            result.setUID( uid );
          }
         
          boolean got_seeds_peers = false;
         
          SimpleXMLParserDocumentNode node = item.getNode();
         
          if ( node != null ){
           
            SimpleXMLParserDocumentNode[] children = node.getChildren();
           
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.