Class ALcdTransformingModel

java.lang.Object
com.luciad.model.transformation.ALcdTransformingModel
All Implemented Interfaces:
ILcdModel, ILcdDisposable, Serializable, AutoCloseable

public abstract class ALcdTransformingModel extends Object implements ILcdModel

A model representing transformed data of an original model. It uses a TLcdClusteringTransformer to perform the transformation.

As the data transformation can be time-consuming, it might take a while before the original model and this transformed model are in sync. For example when an element is added to the original model, the transformed model must recalculate the transformation. Only when recalculation is done, the elements of the transformed model are updated.
To ensure that the layer containing this model remains responsive, the transformation is calculated on a dedicated thread. Once the transformation is done, the transformed model is updated (under a write lock) on the painting thread.

This means that you should treat this ALcdTransformingModel just as you do any other ILcdModel:

More information about the threading and locking rules of ILcdModel instances can be found in the developer guide.

The asynchronous nature of the transformation implies that when ILcdMultiDimensionalModel.applyDimensionFilter(com.luciad.multidimensional.TLcdDimensionFilter, int) is called on an implementation of this class that also implements ILcdMultiDimensionalModel,

  • this model might not be up-to-date when the method returns
  • the given event mode is not respected

Use TLcdTransformingModelFactory to create instances of this class.

Since:
2016.0
See Also:
  • Method Details

    • getOriginalModel

      public abstract ILcdModel getOriginalModel()
      Returns the model containing the original data on which the TLcdClusteringTransformer operates
      Returns:
      the model containing the original data on which the TLcdClusteringTransformer operates
    • setTransformer

      public abstract void setTransformer(TLcdClusteringTransformer aModelTransformer)

      Sets the transformer responsible from transforming data from the original model.

      Parameters:
      aModelTransformer - The transformer. Must not be null.
    • originalToTransformed

      public abstract Collection<Object> originalToTransformed(Collection<Object> aOriginalModelElements)
      Returns a collection containing the domain objects from this ALcdTransformingModel corresponding to the objects from the getOriginalModel() contained in aOriginalModelElements
      Parameters:
      aOriginalModelElements - The elements of the getOriginalModel() for which the corresponding elements must be retrieved
      Returns:
      a collection containing the domain objects from this ALcdTransformingModel corresponding to the objects from the getOriginalModel() contained in aOriginalModelElements. Never null, but might be empty (for example when those elements are filtered out).
    • transformedToOriginal

      public abstract Collection<Object> transformedToOriginal(Collection<Object> aTransformedModelElements)
      Returns a collection containing the domain objects from getOriginalModel() corresponding to the objects from this ALcdTransformingModel contained in aTransformedModelElements
      Parameters:
      aTransformedModelElements - The elements of this ALcdTransformingModel for which the corresponding elements must be retrieved
      Returns:
      a collection containing the domain objects from getOriginalModel() corresponding to the objects from this ALcdTransformingModel contained in aTransformedModelElements. Never null, but might be empty.