HiRISE

HiRISE.HiReport.product
Class ObservationNode

java.lang.Object
  extended by HiRISE.HiReport.product.ObservationNode
Direct Known Subclasses:
EdrValidationNode, PhotStatsNode, ProductObservationNode

public abstract class ObservationNode
extends Object

Contains observation information for serialization


Field Summary
protected  Timestamp acquired
          Actual acquisition time
protected  CommandedCcdSet ccdset
          CCD Settings
protected  int cycle
          Cycle number
protected  String id
          observation ID
protected  Timestamp predicted
          Predicted acquisition time
protected  Set<String> related
          set of related stereo observation IDs
protected  String status
          observation status
protected  boolean stereo
          true if suggestion was stereo
protected  int suggestion
          Corresponding suggestion ID
protected  Set<String> tagnames
          just the tag names
protected  Map<Tag,String> tags
          map of tag to product#version (or empty string if no specific product)
protected  String target
          observation target
protected  String theme
          Science theme
protected  String thumb
          Thumbnail URL
protected  String title
          observation title
 
Constructor Summary
ObservationNode(String id)
          Create a new node, with information to be filled out
 
Method Summary
 void addRelatedId(String id)
          Add a related ID
 void addTag(String product, String id, int version, Tag tag)
          Associates a tag with a product.
 ObservationNode cycle(int cycle)
          Set to true if cycle is available
 boolean equals(Object obj)
           
 Date getAcquiredTime()
          Get the acquired time
 CommandedCcdSet getCommandedCcdSet()
          Get the commanding instance
 int getCycle()
          Get the cycle number
 boolean getDerivable()
          Return true if geometry is required
 String getId()
          Get the observation ID
 Date getPredictedTime()
          Get the predicted time
 boolean getProductable()
          Return true if products are expected for this observation
 Set<String> getRelated()
           
 int getRelatedCount()
          Get the number of related observations/suggestions
 String getStatus()
           
 int getSuggestion()
          Get the suggestion number (could be zero if there is no corresponding suggestion)
 String getTarget()
          Get the target name
 String getTheme()
          Get the science theme name
 String getThumb()
          Get the thumb path (relative URL path)
 String getTitle()
          Get the observation title
 int hashCode()
           
 boolean isStereo()
          Get the stereo type (STL stereo)
 void setSuggestion(int suggestion)
          Set the suggestion number
 void setThumb(String thumb)
          Set the thumb path (relative URL path)
 void setTiming(Timestamp predicted, Timestamp acquired)
          Set the predicted and acquired times
 ObservationNode status(String status)
          Set the status
 ObservationNode stereo(boolean stereo)
          Set the stereo mode
 ObservationNode target(String target)
          Set the target
 ObservationNode theme(String theme)
          Set the theme
 ObservationNode title(String title)
          Set the title
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected String id
observation ID


title

protected String title
observation title


target

protected String target
observation target


status

protected String status
observation status


stereo

protected boolean stereo
true if suggestion was stereo


related

protected Set<String> related
set of related stereo observation IDs


ccdset

protected CommandedCcdSet ccdset
CCD Settings


predicted

protected transient Timestamp predicted
Predicted acquisition time


acquired

protected Timestamp acquired
Actual acquisition time


suggestion

protected int suggestion
Corresponding suggestion ID


thumb

protected String thumb
Thumbnail URL


theme

protected String theme
Science theme


cycle

protected int cycle
Cycle number


tags

protected transient Map<Tag,String> tags
map of tag to product#version (or empty string if no specific product)


tagnames

protected transient Set<String> tagnames
just the tag names

Constructor Detail

ObservationNode

public ObservationNode(String id)
Create a new node, with information to be filled out

Parameters:
id - observation ID
Method Detail

status

public ObservationNode status(String status)
Set the status

Parameters:
status - value of status
Returns:
this instance

title

public ObservationNode title(String title)
Set the title

Parameters:
title - value of title
Returns:
this instance

target

public ObservationNode target(String target)
Set the target

Parameters:
target - value of target
Returns:
this instance

theme

public ObservationNode theme(String theme)
Set the theme

Parameters:
theme - value of theme
Returns:
this instance

cycle

public ObservationNode cycle(int cycle)
Set to true if cycle is available

Parameters:
cycle - true if cycle is available
Returns:
this instance

stereo

public ObservationNode stereo(boolean stereo)
Set the stereo mode

Parameters:
stereo - true if stereo
Returns:
this instance

setTiming

public void setTiming(Timestamp predicted,
                      Timestamp acquired)
Set the predicted and acquired times

Parameters:
predicted - value (should not be null)
acquired - value (can be null)

getPredictedTime

public Date getPredictedTime()
Get the predicted time

Returns:
predicted time

getAcquiredTime

public Date getAcquiredTime()
Get the acquired time

Returns:
acquired time

getCommandedCcdSet

public CommandedCcdSet getCommandedCcdSet()
Get the commanding instance

Returns:
CCD commanding

addRelatedId

public void addRelatedId(String id)
Add a related ID

Parameters:
id - the ID

getTitle

public String getTitle()
Get the observation title

Returns:
the title

getTarget

public String getTarget()
Get the target name

Returns:
the target

getTheme

public String getTheme()
Get the science theme name

Returns:
the theme

getCycle

public int getCycle()
Get the cycle number

Returns:
cycle number

isStereo

public boolean isStereo()
Get the stereo type (STL stereo)

Returns:
the stereo

getRelated

public Set<String> getRelated()
Returns:
the related

getRelatedCount

public int getRelatedCount()
Get the number of related observations/suggestions

Returns:
related count

getId

public String getId()
Get the observation ID

Returns:
ID string

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getStatus

public String getStatus()
Returns:
the status

getDerivable

public boolean getDerivable()
Return true if geometry is required

Returns:
true for MARS-targeted observations

getProductable

public boolean getProductable()
Return true if products are expected for this observation

Returns:
true if products expected

getSuggestion

public int getSuggestion()
Get the suggestion number (could be zero if there is no corresponding suggestion)

Returns:
suggestion number

setSuggestion

public void setSuggestion(int suggestion)
Set the suggestion number

Parameters:
suggestion - suggestion_id

getThumb

public String getThumb()
Get the thumb path (relative URL path)

Returns:
thumb URL path

setThumb

public void setThumb(String thumb)
Set the thumb path (relative URL path)

Parameters:
thumb - URL path

addTag

public void addTag(String product,
                   String id,
                   int version,
                   Tag tag)
Associates a tag with a product.

Parameters:
product - uniquely identifies the product
id - product ID (not necessarily unique, e.g. "RED")
version - product version number
tag - the tag instance

HiRISE

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