Class BrowseBean

java.lang.Object
io.goobi.viewer.managedbeans.BrowseBean
All Implemented Interfaces:
Serializable

@Named @SessionScoped public class BrowseBean extends Object implements Serializable
This bean provides the data for collection and term browsing.
See Also:
  • Constructor Details

    • BrowseBean

      public BrowseBean()
      Empty constructor.
  • Method Details

    • setBreadcrumbBean

      public void setBreadcrumbBean(BreadcrumbBean breadcrumbBean)
      Required setter for ManagedProperty injection
      Parameters:
      breadcrumbBean - the breadcrumbBean to set
    • resetTerms

      public void resetTerms()
      Resets all lists for term browsing.
    • resetAllLists

      public void resetAllLists()

      resetAllLists.

    • resetDcList

      public void resetDcList()

      resetDcList.

    • resetList

      public void resetList(String field)

      resetList.

      Parameters:
      field - a String object.
    • getDcList

      public List<BrowseDcElement> getDcList() throws IndexUnreachableException

      getDcList.

      Returns:
      the dcList (Collections)
      Throws:
      IndexUnreachableException - if any.
    • getList

      public List<BrowseDcElement> getList(String field) throws IndexUnreachableException

      getList.

      Parameters:
      field - a String object.
      Returns:
      a List object.
      Throws:
      IndexUnreachableException - if any.
    • getList

      public List<BrowseDcElement> getList(String field, int depth) throws IndexUnreachableException

      getList.

      Parameters:
      field - a String object.
      depth - a int.
      Returns:
      a List object.
      Throws:
      IndexUnreachableException - if any.
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • populateCollection

      public void populateCollection(String field) throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException

      populateCollection.

      Parameters:
      field - a String object.
      Throws:
      IndexUnreachableException - if any.
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • getCollectionToExpand

      public String getCollectionToExpand()

      Getter for the field collectionToExpand.

      Returns:
      a String object.
    • setCollectionToExpand

      public void setCollectionToExpand(String collectionToExpand)

      Setter for the field collectionToExpand.

      Parameters:
      collectionToExpand - a String object.
    • getTopVisibleCollection

      public String getTopVisibleCollection()

      Getter for the field topVisibleCollection.

      Returns:
      the topVisibleCollecion
    • setTopVisibleCollection

      public void setTopVisibleCollection(String topVisibleCollecion)

      Setter for the field topVisibleCollection.

      Parameters:
      topVisibleCollecion - the topVisibleCollecion to set
    • expandCollection

      public void expandCollection() throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
      Use this method of a certain collections needs to be expanded via URL.
      Throws:
      IndexUnreachableException - if any.
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • expandCollection

      @Deprecated(since="24.08") public void expandCollection(int levels) throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
      Deprecated.
      Throws:
      IndexUnreachableException
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • expandCollection

      @Deprecated(since="24.08") public void expandCollection(String collectionField, String facetField, int levels) throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
      Deprecated.
      Throws:
      IndexUnreachableException
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • expandCollection

      public void expandCollection(String collectionField, String facetField) throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException

      expandCollection.

      Parameters:
      collectionField - a String object.
      facetField - a String object.
      Throws:
      IndexUnreachableException - if any.
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • searchTermsAction

      public String searchTermsAction() throws PresentationException, IndexUnreachableException
      Action method for JSF.
      Returns:
      Navigation outcome
      Throws:
      PresentationException
      IndexUnreachableException
    • searchTerms

      searchTerms.

      Returns:
      a String object.
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
      RedirectException
    • selectRedirectFilter

      public String selectRedirectFilter()
      Selects a filter string for automatic redirecting, prioritizing letters, followed by numbers and finally by the first available filter.
      Returns:
      Selected filter string
    • getBrowsingMenuFieldForLanguage

      public String getBrowsingMenuFieldForLanguage(String language)
      Parameters:
      language - Requested language
      Returns:
      browsingMenuField (modified for given language if placeholder found)
    • getBrowsingMenuField

      public String getBrowsingMenuField()

      Getter for the field browsingMenuField.

      Returns:
      the browsingMenuField
    • setBrowsingMenuField

      public void setBrowsingMenuField(String browsingMenuField)

      Setter for the field browsingMenuField.

      Parameters:
      browsingMenuField - the browsingMenuField to set
    • isBrowsingMenuFieldTranslated

      public boolean isBrowsingMenuFieldTranslated()
      Returns:
      true if browsingMenuField is set and configured to be translated; false otherwise
    • getBrowseTermList

      public List<String> getBrowseTermList()

      Getter for the field browseTermList.

      Returns:
      the browseTermList
    • getBrowseTermListEscaped

      public List<String> getBrowseTermListEscaped()

      Getter for the field browseTermListEscaped.

      Returns:
      the browseTermListEscaped
    • getBrowseTermHitCountList

      public List<Long> getBrowseTermHitCountList()

      Getter for the field browseTermHitCountList.

      Returns:
      the browseTermHitCountList
    • getPrevTermUrl

      public String getPrevTermUrl()

      getPrevTermUrl.

      Returns:
      a String object.
    • getNextTermUrl

      public String getNextTermUrl()

      getNextTermUrl.

      Returns:
      a String object.
    • getAvailableStringFilters

      public List<String> getAvailableStringFilters()

      Getter for the field availableStringFilters.

      Returns:
      the availableStringFilters
    • getCurrentStringFilter

      public String getCurrentStringFilter()

      Getter for the field currentStringFilter.

      Returns:
      the currentStringFilter
    • setCurrentStringFilter

      public void setCurrentStringFilter(String currentStringFilter)

      Setter for the field currentStringFilter.

      Parameters:
      currentStringFilter - the currentStringFilter to set
    • getFilterQuery

      public String getFilterQuery()

      Getter for the field filterQuery.

      Returns:
      the filterQuery
    • setFilterQuery

      public void setFilterQuery(String filterQuery)

      Setter for the field filterQuery.

      Parameters:
      filterQuery - the filterQuery to set
    • getCurrentPage

      public int getCurrentPage()

      Getter for the field currentPage.

      Returns:
      the currentPage
    • setCurrentPage

      public void setCurrentPage(int currentPage)

      Setter for the field currentPage.

      Parameters:
      currentPage - the currentPage to set
    • getLastPage

      public int getLastPage()

      getLastPage.

      Returns:
      a int.
    • isBrowsingMenuEnabled

      public boolean isBrowsingMenuEnabled()

      isBrowsingMenuEnabled.

      Returns:
      a boolean.
    • getBrowsingMenuItems

      public List<String> getBrowsingMenuItems(String language)

      Returns the list of fields configured for term browsing to be listed in term browsing widgets.

      Parameters:
      language - a String object.
      Returns:
      List of browsing menu items
    • getConfiguredBrowsingMenuFields

      public List<String> getConfiguredBrowsingMenuFields()
      Returns:
      List of configured browsing menu fields
    • getTargetCollection

      public String getTargetCollection()

      Getter for the field targetCollection.

      Returns:
      a String object.
    • setTargetCollection

      public void setTargetCollection(String targetCollection)

      Setter for the field targetCollection.

      Parameters:
      targetCollection - a String object.
    • openWorkInTargetCollection

      openWorkInTargetCollection.

      Returns:
      a String object.
      Throws:
      IndexUnreachableException - if any.
      PresentationException - if any.
      ViewerConfigurationException
      DAOException
      RecordDeletedException
      RecordLimitExceededException
    • getDcCollection

      public CollectionView getDcCollection()

      getDcCollection.

      Returns:
      a CollectionView object.
    • getCollection

      public CollectionView getCollection(String field)

      getCollection.

      Parameters:
      field - a String object.
      Returns:
      a CollectionView object.
    • getOrCreateCollection

      public CollectionView getOrCreateCollection(String field)
      Parameters:
      field -
      Returns:
      CollectionView
    • initializeDCCollection

      public void initializeDCCollection()

      initializeDCCollection.

    • initializeCollection

      public void initializeCollection(String collectionField)
    • initializeCollection

      public void initializeCollection(String collectionField, String groupingField)
      Adds a CollectionView object for the given field to the map and populates its values.
      Parameters:
      collectionField - a String object.
      groupingField - a String object. Used for grouping results
    • getCollectionField

      public String getCollectionField()

      Getter for the field collectionField.

      Returns:
      the collectionField
    • setCollectionField

      public void setCollectionField(String collectionField)

      Setter for the field collectionField.

      Parameters:
      collectionField - the collectionField to set
    • getCollectionHierarchy

      public String getCollectionHierarchy(String collectionField, String collectionValue)
      TODO translation from DB
      Parameters:
      collectionField -
      collectionValue -
      Returns:
      String
    • getTranslationForCollectionName

      public String getTranslationForCollectionName(String field, String value)
      Parameters:
      field - Collection field name
      value - Collection raw name
      Returns:
      Translated collection name
    • getRecordCount

      public long getRecordCount(String collectionField, String collectionName)