Package comp3111.covid
Class UIDataModel
java.lang.Object
comp3111.covid.UIDataModel
public class UIDataModel
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description javafx.beans.property.BooleanPropertyacumulativeDataIf it is set to true, the calculation should be acumulative.javafx.beans.property.StringPropertydataPathPath where the dataset locates at.java.time.LocalDateendThe range of date for searching data.InterestedDatafocusedDataSelected data.java.util.Map<java.lang.String,java.lang.String>ISORepresentationjava.time.LocalDatestartThe range of date for searching data. -
Constructor Summary
Constructors Constructor Description UIDataModel() -
Method Summary
Modifier and Type Method Description javafx.collections.ObservableList<java.lang.String>getAvailableCountries()Gets available countries that can retrieve from the dataset.java.lang.Object[]getISOList(javafx.collections.ObservableList<java.lang.String> countries)Conveert the list of country to a list of ISO that the countries represent.java.lang.StringtoString()
-
Field Details
-
focusedData
Selected data. It should be updated only if the user click the group of ratio button. -
dataPath
public javafx.beans.property.StringProperty dataPathPath where the dataset locates at. -
acumulativeData
public javafx.beans.property.BooleanProperty acumulativeDataIf it is set to true, the calculation should be acumulative. -
start
public java.time.LocalDate startThe range of date for searching data. -
end
public java.time.LocalDate endThe range of date for searching data. -
ISORepresentation
public java.util.Map<java.lang.String,java.lang.String> ISORepresentation
-
-
Constructor Details
-
UIDataModel
public UIDataModel()
-
-
Method Details
-
getAvailableCountries
public javafx.collections.ObservableList<java.lang.String> getAvailableCountries()Gets available countries that can retrieve from the dataset.- Returns:
- available countries
-
getISOList
public java.lang.Object[] getISOList(javafx.collections.ObservableList<java.lang.String> countries)Conveert the list of country to a list of ISO that the countries represent.- Parameters:
countries- list of country- Returns:
- list of ISO
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-