Package org.opengis.test.referencing
Class DatumValidator
- Object
-
- Validator
-
- ReferencingValidator
-
- DatumValidator
-
public class DatumValidator extends ReferencingValidator
ValidatesDatum
and related objects from theorg.opengis.datum
package.This class is provided for users wanting to override the validation methods. When the default behavior is sufficient, the
Validators
static methods provide a more convenient way to validate various kinds of objects.- Since:
- 2.2
-
-
Field Summary
-
Fields inherited from class Validator
container, DEFAULT_TOLERANCE, enforceForbiddenAttributes, logger, requireMandatoryAttributes
-
-
Constructor Summary
Constructors Constructor Description DatumValidator(ValidatorContainer container)
Creates a new validator instance.
-
Method Summary
Modifier and Type Method Description int
dispatch(Datum object)
For each interface implemented by the given object, invokes the correspondingvalidate(…)
method defined in this class (if any).void
validate(Ellipsoid object)
Validates the given ellipsoid.void
validate(EngineeringDatum object)
Validates the given datum.void
validate(GeodeticDatum object)
Validates the given datum.void
validate(ImageDatum object)
Validates the given datum.void
validate(PrimeMeridian object)
Validates the given prime meridian.void
validate(TemporalDatum object)
Validates the given datum.void
validate(VerticalDatum object)
Validates the given datum.-
Methods inherited from class ReferencingValidator
dispatchObject, validate
-
Methods inherited from class Validator
conditional, forbidden, mandatory, validate
-
-
-
-
Constructor Detail
-
DatumValidator
public DatumValidator(ValidatorContainer container)
Creates a new validator instance.- Parameters:
container
- the set of validators to use for validating other kinds of objects (see field javadoc).
-
-
Method Detail
-
dispatch
public int dispatch(Datum object)
For each interface implemented by the given object, invokes the correspondingvalidate(…)
method defined in this class (if any).- Parameters:
object
- the object to dispatch tovalidate(…)
methods, ornull
.- Returns:
- number of
validate(…)
methods invoked in this class for the given object.
-
validate
public void validate(PrimeMeridian object)
Validates the given prime meridian.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(Ellipsoid object)
Validates the given ellipsoid. This method checks the following conditions:- Axis unit is defined and is linear.
- semi-minor <= semi-major.
- inverse flattening > 0.
- Consistency of semi-minor axis length with inverse flattening factor.
- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(GeodeticDatum object)
Validates the given datum.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(VerticalDatum object)
Validates the given datum.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(TemporalDatum object)
Validates the given datum.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(ImageDatum object)
Validates the given datum.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(EngineeringDatum object)
Validates the given datum.- Parameters:
object
- the object to validate, ornull
.
-
-