Package org.geotools.data.transform
Class Definition
Object
Definition
Defines a transformed attribute to be used in
TransformFeatureSource
- Author:
- Andrea Aime - GeoSolutions
-
Constructor Summary
ConstructorsConstructorDescriptionDefinition
(String name) Creates a new transformed property that mirrors 1-1 an existing property in the source type, without even renaming itDefinition
(String name, Expression source) Creates a new transformed propertyDefinition
(String name, Expression source, Class binding) Creates a new transformed propertyDefinition
(String name, Expression source, Class binding, CoordinateReferenceSystem crs) Creates a new transformed propertyDefinition
(String name, Expression source, Class binding, CoordinateReferenceSystem crs, InternationalString description) Creates a new transformed propertyDefinition
(String name, InternationalString description) Creates a new property definition with a description -
Method Summary
Modifier and TypeMethodDescriptionboolean
getAttributeDescriptor
(SimpleFeature originalFeature) Computes the output attribute descriptor for thisDefinition
given a sample feature of the original feature type.getAttributeDescriptor
(SimpleFeatureType originalSchema) Computes the output attribute descriptor for thisDefinition
given only the original feature type.getName()
int
hashCode()
inverse()
Returns the inverse to this Definition, that is, the definition of the source attribute corresponding to this computed attribute, if any.toString()
-
Constructor Details
-
Definition
Creates a new transformed property that mirrors 1-1 an existing property in the source type, without even renaming it- Parameters:
name
- The property name
-
Definition
Creates a new property definition with a description- Parameters:
name
- The property namedescription
- The property description
-
Definition
Creates a new transformed property- Parameters:
name
- The property namesource
- The expression generating the property
-
Definition
Creates a new transformed property- Parameters:
name
- The property namesource
- The expression generating the propertybinding
- The property type. Optional, the store will try to figure out the type from the expression in case it's missing
-
Definition
Creates a new transformed property- Parameters:
name
- The property namesource
- The expression generating the propertybinding
- The property type. Optional, the store will try to figure out the type from the expression in case it's missingcrs
- The coordinate reference system of the property, to be used only for geometry properties
-
Definition
public Definition(String name, Expression source, Class binding, CoordinateReferenceSystem crs, InternationalString description) Creates a new transformed property- Parameters:
name
- The property namesource
- The expression generating the propertybinding
- The property type. Optional, the store will try to figure out the type from the expression in case it's missingcrs
- The coordinate reference system of the property, to be used only for geometry propertiesdescription
- The property description
-
-
Method Details
-
getName
-
getExpression
-
getBinding
-
getDescription
-
inverse
Returns the inverse to this Definition, that is, the definition of the source attribute corresponding to this computed attribute, if any. Only a small set of expression are invertible in general, and a smaller subset of that can be inverted by this method. Implementor can override this method to provide a custom inversion logic.- Returns:
- The inverse of this definition, or null if not invertible or if the inversion logic for the specified case is missing
-
getAttributeDescriptor
Computes the output attribute descriptor for thisDefinition
given a sample feature of the original feature type. The code will first attempt a static analysis on the original feature type, if that fails it will try to evaluate the expression on the sample feature. -
getAttributeDescriptor
Computes the output attribute descriptor for thisDefinition
given only the original feature type. The code will attempt a static analysis on the original feature type, if that fails it will return null -
hashCode
public int hashCode() -
equals
-
toString
-