gov.noaa.pmel.sgt.dm
Class SimpleTuple

java.lang.Object
  extended by gov.noaa.pmel.sgt.dm.SimpleTuple
All Implemented Interfaces:
Cartesian, CoordinateSystem, SGTData, SGTTuple, java.io.Serializable, java.lang.Cloneable

public class SimpleTuple
extends java.lang.Object
implements java.lang.Cloneable, SGTTuple, Cartesian, java.io.Serializable

SimpleTuple provides an implementation of the SGTTuple and Cartesian interfaces.

Since:
2.x
Version:
$Revision$, $Date$
Author:
Donald Denbo
See Also:
SGTTuple, Cartesian, Serialized Form

Field Summary
protected  SGTMetaData xMetaData_
           
protected  SGTMetaData yMetaData_
           
protected  SGTMetaData zMetaData_
           
 
Constructor Summary
SimpleTuple()
           
SimpleTuple(double[] xArray, double[] yArray, double[] zArray, java.lang.String title)
           
SimpleTuple(double[] xArray, double[] yArray, java.lang.String title)
           
SimpleTuple(double[] xArray, GeoDate[] yArray, double[] zArray, java.lang.String title)
           
SimpleTuple(double[] xArray, GeoDate[] yArray, java.lang.String title)
           
SimpleTuple(GeoDate[] xArray, double[] yArray, double[] zArray, java.lang.String title)
           
SimpleTuple(GeoDate[] xArray, double[] yArray, java.lang.String title)
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Add a PropertyChangeListener to the listener list.
 SGTData copy()
          Create a shallow copy.
 double[] getAssociatedData()
           
 GeoDateArray getGeoDateArray()
          Get the GeoDateArray object.
 java.lang.String getId()
          Get the unique identifier.
 SGLabel getKeyTitle()
          Get a title formatted for a Key.
 int getSize()
           
 GeoDate[] getTimeArray()
           
 java.lang.String getTitle()
          Get the title.
 double[] getXArray()
           
 SGTMetaData getXMetaData()
          Returns the X SGTMetaData.
 SoTRange getXRange()
          Returns the range of the X coordinates.
 double[] getYArray()
           
 SGTMetaData getYMetaData()
          Returns the Y SGTMetaData.
 SoTRange getYRange()
          Returns the range of the Y coordinates.
 double[] getZArray()
           
 SGTMetaData getZMetaData()
           
 Range2D getZRange()
           
 boolean hasAssociatedData()
           
 boolean isXTime()
          Returns true if the X coordinate is Time.
 boolean isYTime()
          Returns true if the Y coordinate is Time.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Remove a PropertyChangeListener from the listener list.
 void setAssociatedData(double[] assocArray)
           
 void setId(java.lang.String id)
           
 void setKeyTitle(SGLabel title)
           
 void setTitle(java.lang.String title)
           
 void setXArray(double[] xArray)
           
 void setXArray(GeoDate[] tArray)
           
 void setXArray(GeoDateArray tArray)
           
 void setXMetaData(SGTMetaData xMeta)
           
 void setYArray(double[] yArray)
           
 void setYArray(GeoDate[] tArray)
           
 void setYArray(GeoDateArray tArray)
           
 void setYMetaData(SGTMetaData yMeta)
           
 void setZArray(double[] zArray)
           
 void setZMetaData(SGTMetaData zMeta)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xMetaData_

protected SGTMetaData xMetaData_

yMetaData_

protected SGTMetaData yMetaData_

zMetaData_

protected SGTMetaData zMetaData_
Constructor Detail

SimpleTuple

public SimpleTuple(double[] xArray,
                   double[] yArray,
                   java.lang.String title)

SimpleTuple

public SimpleTuple(GeoDate[] xArray,
                   double[] yArray,
                   java.lang.String title)

SimpleTuple

public SimpleTuple(double[] xArray,
                   GeoDate[] yArray,
                   java.lang.String title)

SimpleTuple

public SimpleTuple(double[] xArray,
                   double[] yArray,
                   double[] zArray,
                   java.lang.String title)

SimpleTuple

public SimpleTuple(GeoDate[] xArray,
                   double[] yArray,
                   double[] zArray,
                   java.lang.String title)

SimpleTuple

public SimpleTuple(double[] xArray,
                   GeoDate[] yArray,
                   double[] zArray,
                   java.lang.String title)

SimpleTuple

public SimpleTuple()
Method Detail

getXArray

public double[] getXArray()
Specified by:
getXArray in interface SGTTuple

setXArray

public void setXArray(double[] xArray)

setXArray

