public class Definition extends Object
TransformFeatureSource
Constructor and Description |
---|
Definition(String name)
Creates a new transformed property that mirrors 1-1 an existing property in the source type,
without even renaming it
|
Definition(String name,
Expression source)
Creates a new transformed property
|
Definition(String name,
Expression source,
Class binding)
Creates a new transformed property
|
Definition(String name,
Expression source,
Class binding,
CoordinateReferenceSystem crs)
Creates a new transformed property
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
AttributeDescriptor |
getAttributeDescriptor(SimpleFeature originalFeature)
Computes the output attribute descriptor for this
Definition given a sample feature
of the original feature type. |
AttributeDescriptor |
getAttributeDescriptor(SimpleFeatureType originalSchema)
Computes the output attribute descriptor for this
Definition given only the original
feature type. |
Class |
getBinding() |
Expression |
getExpression() |
String |
getName() |
int |
hashCode() |
List<Definition> |
inverse()
Returns the inverse to this Definition, that is, the definition of the source attribute
corresponding to this computed attribute, if any.
|
String |
toString() |
public Definition(String name)
name
- The property namepublic Definition(String name, Expression source)
name
- The property namesource
- The expression generating the propertypublic Definition(String name, Expression source, Class binding)
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 missingpublic Definition(String name, Expression source, Class binding, CoordinateReferenceSystem crs)
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
propertiespublic String getName()
public Expression getExpression()
public Class getBinding()
public List<Definition> inverse()
public AttributeDescriptor getAttributeDescriptor(SimpleFeature originalFeature)
Definition
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.public AttributeDescriptor getAttributeDescriptor(SimpleFeatureType originalSchema)
Definition
given only the original
feature type. The code will attempt a static analysis on the original feature type, if that
fails it will return nullCopyright © 1996–2022 Geotools. All rights reserved.