Blame view

src/main/java/eu/omp/irap/vespa/epntapclient/granule/GranuleEnum.java 12.9 KB
260c559f   Nathanael Jourdane   Add the Granule e...
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
/*
 * 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;

/**
 * Enumeration list generated with the Python script in main/resources/scripts.
 *
 * @author N. Jourdane
 */
30e4599b   Nathanael Jourdane   Add Javadoc
26
@SuppressWarnings("javadoc")
260c559f   Nathanael Jourdane   Add the Granule e...
27
public enum GranuleEnum {
260c559f   Nathanael Jourdane   Add the Granule e...
28
	//@noformat
45fb4583   Nathanael Jourdane   Sort methods and ...
29
30
31
32
33
34
35

	ACCESS_ESTSIZE("access_estsize", Integer.class, false, false, "kbyte", "", "Estimate file size in kbyte (with this spelling)"),
	ACCESS_FORMAT("access_format", String.class, false, false, "", "meta.code.mime", ""),
	ACCESS_MD5("access_md5", String.class, false, false, "", "", "MD5 Hash for the file when available (real file)"),
	ACCESS_URL("access_url", String.class, false, false, "", "meta.ref.url;meta.file", ""),
	ALT_TARGET_NAME("alt_target_name", String.class, false, false, "", "meta.id;src", "Provides alternative target name if more common (e.g. comets)"),
	BIB_REFERENCE("bib_reference", String.class, false, false, "", "meta.bib", "Bibcode, doi, or other biblio id, URL"),
260c559f   Nathanael Jourdane   Add the Granule e...
36
	C1_RESOL_MAX("c1_resol_max", Double.class, true, false, "", "pos.resolution;stat.max", "Max resolution in first coordinate"),
45fb4583   Nathanael Jourdane   Sort methods and ...
37
38
39
	C1_RESOL_MIN("c1_resol_min", Double.class, true, false, "", "", "Min resolution in first coordinate"),
	C1MAX("c1max", Double.class, true, false, "", "pos;stat.max", "Max of first coordinate"),
	C1MIN("c1min", Double.class, true, false, "", "pos;stat.min", "Min of first coordinate"),
260c559f   Nathanael Jourdane   Add the Granule e...
40
	C2_RESOL_MAX("c2_resol_max", Double.class, true, false, "", "pos.resolution;stat.max", "Max resolution in second coordinate"),
45fb4583   Nathanael Jourdane   Sort methods and ...
41
42
43
	C2_RESOL_MIN("c2_resol_min", Double.class, true, false, "", "pos.resolution;stat.min", "Min resolution in second coordinate"),
	C2MAX("c2max", Double.class, true, false, "", "pos;stat.max", "Max of second coordinate"),
	C2MIN("c2min", Double.class, true, false, "", "pos;stat.min", "Min of second coordinate"),
260c559f   Nathanael Jourdane   Add the Granule e...
44
	C3_RESOL_MAX("c3_resol_max", Double.class, true, false, "", "pos.resolution;stat.max", "Max resolution in third coordinate"),
45fb4583   Nathanael Jourdane   Sort methods and ...
45
46
47
48
49
50
51
	C3_RESOL_MIN("c3_resol_min", Double.class, true, false, "", "pos.resolution;stat.min", "Min resolution in third coordinate"),
	C3MAX("c3max", Double.class, true, false, "", "pos;stat.max", "Max of third coordinate"),
	C3MIN("c3min", Double.class, true, false, "", "pos;stat.min", "Min of third coordinate"),
	CREATION_DATE("creation_date", Date.class, true, true, "", "time.creation", "Date of first entry of this granule"),
	DATA_ACCESS_URL("data_access_url", String.class, false, false, "", "", "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"),
	DATAPRODUCT_TYPE("dataproduct_type", String.class, true, true, "", "meta.code.class", "Organization of the data product, from enumerated list"),
	DEC("dec", Double.class, false, false, "deg", "pos.eq.dec;meta.main", "Declination"),
260c559f   Nathanael Jourdane   Add the Granule e...
52
	EMERGENCE_MAX("emergence_max", Double.class, true, false, "deg", "pos.posAng;stat.max", "Max emergence angle"),
45fb4583   Nathanael Jourdane   Sort methods and ...
53
54
55
56
57
58
59
	EMERGENCE_MIN("emergence_min", Double.class, true, false, "deg", "pos.posAng;stat.min", "Min emergence angle"),
	FEATURE_NAME("feature_name", String.class, false, false, "", "meta.id;pos", ""),
	FILE_NAME("file_name", String.class, false, false, "", "meta.id;meta.file", "Name of the data file only, case sensitive"),
	GRANULE_GID("granule_gid", String.class, true, true, "", "meta.id", "Common to granules of same type (e.g. same map projection, or geometry data products). Can be alphanum."),
	GRANULE_UID("granule_uid", String.class, true, true, "", "meta.id", ""),
	INCIDENCE_MAX("incidence_max", Double.class, true, false, "deg", "pos.posAng;stat.max", "Max incidence angle (solar zenithal angle)"),
	INCIDENCE_MIN("incidence_min", Double.class, true, false, "deg", "pos.posAng;stat.min", "Min incidence angle (solar zenithal angle)"),
260c559f   Nathanael Jourdane   Add the Granule e...
60
61
	INSTRUMENT_HOST_NAME("instrument_host_name", String.class, true, false, "", "", "Standard name of the observatory or spacecraft"),
	INSTRUMENT_NAME("instrument_name", String.class, true, false, "", "meta.id;instr", "Standard name of instrument"),
45fb4583   Nathanael Jourdane   Sort methods and ...
62
63
	LOCAL_TIME_MAX("local_time_max", Double.class, false, false, "h", "time.phase;stat.max?", "Local time at observed region"),
	LOCAL_TIME_MIN("local_time_min", Double.class, false, false, "h", "time.phase;stat.min?", "Local time at observed region"),
260c559f   Nathanael Jourdane   Add the Granule e...
64
	MEASUREMENT_TYPE("measurement_type", String.class, true, false, "", "meta.ucd", "UCD(s) defining the data"),
260c559f   Nathanael Jourdane   Add the Granule e...
65
	MODIFICATION_DATE("modification_date", Date.class, true, true, "", "time.update", "Date of last modification (used to handle mirroring)"),
45fb4583   Nathanael Jourdane   Sort methods and ...
66
	OBS_ID("obs_id", String.class, true, true, "", "meta.id", "Associates granules derived from the same data (e.g. various representations / processing levels). Can be alphanum., may be the ID of original observation."),
260c559f   Nathanael Jourdane   Add the Granule e...
67
	PARTICLE_SPECTRAL_RANGE_MAX("particle_spectral_range_max", Double.class, false, false, "", "", ""),
45fb4583   Nathanael Jourdane   Sort methods and ...
68
	PARTICLE_SPECTRAL_RANGE_MIN("particle_spectral_range_min", Double.class, false, false, "", "", ""),
260c559f   Nathanael Jourdane   Add the Granule e...
69
	PARTICLE_SPECTRAL_RESOLUTION_MAX("particle_spectral_resolution_max", Double.class, false, false, "", "spect.resolution;stat.max", ""),
45fb4583   Nathanael Jourdane   Sort methods and ...
70
71
72
73
74
75
76
	PARTICLE_SPECTRAL_RESOLUTION_MIN("particle_spectral_resolution_min", Double.class, false, false, "", "spect.resolution;stat.min", ""),
	PARTICLE_SPECTRAL_SAMPLING_STEP_MAX("particle_spectral_sampling_step_max", Double.class, false, false, "", "", ""),
	PARTICLE_SPECTRAL_SAMPLING_STEP_MIN("particle_spectral_sampling_step_min", Double.class, false, false, "", "", ""),
	PARTICLE_SPECTRAL_TYPE("particle_spectral_type", String.class, false, false, "", "", ""),
	PHASE_MAX("phase_max", Double.class, true, false, "deg", "pos.phaseAng;stat.max", "Max phase angle"),
	PHASE_MIN("phase_min", Double.class, true, false, "deg", "pos.phaseAng;stat.min", "Min phase angle"),
	PROCESSING_LEVEL("processing_level", Integer.class, true, false, "", "meta.code;obs.calib", "CODMAC calibration level in v1"),
260c559f   Nathanael Jourdane   Add the Granule e...
77
	PUBLISHER("publisher", String.class, false, false, "", "meta.name", "Resource publisher"),
45fb4583   Nathanael Jourdane   Sort methods and ...
78
79
80
81
82
83
	RA("ra", Double.class, false, false, "deg or h:m:s?", "pos.eq.ra;meta.main", ""),
	RELEASE_DATE("release_date", Date.class, true, true, "", "time.release", ""),
	S_REGION("s_region", String.class, true, false, "", "instr.fov", "ObsCore-like footprint, assume spatial_coordinate_description"),
	SERVICE_TITLE("service_title", String.class, true, true, "", "meta.title", ""),
	SOLAR_LONGITUDE_MAX("solar_longitude_max", Double.class, false, false, "deg", "pos.posangle (TBC)", "Max Solar longitude Ls (location on orbit / season)"),
	SOLAR_LONGITUDE_MIN("solar_longitude_min", Double.class, false, false, "deg", "pos.posangle (TBC)", "Min Solar longitude Ls (location on orbit / season)"),
260c559f   Nathanael Jourdane   Add the Granule e...
84
	SPATIAL_COORDINATE_DESCRIPTION("spatial_coordinate_description", String.class, false, false, "", "", "ID of specific coordinate system and version"),
45fb4583   Nathanael Jourdane   Sort methods and ...
85
	SPATIAL_FRAME_TYPE("spatial_frame_type", String.class, true, false, "", "meta.code.class;pos.frame", "Flavor of coordinate system, defines the nature of coordinates. From enumerated list"),
260c559f   Nathanael Jourdane   Add the Granule e...
86
	SPATIAL_ORIGIN("spatial_origin", String.class, false, false, "", "meta.ref;pos.frame", "Defines the frame origin"),
45fb4583   Nathanael Jourdane   Sort methods and ...
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
	SPECIES("species", String.class, false, false, "", "meta.id;phys.atmol", "Identifies a chemical species, case sensitive"),
	SPECTRAL_RANGE_MAX("spectral_range_max", Double.class, true, false, "Hz", "em.freq;stat.max", "Max spectral range (frequency)"),
	SPECTRAL_RANGE_MIN("spectral_range_min", Double.class, true, false, "Hz", "em.freq;stat.min", "Min spectral range (frequency)"),
	SPECTRAL_RESOLUTION_MAX("spectral_resolution_max", Double.class, true, false, "Hz", "spect.resolution;stat.max", "Max spectral resolution"),
	SPECTRAL_RESOLUTION_MIN("spectral_resolution_min", Double.class, true, false, "Hz", "spect.resolution;stat.min", ""),
	SPECTRAL_SAMPLING_STEP_MAX("spectral_sampling_step_max", Double.class, true, false, "Hz", "", "Max spectral sampling step"),
	SPECTRAL_SAMPLING_STEP_MIN("spectral_sampling_step_min", Double.class, true, false, "Hz", "", "Min spectral sampling step"),
	TARGET_CLASS("target_class", String.class, true, true, "", "meta.code.class;src", "Type of target, from enumerated list"),
	TARGET_DISTANCE_MAX("target_distance_max", Double.class, false, false, "km", "pos.distance;stat.max", "Observer-target distance"),
	TARGET_DISTANCE_MIN("target_distance_min", Double.class, false, false, "km", "pos.distance;stat.min", "Observer-target distance"),
	TARGET_NAME("target_name", String.class, true, true, "", "meta.id;src", "Standard IAU name of target (from a list related to target class), case sensitive"),
	TARGET_REGION("target_region", String.class, false, false, "", "meta.id;class", ""),
	TARGET_TIME_MAX("target_time_max", Double.class, false, false, "d", "", ""),
	TARGET_TIME_MIN("target_time_min", Double.class, false, false, "d", "", ""),
	THUMBNAIL_URL("thumbnail_url", String.class, false, false, "", "meta.ref.url;meta.file", "URL of a thumbnail image with predefined size (png ~200 pix, for use in a client only)"),
	TIME_EXP_MAX("time_exp_max", Double.class, true, false, "s", "time.duration;obs.exposure;stat.max", "Max integration time"),
	TIME_EXP_MIN("time_exp_min", Double.class, true, false, "s", "", "Min integration time"),
	TIME_MAX("time_max", Double.class, true, false, "d (date as JD)", "time.end", ""),
	TIME_MIN("time_min", Double.class, true, false, "d (date as JD)", "time.start", ""),
260c559f   Nathanael Jourdane   Add the Granule e...
106
	TIME_ORIGIN("time_origin", String.class, false, false, "", "", ""),
45fb4583   Nathanael Jourdane   Sort methods and ...
107
108
	TIME_SAMPLING_STEP_MAX("time_sampling_step_max", Double.class, true, false, "s", "time.interval;stat.max", "Max time sampling step"),
	TIME_SAMPLING_STEP_MIN("time_sampling_step_min", Double.class, true, false, "s", "time.interval;stat.min", "Min time sampling step"),
260c559f   Nathanael Jourdane   Add the Granule e...
109
	TIME_SCALE("time_scale", String.class, false, false, "", "time.scale", "");
260c559f   Nathanael Jourdane   Add the Granule e...
110

45fb4583   Nathanael Jourdane   Sort methods and ...
111
	//@format
260c559f   Nathanael Jourdane   Add the Granule e...
112

45fb4583   Nathanael Jourdane   Sort methods and ...
113
114
	/** A short text describing the granule parameter. */
	private String description;
260c559f   Nathanael Jourdane   Add the Granule e...
115

30e4599b   Nathanael Jourdane   Add Javadoc
116
	/** true if the granule parameter is mandatory, false if it is optional. */
260c559f   Nathanael Jourdane   Add the Granule e...
117
118
	private boolean isMandatory;

30e4599b   Nathanael Jourdane   Add Javadoc
119
120
	/** true if the granule parameter must be actually filled, false if the value can be null. */
	private boolean mustBeFilled;
260c559f   Nathanael Jourdane   Add the Granule e...
121

45fb4583   Nathanael Jourdane   Sort methods and ...
122
123
124
125
126
	/** The name of the granule parameter. */
	private String name;

	/** The type of the granule parameter. */
	private Class<?> type;
260c559f   Nathanael Jourdane   Add the Granule e...
127

30e4599b   Nathanael Jourdane   Add Javadoc
128
	/** The UCD of the granule parameter. */
260c559f   Nathanael Jourdane   Add the Granule e...
129
130
	private String ucd;

45fb4583   Nathanael Jourdane   Sort methods and ...
131
132
	/** The unit of the granule parameter (ie. degree, km, etc.). */
	private String unit;
260c559f   Nathanael Jourdane   Add the Granule e...
133
134


30e4599b   Nathanael Jourdane   Add Javadoc
135
136
137
138
139
140
141
142
143
144
145
146
	/**
	 * Contructor of the granule.
	 *
	 * @param name The name of the granule parameter.
	 * @param type The type of the granule parameter.
	 * @param isMandatory true if the granule parameter is mandatory, false if it is optional.
	 * @param mustBeFilled true if the granule parameter must be actually filled.
	 * @param unit The unit of the granule parameter (ie. degree, km, etc.).
	 * @param ucd The UCD of the granule parameter.
	 * @param description A short text describing the granule parameter.
	 */
	GranuleEnum(String name, Class<?> type, boolean isMandatory, boolean mustBeFilled, String unit,
260c559f   Nathanael Jourdane   Add the Granule e...
147
148
149
150
			String ucd, String description) {
		this.name = name;
		this.type = type;
		this.isMandatory = isMandatory;
30e4599b   Nathanael Jourdane   Add Javadoc
151
		this.mustBeFilled = mustBeFilled;
260c559f   Nathanael Jourdane   Add the Granule e...
152
153
154
155
156
		this.unit = unit;
		this.ucd = ucd;
		this.description = description;
	}

45fb4583   Nathanael Jourdane   Sort methods and ...
157
158
159
160
161
	/**
	 * @return A short text describing the granule parameter.
	 */
	public String getDescription() {
		return description;
260c559f   Nathanael Jourdane   Add the Granule e...
162
	}
30e4599b   Nathanael Jourdane   Add Javadoc
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178

	/**
	 * @return The name of the granule parameter.
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return The type of the granule parameter.
	 */
	public Class<?> getType() {
		return type;
	}

	/**
45fb4583   Nathanael Jourdane   Sort methods and ...
179
	 * @return The UCD of the granule parameter.
30e4599b   Nathanael Jourdane   Add Javadoc
180
	 */
45fb4583   Nathanael Jourdane   Sort methods and ...
181
182
	public String getUcd() {
		return ucd;
30e4599b   Nathanael Jourdane   Add Javadoc
183
184
185
186
187
188
189
190
191
192
	}

	/**
	 * @return The unit of the granule parameter (ie. degree, km, etc.).
	 */
	public String getUnit() {
		return unit;
	}

	/**
45fb4583   Nathanael Jourdane   Sort methods and ...
193
	 * @return true if the granule parameter is mandatory, false if it is optional.
30e4599b   Nathanael Jourdane   Add Javadoc
194
	 */
45fb4583   Nathanael Jourdane   Sort methods and ...
195
196
	public boolean isMandatory() {
		return isMandatory;
30e4599b   Nathanael Jourdane   Add Javadoc
197
198
199
	}

	/**
45fb4583   Nathanael Jourdane   Sort methods and ...
200
	 * @return true if the granule parameter must be actually filled false if the value can be null.
30e4599b   Nathanael Jourdane   Add Javadoc
201
	 */
45fb4583   Nathanael Jourdane   Sort methods and ...
202
203
204
205
206
207
208
	public boolean isMustBeFilled() {
		return mustBeFilled;
	}

	@Override
	public String toString() {
		return name;
30e4599b   Nathanael Jourdane   Add Javadoc
209
210
	}

260c559f   Nathanael Jourdane   Add the Granule e...
211
}