|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.berkeley.guir.ptk.PTK
edu.berkeley.guir.ptk.input.InputSource
edu.berkeley.guir.ptk.input.WeatherInput
Gets weather information for a given location: high temperature, low temperature, forecast (e.g., "sunny," "partly cloudy"), wind speeds and direction, and the chance of rain (in percent). The metadata of the events this class creates is WeatherConstants.WEATHER.
| Field Summary | |
static java.lang.String |
MY_ID
The unique ID String for this input, found in WeatherConstants, which is an application specific class. |
static java.lang.String |
URL
The location string at the end of the Yahoo Weather URL. |
java.lang.String |
url_location
|
| Fields inherited from class edu.berkeley.guir.ptk.input.InputSource |
history, mds, my_id, my_ip, time_between_events |
| Fields inherited from class edu.berkeley.guir.ptk.PTK |
debug, MAX_DEBUG, MED_DEBUG, MIN_DEBUG, NO_DEBUG |
| Constructor Summary | |
WeatherInput()
Constructor for non-distributed applications. |
|
WeatherInput(java.lang.String my_ip)
Constructor for distributed applications. |
|
| Method Summary | |
static void |
main(java.lang.String[] argsv)
This main method allows the input to run, continually getting new input and dispatching the data in events to the PTK server. |
Events |
newInput()
Gets the high temperature, low temperature, forecast, wind, barometric pressure, humidity, sunrise, and sunset from the Yahoo weather webpage for today in a user-specified location. |
| Methods inherited from class edu.berkeley.guir.ptk.input.InputSource |
addMetadata, addMetadataItem, addMyMetadataToEvent, dispatchEvent, finalize, getAbstractThenSendInputEvent, getMetadata, getMetadataItemsAsArray, getThenSendInputEvent, register, run, setMetadata, setTimeBetweenEvents, startInput |
| Methods inherited from class edu.berkeley.guir.ptk.PTK |
getMAX, getMED, getMIN, getNO, printDebug, printDebug, printError |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String MY_ID
public static final java.lang.String URL
public java.lang.String url_location
| Constructor Detail |
public WeatherInput()
public WeatherInput(java.lang.String my_ip)
| Method Detail |
public Events newInput()
newInput in class InputSourcepublic static void main(java.lang.String[] argsv)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||