|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.model.ct.MathTransformProvider
Base class for MathTransform
providers.
Instance of this class allow the creation of transform
objects from a classification name.
Note: this class is not part of OpenGIS specification and
may change in a future version. Do not rely strongly on it.
Field Summary | |
private java.lang.String |
classification
The classification name. |
static ParameterListDescriptor |
DEFAULT_PROJECTION_DESCRIPTOR
A default parameter list descriptor for map projections. |
private ParameterListDescriptor |
descriptor
The parameter list descriptor. |
protected static Range |
LATITUDE_RANGE
Range of latitude values. |
protected static Range |
LONGITUDE_RANGE
Range of longitude values. |
private int |
nameKey
Resources key for a human readable name. |
protected static Range |
POSITIVE_RANGE
Range of positives values. |
private java.lang.Object[] |
properties
The set parameters to use for ParameterListDescriptor construction,
or null if the descriptor is already constructed. |
private static int |
RECORD_LENGTH
Number of colunms in table properties below. |
private static java.lang.Double |
ZERO
The zero value. |
Constructor Summary | |
(package private) |
MathTransformProvider(java.lang.String classification,
int nameKey,
ParameterListDescriptor inherit)
Construct a new provider. |
protected |
MathTransformProvider(java.lang.String classification,
ParameterListDescriptor inherit)
Construct a new provider. |
Method Summary | |
abstract MathTransform |
create(ParameterList parameters)
Returns a transform for the specified parameters. |
java.lang.String |
getClassName()
Returns the classification name. |
private static ParameterListDescriptor |
getDescriptor(java.lang.Object[] properties)
Returns the parameter list descriptor for the specified properties list. |
java.lang.String |
getName(java.util.Locale locale)
Returns a human readable name localized for the specified locale. |
ParameterList |
getParameterList()
Returns a newly created parameter list. |
(package private) ParameterListDescriptor |
getParameterListDescriptor()
Returns the parameter list descriptor. |
private void |
put(java.lang.String parameter,
java.lang.Class type,
java.lang.Object defaultValue,
Range range)
Adds or changes a parameter to this math transform provider. |
protected void |
put(java.lang.String parameter,
double defaultValue,
Range range)
Adds or changes a parameter to this math transform provider. |
(package private) void |
putInt(java.lang.String parameter,
int defaultValue,
Range range)
Adds or changes an integer parameter to this math transform provider. |
java.lang.String |
toString()
Returns a string representation for this provider. |
private static java.lang.Object |
wrap(double value)
Wrap the specified double value in an object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final java.lang.Double ZERO
protected static final Range POSITIVE_RANGE
protected static final Range LONGITUDE_RANGE
protected static final Range LATITUDE_RANGE
private static final int RECORD_LENGTH
properties
below.
public static final ParameterListDescriptor DEFAULT_PROJECTION_DESCRIPTOR
"semi_major"
,
"semi_minor"
,
"central_meridian"
,
"latitude_of_origin"
,
"false_easting"
and
"false_northing"
parameters.
private java.lang.Object[] properties
ParameterListDescriptor
construction,
or null
if the descriptor is already constructed.
private ParameterListDescriptor descriptor
private final java.lang.String classification
private final int nameKey
getName(java.util.Locale)
implementation.
Constructor Detail |
protected MathTransformProvider(java.lang.String classification, ParameterListDescriptor inherit)
classification
- The classification name.inherit
- The parameter list descriptor to inherit from, or null
if there is none. All parameter descriptions from inherit
will
be copied into this newly created MathTransformProvider
. For
map projections, this argument may be DEFAULT_PROJECTION_DESCRIPTOR
.
Subclasses may add or change parameters in their constructor by invoking
put(java.lang.String, double, Range)
.MathTransformProvider(java.lang.String classification, int nameKey, ParameterListDescriptor inherit)
classification
- The classification name.nameKey
- Resources key for a human readable name.
This is used for getName(java.util.Locale)
implementation.inherit
- The parameter list descriptor to inherit from, or null
if there is none. All parameter descriptions from inherit
will
be copied into this newly created MathTransformProvider
. For
map projections, this argument may be DEFAULT_PROJECTION_DESCRIPTOR
.
Subclasses may add or change parameters in their constructor by invoking
put(java.lang.String, double, Range)
.Method Detail |
protected final void put(java.lang.String parameter, double defaultValue, Range range) throws java.lang.IllegalStateException
MathTransformProvider
has been constructed with DEFAULT_PROJECTION_DESCRIPTOR
as argument, then default values
are already provided for "semi_major", "semi_minor", "central_meridian" and "latitude_of_origin".
Subclasses may call this method in their constructor for adding or changing parameters.
parameter
- The parameter name.defaultValue
- The default value for this parameter, or Double.NaN
if there is none.range
- The range of legal values. May be one of the predefined constants
(POSITIVE_RANGE
, LONGITUDE_RANGE
, LATITUDE_RANGE
)
or any other Range
object. May be null
if all values
are valid for this parameter.
java.lang.IllegalStateException
- If getParameterList()
has already been invoked prior to this call.final void putInt(java.lang.String parameter, int defaultValue, Range range) throws java.lang.IllegalStateException
double
values.
This is why this method is not yet public. Current SEAGIS version use
integer parameters only for matrix dimension and for a custom parameter
in geocentric transform. We hope the user will barely notice it...
parameter
- The parameter name.defaultValue
- The default value for this parameter.range
- The range of legal values. This is up to the caller to
build is own range with integer values (predefined ranges
like POSITIVE_RANGE
will not work).
java.lang.IllegalStateException
- If getParameterList()
has already been invoked prior to this call.private void put(java.lang.String parameter, java.lang.Class type, java.lang.Object defaultValue, Range range) throws java.lang.IllegalStateException
parameter
- The parameter name.type
- The parameter type.defaultValue
- The default value for this parameter.range
- The range of legal values.
java.lang.IllegalStateException
- If getParameterList()
has already been invoked prior to this call.private static java.lang.Object wrap(double value)
private static ParameterListDescriptor getDescriptor(java.lang.Object[] properties)
public java.lang.String getClassName()
public java.lang.String getName(java.util.Locale locale)
final ParameterListDescriptor getParameterListDescriptor()
public ParameterList getParameterList()
public abstract MathTransform create(ParameterList parameters)
parameters
- The parameter values in standard units.
MathTransform
object of this classification.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |