jpl.mipl.tlm.jedi
Class EDR

java.lang.Object
  extended by jpl.mipl.tlm.jedi.EDR
All Implemented Interfaces:
java.io.Serializable

public class EDR
extends java.lang.Object
implements java.io.Serializable

A java EDR Object used for implementing the new RealTime Display Manager/Server. Basically, to use this object, you'll first need to use one of the <filetype>EDRReaders. They ingest a file from disk and populate the EDR object fields.

This class was intended to offer a way for an EDR file to be made into a Java Object such that it could then be passed around with RMI (or other) mechanisms. This means that I must implement the Serializable interface.

Anyway, class EDR is designed to be a minimal definition of an EDR such that only the salient elements are serialized and, therefore, passed over the network. At a minimum, EDR defines the following characteristics:

Finally, it should be noted that my definition of an EDR, which is derived from the MPF examples I have, is that all the pertinent information is found in the VICAR Property label items. Though the Tasks elements are filled and used, it is the Property hashtable that is, seemingly, of most importance. This also enforces the assumption that all such keywords are unique within the VICAR label.

Version:
$Id: EDR.java,v 1.26 2003/10/03 18:39:44 myche Exp $
Author:
Myche McAuley
See Also:
VicarJAIEDRReader, IsisEDRReader, Serialized Form

Field Summary
protected  short[] data
           
protected  int depth
           
protected  java.lang.String filename
           
protected  int height
           
protected  java.lang.String org
           
protected  int preferredScale
           
protected  java.util.Hashtable properties
           
protected  java.util.Hashtable tasks
           
protected  UniqPropertyChangeSupport upcs
           
protected  int width
           
 
Constructor Summary
EDR()
           
EDR(EDR initEDR)
           
EDR(java.lang.String filestr)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
           
 int getDepth()
          getDepth() returns the depth (bands) of the EDR.
 EDR getEDR()
           
 java.lang.String getFilename()
           
 int getHeight()
          getHeight() returns the height of the EDR.
 double getLabelItemDouble(java.lang.String item)
           
 float getLabelItemFloat(java.lang.String item)
           
 int getLabelItemInt(java.lang.String item)
           
 java.lang.Double getLabelItemNumeric(java.lang.String item)
          getLabelItemNumeric is a convenience function that calls getLabelItemString and converts the resulting value into a Double.
 java.lang.String getLabelItemString(java.lang.String item)
           
 java.lang.String getLabelItemString(java.lang.String item, int occurence)
          getLabelItemString will obtain the value for the label item by utilizing the populated hashtables.
 java.lang.String getLabelItemString(java.lang.String item, java.lang.String prop)
          getLabelItemString will obtain the value for the label item by utilizing the populated hashtables.
 java.lang.String getOrg()
          getOrg() returns the organization of the EDR.
 int getPreferredScale()
          getPreferredScale() returns the desired factor by which the data should be scaled for the display.
 java.lang.String getPropertyFromKey(java.lang.String key)
          getPropertyFromKey will obtain the Property which cointains the supplied label item (keyword).
 int getWidth()
          getWidth() returns the width of the EDR.
 void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
           
 void setDepth(int d)
           
 void setEDR(EDR newEDR)
          Basically, setEDR will copy everything except the UniqPropertyChangeSupport from the newEDR.
 void setHeight(int h)
           
 void setOrg(java.lang.String o)
           
 void setPreferredScale(int ps)
           
 void setWidth(int w)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

width

protected int width

height

protected int height

depth

protected int depth

org

protected java.lang.String org

preferredScale

protected int preferredScale

properties

protected java.util.Hashtable properties

tasks

protected java.util.Hashtable tasks

data

protected short[] data

filename

protected java.lang.String filename

upcs

protected transient UniqPropertyChangeSupport upcs
Constructor Detail

EDR

public EDR(java.lang.String filestr)

EDR

public EDR(EDR initEDR)

EDR

public EDR()
Method Detail

setEDR

public void setEDR(EDR newEDR)
Basically, setEDR will copy everything except the UniqPropertyChangeSupport from the newEDR. This is useful for updating this Bean and, therefore, propogating that update to any registered listeners.


