Package org.opengis.test.referencing
Class CSValidator
- Object
-
- Validator
-
- ReferencingValidator
-
- CSValidator
-
public class CSValidator extends ReferencingValidator
ValidatesCoordinateSystem
and related objects from theorg.opengis.referencing.cs
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
- TODO:
- Add checks for Unit of Measurement depending on the coordinate system type.
For example
EllipsoidalCS
expects two angular values and one linear value (if 3D).
-
-
Field Summary
-
Fields inherited from class Validator
container, DEFAULT_TOLERANCE, enforceForbiddenAttributes, logger, requireMandatoryAttributes
-
-
Constructor Summary
Constructors Constructor Description CSValidator(ValidatorContainer container)
Creates a new validator instance.
-
Method Summary
Modifier and Type Method Description int
dispatch(CoordinateSystem object)
For each interface implemented by the given object, invokes the correspondingvalidate(…)
method defined in this class (if any).void
validate(CartesianCS object)
Validates the given coordinate system.void
validate(CoordinateSystemAxis object)
Validates the given axis.void
validate(CylindricalCS object)
Validates the given coordinate system.void
validate(EllipsoidalCS object)
Validates the given coordinate system.void
validate(LinearCS object)
Validates the given coordinate system.void
validate(PolarCS object)
Validates the given coordinate system.void
validate(SphericalCS object)
Validates the given coordinate system.void
validate(TimeCS object)
Validates the given coordinate system.void
validate(UserDefinedCS object)
Validates the given coordinate system.void
validate(VerticalCS object)
Validates the given coordinate system.-
Methods inherited from class ReferencingValidator
dispatchObject, validate
-
Methods inherited from class Validator
conditional, forbidden, mandatory, validate
-
-
-
-
Constructor Detail
-
CSValidator
public CSValidator(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(CoordinateSystem 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(CoordinateSystemAxis object)
Validates the given axis.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(CartesianCS object)
Validates the given coordinate system. This method ensures that axis directions are perpendicular to each other. Only known or compatibles directions are compared (e.g.NORTH
withEAST
). Unknown or incompatible directions (e.g.NORTH
withFUTURE
) are ignored.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(EllipsoidalCS object)
Validates the given coordinate system.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(SphericalCS object)
Validates the given coordinate system.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(CylindricalCS object)
Validates the given coordinate system.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(PolarCS object)
Validates the given coordinate system.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(LinearCS object)
Validates the given coordinate system.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(VerticalCS object)
Validates the given coordinate system.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(TimeCS object)
Validates the given coordinate system.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(UserDefinedCS object)
Validates the given coordinate system.- Parameters:
object
- the object to validate, ornull
.
-
-