public abstract class AbstractElevationModelDescriptor extends Object implements ElevationModelDescriptor
AbstractElevationModelDescriptor
offers a default implementation for the installDemFiles(Object)
method. It uses the properties values returned ElevationModelDescriptor.getDemArchiveUrl()
and getDemInstallDir()
methods
in order to download and install the DEM.Modifier and Type | Field and Description |
---|---|
static String |
INSTALL_DIR_PROPERTY_NAME |
static String |
PROPERTIES_FILE_NAME |
DEM_INSTALLATION_CANCELED, DEM_INSTALLATION_ERROR, DEM_INSTALLATION_IN_PROGRESS, DEM_INSTALLED
Modifier | Constructor and Description |
---|---|
protected |
AbstractElevationModelDescriptor() |
Modifier and Type | Method and Description |
---|---|
File |
getDemInstallDir()
Returns the directory (if any) where the DEM files shall be located.
|
File |
getDemPropertiesFile()
Gets the DEM properties file "${BEAM-HOME}/beam-core/auxdata/dem/${DEM}/dem.properties".
|
int |
getInstallationStatus()
Currently not used.
|
boolean |
installDemFiles(Object uiComponent)
Asynchronously installs the files required to use the DEM if not already done or in progress.
|
boolean |
isInstallingDem()
Tests whether or not the DEM is currently being installed.
|
protected Properties |
loadProperties()
Loads DEM properties from the "${BEAM-HOME}/beam-core/auxdata/dem/${DEM}/dem.properties" file.
|
protected File |
promptForDemInstallDir(Component parent)
Prompts the user for the installation directory.
|
void |
setDemInstallDir(File demInstallDir) |
protected void |
storeProperties()
Stores DEM properties in the "${BEAM-HOME}/beam-core/auxdata/dem/${DEM}/dem.properties" file.
|
protected void |
storeProperties(Properties properties)
Stores DEM properties in the "${BEAM-HOME}/beam-core/auxdata/dem/${DEM}/dem.properties" file.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createDem, getDatum, getDemArchiveUrl, getName, getNoDataValue, isDemInstalled
public static final String PROPERTIES_FILE_NAME
public static final String INSTALL_DIR_PROPERTY_NAME
public File getDemPropertiesFile()
public File getDemInstallDir()
ElevationModelDescriptor
getDemInstallDir
in interface ElevationModelDescriptor
public void setDemInstallDir(File demInstallDir)
public boolean isInstallingDem()
ElevationModelDescriptor
isInstallingDem
in interface ElevationModelDescriptor
public int getInstallationStatus()
ElevationModelDescriptor
getInstallationStatus
in interface ElevationModelDescriptor
public boolean installDemFiles(Object uiComponent)
ElevationModelDescriptor
installDemFiles
in interface ElevationModelDescriptor
uiComponent
- an optional UI component which serves as parent for progress monitoringprotected Properties loadProperties()
protected void storeProperties()
protected void storeProperties(Properties properties)
properties
- the propertiesCopyright © 2002–2014 Brockmann Consult GmbH. All rights reserved.