com.webalgorithm.weather.service
Class ResponseDigester
java.lang.Object
|
+--com.webalgorithm.weather.service.ResponseDigester
- public class ResponseDigester
- extends java.lang.Object
Description: Handles interpretation of the Weather.com weather response
Copyright: Copyright (c) 2003
Company: WebAlgorithm, Inc
- Version:
- 1.0
Field Summary |
private static java.lang.String[] |
floatParam
|
private static java.lang.String[] |
intParam
|
private static org.apache.commons.logging.Log |
log
|
private static java.lang.String[] |
timeParam
|
Method Summary |
static com.webalgorithm.weather.vo.ErrorsVO |
digestErrors(java.io.InputStream is)
|
static com.webalgorithm.weather.vo.LocationVO[] |
digestLocationSearch(java.io.InputStream is)
This method parses location search results. |
static com.webalgorithm.weather.vo.WeatherVO |
digestWeatherResults(java.io.InputStream is)
This method digests xml response from weather.com into a WeatherVO object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
floatParam
private static final java.lang.String[] floatParam
timeParam
private static final java.lang.String[] timeParam
intParam
private static final java.lang.String[] intParam
log
private static org.apache.commons.logging.Log log
ResponseDigester
public ResponseDigester()
digestWeatherResults
public static com.webalgorithm.weather.vo.WeatherVO digestWeatherResults(java.io.InputStream is)
throws java.lang.Exception
- This method digests xml response from weather.com into a WeatherVO object
- Parameters:
is
- - InputStream from xoap.weather.com http connection in WeatherService
- Returns:
- - WeatherVO object
- Throws:
java.lang.Exception
- - In case of parsing or other unexpected errors
digestLocationSearch
public static com.webalgorithm.weather.vo.LocationVO[] digestLocationSearch(java.io.InputStream is)
throws java.lang.Exception
- This method parses location search results. Location search is useful when zip code is not present. Search will return you a location id which can be used in place of zip code for weather search.
- Parameters:
is
- InputStream from an appropriate weather.com connection
- Throws:
java.lang.Exception
digestErrors
public static com.webalgorithm.weather.vo.ErrorsVO digestErrors(java.io.InputStream is)
throws java.lang.Exception
java.lang.Exception
Copyright © 2003 WebAlgorithm, Inc All Rights Reserved.