HiRISE

HiRISE.HiReport.product
Class ProductVersionNode

java.lang.Object
  extended by HiRISE.HiReport.product.ProductVersionNode

public class ProductVersionNode
extends Object

Represents a branch for a particular version in a tree of products, where the child nodes are ProductNode instances. It maintains a collection of expected products (which do not have any particular version) and a collection of found products, which is initially empty.


Constructor Summary
ProductVersionNode(Set<HiProduct> expected)
          Create the node.
 
Method Summary
 ProductNode addExpectedProduct(HiProduct product)
          Add a product to the expected set.
 ProductNode addProduct(HiProduct product, ProductFile file)
          Add a product, creating a new child node for it
 int getAvailableCount()
          Get the count of available products
 Map<String,ProductNode> getExpected()
          Get the collection: a map from keys to leaf node values.
 int getExpectedCount()
          Get the count of expected products
 int getIgnorableCount()
          Get the count of ignorable products
 Map<String,ProductNode> getProducts()
          Get the collection: a map from keys to leaf node values.
 int getUnfinishedCount()
          Get the count of unfinished products
 void setIgnorable(HiProduct... ignorable)
          Set the ignorable status for one or more products.
 void setStatus(HiProduct product, String status)
          Set the state to unfinished and the corresponding status message for a particular version
protected  void updateExpectation(HiProduct product, ProductState state)
          Set the state for a product
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductVersionNode

public ProductVersionNode(Set<HiProduct> expected)
Create the node.

Parameters:
expected - products that are to be expected
Method Detail

addProduct

public ProductNode addProduct(HiProduct product,
                              ProductFile file)
Add a product, creating a new child node for it

Parameters:
product - the unique product type
file - a file reference for the product
Returns:
the new child node

updateExpectation

protected void updateExpectation(HiProduct product,
                                 ProductState state)
Set the state for a product

Parameters:
product - the product
state - state value

addExpectedProduct

public ProductNode addExpectedProduct(HiProduct product)
Add a product to the expected set.

Parameters:
product - the product
Returns:
the new child node

setIgnorable

public void setIgnorable(HiProduct... ignorable)
Set the ignorable status for one or more products.

Parameters:
ignorable - products

setStatus

public void setStatus(HiProduct product,
                      String status)
Set the state to unfinished and the corresponding status message for a particular version

Parameters:
product - the product instance
status - message, e.g. pipeline name

getProducts

public Map<String,ProductNode> getProducts()
Get the collection: a map from keys to leaf node values.

Returns:
map

getExpected

public Map<String,ProductNode> getExpected()
Get the collection: a map from keys to leaf node values.

Returns:
map

getExpectedCount

public int getExpectedCount()
Get the count of expected products

Returns:
number of products expected

getAvailableCount

public int getAvailableCount()
Get the count of available products

Returns:
number of products found

getIgnorableCount

public int getIgnorableCount()
Get the count of ignorable products

Returns:
number of products ignorable

getUnfinishedCount

public int getUnfinishedCount()
Get the count of unfinished products

Returns:
number of products unfinished

HiRISE

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