Class FeaturePropertyAccessorFactory

Object
FeaturePropertyAccessorFactory
All Implemented Interfaces:
PropertyAccessorFactory

public class FeaturePropertyAccessorFactory extends Object implements PropertyAccessorFactory
Creates a namespace aware property accessor for ISO Features.

The created accessor handles a small subset of xpath expressions, a non-nested "name" which corresponds to a feature attribute, and "@id", corresponding to the feature id.

THe property accessor may be run against org.geotools.feature.Feature, or against org.geotools.feature.FeatureType. In the former case the feature property value is returned, in the latter a descriptor is returned (in case of "@" attributes, a Name is returned or null if the attribute doesn't exist - can be used to validate an x-path!) .

Author:
Justin Deoliveira (The Open Planning Project), Gabriel Roldan (Axios Engineering)
  • Constructor Details

    • FeaturePropertyAccessorFactory

      public FeaturePropertyAccessorFactory()
  • Method Details

    • createPropertyAccessor

      public PropertyAccessor createPropertyAccessor(Class type, String xpath, Class target, Hints hints)
      Description copied from interface: PropertyAccessorFactory
      Creates a property accessor for a particular class.
      Specified by:
      createPropertyAccessor in interface PropertyAccessorFactory
      Parameters:
      type - The type of object to be accessed.
      xpath - The xpath expression to evaluate.
      target - The kind of result we are expecting (ie Geometry)
      hints - Hints to be used when creatign the accessor.
      Returns:
      The property accessor, or null if this factory cannot create an accessor for the specified type.
    • getPriority

      public int getPriority()
      Description copied from interface: PropertyAccessorFactory
      Return the priority associated with this property accessor. By default, a priority value within the range of the lowest and highest priorities will be returned. The more generic a property accessor is, the lower its priority should be.
      Specified by:
      getPriority in interface PropertyAccessorFactory
      Returns:
      the priority of this property accessor