|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.image.ImageMaster
public class ImageMaster
The ImageMaster is an organizer for running the ImageServer to create one or more images. It relies on a properties file, which sets up a series of entries for an ImageServer. Each entry has parameters for setting up a projection for an image, a parameters for a URL for the ImageServer to use to set up the layers for an image, and a parameter to set the name and path of the output image file.
Each map entry in the ImageServer has parameters for the projection and layer properties to use for the map image, and the size, location and format of the output image.
Nested Class Summary | |
---|---|
class |
ImageMaster.ImageMasterHelper
The ImageMasterHelper contains an ImageServer, and acts like the ImageReceiver to create the Image file when the bits are ready. |
Field Summary | |
---|---|
static java.lang.String |
ErrorLogFileProperty
Property for an error log file. |
static java.lang.String |
ImageBackgroundColorProperty
Property for the image's background color. |
static java.lang.String |
ImageHeightProperty
Property for an image's height. |
static java.lang.String |
ImageLatitudeProperty
Property for an image's projection center latitude. |
static java.lang.String |
ImageLongitudeProperty
Property for an image's projection center longitude. |
static java.lang.String |
ImageNameProperty
Property for an image's output name. |
static java.lang.String |
ImageProjectionProperty
Property for an image's projection type. |
static java.lang.String |
ImageScaleProperty
Property for an image's projection scale. |
static java.lang.String |
ImageServersProperty
Property for space separated image servers to be created. |
static java.lang.String |
ImageWidthProperty
Property for an image's width. |
protected java.util.Hashtable |
instantiatedLayers
Hashtable of instantiated layers across servers, to reduce duplication of same layers. |
static java.lang.String |
OutputLogFileProperty
Property for an output log file. |
static java.lang.String |
ScaleToHeightProperty
Property for scaling the height of image after creation. |
static java.lang.String |
ScaleToWidthProperty
Property for scaling the width of image after creation. |
static java.lang.String |
ServerPropertiesProperty
Property for the properties file holding property for a particular image. |
Constructor Summary | |
---|---|
ImageMaster(java.util.Properties props)
Create with properties. |
|
ImageMaster(java.lang.String propertiesFile)
Create with properties file. |
|
ImageMaster(java.net.URL propertiesURL)
Create with properties file URL. |
Method Summary | |
---|---|
protected void |
doNext()
This causes the ImageMaster to look through the list of ImageMasterHelpers and launch the next one that hasn't been completed. |
boolean |
loadProperties(java.util.Properties props,
java.lang.String file)
Load the named file from the named directory into the given Properties instance. |
boolean |
loadProperties(java.util.Properties props,
java.net.URL url)
Loads properties from a java resource. |
protected boolean |
loadPropertiesFromResource(java.util.Properties props,
java.lang.String resourceName)
Loads properties from a java resource. |
static void |
main(java.lang.String[] args)
Start up and go. |
static void |
printHelp()
printHelp should print a usage statement which reflects the command line needs of the ImageServer. |
static void |
printMasterProps()
Prints an example of the ImageMaster properties file. |
static void |
printServerProps()
Print the ImageServer properties file, referenced by the ImageMaster properties file. |
void |
run()
Start the ImageMaster to go through the ImageMasterHelpers. |
ImageMaster.ImageMasterHelper[] |
setImageServers(java.util.Properties properties)
Creates the ImageMasterHelper array from an ImageMaster properties object. |
void |
setProperties(java.util.Properties properties)
Set the properties for the ImageMaster, which also gets all the ImageMasterHelpers created. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ImageServersProperty
public static final java.lang.String ServerPropertiesProperty
public static final java.lang.String ImageProjectionProperty
public static final java.lang.String ImageLatitudeProperty
public static final java.lang.String ImageLongitudeProperty
public static final java.lang.String ImageScaleProperty
public static final java.lang.String ImageHeightProperty
public static final java.lang.String ImageWidthProperty
public static final java.lang.String ImageBackgroundColorProperty
public static final java.lang.String ImageNameProperty
public static final java.lang.String ScaleToWidthProperty
public static final java.lang.String ScaleToHeightProperty
public static final java.lang.String OutputLogFileProperty
public static final java.lang.String ErrorLogFileProperty
protected java.util.Hashtable instantiatedLayers
Constructor Detail |
---|
public ImageMaster(java.util.Properties props)
public ImageMaster(java.lang.String propertiesFile)
public ImageMaster(java.net.URL propertiesURL)
Method Detail |
---|
protected boolean loadPropertiesFromResource(java.util.Properties props, java.lang.String resourceName)
props
- the Properties instance to receive the propertiesresourceName
- the name of the resource to load
public boolean loadProperties(java.util.Properties props, java.net.URL url)
props
- the Properties instance to receive the propertiesurl
- the url to load
public boolean loadProperties(java.util.Properties props, java.lang.String file)
Properties
instance. If the file is not found a warning is
issued. If an IOException occurs, a fatal error is printed and the
application will exit.
file
- the name of the file
public void setProperties(java.util.Properties properties)
public void run()
protected void doNext()
public ImageMaster.ImageMasterHelper[] setImageServers(java.util.Properties properties)
properties
- the ImageMaster properties.
public static void main(java.lang.String[] args)
public static void printHelp()
public static void printMasterProps()
public static void printServerProps()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |