org.geotools.validation.attributes
Class RangeValidation

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

public class RangeValidation
extends DefaultFeatureValidation

RangeFeatureValidation validates that a number is within a given range.

RangeFeatureValidation is a quick and simple class the checks that the given number resides within a given range.

Capabilities:

Example Use:

 RangeFeatureValidation x = new RangeFeatureValidation();
 
 x.setMin(3);
 x.setMax(5);
 x.setName("id");
 
 boolean result = x.validate(feature, featureType, results);
 

Version:
$Id: RangeValidation.java 17704 2006-01-23 00:26:16Z desruisseaux $
Author:
rgould, Refractions Research, Inc., $Author: cholmesny $ (last modification)

Field Summary
 
Fields inherited from interface org.geotools.validation.Validation
ALL, PRIORITY_COMPLEX, PRIORITY_INVOLVED, PRIORITY_SIMPLE, PRIORITY_TRIVIAL
 
Constructor Summary
RangeValidation()
          RangeFeatureValidation constructor.
 
Method Summary
 java.lang.String getAttribute()
          XPATH expression used to locate attribute
 int getMax()
          getMax purpose.
 int getMin()
          getMin purpose.
 int getPriority()
          Override getPriority.
 void setAttribute(java.lang.String xpath)
          XPATH expression used to locate attribute
 void setMax(int i)
          setMax purpose.
 void setMin(int i)
          setMin purpose.
 boolean validate(Feature feature, FeatureType type, ValidationResults results)
          Override validate.
 
Methods inherited from class org.geotools.validation.DefaultFeatureValidation
getDefaultLineString, getDescription, getName, getTypeRef, getTypeRefs, setDescription, setName, setTypeRef
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeValidation

public RangeValidation()
RangeFeatureValidation constructor.

Description

Method Detail

validate

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

Description ...

Specified by:
validate in interface FeatureValidation
Overrides:
validate in class DefaultFeatureValidation
Parameters:
feature -
type -
results -
Returns:
See Also:
FeatureValidation.validate(org.geotools.feature.Feature, org.geotools.feature.FeatureType, org.geotools.validation.ValidationResults)

getPriority

public int getPriority()
Override getPriority.

Description ...

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

getMax

public int getMax()
getMax purpose.

Description ...

Returns:

getMin

public int getMin()
getMin purpose.

Description ...

Returns:

setMax

public void setMax(int i)
setMax purpose.

Description ...

Parameters:
i -

setMin

public void setMin(int i)
setMin purpose.

Description ...

Parameters:
i -

getAttribute

public java.lang.String getAttribute()
XPATH expression used to locate attribute

Returns:
xpath

setAttribute

public void setAttribute(java.lang.String xpath)
XPATH expression used to locate attribute

Parameters:
xpath -


Copyright © GeoTools. All Rights Reserved.