Package org.opengis.test.util
Class NameValidator
- java.lang.Object
-
- org.opengis.test.Validator
-
- org.opengis.test.util.NameValidator
-
public class NameValidator extends Validator
ValidatesGenericNameand related objects from theorg.opengis.utilpackage. This class should not be used directly; use theValidatorsconvenience 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 voiddispatch(GenericName object)Dispatches tovalidate(LocalName)orvalidate(ScopedName).private voidvalidate(GenericName object, java.util.List<? extends LocalName> parsedNames)Performs some tests that are common to all subclasses ofGenericName.voidvalidate(InternationalString object)Ensures that theCharSequencemethods are consistent with thetoString()value.voidvalidate(LocalName object)Ensures that ISO 19103 or GeoAPI restrictions apply.voidvalidate(NameSpace object)Ensures that ISO 19103 or GeoAPI restrictions apply.voidvalidate(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 theCharSequencemethods 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.
-
-