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
FieldsModifier and TypeFieldDescriptionstatic final String[]Required field to create manifest stubs for works in collectionstatic final StringConstantRSS_FEED_FORMAT="Rss feed"static final StringConstantRSS_FEED_LABEL="Rss feed"Fields inherited from class io.goobi.viewer.model.iiif.presentation.v2.builder.AbstractBuilder
config, REQUIRED_SOLR_FIELDS, urls -
Constructor Summary
ConstructorsConstructorDescriptionCollectionBuilder(AbstractApiUrlManager apiUrlManager) Constructor for CollectionBuilder. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContainedWorks(String collectionField, String topElement, de.intranda.api.iiif.presentation.v2.Collection2 collection) addContainedWorks.voidaddTagListService(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.Collection2createCollection(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.Collection2generateCollection(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- aStringobject.topElement- aStringobject.facetField- A SOLR field which values are requested for all records within the collection and stored within the collection for later usesplittingChar- aStringobject.ignoreCollections-- Returns:
- a
Collection2object. - 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- aStringobject.topElement- aStringobject.collection- aCollection2object.- 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:
collectionView- aCollectionViewobject.baseElement- aHierarchicalBrowseDcElementobject.uri- aURIobject.- Returns:
- a
Collection2object. - 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:
IndexUnreachableExceptionde.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- aStringobject.groupingField- aStringobject.splittingChar- aStringobject.- Returns:
- a
CollectionViewobject. - 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:
IndexUnreachableExceptionde.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getFacetField
getFacetField.
-