Project 3 - An RSS Client

Due - Monday, October 8, 2007

The goal of this project is to give you experience with object-oriented design an inheritance. You will write an RSS client capable of retrieving two types of RSS feeds and presenting relevant data to the user. To accomplish this, you will retrieve the feeds and generate a collection of objects that contain information about the items contained in each feed. You will then provide the user with the ability to view the collection in several ways.

Your program should provide the following functionality:

Processing of the Configuration File

Your program will begin by reading from a file a list of URLs for the feeds the user is interested in reading. The format of your configuration file should look like this example. Notice that each line contains a prefix indicating the type of the feed (general or podcast), followed by a colon, followed by the URL of the feed.

Below are several URLs you can begin with:

General Feeds:

http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml

http://feeds.arstechnica.com/arstechnica/BAaf

Podcast/iTunes Feeds:

http://feeds.feedburner.com/coverville

http://www.wdwinfo.com/podcast/unplugged.xml

http://www.npr.org/rss/podcast.php?id=1090&uid=b65ec27c2cdc209bd5237dce3d494d52

Retrieval and Processing of the Feeds

You will need to retrieve the contents of all feeds the user is interested in, and build a collection of objects (you should use the ArrayList class) containing the information. For each URL in the configuraiton file, retrieve the associated feed. Using the XML parser, you should be able to easily retrieve the feed and generate its XML tree. Next, extract the appropriate information from the tree and use it to build an object for each item element.

You will need to think carefully about the information you will store in each item object. First, you will need to store relevant information about the feed itself, including the title. Second, you will need to store relevant information about the specific item, including (but not limited to!) the publication date, title, author, and description.

Notice that the item elements in the Podcast/iTunes Feeds listed above contain more information that the item elements in the General Feeds. You will need to create a specialized class (subclass!) that contains not only the information listed above, but also iTunes specific information such as the summary and duration.

At the end of this step, you will have a collection of objects -- several from the first feed, several from the second feed, and so on.

Viewing of the Feed Contents

Once you have retrieved all of the feed contents, you will display the 30 most recent items sorted by date, most recent first. Next, prompt the user with a menu displaying the following choices:

If the user selects the "View all details for a specific item" choice, display all item titles and an index for each. Then, allow the user to specify the index of the item he/she wishes to see.

If the user selects the "Search titles" choice, ask the him/her for a search term and display the titles of all items that have the search term in the item title.

Continue to prompt the user with this menu until he/she chooses to quit.

Possible Extra Credit Extensions

  1. Implement a graphical user interface
  2. When the user chooses "Quit", iterate through the collection of items and store the data in an XML file. Each time the program starts, process the contents of this file first to build an initial database. Then, retrieve the updated feeds from the Internet.
  3. Visit http://www.feedforall.com/directory-namespace.htm and choose another namespace to support with your program.
Grading:
15Overall design and documentation
10Compiles and runs
10Demonstration and oral responses
10Correctly processes configuration file
15Correctly retrieves feeds and builds collection
10View 30 most recent items
5View items from General feeds
5View items from Podcast feeds
10View detail
10Search

Due 9:40AM, Monday, October 8, 2007

  1. Complete and submit your working code. Turn in a hard copy in class and place a copy of your .java files in /home/submit/cs112/username.
  2. Make sure that each function is well documented. Your documentation should specify the type and function of the input parameters and output.
  3. Run your program on a variety of inputs ensuring that all error conditions are handled correctly.
Note: No portion of your code may be copied from any other source including another text book, a web page, or another student (current or former). You must provide citations for any sources you have used in designing and implementing your program.
Sami Rollins