com.bbn.openmap.layer.rpf
Class RpfViewAttributes

java.lang.Object
  extended by com.bbn.openmap.layer.rpf.RpfViewAttributes
All Implemented Interfaces:
RpfConstants, PropertyConsumer, java.io.Serializable

public class RpfViewAttributes
extends java.lang.Object
implements RpfConstants, PropertyConsumer, java.io.Serializable

This class contains information to pass through the RpfCacheManager and RpfCacheHandlers to describe limitations and parameters desired for data view. It contains information about the numbers of colors to use, how opaque to make the images, the chart series to retrieve, etc.

See Also:
Serialized Form

Field Summary
static java.lang.String ALL
           
static java.lang.String ANY
           
 boolean autofetchAttributes
          Autofetch the subframe attributes from the FrameProvider.
 java.lang.String chartSeries
          The data series two-letter code to limit responses to.
 int colorModel
          The image colormodel to use, indexed or colortable, for the OMRasters.
static java.lang.String COLORMODEL_DIRECT_STRING
           
static java.lang.String COLORMODEL_INDEXED_STRING
           
protected  I18n i18n
           
 float imageScaleFactor
          The limiting factor for image scaling.
 int numberOfColors
          Number of colors to use - 16, 32, 216
 int opaqueness
          The opaqueness of the image (transparency) 0-255: 0 is clear, 255 is opaque.
protected  java.lang.String propertyPrefix
           
 boolean requireProjection
          Flag to set if the CADRG projection is required.
 boolean scaleImages
          Flag to use to scale images or not.
protected  boolean scaleMoreImportantThanCoverage
          Flag to tell TOC handler to use scale over percent coverage when choosing the best coverage box.
 boolean showInfo
          Flag to display attribute information about the subframes.
 boolean showMaps
          Flag to display images.
 
Fields inherited from interface com.bbn.openmap.layer.rpf.RpfConstants
AutoFetchAttributeProperty, AuxCacheSizeProperty, BLANK, CacheSizeProperty, CADRG, CDTED, ChartSeriesProperty, CIB, CITYGRAPHICS, ColormodelProperty, ColorProperty, CoverageProperty, DefaultRPFCoveragePrefix, FillProperty, ImageScaleFactorProperty, KillCacheProperty, lockedButtonTitle, lockSeriesCommand, NumColorsProperty, OpaquenessProperty, RpfPathsProperty, ScaleImagesProperty, ScaleOverCoverageProperty, showCGCommand, showCoverageCommand, ShowCoverageProperty, showInfoCommand, ShowInfoProperty, showMapsCommand, ShowMapsProperty, TOPOLINEMAP, unlockedButtonTitle, Various, VARIOUS
 
Fields inherited from interface com.bbn.openmap.PropertyConsumer
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
 
Constructor Summary
RpfViewAttributes()
           
 
Method Summary
 java.lang.String getInitPropertiesOrder()
          Specify what order properties should be presented in an editor.
 java.util.Properties getProperties(java.util.Properties props)
          PropertyConsumer method, to fill in a Properties object, reflecting the current values of the layer.
 java.util.Properties getPropertyInfo(java.util.Properties list)
          Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer.
 java.lang.String getPropertyPrefix()
          Get the property key prefix that is being used to prepend to the property keys for Properties lookups.
 boolean isScaleMoreImportantThanCoverage()
           
 void setDefaults()
           
 void setProperties(java.util.Properties props)
          Sets the properties.
 void setProperties(java.lang.String prefix, java.util.Properties props)
          Method to set the properties in the PropertyConsumer.
 void setPropertyPrefix(java.lang.String prefix)
          Set the property key prefix that should be used by the PropertyConsumer.
 void setScaleMoreImportantThanCoverage(boolean scaleMoreImportantThanCoverage)
          Set whether scale is more of a determining factor over percent coverage when choosing best entry for a map projection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY

public static final java.lang.String ANY
See Also:
Constant Field Values

ALL

public static final java.lang.String ALL
See Also:
Constant Field Values

COLORMODEL_DIRECT_STRING

public static final java.lang.String COLORMODEL_DIRECT_STRING
See Also:
Constant Field Values

COLORMODEL_INDEXED_STRING

public static final java.lang.String COLORMODEL_INDEXED_STRING
See Also:
Constant Field Values

propertyPrefix

protected java.lang.String propertyPrefix

numberOfColors

public int numberOfColors
Number of colors to use - 16, 32, 216


opaqueness

public int opaqueness
The opaqueness of the image (transparency) 0-255: 0 is clear, 255 is opaque.


colorModel

