org.geotools.validation.attributes
Class NullZeroValidation

Object
  extended by DefaultFeatureValidation
      extended by NullZeroValidation
All Implemented Interfaces:
FeatureValidation, Validation

public class NullZeroValidation
extends DefaultFeatureValidation

NullZeroFeatureValidation purpose.

Description of NullZeroFeatureValidation ...

Capabilities:

Example Use:

 NullZeroFeatureValidation x = new NullZeroFeatureValidation(...);
 

Author:
dzwiers, Refractions Research, Inc., $Author: dmzwiers $ (last modification)
Module:
modules/extension/validation (gt-validation.jar)

Field Summary
 
Fields inherited from interface Validation
ALL, PRIORITY_COMPLEX, PRIORITY_INVOLVED, PRIORITY_SIMPLE, PRIORITY_TRIVIAL
 
Constructor Summary
NullZeroValidation()
           
 
Method Summary
 String getAttribute()
          Access attributeName property.
 int getPriority()
          Implement getPriority.
 String[] getTypeRefs()
          Implementation of getTypeNames.
 void setAttribute(String xpath)
          set AttributeName to xpath expression.
 boolean validate(SimpleFeature feature, SimpleFeatureType type, ValidationResults results)
          Implement validate.
 
Methods inherited from class DefaultFeatureValidation
getDefaultLineString, getDescription, getName, getTypeRef, setDescription, setName, setTypeRef
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullZeroValidation

public NullZeroValidation()
Method Detail

validate

public boolean validate(SimpleFeature feature,
                        SimpleFeatureType 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:
org.geotools.validation.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 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 String getAttribute()
Access attributeName property.

Returns:
the path being stored for validation

setAttribute

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

Parameters:
xpath - A String


Copyright © 1996-2010 Geotools. All Rights Reserved.