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()
      Returns:
      the label
    • setLabel

      public DownloadOption setLabel(String label)
      Parameters:
      label - the label to set
      Returns:
      this
    • getFormat

      public String getFormat()
      Returns:
      the format
    • setFormat

      public DownloadOption setFormat(String format)
      Parameters:
      format - the format to set
      Returns:
      this
    • getBoxSizeInPixel

      public Dimension getBoxSizeInPixel()
      Returns:
      the boxSizeInPixel
    • getExtension

      public String getExtension(String filename)
    • setBoxSizeInPixel

      public DownloadOption setBoxSizeInPixel(String boxSizeInPixel)
      Parameters:
      boxSizeInPixel - the boxSizeInPixel to set
      Returns:
      this
    • getBoxSizeLabel

      public String getBoxSizeLabel()
    • toString

      public String toString()
      Overrides:
      toString in class Object