HiRISE

HiRISE.HiReport.product
Class ProductNode

java.lang.Object
  extended by HiRISE.HiReport.product.ProductNode
Direct Known Subclasses:
StereoProductNode

public class ProductNode
extends Object

Represents a product in a hierarchy. A product may have multiple files.


Constructor Summary
ProductNode(HiProduct product)
          Create a new product node for the specified type of product
ProductNode(HiProduct product, String ref)
          Create a new product node for the specified type of product
 
Method Summary
 void addProductFile(ProductFile file)
          Add a file to this node
 ProductFile getAbrowse()
          Convenience method to get the annotated browse file info if it exists (otherwise null)
 boolean getAvailable()
          Get the availability.
 ProductFile getBrowse()
          Convenience method to get the browse file info if it exists (otherwise null)
 ProductFile getColorThumb()
          Convenience method to get the color thumbnail file if it exists (otherwise null)
 Date getCreated()
          Get the creation date
 String getDisplayName()
          Get the (non-unique) name of the product for display.
 ProductFile getFull()
          Convenience method to get the full file info if it exists (otherwise null)
 String getName()
          Get the name of the product.
 HiProduct getProduct()
          Get the product enumerator instance
 Map<ProductFileType,ProductFile> getProductFiles()
          Get the files for this product
 String getRef()
          Get the reference product ID (may be null)
 ProductState getState()
          Get the state of this product
 String getStatus()
          Get the status, typically a pipeline name to indicate that the product was last sourced to the pipeline
 ProductFile getThumb()
          Convenience method to get the thumbnail file info if it exists (otherwise null)
 void setCreated(Date created)
          Set the product creation date
 void setState(ProductState state)
          Set the state of this product
 void setStatus(String status)
          Set the status, e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductNode

public ProductNode(HiProduct product)
Create a new product node for the specified type of product

Parameters:
product - type

ProductNode

public ProductNode(HiProduct product,
                   String ref)
Create a new product node for the specified type of product

Parameters:
product - type
ref - reference product ID
Method Detail

getName

public String getName()
Get the name of the product.

Returns:
short unique name
See Also:
Enum.toString()

getDisplayName

public String getDisplayName()
Get the (non-unique) name of the product for display.

Returns:
display name
See Also:
HiProduct.getDisplayName()

getProduct

public HiProduct getProduct()
Get the product enumerator instance

Returns:
unique product type

addProductFile

public void addProductFile(ProductFile file)
Add a file to this node

Parameters:
file - reference to file for this product

getProductFiles

public Map<ProductFileType,ProductFile> getProductFiles()
Get the files for this product

Returns:
map from file type to file

getCreated

public Date getCreated()
Get the creation date

Returns:
date of creation

setCreated

public void setCreated(Date created)
Set the product creation date

Parameters:
created - date of creation

getFull

public ProductFile getFull()
Convenience method to get the full file info if it exists (otherwise null)

Returns:
full file reference or null TODO see if this is actually used

getAbrowse

public ProductFile getAbrowse()
Convenience method to get the annotated browse file info if it exists (otherwise null)

Returns:
full file reference or null TODO see if this is actually used

getBrowse

public ProductFile getBrowse()
Convenience method to get the browse file info if it exists (otherwise null)

Returns:
full file reference or null TODO see if this is actually used

getThumb

public ProductFile getThumb()
Convenience method to get the thumbnail file info if it exists (otherwise null)

Returns:
full file reference or null TODO see if this is actually used

getColorThumb

public ProductFile getColorThumb()
Convenience method to get the color thumbnail file if it exists (otherwise null)

Returns:
full file reference or null TODO see if this is actually used

getAvailable

public boolean getAvailable()
Get the availability. A product is considered available if any of its files have been proffered.

Returns:
true if available

getState

public ProductState getState()
Get the state of this product

Returns:
state

setState

public void setState(ProductState state)
Set the state of this product

Parameters:
state - current state

getStatus

public String getStatus()
Get the status, typically a pipeline name to indicate that the product was last sourced to the pipeline

Returns:
status

setStatus

public void setStatus(String status)
Set the status, e.g. a pipeline name to indicate that it was last entered into that pipeline.

Parameters:
status - pipeline name (or other identifier)

getRef

public String getRef()
Get the reference product ID (may be null)

Returns:
referred product ID

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona