gov.nasa.worldwind.terrain
Class BasicElevationModelFactory
java.lang.Object
gov.nasa.worldwind.BasicFactory
gov.nasa.worldwind.terrain.BasicElevationModelFactory
- All Implemented Interfaces:
- Factory
public class BasicElevationModelFactory - extends BasicFactory
A factory that creates ElevationModel instances.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicElevationModelFactory
public BasicElevationModelFactory()
createCompoundModel
protected CompoundElevationModel createCompoundModel(Element domElement,
AVList params)
createDefaultModel
protected ElevationModel createDefaultModel(Element domElement,
AVList params)
createFromConfigFile
public ElevationModel createFromConfigFile(String fileName)
- Creates an elevation model from a configuration file.
Maps the
modelType attribute of the ElevationModel element of the XML configuration
file to the appropriate elevation model type. Elevation model types recognized are: - "Compound" for
models composed of other models.
- Any other value defaults to a default elevation model
implementation.
For non-compound models, this maps the serviceName attribute of the
ElevationModel/Service element of the XML configuration file to the appropriate base elevation model
type. Service types recognized are:" - "WMS" for elevation models that draw their data from a WMS web
service.
- "WWTileService" for elevation models that draw their data from a World Wind tile service.
- "Offline" for elevation models that draw their data only from the local cache.
- Specified by:
createFromConfigFile in interface Factory- Overrides:
createFromConfigFile in class BasicFactory
- Parameters:
fileName - the path to the configuration file. It must be either an absolute path or a relative path
available on the classpath.
- Returns:
- an elevation model.
- Throws:
IllegalArgumentException - if the configuration file name is null.
WWUnrecognizedException - if the service type is unrecognized.
WWRuntimeException - if object creation fails. The exception indicating the source of the failure is
included as the Throwable.initCause(Throwable).
createFromDataConfig
public Object createFromDataConfig(DataConfiguration dataConfig,
AVList params)
- Creates an elevation model from a data configuration.
Maps the
ElevationModel/modelType configuration parameter to the appropriate model type. Elevation
model types recognized are: - "Compound" for models composed of other models.
- Any other value
defaults to a default elevation model implementation.
For non-compound models, this maps the ElevationModel/Service/serviceName configuration property to
the appropriate base elevation model type. Service types recognized are: - "WMS" for elevation models that
draw their data from a WMS web service.
- "WWTileService" for elevation models that draw their data from a
World Wind tile service.
- "Offline" for elevation models that draw their data only from the local
cache.
- Specified by:
createFromDataConfig in interface Factory- Overrides:
createFromDataConfig in class BasicFactory
- Parameters:
dataConfig - the configuration information describing the component.params - key-value parameters which override or supplement the information provided in the specified
configuration. A null reference is permitted.
- Returns:
- an elevation model.
- Throws:
IllegalArgumentException - if the data configuration is null.
WWUnrecognizedException - if the service type is unrecognized.
WWRuntimeException - if object creation fails. The exception indicating the source of the failure is
included as the Throwable.initCause(Throwable).
doCreateFromCapabilities
protected ElevationModel doCreateFromCapabilities(Capabilities caps,
AVList params)
- Description copied from class:
BasicFactory
- Implemented by subclasses to perform the actual object creation. This default implementation always returns null.
- Overrides:
doCreateFromCapabilities in class BasicFactory
- Parameters:
caps - the capabilities document.params - a list of configuration properties. These properties override any specified in the capabilities
document. The list should contain the AVKey.LAYER_NAMES property for services that define
layers, indicating which named layers described in the capabilities document to create. If this
argumet is null or contains no layers, the first named layer is used.
- Returns:
- the requested object.
doCreateFromDataConfig
protected ElevationModel doCreateFromDataConfig(DataConfiguration dataConfig,
AVList params)
throws Exception
- Throws:
Exception
doCreateFromDocument
protected ElevationModel doCreateFromDocument(Element domElement,
AVList params)
throws Exception
- Throws:
Exception
|
|