uk.me.parabola.imgfmt.app.lbl
Class LBLFile

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.ImgFile
      extended by uk.me.parabola.imgfmt.app.lbl.LBLFile
All Implemented Interfaces:
java.io.Closeable

public class LBLFile
extends ImgFile

The file that holds all the labels for the map. Would be quite simple, but there are a number of sections that hold country, region, city, etc. records. To begin with I shall only support regular labels.

Author:
Steve Ratcliffe

Constructor Summary
LBLFile(ImgChannel chan)
           
 
Method Summary
 void allPOIsDone()
           
 City createCity(Country country, java.lang.String city, boolean unique)
           
 City createCity(Region region, java.lang.String city, boolean unique)
           
 Country createCountry(java.lang.String name, java.lang.String abbr)
           
 ExitFacility createExitFacility(int type, char direction, int facilities, java.lang.String description, boolean last)
           
 POIRecord createExitPOI(java.lang.String name, Exit exit)
           
 Highway createHighway(Region region, java.lang.String name)
           
 POIRecord createPOI(java.lang.String name)
           
 POIIndex createPOIIndex(java.lang.String name, int poiIndex, Subdivision group, int type)
           
 Region createRegion(Country country, java.lang.String region, java.lang.String abbr)
           
 Zip createZip(java.lang.String code)
           
 Label newLabel(java.lang.String text)
          Add a new label with the given text.
 int numCities()
           
 int numExitFacilities()
           
 int numHighways()
           
 int numZips()
           
 void setCharacterType(java.lang.String cs, boolean forceUpper)
           
 void setCodePage(int codePage)
           
 void write()
           
 void writePost()
           
 
Methods inherited from class uk.me.parabola.imgfmt.app.ImgFile
close, getHeader, getReader, getSize, getWriter, isWritable, position, position, setHeader, setReader, setWriter, sync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LBLFile

public LBLFile(ImgChannel chan)
Method Detail

write

public void write()

writePost

public void writePost()

setCharacterType

public void setCharacterType(java.lang.String cs,
                             boolean forceUpper)

newLabel

public Label newLabel(java.lang.String text)
Add a new label with the given text. Labels are shared, so that identical text is always represented by the same label.

Parameters:
text - The text of the label, it will be in uppercase.
Returns:
A reference to the created label.

createPOI

public POIRecord createPOI(java.lang.String name)

createExitPOI

public POIRecord createExitPOI(java.lang.String name,
                               Exit exit)

createPOIIndex

public POIIndex createPOIIndex(java.lang.String name,
                               int poiIndex,
                               Subdivision group,
                               int type)

createCountry

public Country createCountry(java.lang.String name,
                             java.lang.String abbr)

createRegion

public Region createRegion(Country country,
                           java.lang.String region,
                           java.lang.String abbr)

createCity

public City createCity(Region region,
                       java.lang.String city,
                       boolean unique)

createCity

public City createCity(Country country,
                       java.lang.String city,
                       boolean unique)

createZip

public Zip createZip(java.lang.String code)

createHighway

public Highway createHighway(Region region,
                             java.lang.String name)

createExitFacility

public ExitFacility createExitFacility(int type,
                                       char direction,
                                       int facilities,
                                       java.lang.String description,
                                       boolean last)

allPOIsDone

public void allPOIsDone()

setCodePage

public void setCodePage(int codePage)

numCities

public int numCities()

numZips

public int numZips()

numHighways

public int numHighways()

numExitFacilities

public int numExitFacilities()