Class CalendarResource
java.lang.Object
io.goobi.viewer.api.rest.v1.records.CalendarResource
REST resource for calendar data of a record (newspapers, periodicals, multi-volume works, etc.).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns all year-month combinations that have calendar entries for this record as a sorted JSON array of "YYYY-MM" strings.getCalendarEntries(int year) Returns all issues/volumes with a YEARMONTHDAY value for the given year as a flat JSON array.
-
Constructor Details
-
CalendarResource
-
-
Method Details
-
getCalendarEntries
@GET @Path("/{year: \\d+}") @Produces("application/json") public Response getCalendarEntries(@PathParam("year") int year) throws PresentationException, IndexUnreachableException Returns all issues/volumes with a YEARMONTHDAY value for the given year as a flat JSON array.- Parameters:
year- Publication year- Returns:
- JSON array of calendar entries
- Throws:
PresentationException- if any.IndexUnreachableException- if any.
-
getAvailableMonths
@GET @Path("/months") @Produces("application/json") public Response getAvailableMonths() throws PresentationException, IndexUnreachableExceptionReturns all year-month combinations that have calendar entries for this record as a sorted JSON array of "YYYY-MM" strings. Uses Solr facet query on the YEARMONTH field — no documents loaded, just facet counts.- Returns:
- JSON array of "YYYY-MM" strings
- Throws:
PresentationException- if any.IndexUnreachableException- if any.
-