uk.me.parabola.tdbfmt
Class TdbFile

java.lang.Object
  extended by uk.me.parabola.tdbfmt.TdbFile

public class TdbFile
extends java.lang.Object

The TDB file. See the package documentation for more details.

Author:
Steve Ratcliffe

Field Summary
static int TDB_V3
           
static int TDB_V407
           
 
Constructor Summary
TdbFile()
           
TdbFile(int tdbVersion)
           
 
Method Summary
 void addCopyright(java.lang.String msg)
          Add a copyright segment to the file.
 void addDetail(DetailMapBlock detail)
          Add a detail block.
 int getTdbVersion()
           
static TdbFile read(java.lang.String name)
          Read in a TDB file from the disk.
 void setOverview(java.lang.String name, Area bounds, java.lang.String number)
          Set the overview information.
 void setProductInfo(int familyId, int productId, short productVersion, java.lang.String seriesName, java.lang.String familyName, java.lang.String overviewDescription, byte enableProfile)
           
 void write(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TDB_V3

public static final int TDB_V3
See Also:
Constant Field Values

TDB_V407

public static final int TDB_V407
See Also:
Constant Field Values
Constructor Detail

TdbFile

public TdbFile()

TdbFile

public TdbFile(int tdbVersion)
Method Detail

read

public static TdbFile read(java.lang.String name)
                    throws java.io.IOException
Read in a TDB file from the disk.

Parameters:
name - The file name to load.
Returns:
A TdbFile instance.
Throws:
java.io.IOException - For problems reading the file.

setProductInfo

public void setProductInfo(int familyId,
                           int productId,
                           short productVersion,
                           java.lang.String seriesName,
                           java.lang.String familyName,
                           java.lang.String overviewDescription,
                           byte enableProfile)

addCopyright

public void addCopyright(java.lang.String msg)
Add a copyright segment to the file.

Parameters:
msg - The message to add.

setOverview

public void setOverview(java.lang.String name,
                        Area bounds,
                        java.lang.String number)
Set the overview information. Basically the overall size of the map set.

Parameters:
name - The overview map name.
bounds - The bounds for the map.

addDetail

public void addDetail(DetailMapBlock detail)
Add a detail block. This describes and names one of the maps in the map set.

Parameters:
detail - The detail to add.

write

public void write(java.lang.String name)
           throws java.io.IOException
Throws:
java.io.IOException

getTdbVersion

public int getTdbVersion()