Package org.opengis.test.util
Class NameValidator
- java.lang.Object
-
- org.opengis.test.Validator
-
- org.opengis.test.util.NameValidator
-
public class NameValidator extends Validator
ValidatesGenericName
and related objects from theorg.opengis.util
package. This class should not be used directly; use theValidators
convenience static methods instead.- Since:
- 2.2
- Version:
- 3.0
-
-
Field Summary
-
Fields inherited from class org.opengis.test.Validator
container, DEFAULT_TOLERANCE, enforceForbiddenAttributes, logger, requireMandatoryAttributes
-
-
Constructor Summary
Constructors Constructor Description NameValidator(ValidatorContainer container)
Creates a new validator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispatch(GenericName object)
Dispatches tovalidate(LocalName)
orvalidate(ScopedName)
.private void
validate(GenericName object, java.util.List<? extends LocalName> parsedNames)
Performs some tests that are common to all subclasses ofGenericName
.void
validate(InternationalString object)
Ensures that theCharSequence
methods are consistent with thetoString()
value.void
validate(LocalName object)
Ensures that ISO 19103 or GeoAPI restrictions apply.void
validate(NameSpace object)
Ensures that ISO 19103 or GeoAPI restrictions apply.void
validate(ScopedName object)
Ensures that ISO 19103 or GeoAPI restrictions apply.
-
-
-
Constructor Detail
-
NameValidator
public NameValidator(ValidatorContainer container)
Creates a new validator.- Parameters:
container
- The container of this validator.
-
-
Method Detail
-
validate
public void validate(InternationalString object)
Ensures that theCharSequence
methods are consistent with thetoString()
value.- Parameters:
object
- The object to validate, ornull
.
-
validate
public void validate(NameSpace object)
Ensures that ISO 19103 or GeoAPI restrictions apply.- Parameters:
object
- The object to validate, ornull
.
-
dispatch
public void dispatch(GenericName object)
Dispatches tovalidate(LocalName)
orvalidate(ScopedName)
. Other implementations are silently ignored.- Parameters:
object
- The object to validate, ornull
.
-
validate
private void validate(GenericName object, java.util.List<? extends LocalName> parsedNames)
Performs some tests that are common to all subclasses ofGenericName
. This method should not invokesvalidate(LocalName)
orvalidate(ScopedName)
in order to avoid never-ending loop.This method should not validate the scope, since it could leads to a never-ending loop.
-
validate
public void validate(LocalName object)
Ensures that ISO 19103 or GeoAPI restrictions apply.- Parameters:
object
- The object to validate, ornull
.
-
validate
public void validate(ScopedName object)
Ensures that ISO 19103 or GeoAPI restrictions apply.- Parameters:
object
- The object to validate, ornull
.
-
-