|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.parameter.Parameters
Utility class for methods helping implementing, and working with the
parameter API from org.opengis.parameter
package.
ParameterValueGroup
implementations. This is against GeoAPI's
inter-operability goal.The above doesn't mean that parameter's descriptor should not be used. They are used for inspecting meta-data about parameters, not as a key for searching parameters in a group. Since each parameter's name should be unique in a given parameter group (because maximum occurs is always 1 for single parameter), the parameter name is a suffisient key.
Field Summary | |
static org.opengis.parameter.ParameterDescriptorGroup |
EMPTY_GROUP
An empty parameter group. |
Constructor Summary | |
Parameters()
|
Method Summary | |
static void |
copy(org.opengis.parameter.ParameterValueGroup source,
org.opengis.parameter.ParameterValueGroup target)
Copies all parameter values from to . |
static boolean |
ensureSet(org.opengis.parameter.ParameterValueGroup parameters,
java.lang.String name,
double value,
javax.units.Unit unit,
boolean force)
Ensures that the specified parameter is set. |
static boolean |
isValid(org.opengis.parameter.ParameterValue parameter)
Checks a parameter value against its parameter descriptor. |
static java.util.List |
search(org.opengis.parameter.GeneralParameterValue param,
java.lang.String name,
int maxDepth)
Searchs all parameters with the specified name. |
static java.util.Map |
toNameValueMap(org.opengis.parameter.GeneralParameterValue parameters,
java.util.Map destination)
Gets a flat view of name-value pairs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static org.opengis.parameter.ParameterDescriptorGroup EMPTY_GROUP
Constructor Detail |
public Parameters()
Method Detail |
public static boolean isValid(org.opengis.parameter.ParameterValue parameter)
parameter
- The parameter to test.
Parameter.ensureValidValue(org.opengis.parameter.ParameterDescriptor, java.lang.Object)
public static java.util.List search(org.opengis.parameter.GeneralParameterValue param, java.lang.String name, int maxDepth)
name
and
alias
. This method search recursively
in subgroups up to the specified depth:
ParameterDescriptorGroup
, then this method checks all elements
in this group but not in subgroups.
param
- The parameter to inspect.name
- The name of the parameter to search for. See the class javadoc
for a rational about the usage of name as a key instead of
descriptor.
public static void copy(org.opengis.parameter.ParameterValueGroup source, org.opengis.parameter.ParameterValueGroup target)
ParameterBlock
for image processing operations).
public static java.util.Map toNameValueMap(org.opengis.parameter.GeneralParameterValue parameters, java.util.Map destination)
String
objects, and values are parameter values as
arbitrary objects. All subgroups (if any) are extracted recursively.
parameters
- The parameters to extract values from.destination
- The destination map, or for a default one.
public static boolean ensureSet(org.opengis.parameter.ParameterValueGroup parameters, java.lang.String name, double value, javax.units.Unit unit, boolean force)
The argument said what to do if the named parameter is already set. If the
value matches, nothing is done in all case. If there is a mismatch and is
, then the parameter is overriden with the specified . Otherwise,
the parameter is left unchanged but a warning is logged with the FINE
level.
parameters
- The set of projection parameters.name
- The parameter name to set.value
- The value to set, or to expect if the parameter is already set.unit
- The value unit.force
- for forcing the parameter to the specified
is case of mismatch.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |