001/*
002 *    GeoAPI - Java interfaces for OGC/ISO standards
003 *    http://www.geoapi.org
004 *
005 *    Copyright (C) 2008-2019 Open Geospatial Consortium, Inc.
006 *    All Rights Reserved. http://www.opengeospatial.org/ogc/legal
007 *
008 *    Permission to use, copy, and modify this software and its documentation, with
009 *    or without modification, for any purpose and without fee or royalty is hereby
010 *    granted, provided that you include the following on ALL copies of the software
011 *    and documentation or portions thereof, including modifications, that you make:
012 *
013 *    1. The full text of this NOTICE in a location viewable to users of the
014 *       redistributed or derivative work.
015 *    2. Notice of any changes or modifications to the OGC files, including the
016 *       date changes were made.
017 *
018 *    THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
019 *    NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
020 *    TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
021 *    THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
022 *    PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
023 *
024 *    COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
025 *    CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
026 *
027 *    The name and trademarks of copyright holders may NOT be used in advertising or
028 *    publicity pertaining to the software without specific, written prior permission.
029 *    Title to copyright in this software and any associated documentation will at all
030 *    times remain with copyright holders.
031 */
032package org.opengis.test;
033
034import java.util.List;
035import java.util.AbstractList;
036import javax.imageio.spi.ImageReaderSpi;
037import javax.imageio.spi.ImageWriterSpi;
038import javax.imageio.metadata.IIOMetadataFormat;
039
040import org.opengis.util.*;
041import org.opengis.metadata.*;
042import org.opengis.metadata.extent.*;
043import org.opengis.metadata.citation.*;
044import org.opengis.geometry.*;
045import org.opengis.parameter.*;
046import org.opengis.referencing.*;
047import org.opengis.referencing.cs.*;
048import org.opengis.referencing.crs.*;
049import org.opengis.referencing.datum.*;
050import org.opengis.referencing.operation.*;
051
052import org.opengis.test.util.*;
053import org.opengis.test.metadata.*;
054import org.opengis.test.geometry.*;
055import org.opengis.test.referencing.*;
056import org.opengis.test.coverage.image.*;
057
058
059/**
060 * A set of convenience methods for validating GeoAPI implementations. Every {@code validate}
061 * method defined in this class delegate their work to one of many {@code Validator} objects
062 * in various packages. Vendors can change the value of fields in this class if they wish to
063 * override some validation process.
064 *
065 * <p><b><u>Customization</u></b><br>
066 * All {@code validate(…)} methods in this class are final because this class is not the extension
067 * point for overriding validation processes. Instead, extend the appropriate {@link Validator}
068 * subclass and assign an instance to the corresponding field in this class. For example in order
069 * to override the validation of {@link org.opengis.referencing.crs.GeographicCRS} objects, one
070 * can do:</p>
071 *
072 * <blockquote><pre>ValidatorContainer container = new ValidationContainer();
073 *container.crs = new {@linkplain org.opengis.test.referencing.CRSValidator}(container) {
074 *    &#64;Override
075 *    public void validate(GeographicCRS object) {
076 *        super.validate(object);
077 *        // Perform additional validation here.
078 *    }
079 *};</pre></blockquote>
080 *
081 * @author  Martin Desruisseaux (Geomatys)
082 * @version 3.1
083 * @since   2.2
084 */
085public class ValidatorContainer implements Cloneable {
086    /**
087     * The validator for {@link GenericName} and related objects.
088     * Vendors can change this field to a different validator, or change the setting
089     * of the referenced validator. This field shall not be set to {@code null} however.
090     */
091    public NameValidator naming = new NameValidator(this);
092
093    /**
094     * The validator for {@link Metadata} and related objects.
095     * Vendors can change this field to a different validator, or change the setting
096     * of the referenced validator. This field shall not be set to {@code null} however.
097     *
098     * @since 3.1
099     */
100    public MetadataBaseValidator metadata = new MetadataBaseValidator(this);
101
102    /**
103     * The validator for {@link Citation} and related objects.
104     * Vendors can change this field to a different validator, or change the setting
105     * of the referenced validator. This field shall not be set to {@code null} however.
106     */
107    public CitationValidator citation = new CitationValidator(this);
108
109    /**
110     * The validator for {@link Extent} and related objects.
111     * Vendors can change this field to a different validator, or change the setting
112     * of the referenced validator. This field shall not be set to {@code null} however.
113     */
114    public ExtentValidator extent = new ExtentValidator(this);
115
116    /**
117     * The validator for {@link Datum} and related objects.
118     * Vendors can change this field to a different validator, or change the setting
119     * of the referenced validator. This field shall not be set to {@code null} however.
120     */
121    public DatumValidator datum = new DatumValidator(this);
122
123    /**
124     * The validator for {@link CoordinateSystem} and related objects.
125     * Vendors can change this field to a different validator, or change the setting
126     * of the referenced validator. This field shall not be set to {@code null} however.
127     */
128    public CSValidator cs = new CSValidator(this);
129
130    /**
131     * The validator for {@link CoordinateReferenceSystem} and related objects.
132     * Vendors can change this field to a different validator, or change the setting
133     * of the referenced validator. This field shall not be set to {@code null} however.
134     */
135    public CRSValidator crs = new CRSValidator(this);
136
137    /**
138     * The validator for {@link ParameterValue} and related objects.
139     * Vendors can change this field to a different validator, or change the setting
140     * of the referenced validator. This field shall not be set to {@code null} however.
141     */
142    public ParameterValidator parameter = new ParameterValidator(this);
143
144    /**
145     * The validator for {@link CoordinateOperation} and related objects.
146     * Vendors can change this field to a different validator, or change the setting
147     * of the referenced validator. This field shall not be set to {@code null} however.
148     */
149    public OperationValidator coordinateOperation = new OperationValidator(this);
150
151    /**
152     * The validator for {@link Geometry} and related objects.
153     * Vendors can change this field to a different validator, or change the setting
154     * of the referenced validator. This field shall not be set to {@code null} however.
155     */
156    public GeometryValidator geometry = new GeometryValidator(this);
157
158    /**
159     * The validator for images and related objects.
160     * Vendors can change this field to a different validator, or change the setting
161     * of the referenced validator. This field shall not be set to {@code null} however.
162     */
163    public ImageValidator image = new ImageValidator(this);
164
165    /**
166     * An unmodifiable "live" list of all validators. Any change to the value of a field declared
167     * in this class is reflected immediately in this list (so this list is <cite>unmodifiable</cite>
168     * but not <cite>immutable</cite>). This list is convenient if the same setting must be applied
169     * on all validators, for example in order to change their {@link Validator#logger logger} setting
170     * or to set their set {@link Validator#requireMandatoryAttributes requireMandatoryAttributes}
171     * field to {@code false}.
172     */
173    public final List<Validator> all = new AbstractList<Validator>() {
174        @Override
175        public int size() {
176            return 11;
177        }
178
179        @Override
180        public Validator get(int index) {
181            switch (index) {
182                case  0: return naming;
183                case  1: return metadata;
184                case  2: return citation;
185                case  3: return extent;
186                case  4: return datum;
187                case  5: return cs;
188                case  6: return crs;
189                case  7: return parameter;
190                case  8: return coordinateOperation;
191                case  9: return geometry;
192                case 10: return image;
193                default: throw new IndexOutOfBoundsException(String.valueOf(index));
194            }
195        }
196    };
197
198    /**
199     * Creates a new {@code ValidatorContainer} initialized with new {@link Validator} instances.
200     * Note that this constructor does not inherit the configuration of the {@link Validators#DEFAULT}
201     * instance. To inherit that default configuration, use <code>DEFAULT.{@linkplain #clone()}</code>
202     * instead.
203     */
204    public ValidatorContainer() {
205    }
206
207    /**
208     * Returns a new container using the same validators than this instance. After this method call,
209     * the two {@code ValidatorContainer} instances will share the same {@link Validator} instances.
210     *
211     * <p>This method is typically used in order to use the default configuration with a few
212     * changes, as in the example below:</p>
213     *
214     * <blockquote><pre> ValidatorContainer myContainer = Validators.DEFAULT.clone();
215     * myContainer.crs = new CRSValidator();
216     * myContainer.crs.{@linkplain CRSValidator#enforceStandardNames enforceStandardNames} = false;</pre></blockquote>
217     *
218     * @return a new {@code ValidatorContainer} instance using the same {@link Validator} instances.
219     */
220    @Override
221    public ValidatorContainer clone() {
222        try {
223            return (ValidatorContainer) super.clone();
224        } catch (CloneNotSupportedException e) {
225            throw new AssertionError(e);                    // Should never happen.
226        }
227    }
228
229    /**
230     * For each interface implemented by the given object, invokes the corresponding
231     * {@code validate(…)} method defined in this class (if any).
232     * Use this method only if the type is unknown at compile-time.
233     *
234     * @param  object The object to dispatch to {@code validate(…)} methods, or {@code null}.
235     */
236    public final void dispatch(final Object object) {
237        if (object instanceof Metadata)              validate((Metadata)              object);
238        if (object instanceof Citation)              validate((Citation)              object);
239        if (object instanceof CitationDate)          validate((CitationDate)          object);
240        if (object instanceof CitationDate[])        validate((CitationDate[])        object);
241        if (object instanceof Responsibility)        validate((Responsibility)        object);
242        if (object instanceof Party)                 validate((Party)                 object);
243        if (object instanceof Contact)               validate((Contact)               object);
244        if (object instanceof Telephone)             validate((Telephone)             object);
245        if (object instanceof Address)               validate((Address)               object);
246        if (object instanceof OnlineResource)        validate((OnlineResource)        object);
247        if (object instanceof Extent)                validate((Extent)                object);
248        if (object instanceof GeographicExtent)      validate((GeographicExtent)      object);
249        if (object instanceof VerticalExtent)        validate((VerticalExtent)        object);
250        if (object instanceof TemporalExtent)        validate((TemporalExtent)        object);
251        if (object instanceof IdentifiedObject)      validate((IdentifiedObject)      object);
252        if (object instanceof Identifier)            validate((Identifier)            object);
253        if (object instanceof GenericName)           validate((GenericName)           object);
254        if (object instanceof NameSpace)             validate((NameSpace)             object);
255        if (object instanceof GeneralParameterValue) validate((GeneralParameterValue) object);
256        if (object instanceof Envelope)              validate((Envelope)              object);
257        if (object instanceof DirectPosition)        validate((DirectPosition)        object);
258        if (object instanceof InternationalString)   validate((InternationalString)   object);
259    }
260
261    /**
262     * Tests the conformance of the given object.
263     *
264     * @param  object  the object to test, or {@code null}.
265     *
266     * @see MetadataBaseValidator#validate(Metadata)
267     *
268     * @since 3.1
269     */
270    public final void validate(final Metadata object) {
271        metadata.validate(object);
272    }
273
274    /**
275     * Tests the conformance of the given object.
276     *
277     * @param  object  the object to test, or {@code null}.
278     *
279     * @see CitationValidator#validate(Citation)
280     */
281    public final void validate(final Citation object) {
282        citation.validate(object);
283    }
284
285    /**
286     * Tests the conformance of the given objects.
287     *
288     * @param  object  the objects to test, or {@code null}.
289     *
290     * @see CitationValidator#validate(CitationDate...)
291     *
292     * @since 3.1
293     */
294    public final void validate(final CitationDate... object) {
295        citation.validate(object);
296    }
297
298    /**
299     * Tests the conformance of the given object.
300     *
301     * @param  object  the object to test, or {@code null}.
302     *
303     * @see CitationValidator#validate(Responsibility)
304     *
305     * @since 3.1
306     */
307    public final void validate(final Responsibility object) {
308        citation.validate(object);
309    }
310
311    /**
312     * Tests the conformance of the given object.
313     *
314     * @param  object  the object to test, or {@code null}.
315     *
316     * @see CitationValidator#validate(Party)
317     *
318     * @since 3.1
319     */
320    public final void validate(final Party object) {
321        citation.validate(object);
322    }
323
324    /**
325     * Tests the conformance of the given object.
326     *
327     * @param  object  the object to test, or {@code null}.
328     *
329     * @see CitationValidator#validate(Contact)
330     *
331     * @since 3.1
332     */
333    public final void validate(final Contact object) {
334        citation.validate(object);
335    }
336
337    /**
338     * Tests the conformance of the given object.
339     *
340     * @param  object  the object to test, or {@code null}.
341     *
342     * @see CitationValidator#validate(Telephone)
343     *
344     * @since 3.1
345     */
346    public final void validate(final Telephone object) {
347        citation.validate(object);
348    }
349
350    /**
351     * Tests the conformance of the given object.
352     *
353     * @param  object  the object to test, or {@code null}.
354     *
355     * @see CitationValidator#validate(Address)
356     *
357     * @since 3.1
358     */
359    public final void validate(final Address object) {
360        citation.validate(object);
361    }
362
363    /**
364     * Tests the conformance of the given object.
365     *
366     * @param  object  the object to test, or {@code null}.
367     *
368     * @see CitationValidator#validate(OnlineResource)
369     *
370     * @since 3.1
371     */
372    public final void validate(final OnlineResource object) {
373        citation.validate(object);
374    }
375
376    /**
377     * Tests the conformance of the given object.
378     *
379     * @param  object  the object to test, or {@code null}.
380     *
381     * @see ExtentValidator#validate(Extent)
382     */
383    public final void validate(final Extent object) {
384        extent.validate(object);
385    }
386
387    /**
388     * Tests the conformance of the given object.
389     *
390     * @param  object  the object to test, or {@code null}.
391     *
392     * @see ExtentValidator#validate(TemporalExtent)
393     */
394    public final void validate(final TemporalExtent object) {
395        extent.validate(object);
396    }
397
398    /**
399     * Tests the conformance of the given object.
400     *
401     * @param  object  the object to test, or {@code null}.
402     *
403     * @see ExtentValidator#validate(VerticalExtent)
404     */
405    public final void validate(final VerticalExtent object) {
406        extent.validate(object);
407    }
408
409    /**
410     * Tests the conformance of the given object.
411     *
412     * @param  object  the object to test, or {@code null}.
413     *
414     * @see ExtentValidator#dispatch(GeographicExtent)
415     */
416    public final void validate(final GeographicExtent object) {
417        extent.dispatch(object);
418    }
419
420    /**
421     * Tests the conformance of the given object.
422     *
423     * @param  object  the object to test, or {@code null}.
424     *
425     * @see ExtentValidator#validate(GeographicDescription)
426     */
427    public final void validate(final GeographicDescription object) {
428        extent.validate(object);
429    }
430
431    /**
432     * Tests the conformance of the given object.
433     *
434     * @param  object  the object to test, or {@code null}.
435     *
436     * @see ExtentValidator#validate(BoundingPolygon)
437     */
438    public final void validate(final BoundingPolygon object) {
439        extent.validate(object);
440    }
441
442    /**
443     * Tests the conformance of the given object.
444     *
445     * @param  object  the object to test, or {@code null}.
446     *
447     * @see ExtentValidator#validate(GeographicBoundingBox)
448     */
449    public final void validate(final GeographicBoundingBox object) {
450        extent.validate(object);
451    }
452
453    /**
454     * Tests the conformance of the given object.
455     *
456     * @param  object  the object to test, or {@code null}.
457     *
458     * @see GeometryValidator#validate(Envelope)
459     */
460    public final void validate(final Envelope object) {
461        geometry.validate(object);
462    }
463
464    /**
465     * Tests the conformance of the given object.
466     *
467     * @param  object  the object to test, or {@code null}.
468     *
469     * @see GeometryValidator#validate(DirectPosition)
470     */
471    public final void validate(final DirectPosition object) {
472        geometry.validate(object);
473    }
474
475    /**
476     * Tests the conformance of the given object.
477     *
478     * @param  object  the object to test, or {@code null}.
479     *
480     * @see CRSValidator#dispatch(CoordinateReferenceSystem)
481     */
482    public final void validate(final CoordinateReferenceSystem object) {
483        crs.dispatch(object);
484    }
485
486    /**
487     * Tests the conformance of the given object.
488     *
489     * @param  object  the object to test, or {@code null}.
490     *
491     * @see CRSValidator#validate(GeocentricCRS)
492     */
493    public final void validate(final GeocentricCRS object) {
494        crs.validate(object);
495    }
496
497    /**
498     * Tests the conformance of the given object.
499     *
500     * @param  object  the object to test, or {@code null}.
501     *
502     * @see CRSValidator#validate(GeographicCRS)
503     */
504    public final void validate(final GeographicCRS object) {
505        crs.validate(object);
506    }
507
508    /**
509     * Validates the given coordinate reference system.
510     *
511     * @param  object  the object to validate, or {@code null}.
512     *
513     * @see CRSValidator#validate(ProjectedCRS)
514     */
515    public final void validate(final ProjectedCRS object) {
516        crs.validate(object);
517    }
518
519    /**
520     * Validates the given coordinate reference system.
521     *
522     * @param  object  the object to validate, or {@code null}.
523     *
524     * @see CRSValidator#validate(DerivedCRS)
525     */
526    public final void validate(final DerivedCRS object) {
527        crs.validate(object);
528    }
529
530    /**
531     * Validates the given coordinate reference system.
532     *
533     * @param  object  the object to validate, or {@code null}.
534     *
535     * @see CRSValidator#validate(ImageCRS)
536     */
537    public final void validate(final ImageCRS object) {
538        crs.validate(object);
539    }
540
541    /**
542     * Validates the given coordinate reference system.
543     *
544     * @param  object  the object to validate, or {@code null}.
545     *
546     * @see CRSValidator#validate(EngineeringCRS)
547     */
548    public final void validate(final EngineeringCRS object) {
549        crs.validate(object);
550    }
551
552    /**
553     * Validates the given coordinate reference system.
554     *
555     * @param  object  the object to validate, or {@code null}.
556     *
557     * @see CRSValidator#validate(VerticalCRS)
558     */
559    public final void validate(final VerticalCRS object) {
560        crs.validate(object);
561    }
562
563    /**
564     * Validates the given coordinate reference system.
565     *
566     * @param  object  the object to validate, or {@code null}.
567     *
568     * @see CRSValidator#validate(TemporalCRS)
569     */
570    public final void validate(final TemporalCRS object) {
571        crs.validate(object);
572    }
573
574    /**
575     * Validates the given coordinate reference system.
576     *
577     * @param  object  the object to validate, or {@code null}.
578     *
579     * @see CRSValidator#validate(CompoundCRS)
580     */
581    public final void validate(final CompoundCRS object) {
582        crs.validate(object);
583    }
584
585    /**
586     * Tests the conformance of the given object.
587     *
588     * @param  object  the object to test, or {@code null}.
589     *
590     * @see CSValidator#dispatch(CoordinateSystem)
591     */
592    public final void validate(final CoordinateSystem object) {
593        cs.dispatch(object);
594    }
595
596    /**
597     * Tests the conformance of the given object.
598     *
599     * @param  object  the object to test, or {@code null}.
600     *
601     * @see CSValidator#validate(CartesianCS)
602     */
603    public final void validate(final CartesianCS object) {
604        cs.validate(object);
605    }
606
607    /**
608     * Tests the conformance of the given object.
609     *
610     * @param  object  the object to test, or {@code null}.
611     *
612     * @see CSValidator#validate(EllipsoidalCS)
613     */
614    public final void validate(final EllipsoidalCS object) {
615        cs.validate(object);
616    }
617
618    /**
619     * Tests the conformance of the given object.
620     *
621     * @param  object  the object to test, or {@code null}.
622     *
623     * @see CSValidator#validate(SphericalCS)
624     */
625    public final void validate(final SphericalCS object) {
626        cs.validate(object);
627    }
628
629    /**
630     * Tests the conformance of the given object.
631     *
632     * @param  object  the object to test, or {@code null}.
633     *
634     * @see CSValidator#validate(CylindricalCS)
635     */
636    public final void validate(final CylindricalCS object) {
637        cs.validate(object);
638    }
639
640    /**
641     * Tests the conformance of the given object.
642     *
643     * @param  object  the object to test, or {@code null}.
644     *
645     * @see CSValidator#validate(PolarCS)
646     */
647    public final void validate(final PolarCS object) {
648        cs.validate(object);
649    }
650
651    /**
652     * Tests the conformance of the given object.
653     *
654     * @param  object  the object to test, or {@code null}.
655     *
656     * @see CSValidator#validate(LinearCS)
657     */
658    public final void validate(final LinearCS object) {
659        cs.validate(object);
660    }
661
662    /**
663     * Tests the conformance of the given object.
664     *
665     * @param  object  the object to test, or {@code null}.
666     *
667     * @see CSValidator#validate(VerticalCS)
668     */
669    public final void validate(final VerticalCS object) {
670        cs.validate(object);
671    }
672
673    /**
674     * Tests the conformance of the given object.
675     *
676     * @param  object  the object to test, or {@code null}.
677     *
678     * @see CSValidator#validate(TimeCS)
679     */
680    public final void validate(final TimeCS object) {
681        cs.validate(object);
682    }
683
684    /**
685     * Tests the conformance of the given object.
686     *
687     * @param  object  the object to test, or {@code null}.
688     *
689     * @see CSValidator#validate(UserDefinedCS)
690     */
691    public final void validate(final UserDefinedCS object) {
692        cs.validate(object);
693    }
694
695    /**
696     * Tests the conformance of the given object.
697     *
698     * @param  object  the object to test, or {@code null}.
699     *
700     * @see CSValidator#validate(CoordinateSystemAxis)
701     */
702    public final void validate(final CoordinateSystemAxis object) {
703        cs.validate(object);
704    }
705
706    /**
707     * Tests the conformance of the given object.
708     *
709     * @param  object  the object to test, or {@code null}.
710     *
711     * @see DatumValidator#dispatch(Datum)
712     */
713    public final void validate(final Datum object) {
714        datum.dispatch(object);
715    }
716
717    /**
718     * Tests the conformance of the given object.
719     *
720     * @param  object  the object to test, or {@code null}.
721     *
722     * @see DatumValidator#validate(PrimeMeridian)
723     */
724    public final void validate(final PrimeMeridian object) {
725        datum.validate(object);
726    }
727
728    /**
729     * Tests the conformance of the given object.
730     *
731     * @param  object  the object to test, or {@code null}.
732     *
733     * @see DatumValidator#validate(Ellipsoid)
734     */
735    public final void validate(final Ellipsoid object) {
736        datum.validate(object);
737    }
738
739    /**
740     * Tests the conformance of the given object.
741     *
742     * @param  object  the object to test, or {@code null}.
743     *
744     * @see DatumValidator#validate(GeodeticDatum)
745     */
746    public final void validate(final GeodeticDatum object) {
747        datum.validate(object);
748    }
749
750    /**
751     * Tests the conformance of the given object.
752     *
753     * @param  object  the object to test, or {@code null}.
754     *
755     * @see DatumValidator#validate(VerticalDatum)
756     */
757    public final void validate(final VerticalDatum object) {
758        datum.validate(object);
759    }
760
761    /**
762     * Tests the conformance of the given object.
763     *
764     * @param  object  the object to test, or {@code null}.
765     *
766     * @see DatumValidator#validate(TemporalDatum)
767     */
768    public final void validate(final TemporalDatum object) {
769        datum.validate(object);
770    }
771
772    /**
773     * Tests the conformance of the given object.
774     *
775     * @param  object  the object to test, or {@code null}.
776     *
777     * @see DatumValidator#validate(ImageDatum)
778     */
779    public final void validate(final ImageDatum object) {
780        datum.validate(object);
781    }
782
783    /**
784     * Tests the conformance of the given object.
785     *
786     * @param  object  the object to test, or {@code null}.
787     *
788     * @see DatumValidator#validate(EngineeringDatum)
789     */
790    public final void validate(final EngineeringDatum object) {
791        datum.validate(object);
792    }
793
794    /**
795     * Tests the conformance of the given object.
796     *
797     * @param  object  the object to test, or {@code null}.
798     *
799     * @see OperationValidator#dispatch(CoordinateOperation)
800     */
801    public final void validate(final CoordinateOperation object) {
802        coordinateOperation.dispatch(object);
803    }
804
805    /**
806     * Tests the conformance of the given object.
807     *
808     * @param  object  the object to test, or {@code null}.
809     *
810     * @see OperationValidator#validate(Conversion)
811     */
812    public final void validate(final Conversion object) {
813        coordinateOperation.validate(object);
814    }
815
816    /**
817     * Tests the conformance of the given object.
818     *
819     * @param  object  the object to test, or {@code null}.
820     *
821     * @see OperationValidator#validate(Transformation)
822     */
823    public final void validate(final Transformation object) {
824        coordinateOperation.validate(object);
825    }
826
827    /**
828     * Tests the conformance of the given object.
829     *
830     * @param  object  the object to test, or {@code null}.
831     *
832     * @see OperationValidator#validate(ConcatenatedOperation)
833     */
834    public final void validate(final ConcatenatedOperation object) {
835        coordinateOperation.validate(object);
836    }
837
838    /**
839     * Tests the conformance of the given object.
840     *
841     * @param  object  the object to test, or {@code null}.
842     *
843     * @see OperationValidator#validate(PassThroughOperation)
844     */
845    public final void validate(final PassThroughOperation object) {
846        coordinateOperation.validate(object);
847    }
848
849    /**
850     * Tests the conformance of the given object.
851     *
852     * @param  object  the object to test, or {@code null}.
853     *
854     * @see OperationValidator#validate(OperationMethod)
855     */
856    public final void validate(final OperationMethod object) {
857        coordinateOperation.validate(object);
858    }
859
860    /**
861     * Tests the conformance of the given object.
862     *
863     * @param  object  the object to test, or {@code null}.
864     *
865     * @see OperationValidator#validate(OperationMethod)
866     */
867    public final void validate(final Formula object) {
868        coordinateOperation.validate(object);
869    }
870
871    /**
872     * Tests the conformance of the given object.
873     *
874     * @param  object  the object to test, or {@code null}.
875     *
876     * @see OperationValidator#validate(MathTransform)
877     */
878    public final void validate(final MathTransform object) {
879        coordinateOperation.validate(object);
880    }
881
882    /**
883     * Tests the conformance of the given object.
884     *
885     * @param  object  the object to test, or {@code null}.
886     *
887     * @see ParameterValidator#dispatch(GeneralParameterDescriptor)
888     */
889    public final void validate(final GeneralParameterDescriptor object) {
890        parameter.dispatch(object);
891    }
892
893    /**
894     * Tests the conformance of the given object.
895     *
896     * @param  object  the object to test, or {@code null}.
897     *
898     * @see ParameterValidator#validate(ParameterDescriptor)
899     */
900    public final void validate(final ParameterDescriptor<?> object) {
901        parameter.validate(object);
902    }
903
904    /**
905     * Tests the conformance of the given object.
906     *
907     * @param  object  the object to test, or {@code null}.
908     *
909     * @see ParameterValidator#validate(ParameterDescriptorGroup)
910     */
911    public final void validate(final ParameterDescriptorGroup object) {
912        parameter.validate(object);
913    }
914
915    /**
916     * Tests the conformance of the given object.
917     *
918     * @param  object  the object to test, or {@code null}.
919     *
920     * @see ParameterValidator#dispatch(GeneralParameterValue)
921     */
922    public final void validate(final GeneralParameterValue object) {
923        parameter.dispatch(object);
924    }
925
926    /**
927     * Tests the conformance of the given object.
928     *
929     * @param  object  the object to test, or {@code null}.
930     *
931     * @see ParameterValidator#validate(ParameterValue)
932     */
933    public final void validate(final ParameterValue<?> object) {
934        parameter.validate(object);
935    }
936
937    /**
938     * Tests the conformance of the given object.
939     *
940     * @param  object  the object to test, or {@code null}.
941     *
942     * @see ParameterValidator#validate(ParameterValueGroup)
943     */
944    public final void validate(final ParameterValueGroup object) {
945        parameter.validate(object);
946    }
947
948    /**
949     * Tests the conformance of the given object.
950     *
951     * @param  object  the object to test, or {@code null}.
952     *
953     * @see ReferencingValidator#dispatchObject(IdentifiedObject)
954     */
955    public final void validate(final IdentifiedObject object) {
956        crs.dispatchObject(object);
957    }
958
959    /**
960     * Tests the conformance of the given object.
961     *
962     * @param  object  the object to test, or {@code null}.
963     *
964     * @see MetadataBaseValidator#validate(Identifier)
965     *
966     * @since 3.1
967     */
968    public final void validate(final Identifier object) {
969        metadata.validate(object);
970    }
971
972    /**
973     * Tests the conformance of the given object.
974     *
975     * @param  object  the object to test, or {@code null}.
976     *
977     * @see NameValidator#dispatch(GenericName)
978     */
979    public final void validate(final GenericName object) {
980        naming.dispatch(object);
981    }
982
983    /**
984     * Tests the conformance of the given object.
985     *
986     * @param  object  the object to test, or {@code null}.
987     *
988     * @see NameValidator#validate(LocalName)
989     */
990    public final void validate(final LocalName object) {
991        naming.validate(object);
992    }
993
994    /**
995     * Tests the conformance of the given object.
996     *
997     * @param  object  the object to test, or {@code null}.
998     *
999     * @see NameValidator#validate(ScopedName)
1000     */
1001    public final void validate(final ScopedName object) {
1002        naming.validate(object);
1003    }
1004
1005    /**
1006     * Tests the conformance of the given object.
1007     *
1008     * @param  object  the object to test, or {@code null}.
1009     *
1010     * @see NameValidator#validate(NameSpace)
1011     */
1012    public final void validate(final NameSpace object) {
1013        naming.validate(object);
1014    }
1015
1016    /**
1017     * Tests the conformance of the given object.
1018     *
1019     * @param  object  the object to test, or {@code null}.
1020     *
1021     * @see NameValidator#validate(InternationalString)
1022     */
1023    public final void validate(final InternationalString object) {
1024        naming.validate(object);
1025    }
1026
1027    /**
1028     * Tests the conformance of the given object.
1029     *
1030     * @param  object  the object to test, or {@code null}.
1031     *
1032     * @see ImageValidator#validate(ImageReaderSpi)
1033     */
1034    public final void validate(final ImageReaderSpi object) {
1035        image.validate(object);
1036    }
1037
1038    /**
1039     * Tests the conformance of the given object.
1040     *
1041     * @param  object  the object to test, or {@code null}.
1042     *
1043     * @see ImageValidator#validate(ImageWriterSpi)
1044     */
1045    public final void validate(final ImageWriterSpi object) {
1046        image.validate(object);
1047    }
1048
1049    /**
1050     * Tests the conformance of the given object.
1051     *
1052     * @param  object  the object to test, or {@code null}.
1053     *
1054     * @see ImageValidator#validate(IIOMetadataFormat)
1055     */
1056    public void validate(final IIOMetadataFormat object) {
1057        image.validate(object);
1058    }
1059}