com.webalgorithm.weather.demo
Class WeatherService
java.lang.Object
|
+--com.webalgorithm.weather.demo.WeatherService
- public class WeatherService
- extends java.lang.Object
Description: Weather.com Service Provides with easy and simple access to current weather. Please note that this is a DEMO VERSION. Please visit http://www.webalgorithm.com for information on obtaining a fully functional version
Copyright: Copyright (c) 2003
Company: WebAlgorithm, Inc
- Version:
- 1.0
Field Summary |
private static org.apache.commons.logging.Log |
log
|
Method Summary |
static com.webalgorithm.weather.vo.LocationVO[] |
lookupLocations(java.lang.String location)
Location lookup is usefull when user does not have a zip code or location id, but still wishes to utilize the weather service. |
static com.webalgorithm.weather.vo.WeatherVO |
lookupWeather(java.lang.String locationId,
int days,
java.lang.String unit,
java.lang.String partnerId,
java.lang.String licenseKey)
This method looks up weather for a given location. |
private static void |
printCopyRight()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.apache.commons.logging.Log log
WeatherService
public WeatherService()
lookupWeather
public static com.webalgorithm.weather.vo.WeatherVO lookupWeather(java.lang.String locationId,
int days,
java.lang.String unit,
java.lang.String partnerId,
java.lang.String licenseKey)
throws java.lang.Exception
- This method looks up weather for a given location.
- Parameters:
locationId
- - Location zipcode or Weather.com Location Id. Location Id my be obtained by utilizing a location search available as part of this service.days
- - Days ahead to look 1-10unit
- - 'm' - metric, 's' - standardpartnerId
- - partnerId, this is your partnerId with weather.com, it is FREE but you need to register. For information on how to obtain parterId please visit http://registration.weather.com/registration/xmloap/step1licenseKey
- - this is your license key as issued by weather.com, this key will be emailed to you once you complete registration. It is free!!!
- Returns:
- - Returned the WeatherVO object
- Throws:
java.lang.Exception
- - In case of Network, IO or parsing issues.
lookupLocations
public static com.webalgorithm.weather.vo.LocationVO[] lookupLocations(java.lang.String location)
throws java.lang.Exception
- Location lookup is usefull when user does not have a zip code or location id, but still wishes to utilize the weather service.
- Parameters:
location
- This is a name of your location, for example: Dallas, New York, etc
- Returns:
- Return array of LocationVO objects.
- Throws:
java.lang.Exception
printCopyRight
private static void printCopyRight()
Copyright © 2003 WebAlgorithm, Inc All Rights Reserved.