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

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

public class WeatherReader
extends RSSReader

WeatherReader accesses current weather conditions for north american cities.

WeatherReader.java Description: Reader class which utilizes the ROME library to read RSS feed information from the weather underground website.

Author:
Tom Lauwers (tlauwers@andrew.cmu.edu)

Constructor Summary
WeatherReader(String location)
          Construct the Weather Reader by providing City, ST of the city which you wish to obtain weather data from.
 
Method Summary
 String getConditions()
           
 double getHumidity()
           
 double getPressure()
           
 double getTemperature()
           
 String getWindDirection()
           
 double getWindSpeed()
           
 void updateWeatherFeed()
          Updates all of the weather data from the 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

WeatherReader

public WeatherReader(String location)
Construct the Weather Reader by providing City, ST of the city which you wish to obtain weather data from. For example, to get Pittsburgh, PA's data, construct with WeatherReader("Pittsburgh, PA").

Parameters:
location - String holds which location to get weather data from
Method Detail

updateWeatherFeed

public void updateWeatherFeed()
Updates all of the weather data from the website


getTemperature

public double getTemperature()
Returns:
Temperature in fahrenheit

getPressure

public double getPressure()
Returns:
Barometric pressure in inches

getHumidity

public double getHumidity()
Returns:
Humidity as a percentage

getWindSpeed

public double getWindSpeed()
Returns:
Wind speed in miles per hour

getConditions

public String getConditions()
Returns:
Current weather conditions (like 'partly cloudy', 'raindy', etc)

getWindDirection

public String getWindDirection()
Returns:
Wind direction ("West" or "ENE" or "SW")