org.geotools.validation.attributes
Class NullZeroValidation

java.lang.Object
  extended byorg.geotools.validation.DefaultFeatureValidation
      extended byorg.geotools.validation.attributes.NullZeroValidation
All Implemented Interfaces:
FeatureValidation, Validation

public class NullZeroValidation
extends DefaultFeatureValidation

NullZeroFeatureValidation purpose.

Description of NullZeroFeatureValidation ...

Capabilities:

Example Use:

 NullZeroFeatureValidation x = new NullZeroFeatureValidation(...);
 

Version:
$Id: NullZeroValidation.java 17704 2006-01-23 00:26:16Z desruisseaux $
Author:
dzwiers, 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
NullZeroValidation()
           
 
Method Summary
 java.lang.String getAttribute()
          Access attributeName property.
 int getPriority()
          Implement getPriority.
 java.lang.String[] getTypeRefs()
          Implementation of getTypeNames.
 void setAttribute(java.lang.String xpath)
          set AttributeName to xpath expression.
 boolean validate(Feature feature, FeatureType type, ValidationResults results)
          Implement validate.
 
Methods inherited from class org.geotools.validation.DefaultFeatureValidation
getDefaultLineString, getDescription, getName, getTypeRef, setDescription, setName, setTypeRef
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullZeroValidation

public NullZeroValidation()
Method Detail

validate

public boolean validate(Feature feature,
                        FeatureType type,
                        ValidationResults results)
Implement validate.

Description ...

Specified by:
validate in interface FeatureValidation
Overrides:
validate in class DefaultFeatureValidation
Parameters:
feature - Provides the attributes to test.
type - not used.
results - a reference for returning error codes.
Returns:
false when null or 0 values are found in the attribute.
See Also:
FeatureValidation.validate(org.geotools.feature.Feature, org.geotools.feature.FeatureType, org.geotools.validation.ValidationResults)

getPriority

public int getPriority()
Implement getPriority.

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

getTypeRefs

public java.lang.String[] getTypeRefs()
Implementation of getTypeNames.

Specified by:
getTypeRefs in interface Validation
Overrides:
getTypeRefs in class DefaultFeatureValidation
Returns:
Array of typeNames, or empty array for all, null for disabled
See Also:
Validation.getTypeRefs()

getAttribute

public java.lang.String getAttribute()
Access attributeName property.

Returns:
the path being stored for validation

setAttribute

public void setAttribute(java.lang.String xpath)
set AttributeName to xpath expression.



Copyright © GeoTools. All Rights Reserved.