public class RangeValidation extends DefaultFeatureValidation
RangeFeatureValidation is a quick and simple class the checks that the given number resides within a given range.
Capabilities:
RangeFeatureValidation x = new RangeFeatureValidation();
x.setMin(3);
x.setMax(5);
x.setName("id");
boolean result = x.validate(feature, featureType, results);
ALL, PRIORITY_COMPLEX, PRIORITY_INVOLVED, PRIORITY_SIMPLE, PRIORITY_TRIVIAL| Constructor and Description |
|---|
RangeValidation()
RangeFeatureValidation constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAttribute()
XPATH expression used to locate attribute
|
int |
getMax()
getMax purpose.
|
int |
getMin()
getMin purpose.
|
int |
getPriority()
Override getPriority.
|
void |
setAttribute(String xpath)
XPATH expression used to locate attribute
|
void |
setMax(int i)
setMax purpose.
|
void |
setMin(int i)
setMin purpose.
|
boolean |
validate(SimpleFeature feature,
SimpleFeatureType type,
ValidationResults results)
Override validate.
|
getDefaultLineString, getDescription, getName, getTypeRef, getTypeRefs, setDescription, setName, setTypeRefpublic RangeValidation()
Description
public boolean validate(SimpleFeature feature, SimpleFeatureType type, ValidationResults results)
Description ...
validate in interface FeatureValidationvalidate in class DefaultFeatureValidationfeature - type - results - true if the feature is a valid geometry.org.geotools.validation.FeatureValidation#validate(org.geotools.feature.Feature,
org.geotools.feature.FeatureType, org.geotools.validation.ValidationResults)public int getPriority()
Description ...
getPriority in interface ValidationgetPriority in class DefaultFeatureValidationValidation.getPriority()public int getMax()
Description ...
public int getMin()
Description ...
public void setMax(int i)
Description ...
i - public void setMin(int i)
Description ...
i - public String getAttribute()
public void setAttribute(String xpath)
xpath - Copyright © 1996–2019 Geotools. All rights reserved.