1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.weather.model;
24  
25  import java.io.Serializable;
26  
27  /**
28   * <a href="Weather.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   *
32   */
33  public class Weather implements Serializable {
34  
35      public Weather() {
36      }
37  
38      public Weather(String zip, float currentTemp) {
39          this(zip, null, currentTemp);
40      }
41  
42      public Weather(String zip, String iconURL, float currentTemp) {
43          this(zip, iconURL, null, currentTemp, (float)0.0, (float)0.0, null);
44      }
45  
46      public Weather(String zip, String iconURL, String conditions,
47                     float currentTemp, float humidity, float barometer,
48                     String barometerDirection) {
49          _zip = zip;
50          _iconURL = iconURL;
51          _conditions = conditions;
52          _currentTemp = currentTemp;
53          _humidity = humidity;
54          _barometer = barometer;
55          _barometerDirection = barometerDirection;
56      }
57  
58      public String getZip() {
59          return _zip;
60      }
61  
62      public void setZip(String zip) {
63          _zip = zip;
64      }
65  
66      public String getIconURL() {
67          return _iconURL;
68      }
69  
70      public void setIconURL(String iconURL) {
71          _iconURL = iconURL;
72      }
73  
74      public String getConditions() {
75          return _conditions;
76      }
77  
78      public void setConditions(String conditions) {
79          _conditions = conditions;
80      }
81  
82      public float getCurrentTemp() {
83          return _currentTemp;
84      }
85  
86      public void setCurrentTemp(float currentTemp) {
87          _currentTemp = currentTemp;
88      }
89  
90      public float getHumidity() {
91          return _humidity;
92      }
93  
94      public void setHumidity(float humidity) {
95          _humidity = humidity;
96      }
97  
98      public float getBarometer() {
99          return _barometer;
100     }
101 
102     public void setBarometer(float barometer) {
103         _barometer = barometer;
104     }
105 
106     public String getBarometerDirection() {
107         return _barometerDirection;
108     }
109 
110     public void setBarometerDirection(String barometerDirection) {
111         _barometerDirection = barometerDirection;
112     }
113 
114     private String _zip;
115     private String _iconURL;
116     private String _conditions;
117     private float _currentTemp;
118     private float _humidity;
119     private float _barometer;
120     private String _barometerDirection;
121 
122 }