org.geotools.validation.attributes
Class RangeValidation

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

public class RangeValidation
extends java.lang.Object
implements FeatureValidation

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.setPath("id");
 
 boolean result = x.validate(feature, featureType, results);
 


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 getDescription()
          Override getDescription.
 int getMax()
          getMax purpose.
 int getMin()
          getMin purpose.
 java.lang.String getName()
          Override getName.
 java.lang.String getPath()
          getPath purpose.
 int getPriority()
          Override getPriority.
 java.lang.String getTypeRef()
           
 java.lang.String[] getTypeRefs()
          Override getTypeNames.
 void setDescription(java.lang.String description)
          Override setDescription.
 void setMax(int i)
          setMax purpose.
 void setMin(int i)
          setMin purpose.
 void setName(java.lang.String name)
          Override setName.
 void setPath(java.lang.String string)
          setPath purpose.
 void setTypeRef(java.lang.String typeRef)
          Set type ref as dataStoreId:typeName.
 boolean validate(org.geotools.feature.Feature feature, org.geotools.feature.FeatureType type, ValidationResults results)
          Override validate.
 
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(org.geotools.feature.Feature feature,
                        org.geotools.feature.FeatureType type,
                        ValidationResults results)
                 throws java.lang.Exception
Override validate.

Description ...

Specified by:
validate in interface FeatureValidation
Parameters:
feature -
type -
results -
Returns:
Throws:
java.lang.Exception
See Also:
FeatureValidation.validate(org.geotools.feature.Feature, org.geotools.feature.FeatureType, org.geotools.validation.ValidationResults)

setName

public void setName(java.lang.String name)
Override setName.

Description ...

Specified by:
setName in interface Validation
Parameters:
name -
See Also:
Validation.setName(java.lang.String)

getName

public java.lang.String getName()
Override getName.

Description ...

Specified by:
getName in interface Validation
Returns:
See Also:
Validation.getName()

setDescription

public void setDescription(java.lang.String description)
Override setDescription.

Description ...

Specified by:
setDescription in interface Validation
Parameters:
description -
See Also:
Validation.setDescription(java.lang.String)

getDescription

public java.lang.String getDescription()
Override getDescription.

Description ...

Specified by:
getDescription in interface Validation
Returns:
See Also:
Validation.getDescription()

getPriority

public int getPriority()
Override getPriority.

Description ...

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

setTypeRef

public void setTypeRef(java.lang.String typeRef)
Set type ref as dataStoreId:typeName.

Parameters:
typeRef - type referenced
See Also:
org.geotools.validation.Validation#setTypeNames(java.lang.String[])

getTypeRef

public java.lang.String getTypeRef()

getTypeRefs

public java.lang.String[] getTypeRefs()
Override getTypeNames.

Description ...

Specified by:
getTypeRefs in interface Validation
Returns:
See Also:
Validation.getTypeRefs()

getMax

public int getMax()
getMax purpose.

Description ...

Returns:

getMin

public int getMin()
getMin purpose.

Description ...

Returns:

getPath

public java.lang.String getPath()
getPath 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 -

setPath

public void setPath(java.lang.String string)
setPath purpose.

Description ...

Parameters:
string -