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.BooleanProperty acumulativeData
    If it is set to true, the calculation should be acumulative.
    javafx.beans.property.StringProperty dataPath
    Path where the dataset locates at.
    java.time.LocalDate end
    The range of date for searching data.
    InterestedData focusedData
    Selected data.
    java.util.Map<java.lang.String,​java.lang.String> ISORepresentation  
    java.time.LocalDate start
    The 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.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • focusedData

      public InterestedData focusedData
      Selected data. It should be updated only if the user click the group of ratio button.
    • dataPath

      public javafx.beans.property.StringProperty dataPath
      Path where the dataset locates at.
    • acumulativeData

      public javafx.beans.property.BooleanProperty acumulativeData
      If it is set to true, the calculation should be acumulative.
    • start

      public java.time.LocalDate start
      The range of date for searching data.
    • end

      public java.time.LocalDate end
      The range of date for searching data.
    • ISORepresentation

      public java.util.Map<java.lang.String,​java.lang.String> ISORepresentation
  • Constructor Details

  • 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:
      toString in class java.lang.Object