Package io.goobi.viewer.model.calendar
Class CalendarView
java.lang.Object
io.goobi.viewer.model.calendar.CalendarView
- All Implemented Interfaces:
Serializable
Data for the calendar view of an individual record (e.g. newspaper).
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCalendarView(String pi, String anchorPi, String anchorField, String year) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the Solr field name used for parent lookups.Returns the parent identifier used for calendar queries.Getter for the fieldcalendarItems.getVolumeYears.getYear()Getter for the fieldyear.booleanChecks whether the conditions for displaying the calendar view have been met.voidPopulates the calendar with items.voidSetter for the fieldyear.
-
Constructor Details
-
CalendarView
public CalendarView(String pi, String anchorPi, String anchorField, String year) throws IndexUnreachableException, PresentationException Constructor.- Parameters:
pi- Record identifieranchorPi- Anchor record identifier (must be same as pi if this is an anchor)anchorField- Solr field name linking volumes to their anchoryear- Year of a volume; null, if this is an anchor!- Throws:
IndexUnreachableException- if any.PresentationException- if any.
-
-
Method Details
-
isDisplay
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
Populates the calendar with items.- Throws:
PresentationException- if any.IndexUnreachableException- if any.
-
getVolumeYears
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
Getter for the fieldyear.- Returns:
- the four-digit year string currently displayed in the calendar
-
setYear
Setter for the fieldyear.- Parameters:
year- the four-digit year string to display; triggers calendar population
-
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
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
Getter for the fieldcalendarItems.- Returns:
- list of calendar month items representing the current calendar year
-