Class DownloadOption

java.lang.Object
io.goobi.viewer.model.job.download.DownloadOption

public class DownloadOption extends Object
Download option configuration item.
  • Field Details

    • TIMES_SYMBOL

      public static final String TIMES_SYMBOL
      See Also:
    • MAX

      public static final Dimension MAX
      Dimension symbolizing the maximal image size.
    • NONE

      public static final Dimension NONE
      Dimension symbolizing that no image size has been set.
  • Constructor Details

    • DownloadOption

      public DownloadOption()
    • DownloadOption

      public DownloadOption(String label, String format, String boxSize)
    • DownloadOption

      public DownloadOption(String label, String format, Dimension boxSize)
  • Method Details

    • isValid

      public boolean isValid()
      Returns:
      true if all properties are set; false otherwise
    • getByLabel

      public static DownloadOption getByLabel(String label)
      Retrieves the DownloadOption with the given label from configuration.
      Parameters:
      label - Label of the DownloadOption to find
      Returns:
      DownloadOption that matches label; null if none found
    • getLabel

      public String getLabel()
    • setLabel

      public DownloadOption setLabel(String label)
      Parameters:
      label - the human-readable display label for this download option
      Returns:
      this
    • getFormat

      public String getFormat()
    • setFormat

      public DownloadOption setFormat(String format)
      Parameters:
      format - the image format identifier (e.g. "jpg", "png", "master") for the download
      Returns:
      this
    • getBoxSizeInPixel

      public Dimension getBoxSizeInPixel()
    • getExtension

      public String getExtension(String filename)
    • setBoxSizeInPixel

      public DownloadOption setBoxSizeInPixel(String boxSizeInPixel)
      Parameters:
      boxSizeInPixel - the maximum bounding box size in pixels as a number string, "max" for maximum resolution, or blank for no limit
      Returns:
      this
    • getBoxSizeLabel

      public String getBoxSizeLabel()
    • toString

      public String toString()
      Overrides:
      toString in class Object