Class CalendarView

java.lang.Object
io.goobi.viewer.model.calendar.CalendarView
All Implemented Interfaces:
Serializable

public class CalendarView extends Object implements Serializable
Data for the calendar view of an individual record (e.g. newspaper).
See Also:
  • Constructor Details

  • Method Details

    • isDisplay

      public boolean isDisplay() throws PresentationException, IndexUnreachableException
      Checks whether the conditions for displaying the calendar view have been met.
      Returns:
      true if more than one selectable year is available or more than one item for the currently selected year; false otherwise
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
    • populateCalendar

      public void populateCalendar() throws PresentationException, IndexUnreachableException
      Populates the calendar with items.
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
    • getVolumeYears

      public List<String> getVolumeYears() throws PresentationException, IndexUnreachableException
      getVolumeYears.
      Returns:
      a list of year strings for volumes of this anchor that have calendar day data
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
    • getYear

      public String getYear()
      Getter for the field year.
      Returns:
      the four-digit year string currently displayed in the calendar
    • setYear

      public void setYear(String year)
      Setter for the field year.
      Parameters:
      year - the four-digit year string to display; triggers calendar population
    • getAnchorPi

      public String getAnchorPi()
      Returns the parent identifier used for calendar queries.

      For anchor volumes this is the anchor PI, for group members it is the group identifier value (i.e. the PI of the GROUP document).

      Returns:
      the parent persistent identifier used for calendar hit queries
    • getAnchorField

      public String getAnchorField()
      Returns the Solr field name used for parent lookups.

      For anchor volumes this is PI_ANCHOR, for group members it is the group identifier field (e.g. GROUPID_NEWSPAPER).

      Returns:
      the Solr field name used for parent identifier lookups in calendar queries
    • getCalendarItems

      public List<CalendarItemMonth> getCalendarItems()
      Getter for the field calendarItems.
      Returns:
      list of calendar month items representing the current calendar year