org.geotools.validation
Interface IntegrityValidation

All Superinterfaces:
Validation
All Known Implementing Classes:
DefaultIntegrityValidation, UniqueFIDIntegrityValidation, UniqueFIDValidation, UniquityValidation

public interface IntegrityValidation
extends Validation

Used to check geospatial information for integrity.

Each ValidationPlugIn is very specific in nature: it performs one test extermly well. This simplifies design decisions, documenation configuration and use.

Following the lead the excelent design work in the JUnit testing framework validation results are collected by a ValidationResults object. This interface for the ValidationResults object also allows it to collect warning information.

The PlugIn is also required to supply some metadata to aid in its deployment, scripting, logging and execution and error recovery:

Capabilities:


Field Summary
 
Fields inherited from interface org.geotools.validation.Validation
ALL, PRIORITY_COMPLEX, PRIORITY_INVOLVED, PRIORITY_SIMPLE, PRIORITY_TRIVIAL
 
Method Summary
 boolean validate(java.util.Map layers, com.vividsolutions.jts.geom.Envelope envelope, ValidationResults results)
          Used to check features against this validation rule.
 
Methods inherited from interface org.geotools.validation.Validation
getDescription, getName, getPriority, getTypeRefs, setDescription, setName
 

Method Detail

validate

public boolean validate(java.util.Map layers,
                        com.vividsolutions.jts.geom.Envelope envelope,
                        ValidationResults results)
                 throws java.lang.Exception
Used to check features against this validation rule.

The layers Map is still under developement, current thinking involves storing a FeatureSource of the correct typeName requested by getTypeNames(), using the current geotools2 Transaction as the opperation being validated.

We may need to extend this information to provide:

Parameters:
layers - Map of FeatureSource by "dataStoreID:typeName"
envelope - The bounding box that encloses the unvalidated data
results - Used to coallate results information
Returns:
true if all the features pass this test.
Throws:
java.lang.Exception