source: ether_megapoli/trunk/service/implementation/gov2/noaa/pmel/sgt/dm/SGTData.java @ 192

Last change on this file since 192 was 192, checked in by vmipsl, 13 years ago

Servlet _ Contour en cours _ package gov2

File size: 3.8 KB
Line 
1/*
2 * $Id: SGTData.java,v 1.9 2001/10/10 19:05:01 dwd Exp $
3 *
4 * This software is provided by NOAA for full, free and open release.  It is
5 * understood by the recipient/user that NOAA assumes no liability for any
6 * errors contained in the code.  Although this software is released without
7 * conditions or restrictions in its use, it is expected that appropriate
8 * credit be given to its author and to the National Oceanic and Atmospheric
9 * Administration should the software be included by the recipient as an
10 * element in other product development.
11 */
12
13package gov.noaa.pmel.sgt.dm;
14
15import gov.noaa.pmel.sgt.SGLabel;
16import gov.noaa.pmel.util.SoTRange;
17
18import java.beans.PropertyChangeListener;
19
20/**
21 * Base class for sgt datamodel rank information.
22 * The <code>SGTData</code> class and its children are used by sgt
23 * to determine the rank (point, line, grid) of the
24 * data. Data values can be either <code>double</code> or
25 * <code>GeoDate</code>, which extends <code>Date</code>.  Missing
26 * values are indicated by <code>Double.NaN</code> for type
27 * <code>double</code> and by <code>null</code> or by
28 * <code>Long.MIN_VALUE</code> milliseconds after (before) January 1,
29 * 1970 00:00:00 GMT for <code>GeoDate</code>.
30 *
31 * @author Donald Denbo
32 * @version $Revision: 1.9 $, $Date: 2001/10/10 19:05:01 $
33 * @since 1.0
34 * @see SGTPoint
35 * @see SGTLine
36 * @see SGTGrid
37 */
38public interface SGTData {
39  /**
40   * Get the title.
41   */
42  public String getTitle();
43  /**
44   * Get a title formatted for a Key. <code>JPlotLayout</code> will use this
45   * if an explicit Key title is not given in the <code>addData</code> method.
46   *
47   * @see gov.noaa.pmel.sgt.SGLabel
48   * @see gov.noaa.pmel.sgt.ColorKey
49   * @see gov.noaa.pmel.sgt.LineKey
50   * @see gov.noaa.pmel.sgt.PointCollectionKey
51   * @see gov.noaa.pmel.sgt.VectorKey
52   */
53   public SGLabel getKeyTitle();
54  /**
55   * Get the unique identifier.  The presence of the identifier
56   * is optional, but if it is present it should be unique.  This
57   * field is used to search for the layer that contains the data.
58   *
59   * @return unique identifier
60   * @see gov.noaa.pmel.sgt.Pane
61   * @see gov.noaa.pmel.sgt.Layer
62   */
63  public String getId();
64  /**
65   * Create a shallow copy. User should implement using the clone()
66   * method, which requires the Cloneable interface be inherited.
67   * If clone() is used, then references to objects are copied NOT
68   * the object itself.
69   *
70   * <p>For example, </p>
71   * <pre>
72   * public SGTData copy() {
73   *   SGTData newData;
74   *   try {
75   *     newData = (SGTData)clone();
76   *   } catch (CloneNotSupportedException e) {
77   *     newData = null;
78   *   }
79   *   return newData;
80   * }
81   * </pre>
82   *
83   * @return shallow copy
84   * @see java.lang.Object
85   */
86  public SGTData copy();
87
88  /**
89   * Returns true if the X coordinate is Time.
90   */
91  public boolean isXTime();
92
93  /**
94   * Returns true if the Y coordinate is Time.
95   */
96  public boolean isYTime();
97
98  /**
99   * Returns the X SGTMetaData.
100   */
101  public SGTMetaData getXMetaData();
102
103  /**
104   * Returns the Y SGTMetaData.
105   */
106  public SGTMetaData getYMetaData();
107
108  /**
109   * Returns the range of the X coordinates.  If all the data in the
110   * array is missing, this method will return <code>Double.NaN</code>
111   * as the start and end values for data of type <code>double</code>
112   * and return <code>GeoDate(Long.MIN_VALUE)</code> for data of type
113   * <code>GeoDate</code>.
114   *
115   * @see gov.noaa.pmel.util.GeoDate#isMissing()
116   */
117  public SoTRange getXRange();
118
119  /**
120   * Returns the range of the Y coordinates.
121   * @see #getXRange()
122   */
123  public SoTRange getYRange();
124
125  /**
126   * Add a PropertyChangeListener to the listener list.
127   */
128  public void addPropertyChangeListener(PropertyChangeListener l);
129
130  /**
131   * Remove a PropertyChangeListener from the listener list.
132   */
133  public void removePropertyChangeListener(PropertyChangeListener l);
134}
Note: See TracBrowser for help on using the repository browser.