org.geotools.filter.expression
Class FeaturePropertyAccessorFactory

java.lang.Object
  extended by org.geotools.filter.expression.FeaturePropertyAccessorFactory
All Implemented Interfaces:
PropertyAccessorFactory

public class FeaturePropertyAccessorFactory
extends java.lang.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 the feature property type is returned.

Author:
Justin Deoliveira, The Open Planning Project, Gabriel Roldan, Axios Engineering

Field Summary
static Hints.Key NAMESPACE_CONTEXT
          Hints key used to pass namespace context to createPropertyAccessor(Class, String, Class, Hints) in the form of a NamespaceSupport instance with the prefix/namespaceURI mappings
 
Constructor Summary
FeaturePropertyAccessorFactory()
           
 
Method Summary
 PropertyAccessor createPropertyAccessor(java.lang.Class type, java.lang.String xpath, java.lang.Class target, Hints hints)
          Creates a property accessor for a particular class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE_CONTEXT

public static final Hints.Key NAMESPACE_CONTEXT
Hints key used to pass namespace context to createPropertyAccessor(Class, String, Class, Hints) in the form of a NamespaceSupport instance with the prefix/namespaceURI mappings

Constructor Detail

FeaturePropertyAccessorFactory

public FeaturePropertyAccessorFactory()
Method Detail

createPropertyAccessor

public PropertyAccessor createPropertyAccessor(java.lang.Class type,
                                               java.lang.String xpath,
                                               java.lang.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.


Copyright © 1996-2010 Geotools. All Rights Reserved.