HiRISE

HiRISE.HiVali
Class CCD

java.lang.Object
  extended by HiRISE.HiVali.CCD
All Implemented Interfaces:
Cloneable, Comparable<CCD>

public class CCD
extends Object
implements Cloneable, Comparable<CCD>

Represents a CCD. An Observation will have multiple CCDs.

Version:
1.2
Author:
guym

Field Summary
protected  int CCD
          CCD Number
protected static List<String> CCD_NAMES
          List of CCD Names, indexed by CPMM_Number
protected  String ccdName
          CCD Name, defined in Instrument class
protected  int cpmmNumber
          The CPMM number
protected  String id
          Our product id String
static String ID
          CVS ID
static Pattern idPattern
          Pattern to match Channel IDs
protected  Observation observation
          Reference to parent observation
 
Constructor Summary
CCD(Observation observation, int cpmmNumber)
          Construct a new CCD for the given Observation and CPMM number.
CCD(Observation observation, String ccdName)
          Construct a new CCD for the given Observation and CCD name.
 
Method Summary
 Object clone()
          Clone this CCD
 int compareTo(CCD CCD)
           
 boolean equals(Object object)
          Compare this CCD to another for equality.
 int getCpmmNumber()
          Get the CPMM number
 String getFilterName()
          Get the filter name used for this CCD
 String getName()
          Get the name of this CCD, e.g.
 Observation getObservation()
          Get the observation that this CCD is a part of.
 int hashCode()
          Get a hash code for this CCD
static CCD parse(String id)
          Construct a new CCD
 String toString()
          Get the String form of the CCD, includes the Observation ID.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final String ID
CVS ID

See Also:
Constant Field Values

CCD_NAMES

protected static List<String> CCD_NAMES
List of CCD Names, indexed by CPMM_Number


observation

protected Observation observation
Reference to parent observation


cpmmNumber

protected int cpmmNumber
The CPMM number


ccdName

protected String ccdName
CCD Name, defined in Instrument class


CCD

protected int CCD
CCD Number


id

protected String id
Our product id String


idPattern

public static final Pattern idPattern
Pattern to match Channel IDs

Constructor Detail

CCD

public CCD(Observation observation,
           int cpmmNumber)
    throws Invalid_Argument_Exception
Construct a new CCD for the given Observation and CPMM number.

Parameters:
observation - The observation
cpmmNumber - Index into the Instrument.CCD_NAMES array
Throws:
Invalid_Argument_Exception - Bad CPMM number

CCD

public CCD(Observation observation,
           String ccdName)
    throws Invalid_Argument_Exception
Construct a new CCD for the given Observation and CCD name.

Parameters:
observation - Observation instance
ccdName - Name of CCD
Throws:
Invalid_Argument_Exception - Bad CCD name
Method Detail

parse

public static CCD parse(String id)
                 throws Invalid_Argument_Exception
Construct a new CCD

Parameters:
id - String containing CCD id
Returns:
Instance of CCD
Throws:
Invalid_Argument_Exception - Bad CCD id input

getName

public String getName()
Get the name of this CCD, e.g. RED0

Returns:
CCD Name

toString

public String toString()
Get the String form of the CCD, includes the Observation ID.

Overrides:
toString in class Object

getObservation

public Observation getObservation()
Get the observation that this CCD is a part of.

Returns:
Observation instance

clone

public final Object clone()
                   throws CloneNotSupportedException
Clone this CCD

Overrides:
clone in class Object
Throws:
CloneNotSupportedException

equals

public boolean equals(Object object)
Compare this CCD to another for equality.

Overrides:
equals in class Object

hashCode

public int hashCode()
Get a hash code for this CCD

Overrides:
hashCode in class Object

compareTo

public int compareTo(CCD CCD)
Specified by:
compareTo in interface Comparable<CCD>
See Also:
Comparable

getCpmmNumber

public int getCpmmNumber()
Get the CPMM number

Returns:
CPMM number

getFilterName

public String getFilterName()
Get the filter name used for this CCD

Returns:
Name of filter

HiRISE

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