gov.nasa.worldwind.util
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Constructor Summary | |
|---|---|
DataConfigurationUtils()
|
|
| Method Summary | |
|---|---|
static void |
checkAndSetBooleanParam(DataConfiguration context,
AVList params,
String paramKey,
String paramName)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an parameter matching a specified name. |
static void |
checkAndSetDoubleParam(DataConfiguration context,
AVList params,
String paramKey,
String paramName)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an parameter matching a specified name. |
static void |
checkAndSetIntegerParam(DataConfiguration context,
AVList params,
String paramKey,
String paramName)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an parameter matching a specified name. |
static void |
checkAndSetLatLonParam(DataConfiguration context,
AVList params,
String paramKey,
String paramName)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an parameter matching a specified name. |
static void |
checkAndSetLongParam(DataConfiguration context,
AVList params,
String paramKey,
String paramName)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an parameter matching a specified name. |
static void |
checkAndSetSectorParam(DataConfiguration context,
AVList params,
String paramKey,
String paramName)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an parameter matching a specified name. |
static void |
checkAndSetSectorResolutionParam(DataConfiguration context,
AVList params,
String paramKey,
String paramName)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an parameter matching a specified name. |
static void |
checkAndSetStringArrayParam(DataConfiguration context,
AVList params,
String paramKey,
String paramName)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an parameter matching a specified name. |
static void |
checkAndSetStringParam(DataConfiguration context,
AVList params,
String paramKey,
String paramName)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an parameter matching a specified name. |
static void |
checkAndSetTimeParam(DataConfiguration context,
AVList params,
String paramKey,
String paramName)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an parameter matching a specified name. |
static void |
checkAndSetTimeParamAsInteger(DataConfiguration context,
AVList params,
String paramKey,
String paramName)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an parameter matching a specified name. |
static void |
checkAndSetUniqueStringsParam(DataConfiguration context,
AVList params,
String paramKey,
String paramName)
Checks a parameter list for a specified key and if not present attempts to find a value for the key from an parameter matching a specified name. |
protected static String |
chooseImageFormat(Capabilities caps,
String[] formatOrderPreference)
|
protected static int |
computeLayerNumLevels(Angle minDelta,
Angle maxDelta)
|
protected static int |
computeLayerNumLevels(LatLon minDelta,
LatLon maxDelta)
|
static DataConfiguration |
createDataConfig(Element domElement)
Create a DataConfiguration from a specified Document. |
static Element |
createLevelSetElements(AVList params,
Element context)
Appends LevelSet parameters as elements to a specified context. |
static Element |
createWMSLayerElements(AVList params,
Element context)
Appends WMS layer parameters as elements to a specified context. |
static URL |
findExistingDataConfigFile(FileStore fileStore,
String fileName)
Returns the URL of an existing data configuration file under the specified file store, or null if no configuration file exists. |
static String |
getDataConfigFilename(AVList params,
String suffix)
Returns a file store path name for the specified parameters list. |
static AVList |
getFileStoreParams(FileStore fileStore,
String dataConfigFileName,
AVList params)
Convenience method for parsing parameters about a configuration file in a specified FileStore. |
protected static String |
getInactiveLevels(LevelSet levelSet)
|
protected static int[] |
getLayerFixedWidthAndHeight(Capabilities caps,
Element layer)
|
protected static LatLon |
getLayerGeographicMaxTileDelta(Element layer)
|
protected static LatLon |
getLayerGeographicMinTileDelta(Element layer)
|
protected static LatLon |
getLayerGeographicTileOrigin(Element layer)
|
protected static LatLon |
getLayerLatLon(Element layer,
String path)
|
static AVList |
getLevelSetParams(DataConfiguration dataConfig,
AVList params)
Parses LevelSet parameters from the configuration information. |
static AVList |
getLevelSetParams(Element domElement,
AVList params)
Parses LevelSet parameters from a specified DOM document. |
static AVList |
getLevelSetParams(LevelSet levelSet,
AVList params)
Gathers LevelSet parameters from a specified LevelSet reference. |
static AVList |
getNonComposableWMSLayerParams(Capabilities caps,
AVList params)
Parses non-composable WMS layer parameters from the WMS Capabilities document starting at domElement. |
protected static int |
getNumEmptyLevels(LevelSet levelSet)
|
static URL |
getOGCGetCapabilitiesURL(AVList params)
Convenience metohd to get the OGC GetCapabilities URL from a specified parameter list. |
static String[] |
getOGCLayerNames(AVList params)
Convenience method to get the OGC AVKey.LAYER_NAMES parameter from a specified parameter list. |
static AVList |
getWMSLayerParams(Capabilities caps,
String[] formatOrderPreference,
AVList params)
Parses WMS layer parameters from the WMS Capabilities document starting at domElement. |
static AVList |
getWMSLayerParams(Element domElement,
AVList params)
Parses WMS layer parameters from the XML configuration document starting at domElement. |
static boolean |
hasDataConfigFile(FileStore fileStore,
String fileName,
boolean removeIfExpired,
long expiryTime)
Returns true if a configuration file name exists in the store which has not expired. |
static boolean |
isDataConfig(Element domElement)
Returns true if the specified Element should be accepted as a configuration document. |
static boolean |
isNonComposableWMSLayer(Capabilities caps,
AVList params)
Returns true if the layer is a non-composable WMS layer, indicating that GetMap requests must be made by the client against a specific tiling structure. |
protected static String |
makeTitle(Capabilities caps,
String layerNames,
String styleNames)
|
static DataConfiguration |
openDataConfigFile(String filePath,
Class c)
Opens a configuration file given the file's location in the file system or on the classpath. |
static DataConfiguration |
openDataConfigStream(InputStream inputStream)
Reads configuration information given an input stream. |
static DataConfiguration |
openDataConfigURL(URL url)
Reads configuration information given a URL. |
static void |
saveDataConfigDocument(Document doc,
FileStore fileStore,
String fileName)
Saves a specified configuration document to a specified file store, under a specified name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataConfigurationUtils()
| Method Detail |
|---|
public static void checkAndSetBooleanParam(DataConfiguration context, AVList params, String paramKey, String paramName)
context - the context in which look for the parameter.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the parameter name identifying the parameter value within the specified context.
IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.public static void checkAndSetDoubleParam(DataConfiguration context, AVList params, String paramKey, String paramName)
context - the context in which look for the parameter.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the parameter name identifying the parameter value within the specified context.
IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.public static void checkAndSetIntegerParam(DataConfiguration context, AVList params, String paramKey, String paramName)
context - the context in which look for the parameter.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the parameter name identifying the parameter value within the specified context.
IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.public static void checkAndSetLatLonParam(DataConfiguration context, AVList params, String paramKey, String paramName)
context - the context in which look for the parameter.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the parameter name identifying the parameter value within the specified context.
IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.public static void checkAndSetLongParam(DataConfiguration context, AVList params, String paramKey, String paramName)
context - the context in which look for the parameter.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the parameter name identifying the parameter value within the specified context.
IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.public static void checkAndSetSectorParam(DataConfiguration context, AVList params, String paramKey, String paramName)
context - the context in which look for the parameter.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the parameter name identifying the parameter value within the specified context.
IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.public static void checkAndSetSectorResolutionParam(DataConfiguration context, AVList params, String paramKey, String paramName)
context - the context in which look for the parameter.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the parameter name identifying the parameter value within the specified context.
IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.public static void checkAndSetStringArrayParam(DataConfiguration context, AVList params, String paramKey, String paramName)
context - the context in which look for the parameter.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the parameter name identifying the parameter value within the specified context.
IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.public static void checkAndSetStringParam(DataConfiguration context, AVList params, String paramKey, String paramName)
context - the context in which look for the parameter.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the parameter name identifying the parameter value within the specified context.
IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.public static void checkAndSetTimeParam(DataConfiguration context, AVList params, String paramKey, String paramName)
context - the context in which look for the parameter.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the parameter name identifying the parameter value within the specified context.
IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.public static void checkAndSetTimeParamAsInteger(DataConfiguration context, AVList params, String paramKey, String paramName)
context - the context in which look for the parameter.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the parameter name identifying the parameter value within the specified context.
IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.public static void checkAndSetUniqueStringsParam(DataConfiguration context, AVList params, String paramKey, String paramName)
context - the context in which look for the parameter.params - the parameter list.paramKey - the key used to identify the paramater in the parameter list.paramName - the parameter name identifying the parameter value within the specified context.
IllegalArgumentException - if either the context, parameter list, parameter key or parameter name are
null.protected static String chooseImageFormat(Capabilities caps, String[] formatOrderPreference)
protected static int computeLayerNumLevels(Angle minDelta, Angle maxDelta)
protected static int computeLayerNumLevels(LatLon minDelta, LatLon maxDelta)
public static DataConfiguration createDataConfig(Element domElement)
Layer configuration documentsElevationModel configuration documents
domElement - the document to create
IllegalArgumentException - if the document is null.public static Element createLevelSetElements(AVList params, Element context)
| Key | Name | Path |
AVKey.DATASET_NAME | DatasetName | String |
AVKey.DATA_CACHE_NAME | DataCacheName | String |
AVKey.SERVICE | Service/URL | String |
AVKey.EXPIRY_TIME | ExpiryTime | Long |
AVKey.EXPIRY_TIME | LastUpdate | Long |
AVKey.FORMAT_SUFFIX | FormatSuffix | String |
AVKey.NUM_LEVELS | NumLevels/@count | Integer |
AVKey.NUM_EMPTY_LEVELS | NumLevels/@numEmpty | Integer |
AVKey.INACTIVE_LEVELS | NumLevels/@inactive | String |
AVKey.SECTOR | Sector | Sector |
AVKey.SECTOR_RESOLUTION_LIMITS | SectorResolutionLimit | LevelSet.SectorResolution |
AVKey.TILE_ORIGIN | TileOrigin/LatLon | LatLon |
AVKey.TILE_WIDTH | TileSize/Dimension/@width | Integer |
AVKey.TILE_HEIGHT | TileSize/Dimension/@height | Integer |
AVKey.LEVEL_ZERO_TILE_DELTA | LastUpdate | LatLon |
AVKey.MAX_ABSENT_TILE_ATTEMPTS | MaxAbsentTileAttempts | Integer |
AVKey.MIN_ABSENT_TILE_CHECK_INTERVAL | MinAbsentTileCheckInterval | Integer |
params - the key-value pairs which define the LevelSet parameters.context - the XML document root on which to append parameter elements.
IllegalArgumentException - if either the parameters or the context are null.public static Element createWMSLayerElements(AVList params, Element context)
| Key | Name | Type |
AVKey.WMS_VERSION | Service/@version | String |
AVKey.LAYER_NAMES | Service/LayerNames | String |
AVKey.STYLE_NAMES | Service/StyleNames | String |
AVKey.GET_MAP_URL | Service/GetMapURL | String |
AVKey.GET_CAPABILITIES_URL | Service/GetCapabilitiesURL | String |
AVKey.IMAGE_FORMAT | ImageFormat | String |
AVKey.SERVICE | AVKey#GET_MAP_URL | String |
AVKey.DATASET_NAME | AVKey.LAYER_NAMES | String |
params - the key-value pairs which define the WMS layer parameters.context - the XML document root on which to append parameter elements.
IllegalArgumentException - if either the parameters or the context are null.public static URL findExistingDataConfigFile(FileStore fileStore, String fileName)
fileStore - the file store in which to look.fileName - the file name to look for. If a file with this nname does not exist in the store, this looks at
the file's siblings for a match.
IllegalArgumentException - if either the file store or file name are null.public static String getDataConfigFilename(AVList params, String suffix)
params - the parameter list to extract a configuration filename from.suffix - the file suffix to append on the path name, or null to append no suffix.
IllegalArgumentException - if the parameter list is null.public static AVList getFileStoreParams(FileStore fileStore, String dataConfigFileName, AVList params)
FileStore. This
writes output as key-value pairs to params. If a parameter from the XML document already exists in params, that
parameter is ignored. Supported key and parameter names are: | Key | Name | Type |
AVKey.DATA_CACHE_NAME | DataCacheName | String |
DataCacheName is chosen as the file name's relative parent directory path in the file
store. This convention is chosen so that the configuration file sits along side the component's cached data,
therefore the cache name points to the directory containing both the configuration file and the contents. This
enables the component described by DataCacheName to be moved withing the file store (along with the
configuration file), because the DataCacheName parameter is bound at discovery time, and not hard
wired in the configuration file itself.
fileStore - file store which contains the file path.dataConfigFileName - file store path of the configuration information.params - the output key-value pairs which recieve the LevelSet parameters. A null reference is
permitted.
IllegalArgumentException - if either the file store or file name is null, or if the configuration file
cannot be read for any reason.protected static String getInactiveLevels(LevelSet levelSet)
protected static int[] getLayerFixedWidthAndHeight(Capabilities caps, Element layer)
protected static LatLon getLayerGeographicMaxTileDelta(Element layer)
protected static LatLon getLayerGeographicMinTileDelta(Element layer)
protected static LatLon getLayerGeographicTileOrigin(Element layer)
protected static LatLon getLayerLatLon(Element layer, String path)
public static AVList getLevelSetParams(DataConfiguration dataConfig, AVList params)
| Key | Name | Type |
AVKey.DATASET_NAME | DatasetName | String |
AVKey.DATA_CACHE_NAME | DataCacheName | String |
AVKey.SERVICE | Service/URL | String |
AVKey.EXPIRY_TIME | ExpiryTime | Long |
AVKey.EXPIRY_TIME | LastUpdate | Long |
AVKey.FORMAT_SUFFIX | FormatSuffix | String |
AVKey.NUM_LEVELS | NumLevels/@count | Integer |
AVKey.NUM_EMPTY_LEVELS | NumLevels/@numEmpty | Integer |
AVKey.INACTIVE_LEVELS | NumLevels/@inactive | String |
AVKey.SECTOR | Sector | Sector |
AVKey.SECTOR_RESOLUTION_LIMITS | SectorResolutionLimit | LevelSet.SectorResolution |
AVKey.TILE_ORIGIN | TileOrigin/LatLon | LatLon |
AVKey.TILE_WIDTH | TileSize/Dimension/@width | Integer |
AVKey.TILE_HEIGHT | TileSize/Dimension/@height | Integer |
AVKey.LEVEL_ZERO_TILE_DELTA | LastUpdate | LatLon |
AVKey.MAX_ABSENT_TILE_ATTEMPTS | AbsentTiles/MaxAttempts | Integer |
AVKey.MIN_ABSENT_TILE_CHECK_INTERVAL | AbsentTiles/MinCheckInterval/Time | Integer milliseconds |
dataConfig - the configuration information in which to look for for LevelSet parameters.params - the output key-value pairs which recieve the LevelSet parameters. A null reference is
permitted.
IllegalArgumentException - if the configuration information is null.public static AVList getLevelSetParams(Element domElement, AVList params)
| Key | Name | Type |
AVKey.DATASET_NAME | DatasetName | String |
AVKey.DATA_CACHE_NAME | DataCacheName | String |
AVKey.SERVICE | Service/URL | String |
AVKey.EXPIRY_TIME | ExpiryTime | Long |
AVKey.EXPIRY_TIME | LastUpdate | Long |
AVKey.FORMAT_SUFFIX | FormatSuffix | String |
AVKey.NUM_LEVELS | NumLevels/@count | Integer |
AVKey.NUM_EMPTY_LEVELS | NumLevels/@numEmpty | Integer |
AVKey.INACTIVE_LEVELS | NumLevels/@inactive | String |
AVKey.SECTOR | Sector | Sector |
AVKey.SECTOR_RESOLUTION_LIMITS | SectorResolutionLimit | LevelSet.SectorResolution |
AVKey.TILE_ORIGIN | TileOrigin/LatLon | LatLon |
AVKey.TILE_WIDTH | TileSize/Dimension/@width | Integer |
AVKey.TILE_HEIGHT | TileSize/Dimension/@height | Integer |
AVKey.LEVEL_ZERO_TILE_DELTA | LastUpdate | LatLon |
AVKey.MAX_ABSENT_TILE_ATTEMPTS | AbsentTiles/MaxAttempts | Integer |
AVKey.MIN_ABSENT_TILE_CHECK_INTERVAL | AbsentTiles/MinCheckInterval/Time | Integer milliseconds |
domElement - the XML document root to parse for LevelSet parameters.params - the output key-value pairs which recieve the LevelSet parametres. A null reference is
permitted.
IllegalArgumentException - if the document is null.public static AVList getLevelSetParams(LevelSet levelSet, AVList params)
| Key | Value | Type | |
AVKey.DATASET_NAME | First Level's dataset | String | |
AVKey.DATA_CACHE_NAME | First Level's cacheName | String | |
AVKey.SERVICE | First Level's service | String | |
AVKey.EXPIRY_TIME | First Level's expiryTime | Long | |
AVKey.FORMAT_SUFFIX | FirstLevel's formatSuffix | String | |
AVKey.NUM_LEVELS | numLevels | Integer | |
AVKey.NUM_EMPTY_LEVELS | 1 + index of first non-empty Level | Integer | |
AVKey.INACTIVE_LEVELS | Comma delimited string of Level numbers | String | |
AVKey.SECTOR | sector | Sector | |
AVKey.SECTOR_RESOLUTION_LIMITS | sectorLevelLimits | LevelSet.SectorResolution | |
AVKey.TILE_ORIGIN | tileOrigin | LatLon | |
AVKey.TILE_WIDTH | First Level's tileWidth | Integer | |
AVKey.TILE_HEIGHT | First Level's tileHeight | Integer | |
AVKey.LEVEL_ZERO_TILE_DELTA | levelZeroTileDelta | LatLon |
levelSet - the LevelSet reference to gather parameters from.params - the output key-value pairs which recieve the LevelSet parameters. A null reference is permitted.
IllegalArgumentException - if the document is null.public static AVList getNonComposableWMSLayerParams(Capabilities caps, AVList params)
Capabilities document starting at domElement. The
specified parameter list must contain a non-empty String value under the key AVKey.LAYER_NAMES, and it
must match one of the names layers in the specified Capabilities document. This writes output as key-value pairs
to params. Supported key and parameter names are: | Key | Value | Type |
AVKey.TILE_WIDTH | WMS layer's fixedWidth attribute | Integer |
AVKey.TILE_HEIGHT | WMS layer's fixedHeight attribute | Integer |
AVKey.TILE_ORIGIN | WMS layer's GeographicTileOrigin element | LatLon |
AVKey.LEVEL_ZERO_TILE_DELTA | WMS layer's GeographicTileDelta/MaxTileDelta element | LatLon |
AVKey.NUM_LEVELS | Function of WMS layer's GeographicTileDelta/MaxTileDelta and GeographictileDelta/MinTileDelta elements | Integer |
caps - the WMS Capabilities document to parse for WMS layer parameters.params - the output key-value pairs which recieve the WMS layer parameters.
IllegalArgumentException - if either the document or params are null, or if params does not contain the
required key-value pairs.
WWRuntimeException - if the Capabilities document does not contain any of the required information.isNonComposableWMSLayer(gov.nasa.worldwind.wms.Capabilities, gov.nasa.worldwind.avlist.AVList)protected static int getNumEmptyLevels(LevelSet levelSet)
public static URL getOGCGetCapabilitiesURL(AVList params)
params - parameter list to get the GetCapabilities parameters from.
IllegalArgumentException - if the parameter list is null.public static String[] getOGCLayerNames(AVList params)
AVKey.LAYER_NAMES parameter from a specified parameter list. If the
parameter is available as a String, this returns all the OGC layer names found in that String. Otherwise this
returns null.
params - parameter list to get the layer names from.
IllegalArgumentException - if the parameter list is null.public static AVList getWMSLayerParams(Capabilities caps, String[] formatOrderPreference, AVList params)
Capabilities document starting at domElement. The specified
parameter list must contain a non-empty String value under the key AVKey.LAYER_NAMES, and it must match
one of the names layers in the specified Capabilities document. The parameter list may optionally contain a
String value under the key AVKey.STYLE_NAMES. This writes output as key-value pairs to params. Supported
key and parameter names are: | Key | Value | Type |
AVKey.DISPLAY_NAME | Combination of WMS layer names and style names | String |
AVKey.DATASET_NAME | WMS layer names | String |
AVKey.EXPIRY_TIME | WMS layer last update time | String |
AVKey.GET_MAP_URL | WMS GetMap Get URL | String |
AVKey.GET_CAPABILITIES_URL | WMS GetCapabilities Get URL | String |
AVKey.SERVICE | WMS GetMap Get URL | String |
AVKey.SERVICE_NAME | Capabilities#WMS_SERVICE_NAME | String |
AVKey.WMS_VERSION | WMS version | String |
AVKey.DATA_CACHE_NAME | Combination of WMS layer names and style names | String |
AVKey.IMAGE_FORMAT | First WMS image format matching the specified formats | String |
AVKey.SECTOR | Union of WMS layer bounding boxes | Sector |
caps - the WMS Capabilities document to parse for WMS layer parameters.formatOrderPreference - an ordered array of preferred image formats, or null to use the default format.params - the output key-value pairs which recieve the WMS layer parameters.
IllegalArgumentException - if either the document or params are null, or if params does not contain the
required key-value pairs.
WWRuntimeException - if the Capabilities document does not contain any of the required information.public static AVList getWMSLayerParams(Element domElement, AVList params)
| Key | Name | Type |
AVKey.WMS_VERSION | Service/@version | String |
AVKey.LAYER_NAMES | Service/LayerNames | String |
AVKey.STYLE_NAMES | Service/StyleNames | String |
AVKey.GET_MAP_URL | Service/GetMapURL | String |
AVKey.GET_CAPABILITIES_URL | Service/GetCapabilitiesURL | String |
AVKey.IMAGE_FORMAT | ImageFormat | String |
AVKey.SERVICE | AVKey#GET_MAP_URL | String |
AVKey.DATASET_NAME | AVKey.LAYER_NAMES | String |
domElement - the XML document root to parse for WMS layer parameters.params - the output key-value pairs which recieve the WMS layer parameters. A null reference is
permitted.
IllegalArgumentException - if the document is null.public static boolean hasDataConfigFile(FileStore fileStore, String fileName, boolean removeIfExpired, long expiryTime)
findExistingDataConfigFile(gov.nasa.worldwind.cache.FileStore,
String) to determine the URL of any existing file names. If an existing file has expired, and removeIfExpired is
true, this removes the existing file.
fileStore - the file store in which to look.fileName - the file name to look for. If a file with this nname does not exist in the store, this
looks at the file's siblings for a match.removeIfExpired - true to remove the existing file, if it exists and is expired; false otherwise.expiryTime - the time in milliseconds, before which a file is considered to be expired.
IllegalArgumentException - if either the file store or file name are null.public static boolean isDataConfig(Element domElement)
Element should be accepted as a configuration document.
domElement - the document in question.
IllegalArgumentException - if the document is null.public static boolean isNonComposableWMSLayer(Capabilities caps, AVList params)
AVKey.LAYER_NAMES, and it must match one of the names layers in the specified Capabilities
document.
caps - the WMS Capabilities document to parse for WMS layer parameters.params - the output key-value pairs which recieve the WMS layer parameters.
IllegalArgumentException - if either the document or params are null, or if params does not contain the
required key-value pairs.
WWRuntimeException - if the Capabilities document does not contain any of the required information.protected static String makeTitle(Capabilities caps, String layerNames, String styleNames)
public static DataConfiguration openDataConfigFile(String filePath, Class c)
filePath - the path to the file. Must be an absolute path or a path relative to a location in the
classpath.c - the class that is used to find a path relative to the classpath.
IllegalArgumentException - if the file path is null.
WWRuntimeException - if an exception or error occurs while opening and parsing the file. The causing
exception is included in this exception's Throwable.initCause(Throwable)
.public static DataConfiguration openDataConfigStream(InputStream inputStream)
inputStream - the configuration information as an input stream.
IllegalArgumentException - if the input stream is null.
WWRuntimeException - if an exception or error occurs while parsing the string. The causing exception
is included in this exception's Throwable.initCause(Throwable)public static DataConfiguration openDataConfigURL(URL url)
URL.
url - the configuration information .
IllegalArgumentException - if the input stream is null.
WWRuntimeException - if an exception or error occurs while parsing the string. The causing exception
is included in this exception's Throwable.initCause(Throwable)public static void saveDataConfigDocument(Document doc, FileStore fileStore, String fileName)
doc - the DOM document to save.fileStore - the file store to save the document under.fileName - the path to the file. Must be an relative path in the file store.
IllegalArgumentException - if either the document, file store, or file name are null.
WWRuntimeException - if the file cannot be created, or if an exception or error occurs while writing
the document. The causing exception is included in this exception's Throwable.initCause(Throwable)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||