Interface Timeline


public interface Timeline
A Timeline is composed of one or more DataMeasure objects, scoped by a date range. The individual DataMeasures each potentially have a different Bucketization, for example daily, weekly, monthly. Each bucket of each DataMeasure contains a numeric value. A Column Hierarchy Timeline, which is a different type, has Timelines composed of child Timelines, where only the final leaf node child Timelines contain the actual DataMeasure objects.
  • Method Summary

    Modifier and Type Method Description
    java.util.List<Timeline> getChildTimelines()
    A column hierarchy TLV has Timelines composed of child Timelines, where only the final leaf node child Timelines contain the actual data measures.
    java.util.Map<java.lang.String,​DataMeasure> getDataMeasures()
    Map of DataMeasure by name.
    java.util.Date getEnd()
    End date of the Timeline
    java.util.Map<java.lang.String,​java.lang.Object> getFilterValues()
    Contains the values of the filters provided by the user to generate this Timeline, keyed by field name.
    java.util.Map<java.lang.String,​java.lang.Object> getHeaderValues()
    Contains the values of the "header" section which accompanies this Timeline, keyed by field name.
    int getPageNo()
    Iff vertical paging on TLV is enabled using VerticalPagingSqlDef, this method returns the number of the current page.
    java.util.List<DataMeasure> getRootDataMeasures()
    Convenience method for returning all DataMeasures without a parent.
    java.util.Date getStart()
    Start date of the Timeline
    java.lang.String getTimelineViewName()
    Convenience method for returning the name of the timeline.
    java.util.TimeZone getTimeZone()
    Timezone of timeline
    boolean hasMorePages()
    Iff vertical paging on TLV is enabled using VerticalPagingSqlDef and there are more pages to be fetched, this method returns true.
    org.json.JSONObject toJSONObject()
    Returns a JSON representation of this Timeline.
  • Method Details

    • getDataMeasures

      java.util.Map<java.lang.String,​DataMeasure> getDataMeasures()
      Map of DataMeasure by name. You should not mutate this collection.
    • getStart

      java.util.Date getStart()
      Start date of the Timeline
    • getEnd

      java.util.Date getEnd()
      End date of the Timeline
    • getFilterValues

      java.util.Map<java.lang.String,​java.lang.Object> getFilterValues()
      Contains the values of the filters provided by the user to generate this Timeline, keyed by field name.
    • getHeaderValues

      java.util.Map<java.lang.String,​java.lang.Object> getHeaderValues()
      Contains the values of the "header" section which accompanies this Timeline, keyed by field name.
    • getRootDataMeasures

      java.util.List<DataMeasure> getRootDataMeasures()
      Convenience method for returning all DataMeasures without a parent. You should not mutate this collection.
    • getTimelineViewName

      java.lang.String getTimelineViewName()
      Convenience method for returning the name of the timeline.
    • getChildTimelines

      java.util.List<Timeline> getChildTimelines()
      A column hierarchy TLV has Timelines composed of child Timelines, where only the final leaf node child Timelines contain the actual data measures.
      Returns all child Timelines of the Timeline calling it, empty list if there are no children.
      Example Usage:
      In a timeline view listener's (extending BaseTimelineViewListener) overridden postProcessTimeline method
       public void postProcessTimeline(Timeline timeline) {
        timeline.getChildTimelines(); // will give child timelines in case of a hierarchical TLV
        // assuming timeline has one child timeline which is a leaf node
        timeline.getChildTimelines().get(0).getDataMeasures(); // will return a map of DataMeasures of the leaf node child timeline
       }
       
    • getTimeZone

      java.util.TimeZone getTimeZone()
      Timezone of timeline
      Returns:
    • hasMorePages

      boolean hasMorePages()
      Iff vertical paging on TLV is enabled using VerticalPagingSqlDef and there are more pages to be fetched, this method returns true. Otherwise it returns false
      Returns:
      true if there are more pages to fetch, otherwise false
    • getPageNo

      int getPageNo()
      Iff vertical paging on TLV is enabled using VerticalPagingSqlDef, this method returns the number of the current page. Otherwise it returns -1
      Returns:
      page number or -1 if vertical paging is not enabled.
    • toJSONObject

      org.json.JSONObject toJSONObject()
      Returns a JSON representation of this Timeline. Will use system default for Date and other localized formats. To see an example format of the JSON, check the SDK User's Guide in the following section: Timeline Views > JS Plugin Framework > Data