Class Quicklook
java.lang.Object
com.bc.ceres.core.ExtensibleObject
org.esa.snap.core.datamodel.ProductNode
org.esa.snap.core.datamodel.quicklooks.Quicklook
- All Implemented Interfaces:
Extensible,Thumbnail
Created by luis on 10/01/2016.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.esa.snap.core.datamodel.quicklooks.Thumbnail
Thumbnail.ThumbnailListener -
Field Summary
FieldsFields inherited from class org.esa.snap.core.datamodel.ProductNode
PROPERTY_NAME_DESCRIPTION, PROPERTY_NAME_NAMEFields inherited from interface org.esa.snap.core.datamodel.quicklooks.Thumbnail
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionConstructor when only a quicklook name is given.Constructor when a browseFile is given.Quicklook(Product product, String name, File browseFile, boolean productCanAppendFiles, Path productQuicklookFolder, Band[] quicklookBands) Constructor when a browseFile is given.Constructor when a browseFile is given. -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptVisitor(ProductVisitor visitor) Accepts the given visitor.longgetRawStorageSize(ProductSubsetDef subsetDef) Gets an estimated, raw storage size in bytes of this product node.booleanbooleanhasImage()booleanvoidsetProduct(Product product) voidsetQuicklookLink(String link) Methods inherited from class org.esa.snap.core.datamodel.ProductNode
dispose, fireProductNodeChanged, fireProductNodeChanged, getDescription, getDisplayName, getName, getOwner, getProduct, getProductReader, getProductReaderSafe, getProductRefString, getProductSafe, getProductWriter, getProductWriterSafe, getRawStorageSize, isModified, isPartOfSubset, isValidNodeName, removeFromFile, setDescription, setModified, setName, setNodeName, setOwner, toString, updateExpressionMethods inherited from class com.bc.ceres.core.ExtensibleObject
getExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.esa.snap.core.datamodel.quicklooks.Thumbnail
addListener, getProduct, notifyImageUpdated, removeListener
-
Field Details
-
DEFAULT_QUICKLOOK_NAME
- See Also:
-
SNAP_QUICKLOOK_FILE_PREFIX
- See Also:
-
-
Constructor Details
-
Quicklook
-
Quicklook
Constructor when only a quicklook name is given. Quicklook will be generated using defaults- Parameters:
product- the source productname- the name of the quicklook
-
Quicklook
Constructor when a browseFile is given. The quicklook is generated from the browse file- Parameters:
product- the source productname- the name of the quicklookbrowseFile- the preview or browse image from a product
-
Quicklook
Constructor when a browseFile is given. The quicklook is generated from the browse file- Parameters:
product- the source productname- the name of the quicklookquicklookBands- 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 productname- the name of the quicklookbrowseFile- the preview or browse image from a productproductCanAppendFiles- true when files may be written to the productproductQuicklookFolder- where to write the quicklook files
-
-
Method Details
-
setProduct
-
hasProduct
public boolean hasProduct() -
getProductFile
-
getRawStorageSize
Gets an estimated, raw storage size in bytes of this product node.- Specified by:
getRawStorageSizein classProductNode- Parameters:
subsetDef- if notnullthe subset may limit the size returned- Returns:
- the size in bytes.
-
setQuicklookLink
-
acceptVisitor
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:
acceptVisitorin classProductNode- Parameters:
visitor- the visitor, must not benull
-
hasCachedImage
public boolean hasCachedImage()- Specified by:
hasCachedImagein interfaceThumbnail
-
hasImage
public boolean hasImage() -
getImage
-