Class DataInstallUtil
- java.lang.Object
-
- gov.nasa.worldwindx.examples.dataimport.DataInstallUtil
-
public class DataInstallUtil extends java.lang.ObjectDataInstallUtil is a collection of utility methods for common data import tasks.
-
-
Constructor Summary
Constructors Constructor Description DataInstallUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.io.FilegetDefaultInstallLocation(FileStore fileStore)Returns a location in the specifiedFileStorewhich should be used as the default location for installing data.static booleanisDataRaster(java.lang.Object source, AVList params)Returns true if the specified input source is non-null and represents a data raster (imagery or elevation), and false otherwise.static booleanisWWDotNetLayerSet(java.lang.Object source)Returns true if the specified input source is non-null and represents a reference to a WorldWind .NET LayerSet XML document, and false otherwise.
-
-
-
Method Detail
-
isDataRaster
public static boolean isDataRaster(java.lang.Object source, AVList params)Returns true if the specified input source is non-null and represents a data raster (imagery or elevation), and false otherwise. The input source may be one of the following:StringFileURLURIInputStream
- Parameters:
source- the input source reference to test as a data raster.params- the parameter list associated with the input source, ornullto indicate there are no known parameters. If the raster is already known to be imagery or elevation data, specify a non-nullparameter list with the keyAVKey.PIXEL_FORMATset toAVKey.IMAGEorAVKey.ELEVATION.- Returns:
trueif the input source is data raster, andfalseotherwise.- Throws:
java.lang.IllegalArgumentException- if the input source isnull.
-
isWWDotNetLayerSet
public static boolean isWWDotNetLayerSet(java.lang.Object source)
Returns true if the specified input source is non-null and represents a reference to a WorldWind .NET LayerSet XML document, and false otherwise. The input source may be one of the following:StringFileURLURIInputStream
- Parameters:
source- the input source reference to test as a WorldWind .NET LayerSet document.- Returns:
- true if the input source is a WorldWind .NET LayerSet document, and false otherwise.
- Throws:
java.lang.IllegalArgumentException- if the input source is null.
-
getDefaultInstallLocation
public static java.io.File getDefaultInstallLocation(FileStore fileStore)
Returns a location in the specifiedFileStorewhich should be used as the default location for installing data. This attempts to use the first FileStore location marked as an "install" location. If no install location exists, this falls back to the FileStore's default write location, the same location where downloaded data is cached.The returned
Filerepresents an abstract path, and therefore may not exist. In this case, the caller must create the missing directories composing the abstract path.- Parameters:
fileStore- the FileStore to determine the default location for installing data.- Returns:
- the default location in the specified FileStore to be used for installing data.
- Throws:
java.lang.IllegalArgumentException- if the FileStore is null.
-
-