cz.cvut.fel.uherjir2
Class DayWeatherInfo

java.lang.Object
  extended by cz.cvut.fel.uherjir2.DayWeatherInfo

public class DayWeatherInfo
extends java.lang.Object

Class DayWeatherInfo contains information about weather in some particular location. It contains info about date, day name, min and max temperature, cloudness information, wind direction and speed.

Author:
Jirka Uher

Field Summary
private  java.lang.String cloudness
           
private  boolean current
           
private  java.util.Date date
           
private  java.util.HashMap<java.lang.String,java.lang.String> dayMap
           
private  java.lang.String dayName
           
private  java.lang.String location
           
private  int maxTemp
           
private  int minTemp
           
private  java.lang.String windDirection
           
private  int windSpeed
           
 
Constructor Summary
DayWeatherInfo(java.lang.String location, boolean current)
          DayWeatherInfo constructor.
DayWeatherInfo(java.lang.String location, int offset)
          DayWeatherInfo constructor.
 
Method Summary
 java.lang.String getAIMLCode()
          Builds AIML code for this weather information.
 java.lang.String getCloudness()
           
 java.lang.String getDate()
           
 java.lang.String getDayName()
           
static java.lang.String getFormatedDate(java.util.Date date)
          Return formatted date in a format dd.MM.yyyy
 java.lang.String getLocation()
           
 int getMaxTemp()
           
 int getMinTemp()
           
 java.lang.String getWindDirection()
           
 int getWindSpeed()
           
 void setCloudness(java.lang.String cloudness)
           
 void setDate(java.util.Date date)
           
 void setDayName(java.lang.String dayName)
           
 void setLocation(java.lang.String location)
           
 void setMaxTemp(java.lang.String maxTemp)
           
 void setMinTemp(java.lang.String minTemp)
           
 void setWindDirection(java.lang.String windDirection)
           
 void setWindSpeed(java.lang.String windSpeed)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

date

private java.util.Date date

dayName

private java.lang.String dayName

maxTemp

private int maxTemp

minTemp

private int minTemp

cloudness

private java.lang.String cloudness

windDirection

private java.lang.String windDirection

windSpeed

private int windSpeed

location

private java.lang.String location

current

private boolean current

dayMap

private java.util.HashMap<java.lang.String,java.lang.String> dayMap
Constructor Detail

DayWeatherInfo

public DayWeatherInfo(java.lang.String location,
                      int offset)
DayWeatherInfo constructor.

Parameters:
location -
offset -

DayWeatherInfo

public DayWeatherInfo(java.lang.String location,
                      boolean current)
DayWeatherInfo constructor.

Parameters:
location -
current -
Method Detail

getFormatedDate

public static java.lang.String getFormatedDate(java.util.Date date)
Return formatted date in a format dd.MM.yyyy

Parameters:
date -
Returns:

getDayName

public java.lang.String getDayName()
Returns:
the dayName

setDayName

public void setDayName(java.lang.String dayName)
Parameters:
dayName - the dayName to set

getMaxTemp

public int getMaxTemp()
Returns:
the maxTemp

setMaxTemp

public void setMaxTemp(java.lang.String maxTemp)
Parameters:
maxTemp - the maxTemp to set

getMinTemp

public int getMinTemp()
Returns:
the minTemp

setMinTemp

public void setMinTemp(java.lang.String minTemp)
Parameters:
minTemp - the minTemp to set

getCloudness

public java.lang.String getCloudness()
Returns:
the cloudness

setCloudness

public void setCloudness(java.lang.String cloudness)
Parameters:
cloudness - the cloudness to set

getWindDirection

public java.lang.String getWindDirection()
Returns:
the windDirection

setWindDirection

public void setWindDirection(java.lang.String windDirection)
Parameters:
windDirection - the windDirection to set

getWindSpeed

public int getWindSpeed()
Returns:
the windSpeed

setWindSpeed

public void setWindSpeed(java.lang.String windSpeed)
Parameters:
windSpeed - the windSpeed to set

getDate

public java.lang.String getDate()
Returns:
the date

setDate

public void setDate(java.util.Date date)
Parameters:
date - the date to set

getLocation

public java.lang.String getLocation()
Returns:
the location

setLocation

public void setLocation(java.lang.String location)
Parameters:
location - the location to set

getAIMLCode

public java.lang.String getAIMLCode()
Builds AIML code for this weather information.

Returns:
Built AIML code

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object