|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfilecontroller.FileController
public class FileController
The FileController is a maintain class which handles all other classes in filecontroller -package. FileController returns and updates the actual weather data. The source of weather data depends on WeatherDataType -value, which is defined in Parameter -class. WeatherDataType can be "radar" or "PGM". The first value means that we use real data from FMI's radar, and the second value means that we use user made images. No matter what is the source, the data is returned in WeatherMap -class. FileController class also implements the FileInterface.
Field Summary | |
---|---|
private java.lang.String |
errorMessage
Error message for user. |
private java.lang.String |
mode
This value reflect which ReadImageFile -class shall we use. |
private Parameters |
parameters
Current instance of Parameter class. |
private ReadImageFile |
readImageFile
Current instance of ReadImageFile class. |
private ReadPGMImageFile |
readPGMImageFile
Current instance of ReadPGMImageFile class. |
private boolean |
status
Status reveal if constructor fails. |
private WeatherMap |
weatherMap
Current instance of WeatherMap class. |
Constructor Summary | |
---|---|
FileController(Parameters parameters)
Constructor initialize new instance of FileController class. |
Method Summary | |
---|---|
java.lang.String |
getErrorMessage()
Method returns latest error message. |
boolean |
getStatus()
Method returns current status of this instance. |
WeatherMap |
getWeatherMap()
Method returns current instance of WeatherMap -class, which contains the actual weather data. |
boolean |
prepare()
Method is used to divide calculation in several parts. |
boolean |
update()
Update FileController and all it's adjuncts. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String errorMessage
private java.lang.String mode
private Parameters parameters
private ReadImageFile readImageFile
private ReadPGMImageFile readPGMImageFile
private boolean status
private WeatherMap weatherMap
Constructor Detail |
---|
public FileController(Parameters parameters)
parameters
- Current Parameter -class.Method Detail |
---|
public java.lang.String getErrorMessage()
getErrorMessage
in interface FileInterface
public boolean getStatus()
getStatus
in interface FileInterface
public WeatherMap getWeatherMap()
getWeatherMap
in interface FileInterface
public boolean prepare()
prepare
in interface FileInterface
public boolean update()
update
in interface FileInterface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |