// initialize dummy parameters for search by pos/radius (for a more uniform user interface)
List<FieldDesc> params = new ArrayList<FieldDesc>();
if (_isCatalog || _isImageServer) {
// Define the "standard" parameters
FieldDescAdapter p = new FieldDescAdapter(OBJECT);
p.setDescription("Enter the name of the object");
params.add(p);
p = new FieldDescAdapter(NAME_SERVER);
p.setDescription("Select the name server to use to resolve the object name");
List<Catalog> l = AstroCatConfig.getConfigFile().getNameServers();
NameValue[] ar = new NameValue[l.size()];
for (int i = 0; i < ar.length; i++) {
Catalog cat = l.get(i);
ar[i] = new NameValue(cat.getName(), cat);
}
p.setOptions(ar);
params.add(p);
p = new FieldDescAdapter(RA);
p.setIsRA(true);
p.setDescription("Right Ascension in the selected equinox, format: hh:mm:ss.sss");
params.add(p);
p = new FieldDescAdapter(DEC);
p.setDescription("Declination in the selected equinox, format: dd:mm:ss.sss");
p.setIsDec(true);
params.add(p);
p = new FieldDescAdapter(EQUINOX);
p.setDescription("Equinox of RA and Dec");
p.setOptions(_equinoxOptions);
params.add(p);
if (_isCatalog) {
if (_findParamByType(_paramDesc, "radius") != null) {
p = new FieldDescAdapter(MAX_RADIUS);
p.setDescription("The radius from the center coordinates in arcmin");
p.setFieldClass(Double.class);
p.setUnits("arcmin");
params.add(p);
} else {
if (_findParamByType(_paramDesc, "minradius") != null) {
p = new FieldDescAdapter(MIN_RADIUS);
p.setDescription("The minimum radius from the center coordinates in arcmin");
p.setFieldClass(Double.class);
p.setUnits("arcmin");
params.add(p);
}
if (_findParamByType(_paramDesc, "maxradius") != null) {
p = new FieldDescAdapter(MAX_RADIUS);
p.setDescription("The maximum radius from the center coordinates in arcmin");
p.setFieldClass(Double.class);
p.setUnits("arcmin");
params.add(p);
}
}
} else if (_isImageServer) {
if (_findParamByType(_paramDesc, "size") != null) {
p = new FieldDescAdapter(SIZE);
p.setDescription("The requested size (width or height) about the center coordinates in arcmin");
p.setFieldClass(Double.class);
p.setUnits("arcmin");
params.add(p);
} else {
if (_findParamByType(_paramDesc, "width") != null) {
p = new FieldDescAdapter(WIDTH);
p.setDescription("The width about the center coordinates in arcmin");
p.setFieldClass(Double.class);
p.setUnits("arcmin");
params.add(p);
}
if (_findParamByType(_paramDesc, "height") != null) {
p = new FieldDescAdapter(HEIGHT);
p.setDescription("The height about the center coordinates in arcmin");
p.setFieldClass(Double.class);
p.setUnits("arcmin");
params.add(p);
}
}
}
if (_isCatalog &&
_findParamByType(_paramDesc, "maxobjects") == null
&& _findParamByType(_paramDesc, "maxrows") == null) {
p = new FieldDescAdapter(MAX_OBJECTS);
p.setDescription("The maximum number of objects to return");
p.setFieldClass(Integer.class);
p.setDefaultValue(1000);
params.add(p);
}
}
// Add the rest of the parameters not dealing with position and radius