Commit 6a2d38427f368bbd4b1a18d2d1dd25b7a7d2be97

Authored by Nathanael Jourdane
1 parent 794192b5
Exists in master

Use getters and setters for Granule.

src/main/java/eu/omp/irap/vespa/epntapclient/granule/Granule.java
... ... @@ -24,260 +24,260 @@ import java.util.Date;
24 24 public class Granule {
25 25  
26 26 /** Internal table row index. Unique ID in data service, also in v2. Can be alphanum. */
27   - public String granuleUid;
  27 + private String granuleUid;
28 28  
29 29 /**
30 30 * Common to granules of same type (e.g. same map projection, or geometry data products). Can be
31 31 * alphanum.
32 32 */
33   - public String granuleGid;
  33 + private String granuleGid;
34 34  
35 35 /**
36 36 * Associates granules derived from the same data (e.g. various representations / processing
37 37 * levels). Can be alphanum., may be the ID of original observation.
38 38 */
39   - public String obsId;
  39 + private String obsId;
40 40  
41 41 /** Organization of the data product, from enumerated list. */
42   - public String dataproductType;
  42 + private String dataproductType;
43 43  
44 44 /** Standard IAU name of target (from a list related to target class), case sensitive. */
45   - public String targetName;
  45 + private String targetName;
46 46  
47 47 /** Type of target, from enumerated list. */
48   - public String targetClass;
  48 + private String targetClass;
49 49  
50 50 /**
51 51 * Acquisition start time (in JD). UTC measured at time_origin location (default is observer's
52 52 * frame)
53 53 */
54   - public Double timeMin;
  54 + private Double timeMin;
55 55  
56 56 /**
57 57 * Acquisition stop time (in JD). UTC measured at time_origin location (default is observer's
58 58 * frame).
59 59 */
60   - public Double timeMax;
  60 + private Double timeMax;
61 61  
62 62 /** Min time sampling step. */
63   - public Double timeSamplingStepMin;
  63 + private Double timeSamplingStepMin;
64 64  
65 65 /** Max time sampling step. */
66   - public Double timeSamplingStepMax;
  66 + private Double timeSamplingStepMax;
67 67  
68 68 /** Min integration time. */
69   - public Double timeExpMin;
  69 + private Double timeExpMin;
70 70  
71 71 /** Max integration time. */
72   - public Double timeExpMax;
  72 + private Double timeExpMax;
73 73  
74 74 /** Min spectral range (frequency). */
75   - public Double spectralRangeMin;
  75 + private Double spectralRangeMin;
76 76  
77 77 /** Max spectral range (frequency). */
78   - public Double spectralRangeMax;
  78 + private Double spectralRangeMax;
79 79  
80 80 /** Min spectral sampling step. */
81   - public Double spectralSamplingStepMin;
  81 + private Double spectralSamplingStepMin;
82 82  
83 83 /** Max spectral sampling step. */
84   - public Double spectralSamplingStepMax;
  84 + private Double spectralSamplingStepMax;
85 85  
86 86 /** Min spectral resolution. */
87   - public Double spectralResolutionMin;
  87 + private Double spectralResolutionMin;
88 88  
89 89 /** Max spectral resolution. */
90   - public Double spectralResolutionMax;
  90 + private Double spectralResolutionMax;
91 91  
92 92 /** Min of first coordinate. */
93   - public Double c1Min;
  93 + private Double c1Min;
94 94  
95 95 /** Max of first coordinate. */
96   - public Double c1Max;
  96 + private Double c1Max;
97 97  
98 98 /** Min of second coordinate. */
99   - public Double c2Min;
  99 + private Double c2Min;
100 100  
101 101 /** Max of second coordinate. */
102   - public Double c2Max;
  102 + private Double c2Max;
103 103  
104 104 /** Min of third coordinate. */
105   - public Double c3Min;
  105 + private Double c3Min;
106 106  
107 107 /** Max of third coordinate. */
108   - public Double c3Max;
  108 + private Double c3Max;
109 109  
110 110 /** ObsCore-like footprint, assume spatial_coordinate_description. */
111   - public String sRegion;
  111 + private String sRegion;
112 112  
113 113 /** Min resolution in first coordinate. */
114   - public Double c1ResolMin;
  114 + private Double c1ResolMin;
115 115  
116 116 /** Max resolution in first coordinate. */
117   - public Double c1ResolMax;
  117 + private Double c1ResolMax;
118 118  
119 119 /** Min resolution in second coordinate. */
120   - public Double c2ResolMin;
  120 + private Double c2ResolMin;
121 121  
122 122 /** Max resolution in second coordinate. */
123   - public Double c2ResolMax;
  123 + private Double c2ResolMax;
124 124  
125 125 /** Min resolution in third coordinate. */
126   - public Double c3ResolMin;
  126 + private Double c3ResolMin;
127 127  
128 128 /** Max resolution in third coordinate. */
129   - public Double c3ResolMax;
  129 + private Double c3ResolMax;
130 130  
131 131 /** Flavor of coordinate system, defines the nature of coordinates. From enumerated list. */
132   - public String spatialFrameType;
  132 + private String spatialFrameType;
133 133  
134 134 /** Min incidence angle (solar zenithal angle). */
135   - public Double incidenceMin;
  135 + private Double incidenceMin;
136 136  
137 137 /** Max incidence angle (solar zenithal angle). */
138   - public Double incidenceMax;
  138 + private Double incidenceMax;
139 139  
140 140 /** Min emergence angle. */
141   - public Double emergenceMin;
  141 + private Double emergenceMin;
142 142  
143 143 /** Max emergence angle. */
144   - public Double emergenceMax;
  144 + private Double emergenceMax;
145 145  
146 146 /** Min phase angle. */
147   - public Double phaseMin;
  147 + private Double phaseMin;
148 148  
149 149 /** Max phase angle. */
150   - public Double phaseMax;
  150 + private Double phaseMax;
151 151  
152 152 /** Standard name of the observatory or spacecraft. */
153   - public String instrumentHostName;
  153 + private String instrumentHostName;
154 154  
155 155 /** Standard name of instrument */
156   - public String instrumentName;
  156 + private String instrumentName;
157 157  
158 158 /** UCD(s) defining the data */
159   - public String measurementType;
  159 + private String measurementType;
160 160  
161 161 /** CODMAC calibration level in v1 */
162   - public Integer processingLevel;
  162 + private Integer processingLevel;
163 163  
164 164 /** Date of first entry of this granule */
165   - public Date creationDate;
  165 + private Date creationDate;
166 166  
167 167 /** Date of last modification (used to handle mirroring) */
168   - public Date modificationDate;
  168 + private Date modificationDate;
169 169  
170 170 /** */
171   - public Date releaseDate;
  171 + private Date releaseDate;
172 172  
173 173 /** */
174   - public String serviceTitle;
  174 + private String serviceTitle;
175 175  
176 176 /** */
177   - public String accessUrl;
  177 + private String accessUrl;
178 178  
179 179 /** */
180   - public String accessFormat;
  180 + private String accessFormat;
181 181  
182 182 /** Estimate file size in kbyte (with this spelling) */
183   - public int accessEstsize;
  183 + private int accessEstsize;
184 184  
185 185 /**
186 186 * If access_format indicates a detached label, this parameter is mandatory and points to the
187 187 * corresponding data file - both will be handled by the client before samping it to tools or
188 188 * downloading
189 189 */
190   - public String dataAccessUrl;
  190 + private String dataAccessUrl;
191 191  
192 192 /** MD5 Hash for the file when available (real file) */
193   - public String accessMd5;
  193 + private String accessMd5;
194 194  
195 195 /** URL of a thumbnail image with predefined size (png ~200 pix, for use in a client only) */
196   - public String thumbnailUrl;
  196 + private String thumbnailUrl;
197 197  
198 198 /** Name of the data file only, case sensitive */
199   - public String fileName;
  199 + private String fileName;
200 200  
201 201 /** Identifies a chemical species, case sensitive */
202   - public String species;
  202 + private String species;
203 203  
204 204 /** Provides alternative target name if more common (e.g. comets) */
205   - public String altTargetName;
  205 + private String altTargetName;
206 206  
207 207 /** */
208   - public String targetRegion;
  208 + private String targetRegion;
209 209  
210 210 /** */
211   - public String featureName;
  211 + private String featureName;
212 212  
213 213 /** Bibcode, doi, or other biblio id, URL */
214   - public String bibReference;
  214 + private String bibReference;
215 215  
216 216 /** */
217   - public double ra;
  217 + private double ra;
218 218  
219 219 /** Declination */
220   - public double dec;
  220 + private double dec;
221 221  
222 222 /** Min Solar longitude Ls (location on orbit / season) */
223   - public double solarLongitudeMin;
  223 + private double solarLongitudeMin;
224 224  
225 225 /** Max Solar longitude Ls (location on orbit / season) */
226   - public double solarLongitudeMax;
  226 + private double solarLongitudeMax;
227 227  
228 228 /** Local time at observed region */
229   - public double localTimeMin;
  229 + private double localTimeMin;
230 230  
231 231 /** Local time at observed region */
232   - public double localTimeMax;
  232 + private double localTimeMax;
233 233  
234 234 /** Observer-target distance */
235   - public double targetDistanceMin;
  235 + private double targetDistanceMin;
236 236  
237 237 /** Observer-target distance */
238   - public double targetDistanceMax;
  238 + private double targetDistanceMax;
239 239  
240 240 /** */
241   - public double targetTimeMin;
  241 + private double targetTimeMin;
242 242  
243 243 /** */
244   - public double targetTimeMax;
  244 + private double targetTimeMax;
245 245  
246 246 /** */
247   - public String particleSpectralType;
  247 + private String particleSpectralType;
248 248  
249 249 /** */
250   - public double particleSpectralRangeMin;
  250 + private double particleSpectralRangeMin;
251 251  
252 252 /** */
253   - public double particleSpectralRangeMax;
  253 + private double particleSpectralRangeMax;
254 254  
255 255 /** */
256   - public double particleSpectralSamplingStepMin;
  256 + private double particleSpectralSamplingStepMin;
257 257  
258 258 /** */
259   - public double particleSpectralSamplingStepMax;
  259 + private double particleSpectralSamplingStepMax;
260 260  
261 261 /** */
262   - public double particleSpectralResolutionMin;
  262 + private double particleSpectralResolutionMin;
263 263  
264 264 /** */
265   - public double particleSpectralResolutionMax;
  265 + private double particleSpectralResolutionMax;
266 266  
267 267 /** Resource publisher */
268   - public String publisher;
  268 + private String publisher;
269 269  
270 270 /** ID of specific coordinate system and version */
271   - public String spatialCoordinateDescription;
  271 + private String spatialCoordinateDescription;
272 272  
273 273 /** Defines the frame origin */
274   - public String spatialOrigin;
  274 + private String spatialOrigin;
275 275  
276 276 /** */
277   - public String timeOrigin;
  277 + private String timeOrigin;
278 278  
279 279 /** */
280   - public String timeScale;
  280 + private String timeScale;
281 281  
282 282  
283 283 /** Private constructor to hide the default public one. */
... ... @@ -294,6 +294,1126 @@ public class Granule {
294 294 }
295 295  
296 296 /**
  297 + * @return the granuleUid
  298 + */
  299 + public String getGranuleUid() {
  300 + return granuleUid;
  301 + }
  302 +
  303 + /**
  304 + * @param granuleUid the granuleUid to set
  305 + */
  306 + public void setGranuleUid(String granuleUid) {
  307 + this.granuleUid = granuleUid;
  308 + }
  309 +
  310 + /**
  311 + * @return the granuleGid
  312 + */
  313 + public String getGranuleGid() {
  314 + return granuleGid;
  315 + }
  316 +
  317 + /**
  318 + * @param granuleGid the granuleGid to set
  319 + */
  320 + public void setGranuleGid(String granuleGid) {
  321 + this.granuleGid = granuleGid;
  322 + }
  323 +
  324 + /**
  325 + * @return the obsId
  326 + */
  327 + public String getObsId() {
  328 + return obsId;
  329 + }
  330 +
  331 + /**
  332 + * @param obsId the obsId to set
  333 + */
  334 + public void setObsId(String obsId) {
  335 + this.obsId = obsId;
  336 + }
  337 +
  338 + /**
  339 + * @return the dataproductType
  340 + */
  341 + public String getDataproductType() {
  342 + return dataproductType;
  343 + }
  344 +
  345 + /**
  346 + * @param dataproductType the dataproductType to set
  347 + */
  348 + public void setDataproductType(String dataproductType) {
  349 + this.dataproductType = dataproductType;
  350 + }
  351 +
  352 + /**
  353 + * @return the targetName
  354 + */
  355 + public String getTargetName() {
  356 + return targetName;
  357 + }
  358 +
  359 + /**
  360 + * @param targetName the targetName to set
  361 + */
  362 + public void setTargetName(String targetName) {
  363 + this.targetName = targetName;
  364 + }
  365 +
  366 + /**
  367 + * @return the targetClass
  368 + */
  369 + public String getTargetClass() {
  370 + return targetClass;
  371 + }
  372 +
  373 + /**
  374 + * @param targetClass the targetClass to set
  375 + */
  376 + public void setTargetClass(String targetClass) {
  377 + this.targetClass = targetClass;
  378 + }
  379 +
  380 + /**
  381 + * @return the timeMin
  382 + */
  383 + public Double getTimeMin() {
  384 + return timeMin;
  385 + }
  386 +
  387 + /**
  388 + * @param timeMin the timeMin to set
  389 + */
  390 + public void setTimeMin(Double timeMin) {
  391 + this.timeMin = timeMin;
  392 + }
  393 +
  394 + /**
  395 + * @return the timeMax
  396 + */
  397 + public Double getTimeMax() {
  398 + return timeMax;
  399 + }
  400 +
  401 + /**
  402 + * @param timeMax the timeMax to set
  403 + */
  404 + public void setTimeMax(Double timeMax) {
  405 + this.timeMax = timeMax;
  406 + }
  407 +
  408 + /**
  409 + * @return the timeSamplingStepMin
  410 + */
  411 + public Double getTimeSamplingStepMin() {
  412 + return timeSamplingStepMin;
  413 + }
  414 +
  415 + /**
  416 + * @param timeSamplingStepMin the timeSamplingStepMin to set
  417 + */
  418 + public void setTimeSamplingStepMin(Double timeSamplingStepMin) {
  419 + this.timeSamplingStepMin = timeSamplingStepMin;
  420 + }
  421 +
  422 + /**
  423 + * @return the timeSamplingStepMax
  424 + */
  425 + public Double getTimeSamplingStepMax() {
  426 + return timeSamplingStepMax;
  427 + }
  428 +
  429 + /**
  430 + * @param timeSamplingStepMax the timeSamplingStepMax to set
  431 + */
  432 + public void setTimeSamplingStepMax(Double timeSamplingStepMax) {
  433 + this.timeSamplingStepMax = timeSamplingStepMax;
  434 + }
  435 +
  436 + /**
  437 + * @return the timeExpMin
  438 + */
  439 + public Double getTimeExpMin() {
  440 + return timeExpMin;
  441 + }
  442 +
  443 + /**
  444 + * @param timeExpMin the timeExpMin to set
  445 + */
  446 + public void setTimeExpMin(Double timeExpMin) {
  447 + this.timeExpMin = timeExpMin;
  448 + }
  449 +
  450 + /**
  451 + * @return the timeExpMax
  452 + */
  453 + public Double getTimeExpMax() {
  454 + return timeExpMax;
  455 + }
  456 +
  457 + /**
  458 + * @param timeExpMax the timeExpMax to set
  459 + */
  460 + public void setTimeExpMax(Double timeExpMax) {
  461 + this.timeExpMax = timeExpMax;
  462 + }
  463 +
  464 + /**
  465 + * @return the spectralRangeMin
  466 + */
  467 + public Double getSpectralRangeMin() {
  468 + return spectralRangeMin;
  469 + }
  470 +
  471 + /**
  472 + * @param spectralRangeMin the spectralRangeMin to set
  473 + */
  474 + public void setSpectralRangeMin(Double spectralRangeMin) {
  475 + this.spectralRangeMin = spectralRangeMin;
  476 + }
  477 +
  478 + /**
  479 + * @return the spectralRangeMax
  480 + */
  481 + public Double getSpectralRangeMax() {
  482 + return spectralRangeMax;
  483 + }
  484 +
  485 + /**
  486 + * @param spectralRangeMax the spectralRangeMax to set
  487 + */
  488 + public void setSpectralRangeMax(Double spectralRangeMax) {
  489 + this.spectralRangeMax = spectralRangeMax;
  490 + }
  491 +
  492 + /**
  493 + * @return the spectralSamplingStepMin
  494 + */
  495 + public Double getSpectralSamplingStepMin() {
  496 + return spectralSamplingStepMin;
  497 + }
  498 +
  499 + /**
  500 + * @param spectralSamplingStepMin the spectralSamplingStepMin to set
  501 + */
  502 + public void setSpectralSamplingStepMin(Double spectralSamplingStepMin) {
  503 + this.spectralSamplingStepMin = spectralSamplingStepMin;
  504 + }
  505 +
  506 + /**
  507 + * @return the spectralSamplingStepMax
  508 + */
  509 + public Double getSpectralSamplingStepMax() {
  510 + return spectralSamplingStepMax;
  511 + }
  512 +
  513 + /**
  514 + * @param spectralSamplingStepMax the spectralSamplingStepMax to set
  515 + */
  516 + public void setSpectralSamplingStepMax(Double spectralSamplingStepMax) {
  517 + this.spectralSamplingStepMax = spectralSamplingStepMax;
  518 + }
  519 +
  520 + /**
  521 + * @return the spectralResolutionMin
  522 + */
  523 + public Double getSpectralResolutionMin() {
  524 + return spectralResolutionMin;
  525 + }
  526 +
  527 + /**
  528 + * @param spectralResolutionMin the spectralResolutionMin to set
  529 + */
  530 + public void setSpectralResolutionMin(Double spectralResolutionMin) {
  531 + this.spectralResolutionMin = spectralResolutionMin;
  532 + }
  533 +
  534 + /**
  535 + * @return the spectralResolutionMax
  536 + */
  537 + public Double getSpectralResolutionMax() {
  538 + return spectralResolutionMax;
  539 + }
  540 +
  541 + /**
  542 + * @param spectralResolutionMax the spectralResolutionMax to set
  543 + */
  544 + public void setSpectralResolutionMax(Double spectralResolutionMax) {
  545 + this.spectralResolutionMax = spectralResolutionMax;
  546 + }
  547 +
  548 + /**
  549 + * @return the c1Min
  550 + */
  551 + public Double getC1Min() {
  552 + return c1Min;
  553 + }
  554 +
  555 + /**
  556 + * @param c1Min the c1Min to set
  557 + */
  558 + public void setC1Min(Double c1Min) {
  559 + this.c1Min = c1Min;
  560 + }
  561 +
  562 + /**
  563 + * @return the c1Max
  564 + */
  565 + public Double getC1Max() {
  566 + return c1Max;
  567 + }
  568 +
  569 + /**
  570 + * @param c1Max the c1Max to set
  571 + */
  572 + public void setC1Max(Double c1Max) {
  573 + this.c1Max = c1Max;
  574 + }
  575 +
  576 + /**
  577 + * @return the c2Min
  578 + */
  579 + public Double getC2Min() {
  580 + return c2Min;
  581 + }
  582 +
  583 + /**
  584 + * @param c2Min the c2Min to set
  585 + */
  586 + public void setC2Min(Double c2Min) {
  587 + this.c2Min = c2Min;
  588 + }
  589 +
  590 + /**
  591 + * @return the c2Max
  592 + */
  593 + public Double getC2Max() {
  594 + return c2Max;
  595 + }
  596 +
  597 + /**
  598 + * @param c2Max the c2Max to set
  599 + */
  600 + public void setC2Max(Double c2Max) {
  601 + this.c2Max = c2Max;
  602 + }
  603 +
  604 + /**
  605 + * @return the c3Min
  606 + */
  607 + public Double getC3Min() {
  608 + return c3Min;
  609 + }
  610 +
  611 + /**
  612 + * @param c3Min the c3Min to set
  613 + */
  614 + public void setC3Min(Double c3Min) {
  615 + this.c3Min = c3Min;
  616 + }
  617 +
  618 + /**
  619 + * @return the c3Max
  620 + */
  621 + public Double getC3Max() {
  622 + return c3Max;
  623 + }
  624 +
  625 + /**
  626 + * @param c3Max the c3Max to set
  627 + */
  628 + public void setC3Max(Double c3Max) {
  629 + this.c3Max = c3Max;
  630 + }
  631 +
  632 + /**
  633 + * @return the sRegion
  634 + */
  635 + public String getsRegion() {
  636 + return sRegion;
  637 + }
  638 +
  639 + /**
  640 + * @param sRegion the sRegion to set
  641 + */
  642 + public void setsRegion(String sRegion) {
  643 + this.sRegion = sRegion;
  644 + }
  645 +
  646 + /**
  647 + * @return the c1ResolMin
  648 + */
  649 + public Double getC1ResolMin() {
  650 + return c1ResolMin;
  651 + }
  652 +
  653 + /**
  654 + * @param c1ResolMin the c1ResolMin to set
  655 + */
  656 + public void setC1ResolMin(Double c1ResolMin) {
  657 + this.c1ResolMin = c1ResolMin;
  658 + }
  659 +
  660 + /**
  661 + * @return the c1ResolMax
  662 + */
  663 + public Double getC1ResolMax() {
  664 + return c1ResolMax;
  665 + }
  666 +
  667 + /**
  668 + * @param c1ResolMax the c1ResolMax to set
  669 + */
  670 + public void setC1ResolMax(Double c1ResolMax) {
  671 + this.c1ResolMax = c1ResolMax;
  672 + }
  673 +
  674 + /**
  675 + * @return the c2ResolMin
  676 + */
  677 + public Double getC2ResolMin() {
  678 + return c2ResolMin;
  679 + }
  680 +
  681 + /**
  682 + * @param c2ResolMin the c2ResolMin to set
  683 + */
  684 + public void setC2ResolMin(Double c2ResolMin) {
  685 + this.c2ResolMin = c2ResolMin;
  686 + }
  687 +
  688 + /**
  689 + * @return the c2ResolMax
  690 + */
  691 + public Double getC2ResolMax() {
  692 + return c2ResolMax;
  693 + }
  694 +
  695 + /**
  696 + * @param c2ResolMax the c2ResolMax to set
  697 + */
  698 + public void setC2ResolMax(Double c2ResolMax) {
  699 + this.c2ResolMax = c2ResolMax;
  700 + }
  701 +
  702 + /**
  703 + * @return the c3ResolMin
  704 + */
  705 + public Double getC3ResolMin() {
  706 + return c3ResolMin;
  707 + }
  708 +
  709 + /**
  710 + * @param c3ResolMin the c3ResolMin to set
  711 + */
  712 + public void setC3ResolMin(Double c3ResolMin) {
  713 + this.c3ResolMin = c3ResolMin;
  714 + }
  715 +
  716 + /**
  717 + * @return the c3ResolMax
  718 + */
  719 + public Double getC3ResolMax() {
  720 + return c3ResolMax;
  721 + }
  722 +
  723 + /**
  724 + * @param c3ResolMax the c3ResolMax to set
  725 + */
  726 + public void setC3ResolMax(Double c3ResolMax) {
  727 + this.c3ResolMax = c3ResolMax;
  728 + }
  729 +
  730 + /**
  731 + * @return the spatialFrameType
  732 + */
  733 + public String getSpatialFrameType() {
  734 + return spatialFrameType;
  735 + }
  736 +
  737 + /**
  738 + * @param spatialFrameType the spatialFrameType to set
  739 + */
  740 + public void setSpatialFrameType(String spatialFrameType) {
  741 + this.spatialFrameType = spatialFrameType;
  742 + }
  743 +
  744 + /**
  745 + * @return the incidenceMin
  746 + */
  747 + public Double getIncidenceMin() {
  748 + return incidenceMin;
  749 + }
  750 +
  751 + /**
  752 + * @param incidenceMin the incidenceMin to set
  753 + */
  754 + public void setIncidenceMin(Double incidenceMin) {
  755 + this.incidenceMin = incidenceMin;
  756 + }
  757 +
  758 + /**
  759 + * @return the incidenceMax
  760 + */
  761 + public Double getIncidenceMax() {
  762 + return incidenceMax;
  763 + }
  764 +
  765 + /**
  766 + * @param incidenceMax the incidenceMax to set
  767 + */
  768 + public void setIncidenceMax(Double incidenceMax) {
  769 + this.incidenceMax = incidenceMax;
  770 + }
  771 +
  772 + /**
  773 + * @return the emergenceMin
  774 + */
  775 + public Double getEmergenceMin() {
  776 + return emergenceMin;
  777 + }
  778 +
  779 + /**
  780 + * @param emergenceMin the emergenceMin to set
  781 + */
  782 + public void setEmergenceMin(Double emergenceMin) {
  783 + this.emergenceMin = emergenceMin;
  784 + }
  785 +
  786 + /**
  787 + * @return the emergenceMax
  788 + */
  789 + public Double getEmergenceMax() {
  790 + return emergenceMax;
  791 + }
  792 +
  793 + /**
  794 + * @param emergenceMax the emergenceMax to set
  795 + */
  796 + public void setEmergenceMax(Double emergenceMax) {
  797 + this.emergenceMax = emergenceMax;
  798 + }
  799 +
  800 + /**
  801 + * @return the phaseMin
  802 + */
  803 + public Double getPhaseMin() {
  804 + return phaseMin;
  805 + }
  806 +
  807 + /**
  808 + * @param phaseMin the phaseMin to set
  809 + */
  810 + public void setPhaseMin(Double phaseMin) {
  811 + this.phaseMin = phaseMin;
  812 + }
  813 +
  814 + /**
  815 + * @return the phaseMax
  816 + */
  817 + public Double getPhaseMax() {
  818 + return phaseMax;
  819 + }
  820 +
  821 + /**
  822 + * @param phaseMax the phaseMax to set
  823 + */
  824 + public void setPhaseMax(Double phaseMax) {
  825 + this.phaseMax = phaseMax;
  826 + }
  827 +
  828 + /**
  829 + * @return the instrumentHostName
  830 + */
  831 + public String getInstrumentHostName() {
  832 + return instrumentHostName;
  833 + }
  834 +
  835 + /**
  836 + * @param instrumentHostName the instrumentHostName to set
  837 + */
  838 + public void setInstrumentHostName(String instrumentHostName) {
  839 + this.instrumentHostName = instrumentHostName;
  840 + }
  841 +
  842 + /**
  843 + * @return the instrumentName
  844 + */
  845 + public String getInstrumentName() {
  846 + return instrumentName;
  847 + }
  848 +
  849 + /**
  850 + * @param instrumentName the instrumentName to set
  851 + */
  852 + public void setInstrumentName(String instrumentName) {
  853 + this.instrumentName = instrumentName;
  854 + }
  855 +
  856 + /**
  857 + * @return the measurementType
  858 + */
  859 + public String getMeasurementType() {
  860 + return measurementType;
  861 + }
  862 +
  863 + /**
  864 + * @param measurementType the measurementType to set
  865 + */
  866 + public void setMeasurementType(String measurementType) {
  867 + this.measurementType = measurementType;
  868 + }
  869 +
  870 + /**
  871 + * @return the processingLevel
  872 + */
  873 + public Integer getProcessingLevel() {
  874 + return processingLevel;
  875 + }
  876 +
  877 + /**
  878 + * @param processingLevel the processingLevel to set
  879 + */
  880 + public void setProcessingLevel(Integer processingLevel) {
  881 + this.processingLevel = processingLevel;
  882 + }
  883 +
  884 + /**
  885 + * @return the creationDate
  886 + */
  887 + public Date getCreationDate() {
  888 + return creationDate;
  889 + }
  890 +
  891 + /**
  892 + * @param creationDate the creationDate to set
  893 + */
  894 + public void setCreationDate(Date creationDate) {
  895 + this.creationDate = creationDate;
  896 + }
  897 +
  898 + /**
  899 + * @return the modificationDate
  900 + */
  901 + public Date getModificationDate() {
  902 + return modificationDate;
  903 + }
  904 +
  905 + /**
  906 + * @param modificationDate the modificationDate to set
  907 + */
  908 + public void setModificationDate(Date modificationDate) {
  909 + this.modificationDate = modificationDate;
  910 + }
  911 +
  912 + /**
  913 + * @return the releaseDate
  914 + */
  915 + public Date getReleaseDate() {
  916 + return releaseDate;
  917 + }
  918 +
  919 + /**
  920 + * @param releaseDate the releaseDate to set
  921 + */
  922 + public void setReleaseDate(Date releaseDate) {
  923 + this.releaseDate = releaseDate;
  924 + }
  925 +
  926 + /**
  927 + * @return the serviceTitle
  928 + */
  929 + public String getServiceTitle() {
  930 + return serviceTitle;
  931 + }
  932 +
  933 + /**
  934 + * @param serviceTitle the serviceTitle to set
  935 + */
  936 + public void setServiceTitle(String serviceTitle) {
  937 + this.serviceTitle = serviceTitle;
  938 + }
  939 +
  940 + /**
  941 + * @return the accessUrl
  942 + */
  943 + public String getAccessUrl() {
  944 + return accessUrl;
  945 + }
  946 +
  947 + /**
  948 + * @param accessUrl the accessUrl to set
  949 + */
  950 + public void setAccessUrl(String accessUrl) {
  951 + this.accessUrl = accessUrl;
  952 + }
  953 +
  954 + /**
  955 + * @return the accessFormat
  956 + */
  957 + public String getAccessFormat() {
  958 + return accessFormat;
  959 + }
  960 +
  961 + /**
  962 + * @param accessFormat the accessFormat to set
  963 + */
  964 + public void setAccessFormat(String accessFormat) {
  965 + this.accessFormat = accessFormat;
  966 + }
  967 +
  968 + /**
  969 + * @return the accessEstsize
  970 + */
  971 + public int getAccessEstsize() {
  972 + return accessEstsize;
  973 + }
  974 +
  975 + /**
  976 + * @param accessEstsize the accessEstsize to set
  977 + */
  978 + public void setAccessEstsize(int accessEstsize) {
  979 + this.accessEstsize = accessEstsize;
  980 + }
  981 +
  982 + /**
  983 + * @return the dataAccessUrl
  984 + */
  985 + public String getDataAccessUrl() {
  986 + return dataAccessUrl;
  987 + }
  988 +
  989 + /**
  990 + * @param dataAccessUrl the dataAccessUrl to set
  991 + */
  992 + public void setDataAccessUrl(String dataAccessUrl) {
  993 + this.dataAccessUrl = dataAccessUrl;
  994 + }
  995 +
  996 + /**
  997 + * @return the accessMd5
  998 + */
  999 + public String getAccessMd5() {
  1000 + return accessMd5;
  1001 + }
  1002 +
  1003 + /**
  1004 + * @param accessMd5 the accessMd5 to set
  1005 + */
  1006 + public void setAccessMd5(String accessMd5) {
  1007 + this.accessMd5 = accessMd5;
  1008 + }
  1009 +
  1010 + /**
  1011 + * @return the thumbnailUrl
  1012 + */
  1013 + public String getThumbnailUrl() {
  1014 + return thumbnailUrl;
  1015 + }
  1016 +
  1017 + /**
  1018 + * @param thumbnailUrl the thumbnailUrl to set
  1019 + */
  1020 + public void setThumbnailUrl(String thumbnailUrl) {
  1021 + this.thumbnailUrl = thumbnailUrl;
  1022 + }
  1023 +
  1024 + /**
  1025 + * @return the fileName
  1026 + */
  1027 + public String getFileName() {
  1028 + return fileName;
  1029 + }
  1030 +
  1031 + /**
  1032 + * @param fileName the fileName to set
  1033 + */
  1034 + public void setFileName(String fileName) {
  1035 + this.fileName = fileName;
  1036 + }
  1037 +
  1038 + /**
  1039 + * @return the species
  1040 + */
  1041 + public String getSpecies() {
  1042 + return species;
  1043 + }
  1044 +
  1045 + /**
  1046 + * @param species the species to set
  1047 + */
  1048 + public void setSpecies(String species) {
  1049 + this.species = species;
  1050 + }
  1051 +
  1052 + /**
  1053 + * @return the altTargetName
  1054 + */
  1055 + public String getAltTargetName() {
  1056 + return altTargetName;
  1057 + }
  1058 +
  1059 + /**
  1060 + * @param altTargetName the altTargetName to set
  1061 + */
  1062 + public void setAltTargetName(String altTargetName) {
  1063 + this.altTargetName = altTargetName;
  1064 + }
  1065 +
  1066 + /**
  1067 + * @return the targetRegion
  1068 + */
  1069 + public String getTargetRegion() {
  1070 + return targetRegion;
  1071 + }
  1072 +
  1073 + /**
  1074 + * @param targetRegion the targetRegion to set
  1075 + */
  1076 + public void setTargetRegion(String targetRegion) {
  1077 + this.targetRegion = targetRegion;
  1078 + }
  1079 +
  1080 + /**
  1081 + * @return the featureName
  1082 + */
  1083 + public String getFeatureName() {
  1084 + return featureName;
  1085 + }
  1086 +
  1087 + /**
  1088 + * @param featureName the featureName to set
  1089 + */
  1090 + public void setFeatureName(String featureName) {
  1091 + this.featureName = featureName;
  1092 + }
  1093 +
  1094 + /**
  1095 + * @return the bibReference
  1096 + */
  1097 + public String getBibReference() {
  1098 + return bibReference;
  1099 + }
  1100 +
  1101 + /**
  1102 + * @param bibReference the bibReference to set
  1103 + */
  1104 + public void setBibReference(String bibReference) {
  1105 + this.bibReference = bibReference;
  1106 + }
  1107 +
  1108 + /**
  1109 + * @return the ra
  1110 + */
  1111 + public double getRa() {
  1112 + return ra;
  1113 + }
  1114 +
  1115 + /**
  1116 + * @param ra the ra to set
  1117 + */
  1118 + public void setRa(double ra) {
  1119 + this.ra = ra;
  1120 + }
  1121 +
  1122 + /**
  1123 + * @return the dec
  1124 + */
  1125 + public double getDec() {
  1126 + return dec;
  1127 + }
  1128 +
  1129 + /**
  1130 + * @param dec the dec to set
  1131 + */
  1132 + public void setDec(double dec) {
  1133 + this.dec = dec;
  1134 + }
  1135 +
  1136 + /**
  1137 + * @return the solarLongitudeMin
  1138 + */
  1139 + public double getSolarLongitudeMin() {
  1140 + return solarLongitudeMin;
  1141 + }
  1142 +
  1143 + /**
  1144 + * @param solarLongitudeMin the solarLongitudeMin to set
  1145 + */
  1146 + public void setSolarLongitudeMin(double solarLongitudeMin) {
  1147 + this.solarLongitudeMin = solarLongitudeMin;
  1148 + }
  1149 +
  1150 + /**
  1151 + * @return the solarLongitudeMax
  1152 + */
  1153 + public double getSolarLongitudeMax() {
  1154 + return solarLongitudeMax;
  1155 + }
  1156 +
  1157 + /**
  1158 + * @param solarLongitudeMax the solarLongitudeMax to set
  1159 + */
  1160 + public void setSolarLongitudeMax(double solarLongitudeMax) {
  1161 + this.solarLongitudeMax = solarLongitudeMax;
  1162 + }
  1163 +
  1164 + /**
  1165 + * @return the localTimeMin
  1166 + */
  1167 + public double getLocalTimeMin() {
  1168 + return localTimeMin;
  1169 + }
  1170 +
  1171 + /**
  1172 + * @param localTimeMin the localTimeMin to set
  1173 + */
  1174 + public void setLocalTimeMin(double localTimeMin) {
  1175 + this.localTimeMin = localTimeMin;
  1176 + }
  1177 +
  1178 + /**
  1179 + * @return the localTimeMax
  1180 + */
  1181 + public double getLocalTimeMax() {
  1182 + return localTimeMax;
  1183 + }
  1184 +
  1185 + /**
  1186 + * @param localTimeMax the localTimeMax to set
  1187 + */
  1188 + public void setLocalTimeMax(double localTimeMax) {
  1189 + this.localTimeMax = localTimeMax;
  1190 + }
  1191 +
  1192 + /**
  1193 + * @return the targetDistanceMin
  1194 + */
  1195 + public double getTargetDistanceMin() {
  1196 + return targetDistanceMin;
  1197 + }
  1198 +
  1199 + /**
  1200 + * @param targetDistanceMin the targetDistanceMin to set
  1201 + */
  1202 + public void setTargetDistanceMin(double targetDistanceMin) {
  1203 + this.targetDistanceMin = targetDistanceMin;
  1204 + }
  1205 +
  1206 + /**
  1207 + * @return the targetDistanceMax
  1208 + */
  1209 + public double getTargetDistanceMax() {
  1210 + return targetDistanceMax;
  1211 + }
  1212 +
  1213 + /**
  1214 + * @param targetDistanceMax the targetDistanceMax to set
  1215 + */
  1216 + public void setTargetDistanceMax(double targetDistanceMax) {
  1217 + this.targetDistanceMax = targetDistanceMax;
  1218 + }
  1219 +
  1220 + /**
  1221 + * @return the targetTimeMin
  1222 + */
  1223 + public double getTargetTimeMin() {
  1224 + return targetTimeMin;
  1225 + }
  1226 +
  1227 + /**
  1228 + * @param targetTimeMin the targetTimeMin to set
  1229 + */
  1230 + public void setTargetTimeMin(double targetTimeMin) {
  1231 + this.targetTimeMin = targetTimeMin;
  1232 + }
  1233 +
  1234 + /**
  1235 + * @return the targetTimeMax
  1236 + */
  1237 + public double getTargetTimeMax() {
  1238 + return targetTimeMax;
  1239 + }
  1240 +
  1241 + /**
  1242 + * @param targetTimeMax the targetTimeMax to set
  1243 + */
  1244 + public void setTargetTimeMax(double targetTimeMax) {
  1245 + this.targetTimeMax = targetTimeMax;
  1246 + }
  1247 +
  1248 + /**
  1249 + * @return the particleSpectralType
  1250 + */
  1251 + public String getParticleSpectralType() {
  1252 + return particleSpectralType;
  1253 + }
  1254 +
  1255 + /**
  1256 + * @param particleSpectralType the particleSpectralType to set
  1257 + */
  1258 + public void setParticleSpectralType(String particleSpectralType) {
  1259 + this.particleSpectralType = particleSpectralType;
  1260 + }
  1261 +
  1262 + /**
  1263 + * @return the particleSpectralRangeMin
  1264 + */
  1265 + public double getParticleSpectralRangeMin() {
  1266 + return particleSpectralRangeMin;
  1267 + }
  1268 +
  1269 + /**
  1270 + * @param particleSpectralRangeMin the particleSpectralRangeMin to set
  1271 + */
  1272 + public void setParticleSpectralRangeMin(double particleSpectralRangeMin) {
  1273 + this.particleSpectralRangeMin = particleSpectralRangeMin;
  1274 + }
  1275 +
  1276 + /**
  1277 + * @return the particleSpectralRangeMax
  1278 + */
  1279 + public double getParticleSpectralRangeMax() {
  1280 + return particleSpectralRangeMax;
  1281 + }
  1282 +
  1283 + /**
  1284 + * @param particleSpectralRangeMax the particleSpectralRangeMax to set
  1285 + */
  1286 + public void setParticleSpectralRangeMax(double particleSpectralRangeMax) {
  1287 + this.particleSpectralRangeMax = particleSpectralRangeMax;
  1288 + }
  1289 +
  1290 + /**
  1291 + * @return the particleSpectralSamplingStepMin
  1292 + */
  1293 + public double getParticleSpectralSamplingStepMin() {
  1294 + return particleSpectralSamplingStepMin;
  1295 + }
  1296 +
  1297 + /**
  1298 + * @param particleSpectralSamplingStepMin the particleSpectralSamplingStepMin to set
  1299 + */
  1300 + public void setParticleSpectralSamplingStepMin(double particleSpectralSamplingStepMin) {
  1301 + this.particleSpectralSamplingStepMin = particleSpectralSamplingStepMin;
  1302 + }
  1303 +
  1304 + /**
  1305 + * @return the particleSpectralSamplingStepMax
  1306 + */
  1307 + public double getParticleSpectralSamplingStepMax() {
  1308 + return particleSpectralSamplingStepMax;
  1309 + }
  1310 +
  1311 + /**
  1312 + * @param particleSpectralSamplingStepMax the particleSpectralSamplingStepMax to set
  1313 + */
  1314 + public void setParticleSpectralSamplingStepMax(double particleSpectralSamplingStepMax) {
  1315 + this.particleSpectralSamplingStepMax = particleSpectralSamplingStepMax;
  1316 + }
  1317 +
  1318 + /**
  1319 + * @return the particleSpectralResolutionMin
  1320 + */
  1321 + public double getParticleSpectralResolutionMin() {
  1322 + return particleSpectralResolutionMin;
  1323 + }
  1324 +
  1325 + /**
  1326 + * @param particleSpectralResolutionMin the particleSpectralResolutionMin to set
  1327 + */
  1328 + public void setParticleSpectralResolutionMin(double particleSpectralResolutionMin) {
  1329 + this.particleSpectralResolutionMin = particleSpectralResolutionMin;
  1330 + }
  1331 +
  1332 + /**
  1333 + * @return the particleSpectralResolutionMax
  1334 + */
  1335 + public double getParticleSpectralResolutionMax() {
  1336 + return particleSpectralResolutionMax;
  1337 + }
  1338 +
  1339 + /**
  1340 + * @param particleSpectralResolutionMax the particleSpectralResolutionMax to set
  1341 + */
  1342 + public void setParticleSpectralResolutionMax(double particleSpectralResolutionMax) {
  1343 + this.particleSpectralResolutionMax = particleSpectralResolutionMax;
  1344 + }
  1345 +
  1346 + /**
  1347 + * @return the publisher
  1348 + */
  1349 + public String getPublisher() {
  1350 + return publisher;
  1351 + }
  1352 +
  1353 + /**
  1354 + * @param publisher the publisher to set
  1355 + */
  1356 + public void setPublisher(String publisher) {
  1357 + this.publisher = publisher;
  1358 + }
  1359 +
  1360 + /**
  1361 + * @return the spatialCoordinateDescription
  1362 + */
  1363 + public String getSpatialCoordinateDescription() {
  1364 + return spatialCoordinateDescription;
  1365 + }
  1366 +
  1367 + /**
  1368 + * @param spatialCoordinateDescription the spatialCoordinateDescription to set
  1369 + */
  1370 + public void setSpatialCoordinateDescription(String spatialCoordinateDescription) {
  1371 + this.spatialCoordinateDescription = spatialCoordinateDescription;
  1372 + }
  1373 +
  1374 + /**
  1375 + * @return the spatialOrigin
  1376 + */
  1377 + public String getSpatialOrigin() {
  1378 + return spatialOrigin;
  1379 + }
  1380 +
  1381 + /**
  1382 + * @param spatialOrigin the spatialOrigin to set
  1383 + */
  1384 + public void setSpatialOrigin(String spatialOrigin) {
  1385 + this.spatialOrigin = spatialOrigin;
  1386 + }
  1387 +
  1388 + /**
  1389 + * @return the timeOrigin
  1390 + */
  1391 + public String getTimeOrigin() {
  1392 + return timeOrigin;
  1393 + }
  1394 +
  1395 + /**
  1396 + * @param timeOrigin the timeOrigin to set
  1397 + */
  1398 + public void setTimeOrigin(String timeOrigin) {
  1399 + this.timeOrigin = timeOrigin;
  1400 + }
  1401 +
  1402 + /**
  1403 + * @return the timeScale
  1404 + */
  1405 + public String getTimeScale() {
  1406 + return timeScale;
  1407 + }
  1408 +
  1409 + /**
  1410 + * @param timeScale the timeScale to set
  1411 + */
  1412 + public void setTimeScale(String timeScale) {
  1413 + this.timeScale = timeScale;
  1414 + }
  1415 +
  1416 + /**
297 1417 * A granule is valid if all mandatory parameters are filled.
298 1418 *
299 1419 * @return true if the Granule is valid, false otherwise.
... ...
src/main/java/eu/omp/irap/vespa/epntapclient/granule/GranuleCtrl.java
... ... @@ -21,9 +21,9 @@ import java.text.SimpleDateFormat;
21 21 import java.util.ArrayList;
22 22 import java.util.Date;
23 23 import java.util.List;
  24 +import java.util.logging.Level;
24 25 import java.util.logging.Logger;
25 26  
26   -import eu.omp.irap.vespa.votable.utils.Debug;
27 27 import eu.omp.irap.vespa.votable.votabledata.VOTableData;
28 28  
29 29 /**
... ... @@ -36,106 +36,44 @@ public class GranuleCtrl {
36 36  
37 37 private VOTableData data;
38 38  
  39 + private static final String ERROR_MSG = "%s not found in the rowId %s: return %s.";
  40 +
39 41  
40 42 public GranuleCtrl(VOTableData data) {
41 43 this.data = data;
42 44 }
43 45  
44   - private String parseString(int rowId, GranuleEnum granuleEnum) {
  46 + private String parseString(int rowId, GranuleEnum granule) {
45 47 String res = "";
46 48 try {
47   - res = (String) data.getCell(rowId, granuleEnum.toString());
  49 + res = (String) data.getCell(rowId, granule.toString());
48 50 } catch (Exception e) {
49   - logger.warning(granuleEnum + "not found in the rowId" + rowId +
50   - ": return an empty string");
  51 + logger.log(Level.WARNING, String.format(ERROR_MSG, granule, rowId, "empty string"), e);
51 52 }
52 53 return res;
53 54 }
54 55  
55   - private Date parseDate(int rowId, GranuleEnum granuleEnum) throws ParseException {
  56 + private Date parseDate(int rowId, GranuleEnum granule) throws ParseException {
56 57 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
57 58 Date date = new Date();
58 59 try {
59   - date = sdf.parse((String) data.getCell(rowId, granuleEnum.toString()));
  60 + date = sdf.parse((String) data.getCell(rowId, granule.toString()));
60 61 } catch (Exception e) {
61   - logger.warning(granuleEnum + "not found in the rowId" + rowId +
62   - ": return an empty Date");
  62 + logger.log(Level.WARNING, String.format(ERROR_MSG, granule, rowId, "empty date"), e);
63 63 }
64   -
  64 +
65 65 return date;
66 66 }
67 67  
68   - private Double parseDouble(int rowId, GranuleEnum granuleEnum) {
  68 + private Double parseDouble(int rowId, GranuleEnum granule) {
69 69 Double d = null;
70 70 try {
71   - d = (Double) data.getCell(rowId, granuleEnum.toString());
  71 + d = (Double) data.getCell(rowId, granule.toString());
72 72 } catch (Exception e) {
73   - logger.warning(granuleEnum + "not found in the rowId" + rowId +
74   - ": return a Double.NaN");
  73 + logger.log(Level.WARNING, String.format(ERROR_MSG, granule, rowId, "double.NaN"), e);
75 74 }
76   -
77   - return d == null ? Double.NaN : d;
78   - }
79 75  
80   - public Granule getGranuleFromVOTableRow(int rowId) throws ParseException {
81   -
82   - // TODO: parser colonne par colonne pour รฉviter de faire des comparer les noms de colone ร 
83   - // chaque ligne.
84   - Debug.writeObject("data", data);
85   -
86   - //@noformat
87   - Granule g = new Granule(parseString(rowId, GranuleEnum.GRANULE_UID));
88   - g.granuleGid = parseString(rowId, GranuleEnum.GRANULE_GID);
89   - g.obsId = parseString(rowId, GranuleEnum.OBS_ID);
90   - g.dataproductType = parseString(rowId, GranuleEnum.DATAPRODUCT_TYPE);
91   - g.targetName = parseString(rowId, GranuleEnum.TARGET_NAME);
92   - g.targetClass = parseString(rowId, GranuleEnum.TARGET_CLASS);
93   - g.timeMin = parseDouble(rowId, GranuleEnum.TIME_MIN);
94   - g.timeMax = parseDouble(rowId, GranuleEnum.TIME_MAX);
95   - g.timeSamplingStepMin = parseDouble(rowId, GranuleEnum.TIME_SAMPLING_STEP_MIN);
96   - g.timeSamplingStepMax = parseDouble(rowId, GranuleEnum.TIME_SAMPLING_STEP_MAX);
97   - g.timeExpMin = parseDouble(rowId, GranuleEnum.TIME_EXP_MIN);
98   - g.timeExpMax = parseDouble(rowId, GranuleEnum.TIME_EXP_MAX);
99   - g.spectralRangeMin = parseDouble(rowId, GranuleEnum.SPECTRAL_RANGE_MIN);
100   - g.spectralRangeMax = parseDouble(rowId, GranuleEnum.SPECTRAL_RANGE_MAX);
101   - g.timeSamplingStepMin = parseDouble(rowId, GranuleEnum.TIME_SAMPLING_STEP_MIN);
102   - g.timeSamplingStepMax = parseDouble(rowId, GranuleEnum.TIME_SAMPLING_STEP_MAX);
103   - g.spectralResolutionMin = parseDouble(rowId, GranuleEnum.SPECTRAL_RESOLUTION_MIN);
104   - g.spectralResolutionMax = parseDouble(rowId, GranuleEnum.SPECTRAL_RESOLUTION_MAX);
105   - g.c1Min = parseDouble(rowId, GranuleEnum.C1MIN);
106   - g.c1Max = parseDouble(rowId, GranuleEnum.C1MAX);
107   - g.c2Min = parseDouble(rowId, GranuleEnum.C2MIN);
108   - g.c2Max = parseDouble(rowId, GranuleEnum.C2MAX);
109   - g.c3Min = parseDouble(rowId, GranuleEnum.C3MIN);
110   - g.c3Max = parseDouble(rowId, GranuleEnum.C3MAX);
111   - g.sRegion = parseString(rowId, GranuleEnum.S_REGION);
112   - g.c1ResolMin = parseDouble(rowId, GranuleEnum.C1_RESOL_MIN);
113   - g.c1ResolMax = parseDouble(rowId, GranuleEnum.C1_RESOL_MAX);
114   - g.c2ResolMin = parseDouble(rowId, GranuleEnum.C2_RESOL_MIN);
115   - g.c2ResolMax = parseDouble(rowId, GranuleEnum.C2_RESOL_MAX);
116   - g.c3ResolMin = parseDouble(rowId, GranuleEnum.C3_RESOL_MIN);
117   - g.c3ResolMax = parseDouble(rowId, GranuleEnum.C3_RESOL_MAX);
118   - g.spatialFrameType = parseString(rowId, GranuleEnum.SPATIAL_FRAME_TYPE);
119   - g.incidenceMin = parseDouble(rowId, GranuleEnum.INCIDENCE_MIN);
120   - g.incidenceMax = parseDouble(rowId, GranuleEnum.INCIDENCE_MAX);
121   - g.emergenceMin = parseDouble(rowId, GranuleEnum.EMERGENCE_MIN);
122   - g.emergenceMax = parseDouble(rowId, GranuleEnum.EMERGENCE_MAX);
123   - g.phaseMin = parseDouble(rowId, GranuleEnum.PHASE_MIN);
124   - g.phaseMax = parseDouble(rowId, GranuleEnum.PHASE_MAX);
125   - g.instrumentHostName = parseString(rowId, GranuleEnum.INSTRUMENT_HOST_NAME);
126   - g.instrumentName = parseString(rowId, GranuleEnum.INSTRUMENT_NAME);
127   - g.measurementType = parseString(rowId, GranuleEnum.MEASUREMENT_TYPE);
128   - g.processingLevel = parseInteger(rowId);
129   - g.creationDate = parseDate(rowId, GranuleEnum.CREATION_DATE);
130   - g.modificationDate = parseDate(rowId, GranuleEnum.MODIFICATION_DATE) ;
131   - g.releaseDate = parseDate(rowId, GranuleEnum.RELEASE_DATE) ;
132   - g.serviceTitle = parseString(rowId, GranuleEnum.SERVICE_TITLE);
133   - //@format
134   -
135   - if (!g.isValid()) {
136   - throw new IllegalArgumentException("One or more EPN parameter is null.");
137   - }
138   - return g;
  76 + return d == null ? Double.NaN : d;
139 77 }
140 78  
141 79 /**
... ... @@ -147,25 +85,83 @@ public class GranuleCtrl {
147 85 try {
148 86 val = (Integer) data.getCell(rowId, GranuleEnum.PROCESSING_LEVEL.toString());
149 87 } catch (Exception e) {
150   - // TODO: handle exception
  88 + logger.log(Level.WARNING, GranuleEnum.PROCESSING_LEVEL.toString() +
  89 + " not found in the rowId " + rowId + ": return a Double.NaN", e);
151 90 }
152 91 return val;
153 92 }
154 93  
  94 + public Granule getGranuleFromVOTableRow(int rowId) throws ParseException {
  95 +
  96 + // TODO: Parse column by column, to avoid compare all column name for each line.
  97 +
  98 + //@noformat
  99 + Granule g = new Granule(parseString(rowId, GranuleEnum.GRANULE_UID));
  100 + g.setGranuleGid(parseString(rowId, GranuleEnum.GRANULE_GID));
  101 + g.setObsId(parseString(rowId, GranuleEnum.OBS_ID));
  102 + g.setDataproductType(parseString(rowId, GranuleEnum.DATAPRODUCT_TYPE));
  103 + g.setTargetName(parseString(rowId, GranuleEnum.TARGET_NAME));
  104 + g.setTargetClass(parseString(rowId, GranuleEnum.TARGET_CLASS));
  105 + g.setTimeMin(parseDouble(rowId, GranuleEnum.TIME_MIN));
  106 + g.setTimeMax(parseDouble(rowId, GranuleEnum.TIME_MAX));
  107 + g.setTimeSamplingStepMin(parseDouble(rowId, GranuleEnum.TIME_SAMPLING_STEP_MIN));
  108 + g.setTimeSamplingStepMax(parseDouble(rowId, GranuleEnum.TIME_SAMPLING_STEP_MAX));
  109 + g.setTimeExpMin(parseDouble(rowId, GranuleEnum.TIME_EXP_MIN));
  110 + g.setTimeExpMax(parseDouble(rowId, GranuleEnum.TIME_EXP_MAX));
  111 + g.setSpectralRangeMin(parseDouble(rowId, GranuleEnum.SPECTRAL_RANGE_MIN));
  112 + g.setSpectralRangeMax(parseDouble(rowId, GranuleEnum.SPECTRAL_RANGE_MAX));
  113 + g.setTimeSamplingStepMin(parseDouble(rowId, GranuleEnum.TIME_SAMPLING_STEP_MIN));
  114 + g.setTimeSamplingStepMax(parseDouble(rowId, GranuleEnum.TIME_SAMPLING_STEP_MAX));
  115 + g.setSpectralResolutionMin(parseDouble(rowId, GranuleEnum.SPECTRAL_RESOLUTION_MIN));
  116 + g.setSpectralResolutionMax(parseDouble(rowId, GranuleEnum.SPECTRAL_RESOLUTION_MAX));
  117 + g.setC1Min(parseDouble(rowId, GranuleEnum.C1MIN));
  118 + g.setC1Max(parseDouble(rowId, GranuleEnum.C1MAX));
  119 + g.setC2Min(parseDouble(rowId, GranuleEnum.C2MIN));
  120 + g.setC2Max(parseDouble(rowId, GranuleEnum.C2MAX));
  121 + g.setC3Min(parseDouble(rowId, GranuleEnum.C3MIN));
  122 + g.setC3Max(parseDouble(rowId, GranuleEnum.C3MAX));
  123 + g.setsRegion(parseString(rowId, GranuleEnum.S_REGION));
  124 + g.setC1ResolMin(parseDouble(rowId, GranuleEnum.C1_RESOL_MIN));
  125 + g.setC1ResolMax(parseDouble(rowId, GranuleEnum.C1_RESOL_MAX));
  126 + g.setC2ResolMin(parseDouble(rowId, GranuleEnum.C2_RESOL_MIN));
  127 + g.setC2ResolMax(parseDouble(rowId, GranuleEnum.C2_RESOL_MAX));
  128 + g.setC3ResolMin(parseDouble(rowId, GranuleEnum.C3_RESOL_MIN));
  129 + g.setC3ResolMax(parseDouble(rowId, GranuleEnum.C3_RESOL_MAX));
  130 + g.setSpatialFrameType(parseString(rowId, GranuleEnum.SPATIAL_FRAME_TYPE));
  131 + g.setIncidenceMin(parseDouble(rowId, GranuleEnum.INCIDENCE_MIN));
  132 + g.setIncidenceMax(parseDouble(rowId, GranuleEnum.INCIDENCE_MAX));
  133 + g.setEmergenceMin(parseDouble(rowId, GranuleEnum.EMERGENCE_MIN));
  134 + g.setEmergenceMax(parseDouble(rowId, GranuleEnum.EMERGENCE_MAX));
  135 + g.setPhaseMin(parseDouble(rowId, GranuleEnum.PHASE_MIN));
  136 + g.setPhaseMax(parseDouble(rowId, GranuleEnum.PHASE_MAX));
  137 + g.setInstrumentHostName(parseString(rowId, GranuleEnum.INSTRUMENT_HOST_NAME));
  138 + g.setInstrumentName(parseString(rowId, GranuleEnum.INSTRUMENT_NAME));
  139 + g.setMeasurementType(parseString(rowId, GranuleEnum.MEASUREMENT_TYPE));
  140 + g.setProcessingLevel(parseInteger(rowId));
  141 + g.setCreationDate(parseDate(rowId, GranuleEnum.CREATION_DATE));
  142 + g.setModificationDate(parseDate(rowId, GranuleEnum.MODIFICATION_DATE) );
  143 + g.setReleaseDate(parseDate(rowId, GranuleEnum.RELEASE_DATE) );
  144 + g.setServiceTitle(parseString(rowId, GranuleEnum.SERVICE_TITLE));
  145 + //@format
  146 +
  147 + if (!g.isValid()) {
  148 + throw new IllegalArgumentException("One or more EPN parameter is null.");
  149 + }
  150 + return g;
  151 + }
  152 +
155 153 public static boolean isV2(VOTableData data) {
156 154 return !data.isContainingColumnName("index");
157 155 }
158 156  
159 157 public List<Granule> getGranulesFromVOTable() throws ParseException {
160   - Debug.writeObject("data", data);
161   -
162 158 if (!GranuleCtrl.isV2(data)) {
163 159 throw new IllegalArgumentException(
164 160 "The EPN-CORE is not v2, which is the only suported version");
165 161 }
166 162 List<Granule> granules = new ArrayList<>();
167 163  
168   - if (data != null){
  164 + if (data != null) {
169 165 for (int rowId = 0; rowId < data.getNbRows(); rowId++) {
170 166 granules.add(getGranuleFromVOTableRow(rowId));
171 167 }
... ...
src/test/java/eu/omp/irap/vespa/epntapclient/EpnTapConnectionTest.java
... ... @@ -335,13 +335,13 @@ public class EpnTapConnectionTest {
335 335 assertEquals(8, granules.size());
336 336 Granule mars = null;
337 337 for (Granule granule : granules) {
338   - if ("Mars".equals(granule.granuleUid)) {
  338 + if ("Mars".equals(granule.getGranuleUid())) {
339 339 mars = granule;
340 340 }
341 341 }
342 342 assertNotNull("granule 'Mars' is not found.", mars);
343   - assertEquals("4", mars.obsId);
344   - assertEquals(new Integer(5), mars.processingLevel);
  343 + assertEquals("4", mars.getObsId());
  344 + assertEquals(new Integer(5), mars.getProcessingLevel());
345 345 }
346 346  
347 347 /**
... ... @@ -360,12 +360,12 @@ public class EpnTapConnectionTest {
360 360 assertEquals(8, granules.size());
361 361 Granule mars = null;
362 362 for (Granule granule : granules) {
363   - if ("Mars".equals(granule.granuleUid)) {
  363 + if ("Mars".equals(granule.getGranuleUid())) {
364 364 mars = granule;
365 365 }
366 366 }
367 367 assertNotNull("granule 'Mars' is not found.", mars);
368   - assertEquals("4", mars.obsId);
369   - assertEquals(new Integer(5), mars.processingLevel);
  368 + assertEquals("4", mars.getObsId());
  369 + assertEquals(new Integer(5), mars.getProcessingLevel());
370 370 }
371 371 }
... ...