new DefaultParameterDescriptor(_key, value.getClass(), null, value) .createValue());
new DefaultParameterDescriptor(_key, descr.getValueClass(), null, value) .createValue());
private GeneralParameterValue[] buildFootprintBandParams( FootprintBehavior footprintBehavior, int[] bands) { final List<ParameterValue<?>> parameters = new ArrayList<ParameterValue<?>>(); parameters.add( new DefaultParameterDescriptor<>( AbstractGridFormat.FOOTPRINT_BEHAVIOR.getName().toString(), AbstractGridFormat.FOOTPRINT_BEHAVIOR.getValueClass(), null, footprintBehavior.name()) .createValue()); parameters.add( new DefaultParameterDescriptor<>( AbstractGridFormat.BANDS.getName().toString(), AbstractGridFormat.BANDS.getValueClass(), null, bands) .createValue()); return (GeneralParameterValue[]) parameters.toArray(new GeneralParameterValue[parameters.size()]); }
protected static class InfoWrapper { public InfoWrapper(String description, String name) { this.description = description; this.name = name; } String description; String name; }
/** * Constructs a descriptor for a parameter in a range of floating point values. * * @param properties The parameter properties (name, identifiers, alias...). * @param defaultValue The default value for the parameter, or {@link Double#NaN} if none. * @param minimum The minimum parameter value, or {@link Double#NEGATIVE_INFINITY} if none. * @param maximum The maximum parameter value, or {@link Double#POSITIVE_INFINITY} if none. * @param unit The unit of measurement for default, minimum and maximum values. * @param required {@code true} if this parameter is required, {@code false} otherwise. * @return The parameter descriptor for the given range of values. * @since 2.5 */ public static DefaultParameterDescriptor<Double> create( final Map<String, ?> properties, final double defaultValue, final double minimum, final double maximum, final Unit<?> unit, final boolean required) { return new DefaultParameterDescriptor<Double>( properties, required, Double.class, null, Double.isNaN(defaultValue) ? null : Double.valueOf(defaultValue), minimum == Double.NEGATIVE_INFINITY ? null : Double.valueOf(minimum), maximum == Double.POSITIVE_INFINITY ? null : Double.valueOf(maximum), unit); }
/** * Constructs a descriptor for a parameter in a range of integer values. * * @param properties The parameter properties (name, identifiers, alias...). * @param defaultValue The default value for the parameter. * @param minimum The minimum parameter value, or {@link Integer#MIN_VALUE} if none. * @param maximum The maximum parameter value, or {@link Integer#MAX_VALUE} if none. * @param required {@code true} if this parameter is required, {@code false} otherwise. * @return The parameter descriptor for the given range of values. * @since 2.5 */ public static DefaultParameterDescriptor<Integer> create( final Map<String, ?> properties, final int defaultValue, final int minimum, final int maximum, final boolean required) { return new DefaultParameterDescriptor<Integer>( properties, required, Integer.class, null, Integer.valueOf(defaultValue), minimum == Integer.MIN_VALUE ? null : Integer.valueOf(minimum), maximum == Integer.MAX_VALUE ? null : Integer.valueOf(maximum), null); }
properties.put(REMARKS_KEY, remarks); return new DefaultParameterDescriptor<T>( properties, valueClass, codeList, defaultValue, null, null, null, required);
new DefaultParameterDescriptor<Double>( Collections.singletonMap(NAME_KEY, prefix + row + separator + column), Double.class,
new DefaultParameterDescriptor<GridGeometry2D>( "ReadGridGeometry2D", GridGeometry2D.class, null, null); new DefaultParameterDescriptor<ProgressListener>( "Listener", ProgressListener.class, null, null); new DefaultParameterDescriptor<GeoToolsWriteParams>( "WriteParameters", GeoToolsWriteParams.class, null, null); new DefaultParameterDescriptor<Boolean>( Hints.USE_JAI_IMAGEREAD.toString(), Boolean.class, new DefaultParameterDescriptor<OverviewPolicy>( Hints.OVERVIEW_POLICY.toString(), OverviewPolicy.class, new DefaultParameterDescriptor<DecimationPolicy>( Hints.DECIMATION_POLICY.toString(), DecimationPolicy.class, new DefaultParameterDescriptor<String>( SUGGESTED_TILESIZE, String.class, null, "512,512"); new DefaultParameterDescriptor<int[]>("Bands", int[].class, null, null); new DefaultParameterDescriptor<Color>("InputTransparentColor", Color.class, null, null); new DefaultParameterDescriptor<Color>("BackgroundColor", Color.class, null, null);
final Map<String, Object> properties = createProperties(name, epsg, remarks); descriptor = new DefaultParameterDescriptor( properties, type, null, null, null, null, unit, true); returnValue = ensureSingleton(descriptor, returnValue, code);
final Map<String, Object> properties = generateProperties(name, epsg, remarks); descriptor = new DefaultParameterDescriptor( properties, type, null, null, null, null, unit, true); returnValue = ensureSingleton(descriptor, returnValue, code);
new DefaultParameterDescriptor( properties, type, new DefaultParameterDescriptor( properties, type, validValues, defaultValue, min, max, null, true);
public GeneralParameterDescriptor createVersionReadParam() { String[] validValues = { "1.0.0", "1.1.0", "1.1.1", "1.3.0" }; Map properties = fillProperties("VERSION", "Value contains the version of the WMS server to be used"); GeneralParameterDescriptor param = new DefaultParameterDescriptor(properties, String.class, validValues, null, null, null, null, true); return param; }
public GeneralParameterDescriptor createHeightReadParam() { Map properties = fillProperties("HEIGHT", "Value contains the height, in pixels, of the requested map"); GeneralParameterDescriptor param = new DefaultParameterDescriptor(properties, Integer.class, null, null, new Integer(1), null, null, true); return param; }
public GeneralParameterDescriptor createWidthReadParam() { Map properties = fillProperties("WIDTH", "Value contains the width, in pixels, of the requested map"); GeneralParameterDescriptor param = new DefaultParameterDescriptor(properties, Integer.class, null, null, new Integer(1), null, null, true); return param; }
public GeneralParameterDescriptor createRequestReadParam() { Map properties = fillProperties("REQUEST", "Value contains the the type of the request"); String getMap = "GetMap"; String[] validValues = { getMap }; GeneralParameterDescriptor param = new DefaultParameterDescriptor(properties, String.class, validValues, getMap, null, null, null, true); return param; }
public GeneralParameterDescriptor createBGColorReadParam() { Map properties = fillProperties("BGCOLOR", "Value indicates map background colour in hex format (0xRRGGBB)"); GeneralParameterDescriptor param = new DefaultParameterDescriptor(properties, String.class, null, "0xFFFFFF", null, null, null, false); return param; }
public GeneralParameterDescriptor createExceptionsReadParam() { Map properties = fillProperties("EXCEPTIONS", "Value indicates the format in which exceptions are returned"); String defaultValue = "application/vnd.ogc.se_xml"; String[] validValues = { defaultValue }; GeneralParameterDescriptor param = new DefaultParameterDescriptor(properties, String.class, validValues, defaultValue, null, null, null, false); //TODO Fix exceptions later //param.validValues = new TreeSet(capabilities..getException().getFormats()); return param; }
new DefaultParameterDescriptor( Citations.OGC, "xPeriod",
final ParameterDescriptor<Integer> p1, p2, p3, p4; p1 = new DefaultParameterDescriptor<Integer>( Collections.singletonMap("name", "1"), Integer.class, true); p2 = new DefaultParameterDescriptor<Integer>( Collections.singletonMap("name", "2"), Integer.class, true); p3 = new DefaultParameterDescriptor<Integer>( Collections.singletonMap("name", "3"), Integer.class,