Class Quicklook

All Implemented Interfaces:
Extensible, Thumbnail

public class Quicklook extends ProductNode implements Thumbnail
Created by luis on 10/01/2016.
  • Field Details

  • Constructor Details

    • Quicklook

      public Quicklook(File productFile)
    • Quicklook

      public Quicklook(Product product, String name)
      Constructor when only a quicklook name is given. Quicklook will be generated using defaults
      Parameters:
      product - the source product
      name - the name of the quicklook
    • Quicklook

      public Quicklook(Product product, String name, File browseFile)
      Constructor when a browseFile is given. The quicklook is generated from the browse file
      Parameters:
      product - the source product
      name - the name of the quicklook
      browseFile - the preview or browse image from a product
    • Quicklook

      public Quicklook(Product product, String name, Band[] quicklookBands)
      Constructor when a browseFile is given. The quicklook is generated from the browse file
      Parameters:
      product - the source product
      name - the name of the quicklook
      quicklookBands - the bands to create an RGB quicklook from
    • Quicklook

      public Quicklook(Product product, String name, File browseFile, boolean productCanAppendFiles, Path productQuicklookFolder, Band[] quicklookBands)
      Constructor when a browseFile is given. The quicklook is generated from the browse file
      Parameters:
      product - the source product
      name - the name of the quicklook
      browseFile - the preview or browse image from a product
      productCanAppendFiles - true when files may be written to the product
      productQuicklookFolder - where to write the quicklook files
  • Method Details

    • setProduct

      public void setProduct(Product product)
    • hasProduct

      public boolean hasProduct()
    • getProductFile

      public File getProductFile()
    • getRawStorageSize

      public long getRawStorageSize(ProductSubsetDef subsetDef)
      Gets an estimated, raw storage size in bytes of this product node.
      Specified by:
      getRawStorageSize in class ProductNode
      Parameters:
      subsetDef - if not null the subset may limit the size returned
      Returns:
      the size in bytes.
    • setQuicklookLink

      public void setQuicklookLink(String link)
    • acceptVisitor

      public void acceptVisitor(ProductVisitor visitor)
      Accepts the given visitor. This method implements the well known 'Visitor' design pattern of the gang-of-four. The visitor pattern allows to define new operations on the product data model without the need to add more code to it. The new operation is implemented by the visitor.

      The method simply calls visitor.visit(this).

      Specified by:
      acceptVisitor in class ProductNode
      Parameters:
      visitor - the visitor, must not be null
    • hasCachedImage

      public boolean hasCachedImage()
      Specified by:
      hasCachedImage in interface Thumbnail
    • hasImage

      public boolean hasImage()
      Specified by:
      hasImage in interface Thumbnail
    • getImage

      public BufferedImage getImage(ProgressMonitor pm)
      Specified by:
      getImage in interface Thumbnail