public void setXArray(GeoDate[] tArray)

setXArray

public void setXArray(GeoDateArray tArray)
Since:
3.0

getYArray

public double[] getYArray()
Specified by:
getYArray in interface SGTTuple

setYArray

public void setYArray(double[] yArray)

setYArray

public void setYArray(GeoDate[] tArray)

setYArray

public void setYArray(GeoDateArray tArray)
Since:
3.0

getZArray

public double[] getZArray()
Specified by:
getZArray in interface SGTTuple

setZArray

public void setZArray(double[] zArray)

getSize

public int getSize()
Specified by:
getSize in interface SGTTuple

getTimeArray

public GeoDate[] getTimeArray()
Specified by:
getTimeArray in interface SGTTuple

getGeoDateArray

public GeoDateArray getGeoDateArray()
Description copied from interface: SGTTuple
Get the GeoDateArray object.

Specified by:
getGeoDateArray in interface SGTTuple
Since:
3.0

getAssociatedData

public double[] getAssociatedData()
Specified by:
getAssociatedData in interface SGTTuple

setAssociatedData

public void setAssociatedData(double[] assocArray)

hasAssociatedData

public boolean hasAssociatedData()
Specified by:
hasAssociatedData in interface SGTTuple

getZMetaData

public SGTMetaData getZMetaData()
Specified by:
getZMetaData in interface SGTTuple

setZMetaData

public void setZMetaData(SGTMetaData zMeta)

getTitle

public java.lang.String getTitle()
Description copied from interface: SGTData
Get the title.

Specified by:
getTitle in interface SGTData

setTitle

public void setTitle(java.lang.String title)

getKeyTitle

public SGLabel getKeyTitle()
Description copied from interface: SGTData
Get a title formatted for a Key. JPlotLayout will use this if an explicit Key title is not given in the addData method.

Specified by:
getKeyTitle in interface SGTData
See Also:
SGLabel, ColorKey, LineKey, PointCollectionKey, VectorKey

setKeyTitle

public void setKeyTitle(SGLabel title)

getId

public java.lang.String getId()
Description copied from interface: SGTData
Get the unique identifier. The presence of the identifier is optional, but if it is present it should be unique. This field is used to search for the layer that contains the data.

Specified by:
getId in interface SGTData
Returns:
unique identifier
See Also:
Pane, Layer

setId

public void setId(java.lang.String id)

copy

public SGTData copy()
Description copied from interface: SGTData
Create a shallow copy. User should implement using the clone() method, which requires the Cloneable interface be inherited. If clone() is used, then references to objects are copied NOT the object itself.

For example,

 public SGTData copy() {
   SGTData newData;
   try {
     newData = (SGTData)clone();
   } catch (CloneNotSupportedException e) {
     newData = null;
   }
   return newData;
 }
 

Specified by:
copy in interface SGTData
Returns:
shallow copy
See Also:
Object

isXTime

public boolean isXTime()
Description copied from interface: SGTData
Returns true if the X coordinate is Time.

Specified by:
isXTime in interface SGTData

isYTime

public boolean isYTime()
Description copied from interface: SGTData
Returns true if the Y coordinate is Time.

Specified by:
isYTime in interface SGTData

getXMetaData

public SGTMetaData getXMetaData()
Description copied from interface: SGTData
Returns the X SGTMetaData.

Specified by:
getXMetaData in interface SGTData

setXMetaData

public void setXMetaData(SGTMetaData xMeta)

getYMetaData

public SGTMetaData getYMetaData()
Description copied from interface: SGTData
Returns the Y SGTMetaData.

Specified by:
getYMetaData in interface SGTData

setYMetaData

public void setYMetaData(SGTMetaData yMeta)

getXRange

public SoTRange getXRange()
Description copied from interface: SGTData
Returns the range of the X coordinates. If all the data in the array is missing, this method will return Double.NaN as the start and end values for data of type double and return GeoDate(Long.MIN_VALUE) for data of type GeoDate.

Specified by:
getXRange in interface SGTData
See Also:
GeoDate.isMissing()

getYRange

public SoTRange getYRange()
Description copied from interface: SGTData
Returns the range of the Y coordinates.

Specified by:
getYRange in interface SGTData
See Also:
SGTData.getXRange()

getZRange

public Range2D getZRange()
Specified by:
getZRange in interface SGTTuple

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface: SGTData
Add a PropertyChangeListener to the listener list.

Specified by:
addPropertyChangeListener in interface SGTData

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface: SGTData
Remove a PropertyChangeListener from the listener list.

Specified by:
removePropertyChangeListener in interface SGTData