org.opengis.test
Class ValidatorContainer

Show UML class diagram
Object
  extended by ValidatorContainer
All Implemented Interfaces:
Cloneable

public class ValidatorContainer
extends Object
implements Cloneable

A set of convenience methods for validating GeoAPI implementations. Every validate method defined in this class delegate their work to one of many Validator objects in various packages. Vendors can change the value of fields in this class if they wish to override some validation process.

Customization
All validate(...) methods in this class are final because this class is not the extension point for overriding validation processes. Instead, extend the appropriate Validator subclass and assign an instance to the corresponding field in this class. For example in order to override the validation of GeographicCRS objects, one can do:

ValidatorContainer container = new ValidationContainer();
container.crs = new CRSValidator(container) {
    @Override
    public void validate(GeographicCRS object) {
        super.validate(object);
        // Perform additional validation here.
    }
};

Since:
2.2

Field Summary
 List<Validator> all
          An unmodifiable "live" list of all validators.
 CitationValidator citation
          The validator for Citation and related objects.
 OperationValidator coordinateOperation
          The validator for CoordinateOperation and related objects.
 CRSValidator crs
          The validator for CoordinateReferenceSystem and related objects.
 CSValidator cs
          The validator for CoordinateSystem and related objects.
 DatumValidator datum
          The validator for Datum and related objects.
 ExtentValidator extent
          The validator for Extent and related objects.
 GeometryValidator geometry
          The validator for Geometry and related objects.
 ImageValidator image
          The validator for images and related objects.
 RootValidator metadata
          The validator for Metadata and related objects.
 NameValidator naming
          The validator for GenericName and related objects.
 ParameterValidator parameter
          The validator for ParameterValue and related objects.
 
Constructor Summary
ValidatorContainer()
          Creates a new ValidatorContainer initialized with new Validator instances.
 
Method Summary
 ValidatorContainer clone()
          Returns a new container using the same validators than this instance.
 void dispatch(Object object)
          For each interface implemented by the given object, invokes the corresponding validate(...) method defined in this class (if any).
 void validate(Address object)
          Tests the conformance of the given object.
 void validate(BoundingPolygon object)
          Tests the conformance of the given object.
 void validate(CartesianCS object)
          Tests the conformance of the given object.
 void validate(Citation object)
          Tests the conformance of the given object.
 void validate(CompoundCRS object)
          Validates the given coordinate reference system.
 void validate(ConcatenatedOperation object)
          Tests the conformance of the given object.
 void validate(Contact object)
          Tests the conformance of the given object.
 void validate(Conversion object)
          Tests the conformance of the given object.
 void validate(CoordinateOperation object)
          Tests the conformance of the given object.
 void validate(CoordinateReferenceSystem object)
          Tests the conformance of the given object.
 void validate(CoordinateSystem object)
          Tests the conformance of the given object.
 void validate(CoordinateSystemAxis object)
          Tests the conformance of the given object.
 void validate(CylindricalCS object)
          Tests the conformance of the given object.
 void validate(Datum object)
          Tests the conformance of the given object.
 void validate(DerivedCRS object)
          Validates the given coordinate reference system.
 void validate(DirectPosition object)
          Tests the conformance of the given object.
 void validate(Ellipsoid object)
          Tests the conformance of the given object.
 void validate(EllipsoidalCS object)
          Tests the conformance of the given object.
 void validate(EngineeringCRS object)
          Validates the given coordinate reference system.
 void validate(EngineeringDatum object)
          Tests the conformance of the given object.
 void validate(Envelope object)
          Tests the conformance of the given object.
 void validate(Extent object)
          Tests the conformance of the given object.
 void validate(Formula object)
          Tests the conformance of the given object.
 void validate(GeneralParameterDescriptor object)
          Tests the conformance of the given object.
 void validate(GeneralParameterValue object)
          Tests the conformance of the given object.
 void validate(GenericName object)
          Tests the conformance of the given object.
 void validate(GeocentricCRS object)
          Tests the conformance of the given object.
 void validate(GeodeticDatum object)
          Tests the conformance of the given object.
 void validate(GeographicBoundingBox object)
          Tests the conformance of the given object.
 void validate(GeographicCRS object)
          Tests the conformance of the given object.
 void validate(GeographicDescription object)
          Tests the conformance of the given object.
 void validate(GeographicExtent object)
          Tests the conformance of the given object.
 void validate(IdentifiedObject object)
          Tests the conformance of the given object.
 void validate(Identifier object)
          Tests the conformance of the given object.
 void validate(IIOMetadataFormat object)
          Tests the conformance of the given object.
 void validate(ImageCRS object)
          Validates the given coordinate reference system.
 void validate(ImageDatum object)
          Tests the conformance of the given object.
 void validate(ImageReaderSpi object)
          Tests the conformance of the given object.
 void validate(ImageWriterSpi object)
          Tests the conformance of the given object.
 void validate(InternationalString object)
          Tests the conformance of the given object.
 void validate(LinearCS object)
          Tests the conformance of the given object.
 void validate(LocalName object)
          Tests the conformance of the given object.
 void validate(MathTransform object)
          Tests the conformance of the given object.
 void validate(Metadata object)
          Tests the conformance of the given object.
 void validate(NameSpace object)
          Tests the conformance of the given object.
 void validate(OnlineResource object)
          Tests the conformance of the given object.
 void validate(OperationMethod object)
          Tests the conformance of the given object.
 void validate(ParameterDescriptor<?> object)
          Tests the conformance of the given object.
 void validate(ParameterDescriptorGroup object)
          Tests the conformance of the given object.
 void validate(ParameterValue<?> object)
          Tests the conformance of the given object.
 void validate(ParameterValueGroup object)
          Tests the conformance of the given object.
 void validate(PassThroughOperation object)
          Tests the conformance of the given object.
 void validate(PolarCS object)
          Tests the conformance of the given object.
 void validate(PrimeMeridian object)
          Tests the conformance of the given object.
 void validate(ProjectedCRS object)
          Validates the given coordinate reference system.
 void validate(ReferenceIdentifier object)
          Tests the conformance of the given object.
 void validate(ResponsibleParty object)
          Tests the conformance of the given object.
 void validate(ScopedName object)
          Tests the conformance of the given object.
 void validate(SphericalCS object)
          Tests the conformance of the given object.
 void validate(Telephone object)
          Tests the conformance of the given object.
 void validate(TemporalCRS object)
          Validates the given coordinate reference system.
 void validate(TemporalDatum object)
          Tests the conformance of the given object.
 void validate(TemporalExtent object)
          Tests the conformance of the given object.
 void validate(TimeCS object)
          Tests the conformance of the given object.
 void validate(Transformation object)
          Tests the conformance of the given object.
 void validate(UserDefinedCS object)
          Tests the conformance of the given object.
 void validate(VerticalCRS object)
          Validates the given coordinate reference system.
 void validate(VerticalCS object)
          Tests the conformance of the given object.
 void validate(VerticalDatum object)
          Tests the conformance of the given object.
 void validate(VerticalExtent object)
          Tests the conformance of the given object.
 
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

naming

public NameValidator naming
The validator for GenericName and related objects. Vendors can change this field to a different validator, or change the setting of the referenced validator. This field shall not be set to null however.


metadata

public RootValidator metadata
The validator for Metadata and related objects. Vendors can change this field to a different validator, or change the setting of the referenced validator. This field shall not be set to null however.

Since:
3.1

citation

public CitationValidator citation
The validator for Citation and related objects. Vendors can change this field to a different validator, or change the setting of the referenced validator. This field shall not be set to null however.


extent

public ExtentValidator extent
The validator for Extent and related objects. Vendors can change this field to a different validator, or change the setting of the referenced validator. This field shall not be set to null however.


datum

public DatumValidator datum
The validator for Datum and related objects. Vendors can change this field to a different validator, or change the setting of the referenced validator. This field shall not be set to null however.


cs

public CSValidator cs
The validator for CoordinateSystem and related objects. Vendors can change this field to a different validator, or change the setting of the referenced validator. This field shall not be set to null however.


crs

public CRSValidator crs
The validator for CoordinateReferenceSystem and related objects. Vendors can change this field to a different validator, or change the setting of the referenced validator. This field shall not be set to null however.


parameter

public ParameterValidator parameter
The validator for ParameterValue and related objects. Vendors can change this field to a different validator, or change the setting of the referenced validator. This field shall not be set to null however.


coordinateOperation

public OperationValidator coordinateOperation
The validator for CoordinateOperation and related objects. Vendors can change this field to a different validator, or change the setting of the referenced validator. This field shall not be set to null however.


geometry

public GeometryValidator geometry
The validator for Geometry and related objects. Vendors can change this field to a different validator, or change the setting of the referenced validator. This field shall not be set to null however.


image

public ImageValidator image
The validator for images and related objects. Vendors can change this field to a different validator, or change the setting of the referenced validator. This field shall not be set to null however.


all

public final List<Validator> all
An unmodifiable "live" list of all validators. Any change to the value of a field declared in this class is reflected immediately in this list (so this list is unmodifiable but not immutable). This list is convenient if the same setting must be applied on all validators, for example in order to change their logger setting or to set their set requireMandatoryAttributes field to false.

Constructor Detail

ValidatorContainer

public ValidatorContainer()
Creates a new ValidatorContainer initialized with new Validator instances. Note that this constructor does not inherit the configuration of the Validators.DEFAULT instance. To inherit that default configuration, use DEFAULT.clone() instead.

Method Detail

clone

public ValidatorContainer clone()
Returns a new container using the same validators than this instance. After this method call, the two ValidatorContainer instances will share the same Validator instances.

This method is typically used in order to use the default configuration with a few changes, as in the example below:

 ValidatorContainer myContainer = Validators.DEFAULT.clone();
 myContainer.crs = new CRSValidator();
 myContainer.crs.enforceStandardNames = false;

Overrides:
clone in class Object
Returns:
A new ValidatorContainer instance using the same Validator instances.

dispatch

public final void dispatch(Object object)
For each interface implemented by the given object, invokes the corresponding validate(...) method defined in this class (if any). Use this method only if the type is unknown at compile-time.

Parameters:
object - The object to dispatch to validate(...) methods, or null.

validate

