gov.nasa.worldwind.layers
Class BasicLayerFactory
java.lang.Object
gov.nasa.worldwind.BasicFactory
gov.nasa.worldwind.layers.BasicLayerFactory
- All Implemented Interfaces:
- Factory
public class BasicLayerFactory - extends BasicFactory
A factory that creates Layer instances.
|
Constructor Summary |
BasicLayerFactory()
Creates an instance of BasicLayerFactory; otherwise does nothing. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicLayerFactory
public BasicLayerFactory()
- Creates an instance of BasicLayerFactory; otherwise does nothing.
createFromConfigFile
public Object createFromConfigFile(String fileName)
- Creates a layer from a configuration file.
Maps the
layerType attribute of the Layer element of the XML configuration file to the
appropriate layer type. Layer types recognized are: - "TiledImageLayer" for layers that render tiled
surface imagery.
For tiled image layers, this maps the serviceName attribute of the Layer/Service
element of the XML configuration file to the appropriate base tiled image layer type. Service types recognized
are: - "WMS" for layers that draw their data from a WMS web service.
- "WWTileService" for layers
that draw their data from a World Wind tile service.
- "Offline" for layers 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. The file must be either an absolute path or a relative path
available on the classpath.
- Returns:
- a layer.
- 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 a layer from a data configuration.
Maps the
Layer/layerType configuration parameter to the appropriate layer type. Layer types
recognized are: - "TiledImageLayer" for layers that render tiled surface imagery.
For tiled image layers, this maps the Layer/Service/serviceName configuration property to the
appropriate base tiled image layer type. Service types recognized are: - "WMS" for layers that draw their
data from a WMS web service.
- "WWTileService" for layers that draw their data from a World Wind tile
service
- "Offline" for layers 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:
- a layer.
- 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).
createFromLayerDocument
protected Layer createFromLayerDocument(Element domElement,
AVList params)
createTiledImageLayer
protected Layer createTiledImageLayer(Element domElement,
AVList params)
doCreateFromCapabilities
protected Layer 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 Layer doCreateFromDataConfig(DataConfiguration dataConfig,
AVList params)
throws Exception
- Throws:
Exception
doCreateFromDocument
protected Layer doCreateFromDocument(Element domElement,
AVList params)
throws Exception
- Throws:
Exception
|
|