uk.me.parabola.imgfmt.app.mdr
Class Mdr10

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.mdr.ConfigBase
      extended by uk.me.parabola.imgfmt.app.mdr.MdrSection
          extended by uk.me.parabola.imgfmt.app.mdr.MdrMapSection
              extended by uk.me.parabola.imgfmt.app.mdr.Mdr10

public class Mdr10
extends MdrMapSection

POI subtype with a reference to MDR11. These are sorted into groups based on the type, and contain the subtype. The mdr9 section contains an index to this section based on the the type groups.

Author:
Steve Ratcliffe

Constructor Summary
Mdr10(MdrConfig config)
           
 
Method Summary
 void addPoiType(int type, Mdr11Record poi)
           
 int getExtraValue()
          Return the value that is put in the header after the section start, len and recsize fields.
 java.util.Map<java.lang.Integer,java.lang.Integer> getGroupSizes()
          Get a list of the group sizes along with the group index number.
 int getItemSize()
          This does not have a record size.
 int getNumberOfItems()
          The number of records in this section.
 int getPointerSize()
          Get the size of an integer that is sufficient to store a record number from this section.
 void setNumberOfPois(int numberOfPois)
           
 void writeSectData(ImgFileWriter writer)
          Write out the contents of this section.
 
Methods inherited from class uk.me.parabola.imgfmt.app.mdr.MdrMapSection
addIndexPointer, init, putCityIndex, putPoiIndex, putRegionIndex, setMapIndex
 
Methods inherited from class uk.me.parabola.imgfmt.app.mdr.MdrSection
getSizes, numberToPointerSize, putMapIndex, putN, putStringOffset, setSizes
 
Methods inherited from class uk.me.parabola.imgfmt.app.mdr.ConfigBase
getConfig, isForDevice, setConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mdr10

public Mdr10(MdrConfig config)
Method Detail

addPoiType

public void addPoiType(int type,
                       Mdr11Record poi)

writeSectData

public void writeSectData(ImgFileWriter writer)
Description copied from class: MdrSection
Write out the contents of this section.

Specified by:
writeSectData in class MdrSection
Parameters:
writer - Where to write it.

getGroupSizes

public java.util.Map<java.lang.Integer,java.lang.Integer> getGroupSizes()
Get a list of the group sizes along with the group index number.

Returns:
A map that is guaranteed to iterate in the correct order for writing mdr9. The key is the group number and the value is the number of entries in that group.

getItemSize

public int getItemSize()
This does not have a record size.

Specified by:
getItemSize in class MdrSection
Returns:
Always zero to indicate that there is not a record size.

getNumberOfItems

public int getNumberOfItems()
Description copied from class: MdrMapSection
The number of records in this section.

Specified by:
getNumberOfItems in class MdrMapSection
Returns:
The number of items in the section.

setNumberOfPois

public void setNumberOfPois(int numberOfPois)

getPointerSize

public int getPointerSize()
Get the size of an integer that is sufficient to store a record number from this section.

Specified by:
getPointerSize in class MdrMapSection
Returns:
A number between 1 and 4 giving the number of bytes required to store the largest record number in this section.

getExtraValue

public int getExtraValue()
Description copied from class: MdrMapSection
Return the value that is put in the header after the section start, len and recsize fields. At least in some cases this field controls what fields and/or size exist in the section.

Specified by:
getExtraValue in class MdrMapSection
Returns:
The correct value based on the contents of the section. Zero if nothing needs to be done.