com.partnersoft.maps.translator
Class TiledRoverBuilder

java.lang.Object
  extended by com.partnersoft.maps.translator.MapDataCollector
      extended by com.partnersoft.maps.translator.TiledRoverBuilder
All Implemented Interfaces:
RoverConstants

public class TiledRoverBuilder
extends MapDataCollector
implements RoverConstants


Field Summary
 
Fields inherited from class com.partnersoft.maps.translator.MapDataCollector
name, pipeline
 
Fields inherited from interface com.partnersoft.io.formats.rover.RoverConstants
ALIGN_BOTTOM_CENTER, ALIGN_BOTTOM_FIT, ALIGN_BOTTOM_LEFT, ALIGN_BOTTOM_RIGHT, ALIGN_CENTER, ALIGN_CENTER_LEFT, ALIGN_CENTER_RIGHT, ALIGN_CODE_CENTER, ALIGN_CODE_FIT, ALIGN_CODE_HIGH, ALIGN_CODE_LOW, ALIGN_FIT, ALIGN_FIT_LEFT, ALIGN_FIT_RIGHT, ALIGN_TOP_CENTER, ALIGN_TOP_FIT, ALIGN_TOP_LEFT, ALIGN_TOP_RIGHT, COMMENT, DATA_FIELDS_MAX, EOF, FLOAT_COORDS, GEOMETRY_TYPE_NAMES, HAS_DATA, HAS_OFFSET, HAS_ROTATION, IMAGE, LIST, MASK_TYPECODE, NAMING, POINT, POINT_COLOR, POLYGON, POLYLINE, POP, PUSH, ROTATION_MULT, TEXEL_COORD_MAX, TEXEL_COORD_SIZE, TEXT, TEXT_LONG, TILE_COORD_MAX, TILE_SIZE_PIXELS, VALUE
 
Constructor Summary
TiledRoverBuilder(java.lang.String name, TranslationPipeline pipeline, MapSpace mapSpace, RoverSet roverSet, java.lang.String publishedName)
           
 
Method Summary
 void addTiledRoverBuilderListener(TiledRoverBuilderListener nosey)
           
 void close()
          Optional; closes collector.
 void collect(MapDataGraphic graphic)
           
 long packGraphicSpoolKey(int tileX, int tileY, int lumpCode)
           
 void removeTiledRoverBuilderListener(TiledRoverBuilderListener nosey)
           
 void spoolGraphic(int tileLOD, int tileX, int tileY, RoverGraphic graphic)
           
 boolean storeGraphic(int lod, RoverGraphic graphic)
          Stores the graphic in the correct tile; splits lines if need be.
 int[] unpackGraphicSpoolKey(long key)
           
 
Methods inherited from class com.partnersoft.maps.translator.MapDataCollector
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TiledRoverBuilder

public TiledRoverBuilder(java.lang.String name,
                         TranslationPipeline pipeline,
                         MapSpace mapSpace,
                         RoverSet roverSet,
                         java.lang.String publishedName)
                  throws java.io.IOException
Throws:
java.io.IOException
Method Detail

collect

public void collect(MapDataGraphic graphic)
Specified by:
collect in class MapDataCollector

storeGraphic

public boolean storeGraphic(int lod,
                            RoverGraphic graphic)
                     throws java.io.IOException
Stores the graphic in the correct tile; splits lines if need be. Returns the size on disk; 0 if it was discarded for some reason.

Throws:
java.io.IOException

close

public void close()
Description copied from class: MapDataCollector
Optional; closes collector.

Overrides:
close in class MapDataCollector

addTiledRoverBuilderListener

public void addTiledRoverBuilderListener(TiledRoverBuilderListener nosey)

removeTiledRoverBuilderListener

public void removeTiledRoverBuilderListener(TiledRoverBuilderListener nosey)

unpackGraphicSpoolKey

public int[] unpackGraphicSpoolKey(long key)

packGraphicSpoolKey

public long packGraphicSpoolKey(int tileX,
                                int tileY,
                                int lumpCode)

spoolGraphic

public void spoolGraphic(int tileLOD,
                         int tileX,
                         int tileY,
                         RoverGraphic graphic)
                  throws java.io.IOException
Throws:
java.io.IOException