| Defined a per Feature validation test.
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:
-
name: user's name of validation test
-
description: user's description of validation test
-
priority: used to schedule validation test
-
typeNames: used to connect validaiton test to transaction opperation
Capabilities:
-
Uses FeatureResults to allow environment to gather error/warning information
as required (transaction XML document, JTable, logging system, etc...)
-
Primiarly used as part of processing an Insert Element in the Transaction
opperation of a Web Feature Server. (Allows us to fail a Feature without
bothering the Database)
Example Use (feature: id=1, name="foo", geom=linestring):
RangeFeatureValidation test = new RangeFeatureValidation();
results.setValidation( test );
test.setMin(0);
test.validate( feature, featureType, results ); // true
test.setMin(2);
test.validate( feature, featureType, results ); // false
author: Jody Garnett, Refractions Research, Inc. version: $Id: FeatureValidation.java 20884 2006-08-07 14:10:46Z jgarnett $ |