getLabelItemString

public java.lang.String getLabelItemString(java.lang.String item,
                                           java.lang.String prop)
getLabelItemString will obtain the value for the label item by utilizing the populated hashtables.

Conversion of the results to appropriate types (int, float, etc...) is left for other wrapper methods.


getLabelItemString

public java.lang.String getLabelItemString(java.lang.String item,
                                           int occurence)
getLabelItemString will obtain the value for the label item by utilizing the populated hashtables.

Conversion of the results to appropriate types (int, float, etc...) is left for other wrapper methods.


getPropertyFromKey

public java.lang.String getPropertyFromKey(java.lang.String key)
getPropertyFromKey will obtain the Property which cointains the supplied label item (keyword). Keys are assumed to be unique within an EDR label.


getLabelItemString

public java.lang.String getLabelItemString(java.lang.String item)

getLabelItemNumeric

public java.lang.Double getLabelItemNumeric(java.lang.String item)
getLabelItemNumeric is a convenience function that calls getLabelItemString and converts the resulting value into a Double. From there, other routines can convert to int, float, etc...

See Also:
getLabelItemInt(String), getLabelItemFloat(String), getLabelItemDouble(String)

getLabelItemInt

public int getLabelItemInt(java.lang.String item)

getLabelItemFloat

public float getLabelItemFloat(java.lang.String item)

getLabelItemDouble

public double getLabelItemDouble(java.lang.String item)

getWidth

public int getWidth()
getWidth() returns the width of the EDR. This method is supplied so as to hide any discrepancies between differing input formats (e.g. VICAR and PDS) and their keyword peculiarities to represent such fundamental information. The EDR should always be instantiated by the appropriate <filetype>Reader such that the: width, height, depth, and org can be obtained by calling getWith(), getHeight(), getDepth(), and getOrg() respectively.

See Also:
getHeight(), getDepth(), getOrg()

getHeight

public int getHeight()
getHeight() returns the height of the EDR. This method is supplied so as to hide any discrepancies between differing input formats (e.g. VICAR and PDS) and their keyword peculiarities to represent such fundamental information. The EDR should always be instantiated by the appropriate <filetype>Reader such that the: width, height, depth, and org can be obtained by calling getWith(), getHeight(), getDepth(), and getOrg() respectively.

See Also:
getWidth(), getDepth(), getOrg()

getDepth

public int getDepth()
getDepth() returns the depth (bands) of the EDR. This method is supplied so as to hide any discrepancies between differing input formats (e.g. VICAR and PDS) and their keyword peculiarities to represent such fundamental information. The EDR should always be instantiated by the appropriate <filetype>Reader such that the: width, height, depth, and org can be obtained by calling getWith(), getHeight(), getDepth(), and getOrg() respectively.

See Also:
getWidth(), getHeight(), getOrg()

getOrg

public java.lang.String getOrg()
getOrg() returns the organization of the EDR. This method is supplied so as to hide any discrepancies between differing input formats (e.g. VICAR and PDS) and their keyword peculiarities to represent such fundamental information. The EDR should always be instantiated by the appropriate <filetype>Reader such that the: width, height, depth, and org can be obtained by calling getWith(), getHeight(), getDepth(), and getOrg() respectively.

See Also:
getWidth(), getHeight(), getDepth()

getPreferredScale

public int getPreferredScale()
getPreferredScale() returns the desired factor by which the data should be scaled for the display. This is most useful for those cases where the data returned by the instrument is very small (spatially) and JEDI could benefit from scaling the data for enlargement. A good example of this would be the Cassini VIMS instrument. It can return cubes on the order of 64 x 64 x 352. By setting the preferredScale = 4, then we can cause JEDI to display the data at 256 x 256 (x 3 bands for red, grn and blu).


setPreferredScale

public void setPreferredScale(int ps)

setWidth

public void setWidth(int w)

setHeight

public void setHeight(int h)

setDepth

public void setDepth(int d)

setOrg

public void setOrg(java.lang.String o)

getFilename

public java.lang.String getFilename()

getEDR

public EDR getEDR()

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object