Blame view

src/main/java/eu/omp/irap/vespa/epntapclient/granule/Granule.java 5.24 KB
2eda27c0   Nathanael Jourdane   Start VOResource ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * 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/>.
 */

5e72363b   Nathanael Jourdane   Change project ar...
17
package eu.omp.irap.vespa.epntapclient.granule;
2eda27c0   Nathanael Jourdane   Start VOResource ...
18
19
20
21
22
23

import java.util.Date;

/**
 * @author N. Jourdane
 */
5e72363b   Nathanael Jourdane   Change project ar...
24
public class Granule {
2eda27c0   Nathanael Jourdane   Start VOResource ...
25
26
27
28
29
30
31
32
33
34
35
36
37

	public String granuleUid;

	public String granuleGid;

	public String obsId;

	public String dataproductType;

	public String targetName;

	public String targetClass;

cfbb6d07   Nathanael Jourdane   Implement most of...
38
	public Double timeMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
39

cfbb6d07   Nathanael Jourdane   Implement most of...
40
	public Double timeMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
41

cfbb6d07   Nathanael Jourdane   Implement most of...
42
	public Double timeSamplingStepMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
43

cfbb6d07   Nathanael Jourdane   Implement most of...
44
	public Double timeSamplingStepMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
45

cfbb6d07   Nathanael Jourdane   Implement most of...
46
	public Double timeExpMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
47

cfbb6d07   Nathanael Jourdane   Implement most of...
48
	public Double timeExpMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
49

cfbb6d07   Nathanael Jourdane   Implement most of...
50
	public Double spectralRangeMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
51

cfbb6d07   Nathanael Jourdane   Implement most of...
52
	public Double spectralRangeMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
53

cfbb6d07   Nathanael Jourdane   Implement most of...
54
	public Double spectralSamplingStepMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
55

cfbb6d07   Nathanael Jourdane   Implement most of...
56
	public Double spectralSamplingStepMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
57

cfbb6d07   Nathanael Jourdane   Implement most of...
58
	public Double spectralResolutionMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
59

cfbb6d07   Nathanael Jourdane   Implement most of...
60
	public Double spectralResolutionMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
61

cfbb6d07   Nathanael Jourdane   Implement most of...
62
	public Double c1Min;
2eda27c0   Nathanael Jourdane   Start VOResource ...
63

cfbb6d07   Nathanael Jourdane   Implement most of...
64
	public Double c1Max;
2eda27c0   Nathanael Jourdane   Start VOResource ...
65

cfbb6d07   Nathanael Jourdane   Implement most of...
66
	public Double c2Min;
2eda27c0   Nathanael Jourdane   Start VOResource ...
67

cfbb6d07   Nathanael Jourdane   Implement most of...
68
	public Double c2Max;
2eda27c0   Nathanael Jourdane   Start VOResource ...
69

cfbb6d07   Nathanael Jourdane   Implement most of...
70
	public Double c3Min;
2eda27c0   Nathanael Jourdane   Start VOResource ...
71

cfbb6d07   Nathanael Jourdane   Implement most of...
72
	public Double c3Max;
2eda27c0   Nathanael Jourdane   Start VOResource ...
73

cfbb6d07   Nathanael Jourdane   Implement most of...
74
	public String sRegion;
2eda27c0   Nathanael Jourdane   Start VOResource ...
75

cfbb6d07   Nathanael Jourdane   Implement most of...
76
	public Double c1ResolMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
77

cfbb6d07   Nathanael Jourdane   Implement most of...
78
	public Double c1ResolMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
79

cfbb6d07   Nathanael Jourdane   Implement most of...
80
	public Double c2ResolMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
81

cfbb6d07   Nathanael Jourdane   Implement most of...
82
	public Double c2ResolMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
83

cfbb6d07   Nathanael Jourdane   Implement most of...
84
85
86
	public Double c3ResolMin;

	public Double c3ResolMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
87
88
89

