|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.rpf.RpfCacheManager
public class RpfCacheManager
The RpfCacheManager is the object you need if you want to retrieve RPF files. You set it up with a RpfFrameProvider, and it gives that provider to the RpfCacheHandler it creates. The RpfCacheManager then handles working with the RpfCacheHandlers to get subframes to display.
RPF data comes with a Table of Contents, which sits at the root of the RPF file system structure and contains information about the frame files. When the RpfFrameProvider gets created, it creates an array of RpfTocHandlers. These Table of Contents readers know how to take a geographic area and figure out which frames and subframes are needed to put on the screen. An array of RpfTocHandlers are needed in case there are many places where there is RPF data.
The RpfCacheManager also manages objects called RpfCacheHandlers. Cache handlers take the information from a frame provider, and create a subframe cache for that zone and map type. The situation gets pretty tricky when the screen has the equator and/or the dateline on it, and a different cache handler is needed for each quadrant of the earth. This situation is relatively rare, though, and the RpfCacheManager automatically checks for these situations and creates the cache handlers needed.
There are two calls to the Cache that you need to use. The constructor sets up the cache with the location of the data. The getRectangle() call returns an OMGraphicList of objects to draw, that cover the area asked for.
Field Summary | |
---|---|
protected int |
auxCacheSize
The size of the aux caches, which are used when the map crosses the equator or dateline. |
protected RpfCacheHandler[] |
caches
The cache handlers needed to cover the screen. |
protected RpfFrameProvider |
frameProvider
The place to look for for image data. |
static int |
MAX_NUM_BOXES
A box is a earth quadrant. |
static int |
SMALL_CACHE_SIZE
The size of the smaller caches, when more cachehandlers are needed to cover the equator and the dateline. |
protected RpfViewAttributes |
viewAttributes
Contains information about displaying the RPF data. |
Constructor Summary | |
---|---|
RpfCacheManager()
|
|
RpfCacheManager(RpfFrameProvider fp)
Constructor that lets you set the RPF frame provider |
|
RpfCacheManager(RpfFrameProvider rfp,
RpfViewAttributes rva)
Constructor that lets you set the RPF frame provider, the view attributes and the subframe cache size. |
|
RpfCacheManager(RpfFrameProvider rfp,
RpfViewAttributes rva,
int mainCacheSize,
int auxSubframeCacheSize)
Constructor that lets you set the RPF frame provider, the view attributes and the subframe cache sizes. |
Method Summary | |
---|---|
void |
clearCaches()
Reset the caches in the RpfCacheHandlers. |
java.util.List<RpfCoverageBox> |
getCoverageBoxes()
Returns the Vector containing RpfCoverageBoxes from the primary RpfCacheHandler. |
RpfFrameProvider |
getFrameProvider()
Return RpfFrameProvider used by the layer. |
OMGraphicList |
getRectangle(Projection proj)
The call to the cache that lets you choose what kind of information is returned. |
RpfViewAttributes |
getViewAttributes()
Get the view attributes or the layer. |
void |
setFrameProvider(RpfFrameProvider fp)
Set the RpfFrameProvider for the layer. |
void |
setViewAttributes(RpfViewAttributes rva)
Set the view attributes for the layer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SMALL_CACHE_SIZE
public static final int MAX_NUM_BOXES
protected transient RpfCacheHandler[] caches
protected RpfFrameProvider frameProvider
protected RpfViewAttributes viewAttributes
RpfViewAttributes
protected int auxCacheSize
Constructor Detail |
---|
public RpfCacheManager()
public RpfCacheManager(RpfFrameProvider fp)
fp
- the object supplying the data.public RpfCacheManager(RpfFrameProvider rfp, RpfViewAttributes rva)
rfp
- the object supplying the data.rva
- the view attributes for the images.public RpfCacheManager(RpfFrameProvider rfp, RpfViewAttributes rva, int mainCacheSize, int auxSubframeCacheSize)
rfp
- the object supplying the data.rva
- the view attributes for the images.mainCacheSize
- the number of subframes held in the large main
cache.auxSubframeCacheSize
- the number of subframes held in the aux
caches.Method Detail |
---|
public void clearCaches()
public void setViewAttributes(RpfViewAttributes rva)
rva
- the RpfViewAttributes used for the layer.public RpfViewAttributes getViewAttributes()
public void setFrameProvider(RpfFrameProvider fp)
fp
- the frame provider.public RpfFrameProvider getFrameProvider()
public java.util.List<RpfCoverageBox> getCoverageBoxes()
public OMGraphicList getRectangle(Projection proj)
proj
- the projection of the screen.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |