Class CollectionBuilder
java.lang.Object
io.goobi.viewer.model.iiif.presentation.v2.builder.AbstractBuilder
io.goobi.viewer.model.iiif.presentation.v2.builder.CollectionBuilder
CollectionBuilder class.
- Author:
- Florian Alpers
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String[]
Required field to create manifest stubs for works in collectionstatic final String
ConstantRSS_FEED_FORMAT="Rss feed"
static final String
ConstantRSS_FEED_LABEL="Rss feed"
Fields inherited from class io.goobi.viewer.model.iiif.presentation.v2.builder.AbstractBuilder
config, REQUIRED_SOLR_FIELDS, urls
-
Constructor Summary
ConstructorDescriptionCollectionBuilder
(AbstractApiUrlManager apiUrlManager) Constructor for CollectionBuilder. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContainedWorks
(String collectionField, String topElement, de.intranda.api.iiif.presentation.v2.Collection2 collection) addContainedWorks.void
addTagListService
(de.intranda.api.iiif.presentation.v2.Collection2 collection, String collectionField, String facetField, String label) Add a taglist service to the collection and all subcollections.de.intranda.api.iiif.presentation.v2.Collection2
createCollection
(CollectionView collectionView, HierarchicalBrowseDcElement baseElement, URI uri) createCollection.createCollectionQuery
(String collectionField, String topElement) createCollectionQuery.createCollectionView
(String collectionField, String facetField, String splittingChar) de.intranda.api.iiif.presentation.v2.Collection2
generateCollection
(String collectionField, String topElement, String facetField, String splittingChar, List<String> ignoreCollections) generateCollection.getCollectionView
(String collectionField, String groupingField, String splittingChar) getCollectionView.getFacetField
(String collectionField) getFacetField.Methods inherited from class io.goobi.viewer.model.iiif.presentation.v2.builder.AbstractBuilder
absolutize, absolutize, addCrowdourcingAnnotations, addEventMetadataToWorkElement, addLanguageFields, addMetadata, addRendering, addSeeAlso, contained, getAnnotationListURI, getAnnotationListURI, getAnnotationURI, getAnnotationURI, getAttributions, getAutoCompleteServiceURI, getAutoSuggestURI, getCanvasURI, getCollectionURI, getCommentAnnotationURI, getDescription, getDocument, getDocumentWithChildren, getEventFields, getExternalManifestURI, getImageAnnotationURI, getLabel, getLabel, getLabelIfExists, getLayerURI, getLidoResolverUrl, getLocale, getManifestURI, getManifestURI, getMetsResolverUrl, getPageManifestURI, getPageOrderFromCanvasURI, getPIFromCanvasURI, getRangeURI, getRenderings, getSearchServiceURI, getSearchURI, getSeeAlsos, getSequenceURI, getSolrFieldList, getViewUrl
-
Field Details
-
CONTAINED_WORKS_QUERY_FIELDS
Required field to create manifest stubs for works in collection -
RSS_FEED_LABEL
ConstantRSS_FEED_LABEL="Rss feed"
- See Also:
-
RSS_FEED_FORMAT
ConstantRSS_FEED_FORMAT="Rss feed"
- See Also:
-
-
Constructor Details
-
CollectionBuilder
Constructor for CollectionBuilder.
- Parameters:
apiUrlManager
-- Throws:
URISyntaxException
- if any.
-
-
Method Details
-
generateCollection
public de.intranda.api.iiif.presentation.v2.Collection2 generateCollection(String collectionField, String topElement, String facetField, String splittingChar, List<String> ignoreCollections) throws IndexUnreachableException, URISyntaxException, PresentationException, ViewerConfigurationException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException generateCollection.
- Parameters:
collectionField
- aString
object.topElement
- aString
object.splittingChar
- aString
object.facetField
- A SOLR field which values are requested for all records within the collection and stored within the collection for later useignoreCollections
-- Returns:
- a
Collection2
object. - Throws:
IndexUnreachableException
- if any.URISyntaxException
- if any.PresentationException
- if any.ViewerConfigurationException
- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
- if the top element is not empty and is not a collection
-
addContainedWorks
public void addContainedWorks(String collectionField, String topElement, de.intranda.api.iiif.presentation.v2.Collection2 collection) throws PresentationException, IndexUnreachableException, URISyntaxException addContainedWorks.
- Parameters:
collectionField
- aString
object.topElement
- aString
object.collection
- aCollection2
object.- Throws:
PresentationException
- if any.IndexUnreachableException
- if any.URISyntaxException
- if any.
-
createCollectionQuery
createCollectionQuery.
-
createCollection
public de.intranda.api.iiif.presentation.v2.Collection2 createCollection(CollectionView collectionView, HierarchicalBrowseDcElement baseElement, URI uri) throws URISyntaxException, ViewerConfigurationException createCollection.
- Parameters:
baseElement
- aHierarchicalBrowseDcElement
object.collectionView
- aCollectionView
object.uri
- aURI
object.- Returns:
- a
Collection2
object. - Throws:
URISyntaxException
- if any.ViewerConfigurationException
- if any.
-
addTagListService
public void addTagListService(de.intranda.api.iiif.presentation.v2.Collection2 collection, String collectionField, String facetField, String label) throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException Add a taglist service to the collection and all subcollections. The taglist service provides a list of- Parameters:
collection
-collectionField
-facetField
-label
-- Throws:
IndexUnreachableException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getCollectionView
public CollectionView getCollectionView(String collectionField, String groupingField, String splittingChar) throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException getCollectionView.
- Parameters:
collectionField
- aString
object.groupingField
- aString
object.splittingChar
- aString
object.- Returns:
- a
CollectionView
object. - Throws:
IndexUnreachableException
- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
createCollectionView
public CollectionView createCollectionView(String collectionField, String facetField, String splittingChar) throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException - Parameters:
collectionField
-facetField
- A SOLR field which values are queried and kept in the collectionView for later usesplittingChar
-- Returns:
CollectionView
- Throws:
IndexUnreachableException
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getFacetField
getFacetField.
-