Class ViewAttributes

java.lang.Object
io.goobi.viewer.controller.model.ViewAttributes

public class ViewAttributes extends Object
Used to check whether a zoomImageView configuration block should be applied to the image view represented by the given viewManager and pageType Stores PageType (the type of view, like fullscreen or viewImage), MimeType of the current page, the number of pages in the record, the main DocStructType of the record and the collections (based on SolrConstants.DC) of the record.
  • Constructor Details

    • ViewAttributes

      public ViewAttributes(MimeType mimeType, Integer recordPageCount, String docStructType, List<String> collections, PageType pageType)
      create an instance based on individual values. All values may be null if they can be ignored for the check
      Parameters:
      mimeType - the media mimeType of the page
      recordPageCount - the number of pages in the record
      docStructType - The DocStructType of the record
      collections - the SolrConstants.DC collections of the record
      pageType - the type of view, one of the values of PageType
    • ViewAttributes

      public ViewAttributes(PhysicalElement page, StructElement structElement, PageType pageType)
      create an instance based on a page and StructElement, along with a PageType. All values may be null if they can be ignored for the check
      Parameters:
      page - the page to consider
      structElement - the structural element to consider
      pageType - the type of view, one of the values of PageType
    • ViewAttributes

      public ViewAttributes(ViewManager viewManager, PageType pageType)
      Creates an instance from a ViewManager All values may be null if they can be ignored for the check.
      Parameters:
      viewManager - the ViewManager
      pageType - the type of view, one of the values of PageType
    • ViewAttributes

      public ViewAttributes(PhysicalElement page, PageType pageType)
    • ViewAttributes

      public ViewAttributes(PageType pageType)
  • Method Details

    • matchesConfiguration

      public boolean matchesConfiguration(org.apache.commons.configuration2.HierarchicalConfiguration<org.apache.commons.configuration2.tree.ImmutableNode> conditionConfigNode)
    • getPageType

      public PageType getPageType()
    • getMimeType

      public MimeType getMimeType()
    • getRecordPageCount

      public int getRecordPageCount()
    • getDocStructType

      public String getDocStructType()
    • getCollection

      public List<String> getCollection()