public final void validate(Metadata object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
Since:
3.1
See Also:
RootValidator.validate(Metadata)

validate

public final void validate(Citation object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CitationValidator.validate(Citation)

validate

public final void validate(ResponsibleParty object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
Since:
3.1
See Also:
CitationValidator.validate(ResponsibleParty)

validate

public final void validate(Contact object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
Since:
3.1
See Also:
CitationValidator.validate(Contact)

validate

public final void validate(Telephone object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
Since:
3.1
See Also:
CitationValidator.validate(Telephone)

validate

public final void validate(Address object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
Since:
3.1
See Also:
CitationValidator.validate(Address)

validate

public final void validate(OnlineResource object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
Since:
3.1
See Also:
CitationValidator.validate(OnlineResource)

validate

public final void validate(Extent object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ExtentValidator.validate(Extent)

validate

public final void validate(TemporalExtent object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ExtentValidator.validate(TemporalExtent)

validate

public final void validate(VerticalExtent object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ExtentValidator.validate(VerticalExtent)

validate

public final void validate(GeographicExtent object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ExtentValidator.dispatch(GeographicExtent)

validate

public final void validate(GeographicDescription object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ExtentValidator.validate(GeographicDescription)

validate

public final void validate(BoundingPolygon object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ExtentValidator.validate(BoundingPolygon)

validate

public final void validate(GeographicBoundingBox object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ExtentValidator.validate(GeographicBoundingBox)

validate

public final void validate(Envelope object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
GeometryValidator.validate(Envelope)

validate

public final void validate(DirectPosition object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
GeometryValidator.validate(DirectPosition)

validate

public final void validate(CoordinateReferenceSystem object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CRSValidator.dispatch(CoordinateReferenceSystem)

validate

public final void validate(GeocentricCRS object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CRSValidator.validate(GeocentricCRS)

validate

public final void validate(GeographicCRS object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CRSValidator.validate(GeographicCRS)

validate

public final void validate(ProjectedCRS object)
Validates the given coordinate reference system.

Parameters:
object - The object to validate, or null.
See Also:
CRSValidator.validate(ProjectedCRS)

validate

public final void validate(DerivedCRS object)
Validates the given coordinate reference system.

Parameters:
object - The object to validate, or null.
See Also:
CRSValidator.validate(DerivedCRS)

validate

public final void validate(ImageCRS object)
Validates the given coordinate reference system.

Parameters:
object - The object to validate, or null.
See Also:
CRSValidator.validate(ImageCRS)

validate

public final void validate(EngineeringCRS object)
Validates the given coordinate reference system.

Parameters:
object - The object to validate, or null.
See Also:
CRSValidator.validate(EngineeringCRS)

validate

public final void validate(VerticalCRS object)
Validates the given coordinate reference system.

Parameters:
object - The object to validate, or null.
See Also:
CRSValidator.validate(VerticalCRS)

validate

public final void validate(TemporalCRS object)
Validates the given coordinate reference system.

Parameters:
object - The object to validate, or null.
See Also:
CRSValidator.validate(TemporalCRS)

validate

public final void validate(CompoundCRS object)
Validates the given coordinate reference system.

Parameters:
object - The object to validate, or null.
See Also:
CRSValidator.validate(CompoundCRS)

validate

public final void validate(CoordinateSystem object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CSValidator.dispatch(CoordinateSystem)

validate

public final void validate(CartesianCS object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CSValidator.validate(CartesianCS)

validate

public final void validate(EllipsoidalCS object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CSValidator.validate(EllipsoidalCS)

validate

public final void validate(SphericalCS object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CSValidator.validate(SphericalCS)

validate

public final void validate(CylindricalCS object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CSValidator.validate(CylindricalCS)

validate

public final void validate(PolarCS object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CSValidator.validate(PolarCS)

validate

public final void validate(LinearCS object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CSValidator.validate(LinearCS)

validate

public final void validate(VerticalCS object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CSValidator.validate(VerticalCS)

validate

public final void validate(TimeCS object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CSValidator.validate(TimeCS)

validate

public final void validate(UserDefinedCS object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CSValidator.validate(UserDefinedCS)

validate

public final void validate(CoordinateSystemAxis object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
CSValidator.validate(CoordinateSystemAxis)

validate

public final void validate(Datum object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
DatumValidator.dispatch(Datum)

validate

public final void validate(PrimeMeridian object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
DatumValidator.validate(PrimeMeridian)

validate

public final void validate(Ellipsoid object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
DatumValidator.validate(Ellipsoid)

validate

public final void validate(GeodeticDatum object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
DatumValidator.validate(GeodeticDatum)

validate

public final void validate(VerticalDatum object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
DatumValidator.validate(VerticalDatum)

validate

public final void validate(TemporalDatum object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
DatumValidator.validate(TemporalDatum)

validate

public final void validate(ImageDatum object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
DatumValidator.validate(ImageDatum)

validate

public final void validate(EngineeringDatum object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
DatumValidator.validate(EngineeringDatum)

validate

public final void validate(CoordinateOperation object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
OperationValidator.dispatch(CoordinateOperation)

validate

public final void validate(Conversion object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
OperationValidator.validate(Conversion)

validate

public final void validate(Transformation object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
OperationValidator.validate(Transformation)

validate

public final void validate(ConcatenatedOperation object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
OperationValidator.validate(ConcatenatedOperation)

validate

public final void validate(PassThroughOperation object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
OperationValidator.validate(PassThroughOperation)

validate

public final void validate(OperationMethod object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
OperationValidator.validate(OperationMethod)

validate

public final void validate(Formula object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
OperationValidator.validate(OperationMethod)

validate

public final void validate(MathTransform object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
OperationValidator.validate(MathTransform)

validate

public final void validate(GeneralParameterDescriptor object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ParameterValidator.dispatch(GeneralParameterDescriptor)

validate

public final void validate(ParameterDescriptor<?> object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ParameterValidator.validate(ParameterDescriptor)

validate

public final void validate(ParameterDescriptorGroup object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ParameterValidator.validate(ParameterDescriptorGroup)

validate

public final void validate(GeneralParameterValue object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ParameterValidator.dispatch(GeneralParameterValue)

validate

public final void validate(ParameterValue<?> object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ParameterValidator.validate(ParameterValue)

validate

public final void validate(ParameterValueGroup object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ParameterValidator.validate(ParameterValueGroup)

validate

public final void validate(IdentifiedObject object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ReferencingValidator.dispatchObject(IdentifiedObject)

validate

public final void validate(ReferenceIdentifier object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ReferencingValidator.validate(ReferenceIdentifier)

validate

public final void validate(Identifier object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
Since:
3.1
See Also:
RootValidator.validate(Identifier)

validate

public final void validate(GenericName object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
NameValidator.dispatch(GenericName)

validate

public final void validate(LocalName object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
NameValidator.validate(LocalName)

validate

public final void validate(ScopedName object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
NameValidator.validate(ScopedName)

validate

public final void validate(NameSpace object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
NameValidator.validate(NameSpace)

validate

public final void validate(InternationalString object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
NameValidator.validate(InternationalString)

validate

public final void validate(ImageReaderSpi object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ImageValidator.validate(ImageReaderSpi)

validate

public final void validate(ImageWriterSpi object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ImageValidator.validate(ImageWriterSpi)

validate

public void validate(IIOMetadataFormat object)
Tests the conformance of the given object.

Parameters:
object - The object to test, or null.
See Also:
ImageValidator.validate(IIOMetadataFormat)


Copyright © 1994-2013 Open Geospatial Consortium. All Rights Reserved.