Class SimpleFeaturePropertyAccessorFactory

  • All Implemented Interfaces:
    PropertyAccessorFactory

    public class SimpleFeaturePropertyAccessorFactory
    extends Object
    implements PropertyAccessorFactory
    Creates a property accessor for simple 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 SimpleFeature, or against SimpleFeature. In the former case the feature property value is returned, in the latter the feature property type is returned.

    Author:
    Justin Deoliveira, The Open Planning Project
    • Field Detail

      • ATTRIBUTE_ACCESS

        public static final PropertyAccessor ATTRIBUTE_ACCESS
        Single instance is fine - we are not stateful
      • DEFAULT_GEOMETRY_ACCESS

        public static final PropertyAccessor DEFAULT_GEOMETRY_ACCESS
    • Constructor Detail

      • SimpleFeaturePropertyAccessorFactory

        public SimpleFeaturePropertyAccessorFactory()
    • Method Detail

      • 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.