Class DashboardDateFilter

    • Field Detail

      • RELATIVE_FILTER_TYPE

        public static final java.lang.String RELATIVE_FILTER_TYPE
        See Also:
        Constant Field Values
      • ABSOLUTE_FILTER_TYPE

        public static final java.lang.String ABSOLUTE_FILTER_TYPE
        See Also:
        Constant Field Values
      • DATE_FORMAT

        public static final java.time.format.DateTimeFormatter DATE_FORMAT
    • Method Detail

      • relativeDateFilter

        public static DashboardDateFilter relativeDateFilter​(int from,
                                                             int to,
                                                             java.lang.String granularity,
                                                             java.lang.String datasetUri)
        Creates relative date filter with the given interval and granularity.
        Parameters:
        from - interval from
        to - interval to
        granularity - granularity (e.g. GDC.time.year)
        datasetUri - date dataset URI (optional)
        Returns:
        created filter
      • absoluteDateFilter

        public static DashboardDateFilter absoluteDateFilter​(java.time.LocalDate from,
                                                             java.time.LocalDate to,
                                                             java.lang.String datasetUri)
        Creates absolute date filter with the given interval
        Parameters:
        from - interval from
        to - interval to
        datasetUri - date dataset URI (optional)
        Returns:
        created filter
      • getFrom

        public java.lang.String getFrom()
        Returns from value of date filter interval. Value represents in the case of:
        • relative date filter - integer value
        • absolute date filter - date value with format DD-MM-YYYY
        Returns:
        date filter from interval value
      • getTo

        public java.lang.String getTo()
        Returns to value of date filter interval. Value represents in the case of:
        • relative date filter - integer value
        • absolute date filter - date value with format YYYY-DD-MM
        Returns:
        date filter from interval value
      • getGranularity

        public java.lang.String getGranularity()
        Returns:
        date interval granularity in the case of relative date filter
      • getDataSet

        public java.lang.String getDataSet()
        Returns:
        date dataset URI of this filter
      • getType

        public java.lang.String getType()
        Returns:
        date filter type, can be either relative or absolute
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object