| java.lang.Object org.geotools.validation.DefaultFeatureValidation
All known Subclasses: org.geotools.validation.attributes.NullZeroValidation, org.geotools.validation.spatial.LineNoSelfOverlappingValidation, org.geotools.validation.attributes.GazetteerNameValidation, org.geotools.validation.attributes.SingleValueValidation, org.geotools.validation.spatial.IsValidGeometryValidation, org.geotools.validation.attributes.AttributeValidation, org.geotools.validation.attributes.RangeValidation, org.geotools.validation.spatial.LineNoSelfIntersectValidation, org.geotools.validation.attributes.SQLValidation, org.geotools.validation.spatial.LineMustBeASinglePartValidation, org.geotools.validation.attributes.EqualityValidation, org.geotools.validation.attributes.DomainValidation, org.geotools.validation.spatial.PolygonNoGapsValidation,
DefaultFeatureValidation | public class DefaultFeatureValidation implements FeatureValidation(Code) | | 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().
author: Jody Garnett, Refractions Research, Inc. author: $Author: jive $ (last modification) version: $Id: DefaultFeatureValidation.java 27862 2007-11-12 19:51:19Z desruisseaux $ |
Method Summary | |
protected LineString | getDefaultLineString(Feature feature) Retrives a single LineString from feature.getDefaultGeometry.
If feature contains MultiLineString (or GeometryCollection ) of length
1 it will be deemed sufficient. | final public String | getDescription() Override getDescription. | final public String | getName() Access the user's name for this test. | public int | getPriority() The priority level used to schedule this Validation. | public String | getTypeRef() Access typeRef property. | public String[] | getTypeRefs() Implementation of getTypeNames. | final public void | setDescription(String description) Sets the description of this validation. | final public void | setName(String name) Sets the name of this validation. | public void | setTypeRef(String typeRef) Set typeRef to typeRef. | public boolean | validate(Feature feature, FeatureType type, ValidationResults results) Validation test for feature.
Description of test ...
Parameters: feature - The Feature to be validated Parameters: type - The FeatureType of the feature Parameters: results - The storage for error messages. |
DefaultFeatureValidation | public DefaultFeatureValidation()(Code) | | No argument constructor, required by the Java Bean Specification.
|
getDefaultLineString | protected LineString getDefaultLineString(Feature feature) throws ClassCastException(Code) | | Retrives a single LineString from feature.getDefaultGeometry.
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.
Parameters: feature - Feature feature.getDefaultGeomertry as a LineString, or null throws: ClassCastException - If feature.getDefaultGeometry is the wrong type |
getTypeRef | public String getTypeRef()(Code) | | Access typeRef property.
Returns the typeRef in the format dataStoreId:typeName. |
setTypeRef | public void setTypeRef(String typeRef)(Code) | | Set typeRef to typeRef.
Parameters: typeRef - The typeRef in the format dataStoreId:typeName |
|
|