Package org.opengis.test.metadata
Class CitationValidator
- Object
-
- Validator
-
- MetadataValidator
-
- CitationValidator
-
public class CitationValidator extends MetadataValidator
ValidatesCitation
and related objects from theorg.opengis.metadata.citation
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 CitationValidator(ValidatorContainer container)
Creates a new validator instance.
-
Method Summary
Modifier and Type Method Description void
validate(Address object)
Validates the given address.void
validate(Citation object)
Validates the given citation.void
validate(CitationDate... dates)
Validates citation dates.void
validate(Contact object)
Validates the given contact information.void
validate(OnlineResource object)
Validates the given online resource.void
validate(Party object)
Validates the given party.void
validate(Responsibility object)
Validates the given responsible party.void
validate(Telephone object)
Validates the given telephone information.-
Methods inherited from class Validator
conditional, forbidden, mandatory, validate
-
-
-
-
Constructor Detail
-
CitationValidator
public CitationValidator(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
-
validate
public void validate(Citation object)
Validates the given citation.- Parameters:
object
- the object to validate, ornull
.
-
validate
public void validate(CitationDate... dates)
Validates citation dates. If more than one dates is given, then this method will check for the following constraints:DateType.CREATION
shall be before or equals to all other type of dates, ignoring user-defined codes.DateType.LAST_UPDATE
shall be before or equals toDateType.NEXT_UPDATE
.DateType.VALIDITY_BEGINS
shall be before or equals toDateType.VALIDITY_EXPIRES
.
- Parameters:
dates
- the citation dates to validate.- Since:
- 3.1
-
validate
public void validate(Responsibility object)
Validates the given responsible party.- Parameters:
object
- the object to validate, ornull
.- Since:
- 3.1
-
validate
public void validate(Party object)
Validates the given party.- Parameters:
object
- the object to validate, ornull
.- Since:
- 3.1
-
validate
public void validate(Contact object)
Validates the given contact information.- Parameters:
object
- the object to validate, ornull
.- Since:
- 3.1
-
validate
public void validate(Telephone object)
Validates the given telephone information.- Parameters:
object
- the object to validate, ornull
.- Since:
- 3.1
-
validate
public void validate(Address object)
Validates the given address.- Parameters:
object
- the object to validate, ornull
.- Since:
- 3.1
-
validate
public void validate(OnlineResource object)
Validates the given online resource.- Parameters:
object
- the object to validate, ornull
.- Since:
- 3.1
-
-