com.vividsolutions.wms
Class MapImageFormatChooser

java.lang.Object
  extended by com.vividsolutions.wms.MapImageFormatChooser

public class MapImageFormatChooser
extends java.lang.Object

A Utility class to select the optimal Map Format based on some preferences.

Author:
Chris Hodgson chodgson@refractions.net

Field Summary
static java.lang.String[][] IMAGE_FORMATS
           
 
Constructor Summary
MapImageFormatChooser()
          Creates a new instance of MapImageFormatChooser.
MapImageFormatChooser(java.lang.String wmsVersion)
          Creates a new instance of MapImageFormatChooser.
 
Method Summary
 java.lang.String chooseFormat(java.lang.String[] formats)
           
static boolean isKnownFormat(java.lang.String format)
          Returns true if the specified format is known by the MapFormatChooser, false otherwise.
 void setPreferLossyCompression(boolean useLossy)
           
 void setTransparencyRequired(boolean transparencyRequired)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMAGE_FORMATS

public static final java.lang.String[][] IMAGE_FORMATS
Constructor Detail

MapImageFormatChooser

public MapImageFormatChooser()
Creates a new instance of MapImageFormatChooser.


MapImageFormatChooser

public MapImageFormatChooser(java.lang.String wmsVersion)
Creates a new instance of MapImageFormatChooser.

Method Detail

isKnownFormat

public static boolean isKnownFormat(java.lang.String format)
Returns true if the specified format is known by the MapFormatChooser, false otherwise. The MapFormatChooser can only reliably select between formats which it knows; it will only return an unknown format if there are no known formats to select from. [UT] changed to accept WMS 1.0 and 1.1.1 image formats

Parameters:
format - the format which is in question
Returns:
true if the specified format is known by the MapFormatChooser, false otherwise

setTransparencyRequired

public void setTransparencyRequired(boolean transparencyRequired)

setPreferLossyCompression

public void setPreferLossyCompression(boolean useLossy)

chooseFormat

public java.lang.String chooseFormat(java.lang.String[] formats)