NASA World Wind

gov.nasa.worldwind.terrain
Class BasicElevationModelFactory

java.lang.Object
  extended by gov.nasa.worldwind.BasicFactory
      extended by gov.nasa.worldwind.terrain.BasicElevationModelFactory
All Implemented Interfaces:
Factory

public class BasicElevationModelFactory
extends BasicFactory

A factory that creates ElevationModel instances.


Constructor Summary
BasicElevationModelFactory()
           
 
Method Summary
 ElevationModel createFromConfigFile(String fileName)
          Creates an elevation model from a configuration file.
protected  ElevationModel doCreateFromCapabilities(Capabilities caps, AVList params)
          Implemented by subclasses to perform the actual object creation.
 
Methods inherited from class gov.nasa.worldwind.BasicFactory
createFromCapabilities, createFromClassName, createFromKeys, doCreateFromKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicElevationModelFactory

public BasicElevationModelFactory()
Method Detail

createFromConfigFile

public ElevationModel createFromConfigFile(String fileName)
Creates an elevation model from a configuration file. Maps the serviceName attribute of the ElevationModel 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, and "WWTileService" for elevation models that draw their data from a World Wind tile service.

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).

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.

NASA World Wind