public int colorModel
The image colormodel to use, indexed or colortable, for the OMRasters.


scaleImages

public boolean scaleImages
Flag to use to scale images or not. This will cause the caches to scale the images to match the map scale, instead of requiring the map to be at the same scale as the desired image.


imageScaleFactor

public float imageScaleFactor
The limiting factor for image scaling. Make this too big, and you will run out of memory.


chartSeries

public java.lang.String chartSeries
The data series two-letter code to limit responses to. If you want any data that is the closest match for the current map, use ANY (default). If you want all of the RpfCoverageBoxes that have some coverage, use ALL.


requireProjection

public boolean requireProjection
Flag to set if the CADRG projection is required. Might not be, if we start warping images.


showMaps

public boolean showMaps
Flag to display images.


showInfo

public boolean showInfo
Flag to display attribute information about the subframes.


scaleMoreImportantThanCoverage

protected boolean scaleMoreImportantThanCoverage
Flag to tell TOC handler to use scale over percent coverage when choosing the best coverage box. If false, you'll get the best match with the most coverage, rather than coverage most appropriate for the map scale. The traditional behavior is true, as is the default setting. However, when the layer is used for creating tiles, you get better background results by setting this to false, and the gaps are filled in with different level coverage.


autofetchAttributes

public boolean autofetchAttributes
Autofetch the subframe attributes from the FrameProvider. Use only if you are interested in background information about the images.


i18n

protected transient I18n i18n
Constructor Detail

RpfViewAttributes

public RpfViewAttributes()
Method Detail

setDefaults

public void setDefaults()

isScaleMoreImportantThanCoverage

public boolean isScaleMoreImportantThanCoverage()
Returns:
true of scale is used as a determining factor over coverage percentage when choosing best entry.

setScaleMoreImportantThanCoverage

public void setScaleMoreImportantThanCoverage(boolean scaleMoreImportantThanCoverage)
Set whether scale is more of a determining factor over percent coverage when choosing best entry for a map projection.

Parameters:
scaleMoreImportantThanCoverage -

setProperties

public void setProperties(java.util.Properties props)
Sets the properties. This particular method assumes that the marker name is not needed, because all of the contents of this Properties object are to be used for this object, and scoping the properties with a prefix is unnecessary.

Specified by:
setProperties in interface PropertyConsumer
Parameters:
props - the Properties object.

setProperties

public void setProperties(java.lang.String prefix,
                          java.util.Properties props)
Description copied from interface: PropertyConsumer
Method to set the properties in the PropertyConsumer. The prefix is a string that should be prepended to each property key (in addition to a separating '.') in order for the PropertyConsumer to uniquely identify properties meant for it, in the midst of of Properties meant for several objects.

Specified by:
setProperties in interface PropertyConsumer
Parameters:
prefix - a String used by the PropertyConsumer to prepend to each property value it wants to look up - setList.getProperty(prefix.propertyKey). If the prefix had already been set, then the prefix passed in should replace that previous value.
props - a Properties object that the PropertyConsumer can use to retrieve expected properties it can use for configuration.

getProperties

public java.util.Properties getProperties(java.util.Properties props)
PropertyConsumer method, to fill in a Properties object, reflecting the current values of the layer. If the layer has a propertyPrefix set, the property keys should have that prefix plus a separating '.' prepended to each property key it uses for configuration.

Specified by:
getProperties in interface PropertyConsumer
Parameters:
props - a Properties object to load the PropertyConsumer properties into. If props equals null, then a new Properties object should be created.
Returns:
Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

getPropertyInfo

public java.util.Properties getPropertyInfo(java.util.Properties list)
Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. The key for each property should be the raw property name (without a prefix) with a value that is a String that describes what the property key represents, along with any other information about the property that would be helpful (range, default value, etc.). For Layer, this method should at least return the 'prettyName' property.

Specified by:
getPropertyInfo in interface PropertyConsumer
Parameters:
list - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
Returns:
Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

getInitPropertiesOrder

public java.lang.String getInitPropertiesOrder()
Specify what order properties should be presented in an editor.


setPropertyPrefix

public void setPropertyPrefix(java.lang.String prefix)
Set the property key prefix that should be used by the PropertyConsumer. The prefix, along with a '.', should be prepended to the property keys known by the PropertyConsumer.

Specified by:
setPropertyPrefix in interface PropertyConsumer
Parameters:
prefix - the prefix String.

getPropertyPrefix

public java.lang.String getPropertyPrefix()
Get the property key prefix that is being used to prepend to the property keys for Properties lookups.

Specified by:
getPropertyPrefix in interface PropertyConsumer
Returns:
the property prefix


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details