|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.validation.DefaultFeatureValidation
Tests to see if a Feature ...
The geometry is first tested to see if it is null, and if it is null, then it is tested to see if it is allowed to be null by calling isNillable().
Field Summary |
Fields inherited from interface org.geotools.validation.Validation |
ALL, PRIORITY_COMPLEX, PRIORITY_INVOLVED, PRIORITY_SIMPLE, PRIORITY_TRIVIAL |
Constructor Summary | |
DefaultFeatureValidation()
No argument constructor, required by the Java Bean Specification. |
Method Summary | |
protected com.vividsolutions.jts.geom.LineString |
getDefaultLineString(Feature feature)
Retrives a single LineString from feature.getDefaultGeometry. |
java.lang.String |
getDescription()
Override getDescription. |
java.lang.String |
getName()
Access the user's name for this test. |
int |
getPriority()
The priority level used to schedule this Validation. |
java.lang.String |
getTypeRef()
Access typeRef property. |
java.lang.String[] |
getTypeRefs()
Implementation of getTypeNames. |
void |
setDescription(java.lang.String description)
Sets the description of this validation. |
void |
setName(java.lang.String name)
Sets the name of this validation. |
void |
setTypeRef(java.lang.String typeRef)
Set typeRef to typeRef. |
boolean |
validate(Feature feature,
FeatureType type,
ValidationResults results)
Validation test for feature. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultFeatureValidation()
Method Detail |
public final void setName(java.lang.String name)
setName
in interface Validation
name
- The name of this validation.Validation.setName(java.lang.String)
public final java.lang.String getName()
getName
in interface Validation
Validation.getName()
public final void setDescription(java.lang.String description)
setDescription
in interface Validation
description
- The description of the validation.Validation.setDescription(java.lang.String)
public final java.lang.String getDescription()
Returns the description of this validation as a string.
getDescription
in interface Validation
Validation.getDescription()
public int getPriority()
getPriority
in interface Validation
Validation.getPriority()
public java.lang.String[] getTypeRefs()
getTypeRefs
in interface Validation
org.geotools.validation.Validation#getTypeNames()
public java.lang.String getTypeRef()
public void setTypeRef(java.lang.String typeRef)
typeRef
- The typeRef in the format dataStoreId:typeNamepublic boolean validate(Feature feature, FeatureType type, ValidationResults results)
Description of test ...
validate
in interface FeatureValidation
feature
- The Feature to be validatedtype
- The FeatureType of the featureresults
- The storage for error messages.
true
if the feature is a valid geometry.FeatureValidation.validate(org.geotools.feature.Feature, org.geotools.feature.FeatureType, org.geotools.validation.ValidationResults)
protected com.vividsolutions.jts.geom.LineString getDefaultLineString(Feature feature) throws java.lang.ClassCastException
If feature contains MultiLineString (or GeometryCollection ) of length 1 it will be deemed sufficient. Shapefiles are determined to work with MultiLineStrings of length 1 forcing the creation of this method.
If feature.getDefaultGeometry returns null
this method
will return null. For most cases the validation should just be abandoned
with a warning; the user can separately specify a NullZero check. This
will prevent the same error (a null value) being reproted by
each and every SpatialValidation test.
feature
- Feature
null
java.lang.ClassCastException
- If feature.getDefaultGeometry is the wrong type
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |