org.geotools.validation.attributes
Class UniquityValidation

java.lang.Object
  extended byorg.geotools.validation.DefaultIntegrityValidation
      extended byorg.geotools.validation.attributes.UniquityValidation
All Implemented Interfaces:
IntegrityValidation, Validation

public class UniquityValidation
extends DefaultIntegrityValidation

Tests to that an attribute's value is unique across the entire FeatureType.

For a starting point you may want to look at UniqueFIDIntegrityValidation

Version:
$Id: UniquityValidation.java 17704 2006-01-23 00:26:16Z desruisseaux $
Author:
Jody Garnett, Refractions Research, Inc., $Author: dmzwiers $ (last modification)

Field Summary
 
Fields inherited from interface org.geotools.validation.Validation
ALL, PRIORITY_COMPLEX, PRIORITY_INVOLVED, PRIORITY_SIMPLE, PRIORITY_TRIVIAL
 
Constructor Summary
UniquityValidation()
          No argument constructor, required by the Java Bean Specification.
 
Method Summary
 int getPriority()
          The priority level used to schedule this Validation.
 boolean validate(java.util.Map layers, com.vividsolutions.jts.geom.Envelope envelope, ValidationResults results)
          Check FeatureType for ...
 
Methods inherited from class org.geotools.validation.DefaultIntegrityValidation
getDescription, getName, getTypeRefs, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniquityValidation

public UniquityValidation()
No argument constructor, required by the Java Bean Specification.

Method Detail

getPriority

public int getPriority()
The priority level used to schedule this Validation.

Specified by:
getPriority in interface Validation
Overrides:
getPriority in class DefaultIntegrityValidation
Returns:
PRORITY_SIMPLE
See Also:
Validation.getPriority()

validate

public boolean validate(java.util.Map layers,
                        com.vividsolutions.jts.geom.Envelope envelope,
                        ValidationResults results)
                 throws java.lang.Exception
Check FeatureType for ...

Detailed description...

Specified by:
validate in interface IntegrityValidation
Overrides:
validate in class DefaultIntegrityValidation
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 - DOCUMENT ME!


Copyright © GeoTools. All Rights Reserved.