com.partnersoft.v3x.apps.MapBrowser.rover
Class TiledRoverStore

java.lang.Object
  extended by com.partnersoft.v3x.apps.MapBrowser.rover.TiledRoverStore
All Implemented Interfaces:
java.io.Serializable

public class TiledRoverStore
extends java.lang.Object
implements java.io.Serializable

A TiledRoverStore is responsible for locating and returning Rover files based on their SheetCoord. Implementations can perform this in a variety of ways and pull their data from a variety of sources. It also encapsulates the knowledge of the database's extents - for any given SheetCoord, it knows whether a rover file exists.

See Also:
Serialized Form

Constructor Summary
TiledRoverStore()
           
 
Method Summary
 PackedGoedelObjectDump createLineDumpFor(long tile)
          Creates a line dump for the given tile.
 PackedObjectDump createPointDumpFor(long tile)
          Creates a point dump for the given tile.
 java.lang.String getPath()
          The path path.
 java.io.InputStream getRoverStream(long coord)
          Returns a Rover input stream associated with a SheetCoord.
 java.util.ArrayList getRoverTilings()
           
 boolean isCompressed()
           
 long packedSheetContaining(Coord3D coord, int scaleIndex)
          Return the PackedSheetCoord for the given ground coordinate at the given scale.
 java.io.File roverDirFor(long coord)
          Returns the directory of tile data for the given PackedSheetCoord.
 java.io.File roverDirFor(SheetCoord coord)
          Returns the directory of tile data for the given SheetCoord.
 java.lang.String roverPathFor(long packedSheetCoord)
          Returns the path to tile data for the given packed SheetCoord.
 RoverTiling roverTilingAt(int index)
          Return the RoverTiling for the given index.
 void setCompressed(boolean tizit)
           
 void setPath(java.lang.String newPath)
          The path path.
 void setRoverTilings(java.util.ArrayList newTilings)
           
 SheetCoord sheetContaining(Coord3D coord, int scaleIndex)
          Return the SheetCoord for the given ground coordinate at the given scale; set the content yourself if you need to.
 boolean tileExists(long coords)
           
 boolean tileExists(SheetCoord coords)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TiledRoverStore

public TiledRoverStore()
Method Detail

getRoverStream

public java.io.InputStream getRoverStream(long coord)
                                   throws java.io.IOException
Returns a Rover input stream associated with a SheetCoord. You can assume the stream is buffered in some fashion (via BufferedInputStream or by being already in memory).

Throws:
java.io.IOException

createPointDumpFor

public PackedObjectDump createPointDumpFor(long tile)
Creates a point dump for the given tile.


createLineDumpFor

public PackedGoedelObjectDump createLineDumpFor(long tile)
Creates a line dump for the given tile.


tileExists

public boolean tileExists(SheetCoord coords)

tileExists

public boolean tileExists(long coords)

sheetContaining

public SheetCoord sheetContaining(Coord3D coord,
                                  int scaleIndex)
Return the SheetCoord for the given ground coordinate at the given scale; set the content yourself if you need to.


packedSheetContaining

public long packedSheetContaining(Coord3D coord,
                                  int scaleIndex)
Return the PackedSheetCoord for the given ground coordinate at the given scale.


roverTilingAt

public RoverTiling roverTilingAt(int index)
Return the RoverTiling for the given index.


getPath

public java.lang.String getPath()
The path path.


setPath

public void setPath(java.lang.String newPath)
The path path.


getRoverTilings

public java.util.ArrayList getRoverTilings()

setRoverTilings

public void setRoverTilings(java.util.ArrayList newTilings)

isCompressed

public boolean isCompressed()

setCompressed

public void setCompressed(boolean tizit)

roverDirFor

public java.io.File roverDirFor(SheetCoord coord)
Returns the directory of tile data for the given SheetCoord.


roverDirFor

public java.io.File roverDirFor(long coord)
Returns the directory of tile data for the given PackedSheetCoord.


roverPathFor

public java.lang.String roverPathFor(long packedSheetCoord)
Returns the path to tile data for the given packed SheetCoord. Ignores content and z for now.