Class TLcyCompositeLayerMeasureProviderFactory

java.lang.Object
com.luciad.lucy.util.TLcyGenericComposite<ILcdLayerMeasureProviderFactory>
com.luciad.lucy.util.measure.TLcyCompositeLayerMeasureProviderFactory
All Implemented Interfaces:
ILcdLayerMeasureProviderFactory, Iterable<ILcdLayerMeasureProviderFactory>

public final class TLcyCompositeLayerMeasureProviderFactory extends TLcyGenericComposite<ILcdLayerMeasureProviderFactory> implements ILcdLayerMeasureProviderFactory

Composite implementation (see composite design pattern) of ILcdLayerMeasureProviderFactory. It keeps a list of associated ILcdLayerMeasureProviderFactory instances: one can add and remove other ILcdLayerMeasureProviderFactory instances to this ILcdLayerMeasureProviderFactory.

When creating a new TLcyCompositeLayerMeasureProviderFactory using the default constructor (see TLcyCompositeLayerMeasureProviderFactory()), the created instance will only work on/with the ILcdLayerMeasureProviderFactorys registered on this composite instance (see addLayerMeasureProviderFactory(com.luciad.util.measure.ILcdLayerMeasureProviderFactory) and removeLayerMeasureProviderFactory(com.luciad.util.measure.ILcdLayerMeasureProviderFactory)).

When creating a new TLcyCompositeLayerMeasureProviderFactory using the constructor specifying an ILcyLucyEnv instance (see TLcyCompositeLayerMeasureProviderFactory(com.luciad.lucy.ILcyLucyEnv)), the created instance will work on the Lucy back-end services. It will use all registered ILcdLayerMeasureProviderFactory instances of the Lucy back-end, adding and/or removing an ILcdLayerMeasureProviderFactory will add/remove the ILcdLayerMeasureProviderFactory as service from Lucy, ... .

This class can for example be used to retrieve measures for a view:


 TLcyCompositeLayerMeasureProviderFactory factory = new TLcyCompositeLayerMeasureProviderFactory(lucyEnv);
 TLcdGXYViewMeasureProvider measureProvider = new TLcdGXYViewMeasureProvider(view, null, Collections.singletonList(factory));
 ALcdMeasureProvider.Parameters parameters = ALcdMeasureProvider.Parameters.newBuilder().build();
 List<TLcdISO19103Measure[]> measures = measureProvider.retrieveMeasuresAt(point, pointReference, parameters);
 

Since:
2015.0