Record Class Timeline

java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.content.Timeline
Record Components:
name - internal timeline name
caption - header caption
cacheName - name of the backing timeline cache
source - the pivot table the timeline filters (may be empty)
dateField - the date field the timeline filters (may be empty when the source did not record it)
level - granularity: "years" / "quarters" / "months" / "days"
pivotCacheId - the shared pivot-cache id filtered, or null when unknown
sheetIndex - 0-based index of the sheet the control displays on (-1 = unknown)
row - anchor from-corner row (0-based)
col - anchor from-corner column (0-based)
endRow - anchor to-corner row (0-based)
endCol - anchor to-corner column (0-based)

public record Timeline(String name, String caption, String cacheName, String source, String dateField, String level, Integer pivotCacheId, int sheetIndex, int row, int col, int endRow, int endCol) extends Record
A workbook timeline descriptor (immutable, read-only): a specialised slicer for date-based filtering of a pivot table. Read back with Workbook.timelines(); author it with Workbook.addTimeline(name, source, dateField) or the anchored overload Workbook.addTimeline(name, source, dateField, sheetIndex, row, col, endRow, endCol).

The structural facts here — name(), caption(), the filtered dateField(), the granularity level() and the on-sheet anchor (sheetIndex(), row()/col() to endRow()/endCol()) — round-trip through the model, and the export path synthesizes the full display apparatus from them. The selected date range is read with Workbook.timelineRange(java.lang.String) and set with Workbook.setTimelineRange(java.lang.String, java.time.LocalDate, java.time.LocalDate), which also refreshes the bound pivot table. This record is a snapshot and does not carry the selected range. The timeline style survives only through byte-exact round-trip.

Reference: [MS-XLSX] x15 timeline / timelineCacheDefinition.

  • Constructor Details

    • Timeline

      public Timeline(String name, String caption, String cacheName, String source, String dateField, String level, Integer pivotCacheId, int sheetIndex, int row, int col, int endRow, int endCol)
      Creates an instance of a Timeline record class.
      Parameters:
      name - the value for the name record component
      caption - the value for the caption record component
      cacheName - the value for the cacheName record component
      source - the value for the source record component
      dateField - the value for the dateField record component
      level - the value for the level record component
      pivotCacheId - the value for the pivotCacheId record component
      sheetIndex - the value for the sheetIndex record component
      row - the value for the row record component
      col - the value for the col record component
      endRow - the value for the endRow record component
      endCol - the value for the endCol record component
  • Method Details

    • fromMap

      public static Timeline fromMap(Map<String,Object> m)
      Build a Timeline from one decoded FFI JSON object.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • caption

      public String caption()
      Returns the value of the caption record component.
      Returns:
      the value of the caption record component
    • cacheName

      public String cacheName()
      Returns the value of the cacheName record component.
      Returns:
      the value of the cacheName record component
    • source

      public String source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • dateField

      public String dateField()
      Returns the value of the dateField record component.
      Returns:
      the value of the dateField record component
    • level

      public String level()
      Returns the value of the level record component.
      Returns:
      the value of the level record component
    • pivotCacheId

      public Integer pivotCacheId()
      Returns the value of the pivotCacheId record component.
      Returns:
      the value of the pivotCacheId record component
    • sheetIndex

      public int sheetIndex()
      Returns the value of the sheetIndex record component.
      Returns:
      the value of the sheetIndex record component
    • row

      public int row()
      Returns the value of the row record component.
      Returns:
      the value of the row record component
    • col

      public int col()
      Returns the value of the col record component.
      Returns:
      the value of the col record component
    • endRow

      public int endRow()
      Returns the value of the endRow record component.
      Returns:
      the value of the endRow record component
    • endCol

      public int endCol()
      Returns the value of the endCol record component.
      Returns:
      the value of the endCol record component