Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.blojsom.plugin.weather.beans
Class NWSInformation

    java.lang.Object
      org.blojsom.plugin.weather.beans.NWSInformation

All Implemented Interfaces:
  WeatherInformation

public class NWSInformation
extends java.lang.Object
implements WeatherInformation

NWSInformation

Since:
  blojsom 3.0
Version:
  $Id: NWSInformation.java,v 1.1 2006/03/26 16:27:30 czarneckid Exp $
Author:
  David Czarnecki, Mark Lussier

Field Summary
`static java.lang.String` | `NWS_URL_FORMAT`
`static java.lang.String` | `TAG_CREDIT`
`static java.lang.String` | `TAG_CREDIT_URL`
`static java.lang.String` | `TAG_HISTORY`
`static java.lang.String` | `TAG_HUMIDITY`
`static java.lang.String` | `TAG_LOCATION`
`static java.lang.String` | `TAG_OBSERVATION`
`static java.lang.String` | `TAG_STATION`
`static java.lang.String` | `TAG_TEMP_C`
`static java.lang.String` | `TAG_TEMP_F`
`static java.lang.String` | `TAG_TEMP_STRING`
`static java.lang.String` | `TAG_VISIBILITY`
`static java.lang.String` | `TAG_WEATHER`
`static java.lang.String` | `TAG_WIND_DEGREES`
`static java.lang.String` | `TAG_WIND_DIRECTION`
`static java.lang.String` | `TAG_WIND_GUST_MPH`
`static java.lang.String` | `TAG_WIND_MPH`
`static java.lang.String` | `TAG_WIND_STRING`

Constructor Summary
`NWSInformation(java.lang.String stationCode)` Public Constructor

Method Summary
`java.lang.String` | `getCelcius()` Get the current temperate as Celcius
`java.lang.String` | `getFahrenheit()` Get the current temperature as Farenheit
`java.lang.String` | `getHistoryUrl()` Get the URL containing a link to weather history information
`java.lang.String` | `getLocation()` Get the Location of the Weather Station
`java.lang.String` | `getProviderUrl()` Gets the URL required to fetch this resource
`java.lang.String` | `getStationCode()` Get the Station Id
`java.lang.String` | `getValueForTag(java.lang.String tag)` Get the value for a given tag from the parsed XML weather information
`java.lang.String` | `getVisibility()` Get the current Visibility
`java.lang.String` | `getWind()` Get the current Wind conditions
`void` | `parseDocument(org.w3c.dom.Document document)` Parse an XML document containing weather related information

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NWS_URL_FORMAT

    public static final java.lang.String NWS_URL_FORMAT

See Also:
  Constant Field Values

### TAG_CREDIT

    public static final java.lang.String TAG_CREDIT

See Also:
  Constant Field Values

### TAG_CREDIT_URL

    public static final java.lang.String TAG_CREDIT_URL

See Also:
  Constant Field Values

### TAG_LOCATION

    public static final java.lang.String TAG_LOCATION

See Also:
  Constant Field Values

### TAG_OBSERVATION

    public static final java.lang.String TAG_OBSERVATION

See Also:
  Constant Field Values

### TAG_WEATHER

    public static final java.lang.String TAG_WEATHER

See Also:
  Constant Field Values

### TAG_TEMP_STRING

    public static final java.lang.String TAG_TEMP_STRING

See Also:
  Constant Field Values

### TAG_TEMP_F

    public static final java.lang.String TAG_TEMP_F

See Also:
  Constant Field Values

### TAG_TEMP_C

    public static final java.lang.String TAG_TEMP_C

See Also:
  Constant Field Values

### TAG_HUMIDITY

    public static final java.lang.String TAG_HUMIDITY

See Also:
  Constant Field Values

### TAG_WIND_STRING

    public static final java.lang.String TAG_WIND_STRING

See Also:
  Constant Field Values

### TAG_WIND_DIRECTION

    public static final java.lang.String TAG_WIND_DIRECTION

See Also:
  Constant Field Values

### TAG_WIND_DEGREES

    public static final java.lang.String TAG_WIND_DEGREES

See Also:
  Constant Field Values

### TAG_WIND_MPH

    public static final java.lang.String TAG_WIND_MPH

See Also:
  Constant Field Values

### TAG_WIND_GUST_MPH

    public static final java.lang.String TAG_WIND_GUST_MPH

See Also:
  Constant Field Values

### TAG_STATION

    public static final java.lang.String TAG_STATION

See Also:
  Constant Field Values

### TAG_VISIBILITY

    public static final java.lang.String TAG_VISIBILITY

See Also:
  Constant Field Values

### TAG_HISTORY

    public static final java.lang.String TAG_HISTORY

See Also:
  Constant Field Values

Constructor Detail

### NWSInformation

    public NWSInformation(java.lang.String stationCode)

  Public Constructor

Parameters:
  `stationCode` - The Provider Station Id

Method Detail

### parseDocument

    public void parseDocument(org.w3c.dom.Document document)

  Parse an XML document containing weather related information

  Specified by:
    `parseDocument` in interface `WeatherInformation`
  Parameters:
    `document` - XML document with weather information

### getLocation

    public java.lang.String getLocation()

  Get the Location of the Weather Station

  Specified by:
    `getLocation` in interface `WeatherInformation`
  Returns:
    The Weather Station name as a String

### getStationCode

    public java.lang.String getStationCode()

  Get the Station Id

  Specified by:
    `getStationCode` in interface `WeatherInformation`
  Returns:
    The Station Id as a String

### getFahrenheit

    public java.lang.String getFahrenheit()

  Get the current temperature as Farenheit

  Specified by:
    `getFahrenheit` in interface `WeatherInformation`
  Returns:
    A String containing the current temperature in Farenheit

### getCelcius

    public java.lang.String getCelcius()

  Get the current temperate as Celcius

  Specified by:
    `getCelcius` in interface `WeatherInformation`
  Returns:
    A String containing the current temperature as Celcius

### getVisibility

    public java.lang.String getVisibility()

  Get the current Visibility

  Specified by:
    `getVisibility` in interface `WeatherInformation`
  Returns:
    The current visbility as a String

### getWind

    public java.lang.String getWind()

  Get the current Wind conditions

  Specified by:
    `getWind` in interface `WeatherInformation`
  Returns:
    The current wind conditions as a String

### getHistoryUrl

    public java.lang.String getHistoryUrl()

  Get the URL containing a link to weather history information

  Specified by:
    `getHistoryUrl` in interface `WeatherInformation`
  Returns:
    URL for weather history information

### getProviderUrl

    public java.lang.String getProviderUrl()

  Gets the URL required to fetch this resource

  Specified by:
    `getProviderUrl` in interface `WeatherInformation`
  Returns:
    The resource location as a String

### getValueForTag

    public java.lang.String getValueForTag(java.lang.String tag)

  Get the value for a given tag from the parsed XML weather information

  Specified by:
    `getValueForTag` in interface `WeatherInformation`
  Parameters:
    `tag` - Tag to retrieve
  Returns:
    Value of tag or `null` if the tag is not present
  Since:
    blojsom 2.24

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD