|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.BasicFactory
public class BasicFactory
A basic implementation of the Factory interface.
| Constructor Summary | |
|---|---|
BasicFactory()
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
create(java.lang.String factoryKey,
java.lang.Object configSource)
Static method to create an object from a factory and configuration source. |
java.lang.Object |
createFromCapabilities(java.lang.String capsFileName,
AVList params)
Create an object such as a layer or elevation model given a local OGC capabilities document containing named layer descriptions. |
java.lang.Object |
createFromConfigSource(java.lang.Object configSource,
AVList params)
Creates an object from a general configuration source. |
java.lang.Object |
createFromDataConfig(DataConfiguration dataConfig,
AVList params)
A no-op implementation of the Factory.createFromDataConfig(DataConfiguration,
gov.nasa.worldwind.avlist.AVList) method provided so that this class can be instantiated. |
protected java.lang.Object |
doCreateFromCapabilities(Capabilities caps,
AVList params)
Implemented by subclasses to perform the actual object creation. |
protected java.lang.Object |
doCreateFromElement(org.w3c.dom.Element domElement,
AVList params)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicFactory()
| Method Detail |
|---|
public static java.lang.Object create(java.lang.String factoryKey,
java.lang.Object configSource)
factoryKey - the key identifying the factory in Configuration.configSource - the configuration source. May be any of the types listed for createFromConfigSource(Object, gov.nasa.worldwind.avlist.AVList)
public java.lang.Object createFromCapabilities(java.lang.String capsFileName,
AVList params)
capsFileName - the path to the capabilities file. The file must be either an absolute path or a relative
path available on the classpath. The file contents must be a valid OGC 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 layer, 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.
java.lang.IllegalArgumentException - if the file name is null.
java.lang.IllegalStateException - if the capabilites document contains no named layer definitions.
WWRuntimeException - if an error occurs while opening, reading or parsing the capabilities document.
public java.lang.Object createFromConfigSource(java.lang.Object configSource,
AVList params)
URLFileInputStreamElementString holding a file name, a name of a resource on the classpath, or a string
represenation of a URL
createFromConfigSource in interface FactoryconfigSource - the configuration source. See above for supported types.params - key-value parameters to override or supplement the information provided in the specified
configuration. May be null.
java.lang.IllegalArgumentException - if the configuration file name is null or an empty string.
WWUnrecognizedException - if the source type is unrecognized.
WWRuntimeException - if object creation fails. The exception indicating the source of the failure is
included as the Throwable.initCause(Throwable).
public java.lang.Object createFromDataConfig(DataConfiguration dataConfig,
AVList params)
Factory.createFromDataConfig(DataConfiguration,
gov.nasa.worldwind.avlist.AVList) method provided so that this class can be instantiated. Not all factories need
a createFromDataConfig method; this class is therefore useful as is in these cases.
createFromDataConfig in interface FactorydataConfig - normally the configuration information describing the component.params - normally key-value parameters which will override or supplement the information provided in the
specified configuration. A null reference is permitted.
protected java.lang.Object doCreateFromCapabilities(Capabilities caps,
AVList params)
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 doCreateFromElement(org.w3c.dom.Element domElement,
AVList params)
throws java.lang.Exception
java.lang.Exception
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||