public abstract class ALcdModelHeightProviderFactory extends Object implements ILcdModelHeightProviderFactory
ILcdHeightProvider
when an ILcdModel
is given.KEY_GEO_REFERENCE
Constructor and Description |
---|
ALcdModelHeightProviderFactory()
Creates a new
TLcdModelHeightProviderFactory . |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
canCreateHeightProvider(ILcdModel aModel)
Checks if a height provider can be created from the given
ILcdModel . |
ILcdHeightProvider |
createHeightProvider(ILcdModel aModel,
Map<String,Object> aRequiredPropertiesSFCT,
Map<String,Object> aOptionalProperties)
Returns a height provider for a given
ILcdModel using the given
properties. |
protected abstract ILcdHeightProvider |
createModelElementHeightProvider(Object aElement,
Map<String,Object> aRequiredPropertiesSFCT,
Map<String,Object> aOptionalProperties)
Creates an
ILcdHeightProvider for the given model element. |
protected void |
transformProperties(ILcdModel aModel,
ILcdGeoReference aFromReference,
ILcdGeoReference aToReference,
Map<String,Object> aRequiredPropertiesSFCT,
Map<String,Object> aOptionalPropertiesSFCT)
Transforms the properties in the
TLcdHeightProviderProperties . |
public ALcdModelHeightProviderFactory()
TLcdModelHeightProviderFactory
.public ILcdHeightProvider createHeightProvider(ILcdModel aModel, Map<String,Object> aRequiredPropertiesSFCT, Map<String,Object> aOptionalProperties) throws TLcdMissingPropertyException, TLcdUnsupportedPropertyException
ILcdModelHeightProviderFactory
ILcdModel
using the given
properties. The returned height provider is determined by the implementation,
the ILcdModel
and the given properties.createHeightProvider
in interface ILcdModelHeightProviderFactory
aModel
- an ILcdModel
for which a height provider is created.aRequiredPropertiesSFCT
- the required properties. The properties can be retrieved using a
String
key describing the property type. When not all required properties
are used, an exception is thrown. aRequiredProperties
may be empty but should
not be null
. When an implementation of this interface uses a required
property, it should always remove it from the list of required properties. When the
ILcdHeightProvider
is actually made, implementations should verify that
the list of required properties is empty (and all required properties are used).aOptionalProperties
- the optional properties. The properties can be retrieved using a
String
key describing the property type. The optional properties may or may
not be used by the implementation. aOptionalProperties
may be empty but
should not be null.null
when elevation
is not supported or when no valid height provider can be created.TLcdMissingPropertyException
- when the implementation misses a necessary property.TLcdUnsupportedPropertyException
- when a required property is not used by the
implementation.TLcdModelHeightProviderFactoryUtil
protected void transformProperties(ILcdModel aModel, ILcdGeoReference aFromReference, ILcdGeoReference aToReference, Map<String,Object> aRequiredPropertiesSFCT, Map<String,Object> aOptionalPropertiesSFCT) throws TLcdOutOfBoundsException
TLcdHeightProviderProperties
. A height provider
factory that extends this class should override this method if it defines extra properties
that depend on the geo reference property. If this is the case, it should be possible to
transform these properties to aToReference
.aModel
- a model defined with respect to aToReference
.aFromReference
- the reference in which the properties are defined.aToReference
- the reference to which the properties will be transformed.aRequiredPropertiesSFCT
- the required properties.aOptionalPropertiesSFCT
- the optional properties.TLcdOutOfBoundsException
- when a property cannot be transformed correctly.protected abstract ILcdHeightProvider createModelElementHeightProvider(Object aElement, Map<String,Object> aRequiredPropertiesSFCT, Map<String,Object> aOptionalProperties) throws TLcdMissingPropertyException, TLcdUnsupportedPropertyException
ILcdHeightProvider
for the given model element.aElement
- a model element.aRequiredPropertiesSFCT
- the required properties.aOptionalProperties
- the optional properties.ILcdHeightProvider
for the given model element or null
if no ILcdHeightProvider
can be created.TLcdMissingPropertyException
- when a property is missing that is necessary to
create the ILcdHeightProvider
.TLcdUnsupportedPropertyException
- when a required property was never used while
creating the ILcdHeightProvider
.protected abstract boolean canCreateHeightProvider(ILcdModel aModel)
ILcdModel
.aModel
- the given model.true
if a height provider can be created from the given model and
false
otherwise.