edu.cmu.ri.createlab.rss.readers
Class NewsReader

java.lang.Object
  extended by edu.cmu.ri.createlab.rss.RSSReader
      extended by edu.cmu.ri.createlab.rss.readers.NewsReader

public class NewsReader
extends RSSReader

NewsReader accesses yahoo top stories.

NewsReader.java Description: Reader class which utilizes the ROME library to read RSS feed information from the Yahoo news top stories.

Author:
Daragh Egan

Constructor Summary
NewsReader()
          Construct News Reader using the default news feed
NewsReader(String url)
          Construct NewsReader using the url of the news feed you wish to use
 
Method Summary
 int getNewsCount()
           
 String getTitle()
           
 ArrayList<String> search(String keyword)
           
 void setIndex(int in)
           
 void updateNewsFeed()
          Updates all news data from website
 
Methods inherited from class edu.cmu.ri.createlab.rss.RSSReader
getEntries, getEntriesPublishedAfterTimestamp, getEntryAuthor, getEntryCount, getEntryDate, getEntryDescription, getEntryLink, getEntryTitle, getFeedAuthor, getFeedDate, getFeedDescription, getFeedLink, getFeedTitle, updateFeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewsReader

public NewsReader(String url)
Construct NewsReader using the url of the news feed you wish to use

Parameters:
url - String url of the news feed you wish to use

NewsReader

public NewsReader()
Construct News Reader using the default news feed

Method Detail

updateNewsFeed

public void updateNewsFeed()
Updates all news data from website


getNewsCount

public int getNewsCount()
Returns:
number of articles listed in feed

getTitle

public String getTitle()
Returns:
title of article at index

search

public ArrayList<String> search(String keyword)
Parameters:
keyword - String keyword for search
Returns:
ArrayList containing search results

setIndex

public void setIndex(int in)
Parameters:
in - int new index value