	public String spatialFrameType;

cfbb6d07   Nathanael Jourdane   Implement most of...
90
	public Double incidenceMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
91

cfbb6d07   Nathanael Jourdane   Implement most of...
92
	public Double incidenceMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
93

cfbb6d07   Nathanael Jourdane   Implement most of...
94
	public Double emergenceMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
95

cfbb6d07   Nathanael Jourdane   Implement most of...
96
	public Double emergenceMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
97

cfbb6d07   Nathanael Jourdane   Implement most of...
98
	public Double phaseMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
99

cfbb6d07   Nathanael Jourdane   Implement most of...
100
	public Double phaseMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
101
102
103
104
105
106
107

	public String instrumentHostName;

	public String instrumentName;

	public String measurementType;

cfbb6d07   Nathanael Jourdane   Implement most of...
108
	public Integer processingLevel;
2eda27c0   Nathanael Jourdane   Start VOResource ...
109
110
111
112
113
114
115
116
117
118
119
120
121

	public Date creationDate;

	public Date modificationDate;

	public Date releaseDate;

	public String serviceTitle;

	public String accessUrl;

	public String accessFormat;

cfbb6d07   Nathanael Jourdane   Implement most of...
122
	public Integer accessEstsize;
2eda27c0   Nathanael Jourdane   Start VOResource ...
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141

	public String dataAccessUrl;

	public String accessMd5;

	public String thumbnailUrl;

	public String fileName;

	public String species;

	public String altTargetName;

	public String targetRegion;

	public String featureName;

	public String bibReference;

cfbb6d07   Nathanael Jourdane   Implement most of...
142
	public Double ra;
2eda27c0   Nathanael Jourdane   Start VOResource ...
143

cfbb6d07   Nathanael Jourdane   Implement most of...
144
	public Double dec;
2eda27c0   Nathanael Jourdane   Start VOResource ...
145

cfbb6d07   Nathanael Jourdane   Implement most of...
146
	public Double solarLongitudeMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
147

cfbb6d07   Nathanael Jourdane   Implement most of...
148
	public Double solarLongitudeMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
149

cfbb6d07   Nathanael Jourdane   Implement most of...
150
	public Double localTimeMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
151

cfbb6d07   Nathanael Jourdane   Implement most of...
152
	public Double localTimeMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
153

cfbb6d07   Nathanael Jourdane   Implement most of...
154
	public Double targetDistanceMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
155

cfbb6d07   Nathanael Jourdane   Implement most of...
156
	public Double targetDistanceMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
157

cfbb6d07   Nathanael Jourdane   Implement most of...
158
	public Double targetTimeMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
159

cfbb6d07   Nathanael Jourdane   Implement most of...
160
	public Double targetTimeMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
161
162
163

	public String particleSpectralType;

cfbb6d07   Nathanael Jourdane   Implement most of...
164
	public Double particleSpectralRangeMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
165

cfbb6d07   Nathanael Jourdane   Implement most of...
166
	public Double particleSpectralRangeMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
167

cfbb6d07   Nathanael Jourdane   Implement most of...
168
	public Double particleSpectralSamplingStepMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
169

cfbb6d07   Nathanael Jourdane   Implement most of...
170
	public Double particleSpectralSamplingStepMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
171

cfbb6d07   Nathanael Jourdane   Implement most of...
172
	public Double particleSpectralResolutionMin;
2eda27c0   Nathanael Jourdane   Start VOResource ...
173

cfbb6d07   Nathanael Jourdane   Implement most of...
174
	public Double particleSpectralResolutionMax;
2eda27c0   Nathanael Jourdane   Start VOResource ...
175
176
177
178
179
180
181
182
183
184

	public String publisher;

	public String spatialCoordinateDescription;

	public String spatialOrigin;

	public String timeOrigin;

	public String timeScale;
cfbb6d07   Nathanael Jourdane   Implement most of...
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


	private Granule() {

	}

	public Granule(String granuleUid) {
		this.granuleUid = granuleUid;
	}

	/**
	 * A Granule is valid if all mandatory parameters are filled.
	 *
	 * @return
	 */
	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;
	}

2eda27c0   Nathanael Jourdane   Start VOResource ...
233
}