NASA World Wind

gov.nasa.worldwind
Class BasicDataConfiguration

java.lang.Object
  extended by gov.nasa.worldwind.BasicDataConfiguration
All Implemented Interfaces:
DataConfiguration
Direct Known Subclasses:
CapabilitiesConfiguration, ElevationModelConfiguration, LayerConfiguration

public class BasicDataConfiguration
extends Object
implements DataConfiguration

An implementation of the DataConfiguration interface, which uses an Element as its backing store. Parameter names in query methods are interpreted as XPath queries against the backing Element.


Field Summary
protected  Element dom
           
protected  XPath xpath
           
 
Constructor Summary
BasicDataConfiguration(Element domElement)
          Creates a BasicDataConfiguration backed by a specified Element.
 
Method Summary
protected  DataConfiguration createChildConfigInfo(Element domElement)
           
 Boolean getBoolean(String paramName)
          Returns the Boolean value identified by a specified parameter name.
 DataConfiguration getChild(String paramName)
          Returns the child configuration with a specified name.
 DataConfiguration[] getChildren(String paramName)
          Returns an array of child configurations with a specified name.
 Double getDouble(String paramName)
          Returns the Double value identified by a specified parameter name.
 Integer getInteger(String paramName)
          Returns the Integer value identified by a specified parameter name.
 LatLon getLatLon(String paramName)
          Returns the LatLon value identified by a specified parameter name.
 Long getLong(String paramName)
          Returns the Long value identified by a specified parameter name.
 String getName()
          A no-op implemenation of the DataConfiguration.getName() method provided so that this class can be instantiated.
 Sector getSector(String paramName)
          Returns the Sector value identified by a specified parameter name.
 LevelSet.SectorResolution getSectorResolutionLimit(String paramName)
          Returns the LevelSet.SectorResolution value identified by a specified parameter name.
 Object getSource()
          Returns this data configuration's backing DOM Element.
 String getString(String paramName)
          Returns the String value identified by a specified parameter name.
 String[] getStringArray(String paramName)
          Returns all String values identified by a specified parameter name.
 Long getTimeInMillis(String paramName)
          Returns the time value in milliseconds identified by a specified parameter name.
 String getType()
          A no-op implemenation of the DataConfiguration.getType() method provided so that this class can be instantiated.
 String[] getUniqueStrings(String paramName)
          Returns all unique String values identified by a specified parameter name.
 String getVersion()
          A no-op implemenation of the DataConfiguration.getVersion() method provided so that this class can be instantiated.
protected  XPath getXPath()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dom

protected Element dom

xpath

protected XPath xpath
Constructor Detail

BasicDataConfiguration

public BasicDataConfiguration(Element domElement)
Creates a BasicDataConfiguration backed by a specified Element.

Parameters:
domElement - backing DOM element.
Throws:
IllegalArgumentException - if the element is null.
Method Detail

createChildConfigInfo

protected DataConfiguration createChildConfigInfo(Element domElement)

getBoolean

public Boolean getBoolean(String paramName)
Description copied from interface: DataConfiguration
Returns the Boolean value identified by a specified parameter name.

Specified by:
getBoolean in interface DataConfiguration
Parameters:
paramName - the parameter name.
Returns:
Boolean value of a parameter with the specified name. Returns null if no parameter exists with the specified name.

getChild

public DataConfiguration getChild(String paramName)
Description copied from interface: DataConfiguration
Returns the child configuration with a specified name.

Specified by:
getChild in interface DataConfiguration
Parameters:
paramName - name of the child configuration.
Returns:
a child configuration, or null if none exists.

getChildren

public DataConfiguration[] getChildren(String paramName)
Description copied from interface: DataConfiguration
Returns an array of child configurations with a specified name.

Specified by:
getChildren in interface DataConfiguration
Parameters:
paramName - name of the child configurations.
Returns:
an array of child configurations, or null if none exists.

getDouble

public Double getDouble(String paramName)
Description copied from interface: DataConfiguration
Returns the Double value identified by a specified parameter name.

Specified by:
getDouble in interface DataConfiguration
Parameters:
paramName - the parameter name.
Returns:
Double value of a parameter with the specified name. Returns null if no parameter exists with the specified name.

getInteger

public Integer getInteger(String paramName)
Description copied from interface: DataConfiguration
Returns the Integer value identified by a specified parameter name.

Specified by:
getInteger in interface DataConfiguration
Parameters:
paramName - the parameter name.
Returns:
Integer value of a parameter with the specified name. Returns null if no parameter exists with the specified name.

getLatLon

public LatLon getLatLon(String paramName)
Description copied from interface: DataConfiguration
Returns the LatLon value identified by a specified parameter name.

Specified by:
getLatLon in interface DataConfiguration
Parameters:
paramName - the parameter name.
Returns:
LatLon value of a parameter with the specified name. Returns null if no parameter exists with the specified name.

getLong

public Long getLong(String paramName)
Description copied from interface: DataConfiguration
Returns the Long value identified by a specified parameter name.

Specified by:
getLong in interface DataConfiguration
Parameters:
paramName - the parameter name.
Returns:
Long value of a parameter with the specified name. Returns null if no parameter exists with the specified name.

getName

public String getName()
A no-op implemenation of the DataConfiguration.getName() method provided so that this class can be instantiated. Not all configuration info supports a getName method; this class is therefore useful as is in these cases.

Specified by:
getName in interface DataConfiguration
Returns:
this no-op method always returns null.

getSector

public Sector getSector(String paramName)
Description copied from interface: DataConfiguration
Returns the Sector value identified by a specified parameter name.

Specified by:
getSector in interface DataConfiguration
Parameters:
paramName - the parameter name.
Returns:
Sector value of a parameter with the specified name. Returns null if no parameter exists with the specified name.

getSectorResolutionLimit

public LevelSet.SectorResolution getSectorResolutionLimit(String paramName)
Description copied from interface: DataConfiguration
Returns the LevelSet.SectorResolution value identified by a specified parameter name.

Specified by:
getSectorResolutionLimit in interface DataConfiguration
Parameters:
paramName - the parameter name.
Returns:
LevelSet.SectorResolution value of a parameter with the specified name. Returns null if no parameter exists with the specified name.

getSource

public Object getSource()
Returns this data configuration's backing DOM Element.

Specified by:
getSource in interface DataConfiguration
Returns:
the backing DOM element.

getString

public String getString(String paramName)
Description copied from interface: DataConfiguration
Returns the String value identified by a specified parameter name.

Specified by:
getString in interface DataConfiguration
Parameters:
paramName - the parameter name.
Returns:
String value of a parameter with the specified name. Returns null if no parameter exists with the specified name.

getStringArray

public String[] getStringArray(String paramName)
Description copied from interface: DataConfiguration
Returns all String values identified by a specified parameter name.

Specified by:
getStringArray in interface DataConfiguration
Parameters:
paramName - the parameter name.
Returns:
an array containing the value of each parameter matching the specified name. Returns null if no parameters exist with the specified name.

getTimeInMillis

public Long getTimeInMillis(String paramName)
Description copied from interface: DataConfiguration
Returns the time value in milliseconds identified by a specified parameter name.

Specified by:
getTimeInMillis in interface DataConfiguration
Parameters:
paramName - the parameter name.
Returns:
time in milliseconds of a parameter with the specified name. Returns null if no parameter exists with the specified name.

getType

public String getType()
A no-op implemenation of the DataConfiguration.getType() method provided so that this class can be instantiated. Not all configuration info supports a getType method; this class is therefore useful as is in these cases.

Specified by:
getType in interface DataConfiguration
Returns:
this no-op method always returns null.

getUniqueStrings

public String[] getUniqueStrings(String paramName)
Description copied from interface: DataConfiguration
Returns all unique String values identified by a specified parameter name.

Specified by:
getUniqueStrings in interface DataConfiguration
Parameters:
paramName - the parameter name.
Returns:
an array containing the value of each parameter matching the specified name, and containing a unique value. Returns null if no parameters exist with the specified name.

getVersion

public String getVersion()
A no-op implemenation of the DataConfiguration.getVersion() method provided so that this class can be instantiated. Not all configuration info supports a getVersion method; this class is therefore useful as is in these cases.

Specified by:
getVersion in interface DataConfiguration
Returns:
this no-op method always returns null.

getXPath

protected XPath getXPath()

NASA World Wind