Class CollectionView

java.lang.Object
io.goobi.viewer.model.viewer.collections.CollectionView
All Implemented Interfaces:
Serializable

public class CollectionView extends Object implements Serializable

CollectionView class.

See Also:
  • Constructor Details

  • Method Details

    • populateCollectionList

      public void populateCollectionList() throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException

      populateCollectionList.

      Throws:
      IndexUnreachableException - if any.
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • calculateVisibleDcElements

      public void calculateVisibleDcElements() throws de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException

      calculateVisibleDcElements.

      Throws:
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • calculateVisibleDcElements

      public void calculateVisibleDcElements(boolean loadDescriptions) throws de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException

      calculateVisibleDcElements.

      Parameters:
      loadDescriptions - a boolean.
      Throws:
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • getAncestors

      public List<HierarchicalBrowseDcElement> getAncestors(String elementName, boolean includeSelf)
      Parameters:
      elementName -
      includeSelf -
      Returns:
      List
    • associateElementsWithCMSData

      public void associateElementsWithCMSData()

      associateElementsWithCMSData.

    • associateWithCMSCollections

      public static List<HierarchicalBrowseDcElement> associateWithCMSCollections(List<HierarchicalBrowseDcElement> collections, String solrField) throws DAOException

      associateWithCMSCollections.

      Parameters:
      collections - a List object.
      solrField - a String object.
      Returns:
      the 'collection' parameter
      Throws:
      DAOException - if any.
      PresentationException - if any.
    • getVisibleDcElements

      public List<HierarchicalBrowseDcElement> getVisibleDcElements()

      getVisibleDcElements.

      Returns:
      a List object.
    • calculateLevel

      public int calculateLevel(String name)

      calculateLevel.

      Parameters:
      name - a String object.
      Returns:
      a int.
    • resetCollectionList

      public void resetCollectionList()

      resetCollectionList.

    • isSubcollection

      public boolean isSubcollection()

      isSubcollection.

      Returns:
      a boolean.
    • getTopVisibleElement

      public String getTopVisibleElement()

      Getter for the field topVisibleElement.

      Returns:
      a String object.
    • setTopVisibleElement

      public void setTopVisibleElement(String topVisibleElement)

      Setter for the field topVisibleElement.

      Parameters:
      topVisibleElement - a String object.
    • setTopVisibleElement

      public void setTopVisibleElement(HierarchicalBrowseDcElement element)

      Setter for the field topVisibleElement.

      Parameters:
      element - a HierarchicalBrowseDcElement object.
    • showChildren

      public void showChildren(HierarchicalBrowseDcElement element)

      showChildren.

      Parameters:
      element - a HierarchicalBrowseDcElement object.
    • hideChildren

      public void hideChildren(HierarchicalBrowseDcElement element)

      hideChildren.

      Parameters:
      element - a HierarchicalBrowseDcElement object.
    • toggleChildren

      public String toggleChildren(HierarchicalBrowseDcElement element)

      toggleChildren.

      Parameters:
      element - a HierarchicalBrowseDcElement object.
      Returns:
      a String object.
    • sortDcList

      protected static List<HierarchicalBrowseDcElement> sortDcList(List<HierarchicalBrowseDcElement> inDcList, List<DcSortingList> sortCriteriaSuperList, String topElement, String splittingChar)
      Sorts the given BrowseDcElement list as defined in the configuration. All other elements are moved to the end of the list.
      Parameters:
      inDcList - The list to sort.
      sortCriteriaSuperList - a List object.
      topElement - a String object.
      splittingChar - a String object.
      Returns:
      A sorted list.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • expandAll

      public void expandAll(HierarchicalBrowseDcElement element)
      Sets all descendants of this element to visible
      Parameters:
      element - a HierarchicalBrowseDcElement object.
    • expandAll

      public void expandAll(HierarchicalBrowseDcElement element, int depth)
      Sets all descendants of this element to visible, but not beyond level 'depth'
      Parameters:
      depth - a int.
      element - a HierarchicalBrowseDcElement object.
    • expandAll

      public void expandAll()
      Sets all collection elements visible
    • expandAll

      public void expandAll(int depth)
      Sets all collection elements visible up to 'depth' levels into the hierarchy
      Parameters:
      depth - a int.
    • getCompleteList

      public List<HierarchicalBrowseDcElement> getCompleteList()

      getCompleteList.

      Returns:
      a List object.
    • expand

      public void expand(HierarchicalBrowseDcElement element) throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException

      expand.

      Parameters:
      element - a HierarchicalBrowseDcElement object.
      Throws:
      IndexUnreachableException - if any.
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • reset

      public void reset(boolean reset)
      Resets the top visible element so the topmost hierarchy level is shown
      Parameters:
      reset - a boolean.
      Throws:
      DAOException - if any.
      IndexUnreachableException - if any.
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • getBaseElementName

      public String getBaseElementName()

      Getter for the field baseElementName.

      Returns:
      a String object.
    • setBaseElementName

      public void setBaseElementName(String baseElementName)

      Setter for the field baseElementName.

      Parameters:
      baseElementName - a String object.
    • getBaseLevels

      public int getBaseLevels()

      Getter for the field baseLevels.

      Returns:
      a int.
    • setBaseLevels

      public void setBaseLevels(int baseLevels)

      Setter for the field baseLevels.

      Parameters:
      baseLevels - a int.
    • isTopVisibleElement

      public boolean isTopVisibleElement(HierarchicalBrowseDcElement element)

      isTopVisibleElement.

      Parameters:
      element - a HierarchicalBrowseDcElement object.
      Returns:
      a boolean.
    • showAll

      public void showAll() throws de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException

      showAll.

      Throws:
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • hideAll

      public void hideAll() throws de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException

      hideAll.

      Throws:
      de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
    • getTopVisibleElementLevel

      public int getTopVisibleElementLevel()

      getTopVisibleElementLevel.

      Returns:
      a int.
    • getBaseElementLevel

      public int getBaseElementLevel()

      getBaseElementLevel.

      Returns:
      a int.
    • setShowAllHierarchyLevels

      public void setShowAllHierarchyLevels(boolean showAllHierarchyLevels)

      Setter for the field showAllHierarchyLevels.

      Parameters:
      showAllHierarchyLevels - the showAllHierarchyLevels to set
    • isShowAllHierarchyLevels

      public boolean isShowAllHierarchyLevels()

      isShowAllHierarchyLevels.

      Returns:
      the showAllHierarchyLevels
    • getCollectionUrl

      public String getCollectionUrl(String collection)

      getCollectionUrl.

      Parameters:
      collection - a String object.
      Returns:
      a String object.
    • loadCollection

      public String loadCollection(HierarchicalBrowseDcElement element)

      loadCollection.

      Parameters:
      element - a HierarchicalBrowseDcElement object.
      Returns:
      a String object.
    • getCollectionUrl

      public String getCollectionUrl(HierarchicalBrowseDcElement collection)

      getCollectionUrl.

      Parameters:
      collection - a HierarchicalBrowseDcElement object.
      Returns:
      a String object.
      Throws:
      URISyntaxException
    • getCollectionUrl

      public static String getCollectionUrl(HierarchicalBrowseDcElement collection, String field, String baseSearchUrl)

      getCollectionUrl.

      Parameters:
      collection - a HierarchicalBrowseDcElement object.
      field - a String object.
      baseSearchUrl -
      Returns:
      a String object.
      Throws:
      URISyntaxException
    • setDisplayParentCollections

      public void setDisplayParentCollections(boolean displayParents)

      Setter for the field displayParentCollections.

      Parameters:
      displayParents - a boolean.
    • isDisplayParentCollections

      public boolean isDisplayParentCollections()

      isDisplayParentCollections.

      Returns:
      the displayParentCollections
    • setIgnore

      public void setIgnore(String collectionName)

      setIgnore.

      Parameters:
      collectionName - a String object.
    • setIgnore

      public void setIgnore(Collection<String> collectionNames)

      setIgnore.

      Parameters:
      collectionNames - a Collection object.
    • resetIgnore

      public void resetIgnore()

      resetIgnore.

    • setCollectionInfo

      public void setCollectionInfo(String name, BrowseElementInfo info)
      Set the BrowseElementInfo of the BrowseDcElement with the given name to the given info object
      Parameters:
      name - The collection name
      info - The info to apply
    • removeCollectionInfo

      public void removeCollectionInfo(String name)
      Remove all custom collection info from the browse element with the given name. The element will get a new SimpleBrowseElementInfo
      Parameters:
      name - The collection name
    • getTranslationForName

      public String getTranslationForName(String name)
      Parameters:
      name - Raw collection name
      Returns:
      Translation for the current langauge; null of none found
    • getField

      public String getField()

      Getter for the field field.

      Returns:
      the field
    • getSearchUrl

      public String getSearchUrl()
      Returns:
      the searchUrl
    • setSearchUrl

      public void setSearchUrl(String searchUrl)
      Parameters:
      searchUrl - the searchUrl to set
    • isIgnoreHierarchy

      public boolean isIgnoreHierarchy()
      Returns:
      the ignoreHierarchy
    • setIgnoreHierarchy

      public void setIgnoreHierarchy(boolean ignoreHierarchy)
      Parameters:
      ignoreHierarchy - the ignoreHierarchy to set
    • getCollectionDefaultSortField

      public static String getCollectionDefaultSortField(String name, Map<String,String> configuredSortFields)
    • getSplittingChar

      public String getSplittingChar()
      Returns:
      the splittingChar
    • getDisplayNumberOfVolumesLevel

      public int getDisplayNumberOfVolumesLevel()
      Returns:
      the displayNumberOfVolumesLevel
    • getCollectionElement

      public HierarchicalBrowseDcElement getCollectionElement(String name)
    • getBaseElement

      public HierarchicalBrowseDcElement getBaseElement()