Class DynamicCollectionViews
java.lang.Object
io.goobi.viewer.model.cms.collections.DynamicCollectionViews
Factory for building a
CollectionView whose entries are the database-defined DynamicCollections. Used by every rendering path that
supports the SolrConstants.DC_DYNAMIC pseudo field (server-side collection listings and the IIIF collection REST API backing the
client-side accordion widget), so that all paths produce the same flat set of entries with the same labels, thumbnails, links and hit counts.-
Method Summary
Modifier and TypeMethodDescriptionstatic CollectionViewBuilds a flatCollectionViewof all dynamic collections, populated and with each entry'sDynamicCollectionattached as its browse-element info (so label, description, thumbnail and link resolve from the DB).static Map<String, CollectionResult> Builds the collection map for the dynamic-collection listing: one entry perDynamicCollectionwith a non-blank query, keyed by its identifier, with the record count of its stored query AND-combined with the given filter query.
-
Method Details
-
build
public static CollectionView build(String subtheme, String filterQuery) throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException Builds a flatCollectionViewof all dynamic collections, populated and with each entry'sDynamicCollectionattached as its browse-element info (so label, description, thumbnail and link resolve from the DB).- Parameters:
subtheme- subtheme discriminator value to keep links within, may be emptyfilterQuery- additional filter query (component filter + subtheme) AND-combined with each collection's query for the hit count, may be blank- Returns:
- the populated collection view
- Throws:
IndexUnreachableException- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException- if any.
-
buildMap
Builds the collection map for the dynamic-collection listing: one entry perDynamicCollectionwith a non-blank query, keyed by its identifier, with the record count of its stored query AND-combined with the given filter query.- Parameters:
filterQuery- additional filter query to AND-combine with each collection's query, may be blank- Returns:
- map of identifier to
CollectionResult
-