public class BasicElevationModelFactory extends BasicFactory
ElevationModel
s.Constructor and Description |
---|
BasicElevationModelFactory() |
Modifier and Type | Method and Description |
---|---|
protected CompoundElevationModel |
createCompoundModel(org.w3c.dom.Element[] elements,
AVList params)
Creates a compound elevation model and populates it with a specified list of elevation models.
|
java.lang.Object |
createFromConfigSource(java.lang.Object configSource,
AVList params)
Creates an elevation model from a general configuration source.
|
protected ElevationModel |
createNonCompoundModel(org.w3c.dom.Element domElement,
AVList params)
Create a simple elevation model.
|
protected ElevationModel |
doCreateFromCapabilities(OGCCapabilities caps,
AVList params)
Implemented by subclasses to perform the actual object creation.
|
protected java.lang.Object |
doCreateFromCapabilities(WCS100Capabilities caps,
AVList params)
Implemented by subclasses to perform the actual object creation.
|
protected ElevationModel |
doCreateFromElement(org.w3c.dom.Element domElement,
AVList params)
Creates an elevation model from an XML description.
|
create, create, createFromCapabilities
protected CompoundElevationModel createCompoundModel(org.w3c.dom.Element[] elements, AVList params)
Any exceptions occurring during creation of the elevation models are logged and not re-thrown. The elevation models associated with the exceptions are not included in the returned compound model.
elements
- the XML elements describing the models in the new elevation model.params
- any parameters to apply when creating the elevation models.createNonCompoundModel(org.w3c.dom.Element, gov.nasa.worldwind.avlist.AVList)
public java.lang.Object createFromConfigSource(java.lang.Object configSource, AVList params)
URL
File
InputStream
Element
String
holding a file name, a name of a resource on the classpath,
or a string representation of a URL
For non-compound models, this method maps the serviceName
attribute of the
ElevationModel/Service
element of the XML configuration document to the appropriate elevation-model
type. Service types recognized are:"
createFromConfigSource
in interface Factory
createFromConfigSource
in class BasicFactory
configSource
- the configuration source. See above for supported types.params
- properties to associate with the elevation model during creation.java.lang.IllegalArgumentException
- if the configuration file name is null or an empty string.WWUnrecognizedException
- if the source type is unrecognized or the requested elevation-model type is
unrecognized.WWRuntimeException
- if object creation fails for other reasons. The exception identifying the source
of the failure is included as the Throwable.initCause(Throwable)
.protected ElevationModel createNonCompoundModel(org.w3c.dom.Element domElement, AVList params)
domElement
- the XML element describing the elevation model to create. The element must inculde a service
name identifying the type of service to use to retrieve elevation data. Recognized service
types are "Offline", "WWTileService" and "OGC:WMS".params
- any parameters to apply when creating the elevation model.WWUnrecognizedException
- if the service type given in the describing element is unrecognized.protected ElevationModel doCreateFromCapabilities(OGCCapabilities caps, AVList params)
BasicFactory
doCreateFromCapabilities
in class BasicFactory
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.protected java.lang.Object doCreateFromCapabilities(WCS100Capabilities caps, AVList params)
BasicFactory
doCreateFromCapabilities
in class BasicFactory
caps
- the capabilities document.params
- a list of configuration properties. These properties override any specified in the capabilities
document.protected ElevationModel doCreateFromElement(org.w3c.dom.Element domElement, AVList params) throws java.lang.Exception
doCreateFromElement
in class BasicFactory
domElement
- an XML element containing the elevation model description.params
- any parameters to apply when creating the elevation models.java.lang.Exception
- if a problem occurs during creation.createNonCompoundModel(org.w3c.dom.Element, gov.nasa.worldwind.avlist.AVList)