Class TLcdObjectTransformationProvider
java.lang.Object
com.luciad.datamodel.transformation.TLcdObjectTransformationProvider
The responsibility of this class is to provide ILcdObjectTransformation
instances
to transform from a source TLcdDataType
to a target TLcdDataType
.
Objects of this class are thread-safe.
- Since:
- 11.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the inverse of this provider.getObjectTransformation
(TLcdDataType aSourceType, TLcdDataType aTargetType) Returns the object transformation that can transform instances of the given source type to instances of the given target type.getTargetTypes
(TLcdDataType aType) Returns a collection of target data types for which transformations have been registered for the given source type.void
register
(TLcdDataType aSourceType, TLcdDataType aTargetType, ILcdObjectTransformation aTransformation) Registers a transformation from the given source type to the given target type.
-
Constructor Details
-
TLcdObjectTransformationProvider
public TLcdObjectTransformationProvider()Creates a new transformation provider.
-
-
Method Details
-
getObjectTransformation
public ILcdObjectTransformation getObjectTransformation(TLcdDataType aSourceType, TLcdDataType aTargetType) Returns the object transformation that can transform instances of the given source type to instances of the given target type. Returns
null
if no such transformation can be found.The implementation first looks for transformation that have been registered on this instance for the given source and target type. If no such transformation can be found, it tries to find an appropriate default transformation.
- Parameters:
aSourceType
- the source typeaTargetType
- the target type- Returns:
- an object transformation that transforms from source type to target type
-
getTargetTypes
Returns a collection of target data types for which transformations have been registered for the given source type.- Parameters:
aType
- the source type- Returns:
- the collection of target types for which a transformation has been registered for the given source type
-
register
public void register(TLcdDataType aSourceType, TLcdDataType aTargetType, ILcdObjectTransformation aTransformation) Registers a transformation from the given source type to the given target type. If the transformation has an inverse, the inverse will be available on this object's inverse (seegetInverse()
.- Parameters:
aSourceType
- the source typeaTargetType
- the target typeaTransformation
- the transformation to register
-
getInverse
Returns the inverse of this provider. Typically, each transformation that is registered on this instance and that has an inverse, will be available on the returned inverse.- Returns:
- the inverse of this provider
-