Granule.java
8.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
/*
* This file is a part of EpnTAPClient.
* This program aims to provide EPN-TAP support for software clients, like CASSIS spectrum analyzer.
* See draft specifications: https://voparis-confluence.obspm.fr/pages/viewpage.action?pageId=559861
* Copyright (C) 2016 Institut de Recherche en Astrophysique et Planétologie.
*
* This program is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License, or (at your option) any later
* version. This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details. You should have received a copy of
* the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
package eu.omp.irap.vespa.epntapclient.granule;
import java.util.Date;
/**
* @author N. Jourdane
*/
public class Granule {
/** Internal table row index. Unique ID in data service, also in v2. Can be alphanum. */
public String granuleUid;
/**
* Common to granules of same type (e.g. same map projection, or geometry data products). Can be
* alphanum.
*/
public String granuleGid;
/**
* Associates granules derived from the same data (e.g. various representations / processing
* levels). Can be alphanum., may be the ID of original observation.
*/
public String obsId;
/** Organization of the data product, from enumerated list. */
public String dataproductType;
/** Standard IAU name of target (from a list related to target class), case sensitive. */
public String targetName;
/** Type of target, from enumerated list. */
public String targetClass;
/**
* Acquisition start time (in JD). UTC measured at time_origin location (default is observer's
* frame)
*/
public Double timeMin;
/**
* Acquisition stop time (in JD). UTC measured at time_origin location (default is observer's
* frame).
*/
public Double timeMax;
/** Min time sampling step. */
public Double timeSamplingStepMin;
/** Max time sampling step. */
public Double timeSamplingStepMax;
/** Min integration time. */
public Double timeExpMin;
/** Max integration time. */
public Double timeExpMax;
/** Min spectral range (frequency). */
public Double spectralRangeMin;
/** Max spectral range (frequency). */
public Double spectralRangeMax;
/** Min spectral sampling step. */
public Double spectralSamplingStepMin;
/** Max spectral sampling step. */
public Double spectralSamplingStepMax;
/** Min spectral resolution. */
public Double spectralResolutionMin;
/** Max spectral resolution. */
public Double spectralResolutionMax;
/** Min of first coordinate. */
public Double c1Min;
/** Max of first coordinate. */
public Double c1Max;
/** Min of second coordinate. */
public Double c2Min;
/** Max of second coordinate. */
public Double c2Max;
/** Min of third coordinate. */
public Double c3Min;
/** Max of third coordinate. */
public Double c3Max;
/** ObsCore-like footprint, assume spatial_coordinate_description. */
public String sRegion;
/** Min resolution in first coordinate. */
public Double c1ResolMin;
/** Max resolution in first coordinate. */
public Double c1ResolMax;
/** Min resolution in second coordinate. */
public Double c2ResolMin;
/** Max resolution in second coordinate. */
public Double c2ResolMax;
/** Min resolution in third coordinate. */
public Double c3ResolMin;
/** Max resolution in third coordinate. */
public Double c3ResolMax;
/** Flavor of coordinate system, defines the nature of coordinates. From enumerated list. */
public String spatialFrameType;
/** Min incidence angle (solar zenithal angle). */
public Double incidenceMin;
/** Max incidence angle (solar zenithal angle). */
public Double incidenceMax;
/** Min emergence angle. */
public Double emergenceMin;
/** Max emergence angle. */
public Double emergenceMax;
/** Min phase angle. */
public Double phaseMin;
/** Max phase angle. */
public Double phaseMax;
/** Standard name of the observatory or spacecraft. */
public String instrumentHostName;
/** Standard name of instrument */
public String instrumentName;
/** UCD(s) defining the data */
public String measurementType;
/** CODMAC calibration level in v1 */
public Integer processingLevel;
/** Date of first entry of this granule */
public Date creationDate;
/** Date of last modification (used to handle mirroring) */
public Date modificationDate;
/** */
public Date releaseDate;
/** */
public String serviceTitle;
/** */
public String accessUrl;
/** */
public String accessFormat;
/** Estimate file size in kbyte (with this spelling) */
public int accessEstsize;
/**
* If access_format indicates a detached label, this parameter is mandatory and points to the
* corresponding data file - both will be handled by the client before samping it to tools or
* downloading
*/
public String dataAccessUrl;
/** MD5 Hash for the file when available (real file) */
public String accessMd5;
/** URL of a thumbnail image with predefined size (png ~200 pix, for use in a client only) */
public String thumbnailUrl;
/** Name of the data file only, case sensitive */
public String fileName;
/** Identifies a chemical species, case sensitive */
public String species;
/** Provides alternative target name if more common (e.g. comets) */
public String altTargetName;
/** */
public String targetRegion;
/** */
public String featureName;
/** Bibcode, doi, or other biblio id, URL */
public String bibReference;
/** */
public double ra;
/** Declination */
public double dec;
/** Min Solar longitude Ls (location on orbit / season) */
public double solarLongitudeMin;
/** Max Solar longitude Ls (location on orbit / season) */
public double solarLongitudeMax;
/** Local time at observed region */
public double localTimeMin;
/** Local time at observed region */
public double localTimeMax;
/** Observer-target distance */
public double targetDistanceMin;
/** Observer-target distance */
public double targetDistanceMax;
/** */
public double targetTimeMin;
/** */
public double targetTimeMax;
/** */
public String particleSpectralType;
/** */
public double particleSpectralRangeMin;
/** */
public double particleSpectralRangeMax;
/** */
public double particleSpectralSamplingStepMin;
/** */
public double particleSpectralSamplingStepMax;
/** */
public double particleSpectralResolutionMin;
/** */
public double particleSpectralResolutionMax;
/** Resource publisher */
public String publisher;
/** ID of specific coordinate system and version */
public String spatialCoordinateDescription;
/** Defines the frame origin */
public String spatialOrigin;
/** */
public String timeOrigin;
/** */
public String timeScale;
/** Private constructor to hide the default public one. */
private Granule() {
}
/**
* Constructor of Granule
*
* @param granuleUid The granule identifier.
*/
public Granule(String granuleUid) {
this.granuleUid = granuleUid;
}
/**
* A granule is valid if all mandatory parameters are filled.
*
* @return true if the Granule is valid, false otherwise.
*/
public boolean isValid() {
boolean valid = granuleUid != null && granuleGid != null && obsId != null;
valid = valid && dataproductType != null && targetName != null && targetClass != null;
valid = valid && timeMin != null && timeMax != null;
valid = valid && timeSamplingStepMin != null && timeSamplingStepMax != null;
valid = valid && timeExpMin != null && timeExpMax != null;
valid = valid && spectralRangeMin != null && spectralRangeMax != null;
valid = valid && timeSamplingStepMin != null && timeSamplingStepMax != null;
valid = valid && spectralResolutionMin != null && spectralResolutionMax != null;
valid = valid && c1Min != null && c1Max != null;
valid = valid && c2Min != null && c2Max != null;
valid = valid && c3Min != null && c3Max != null;
valid = valid && sRegion != null;
valid = valid && c1ResolMin != null && c1ResolMax != null;
valid = valid && c2ResolMin != null && c2ResolMax != null;
valid = valid && c3ResolMin != null && c3ResolMax != null;
valid = valid && spatialFrameType != null;
valid = valid && incidenceMin != null && incidenceMax != null;
valid = valid && emergenceMin != null && emergenceMax != null;
valid = valid && phaseMin != null && phaseMax != null;
valid = valid && instrumentHostName != null && instrumentName != null;
valid = valid && measurementType != null && processingLevel != null;
valid = valid && creationDate != null && modificationDate != null;
valid = valid && releaseDate != null && serviceTitle != null;
return valid;
}
@Override
public String toString() {
return granuleUid;
}
}