uk.me.parabola.mkgmap.combiners
Class FileInfo

java.lang.Object
  extended by uk.me.parabola.mkgmap.combiners.FileInfo

public class FileInfo
extends java.lang.Object

Used for holding information about an individual file that will be made into a gmapsupp file.

Author:
Steve Ratcliffe

Method Summary
 Area getBounds()
           
 java.lang.String[] getCopyrights()
           
 java.lang.String getDescription()
           
 int getFamilyId()
           
 java.lang.String getFamilyName()
           
static FileInfo getFileInfo(java.lang.String inputName)
          Create a file info the the given file.
 java.lang.String getFilename()
           
 uk.me.parabola.mkgmap.combiners.FileKind getKind()
           
 int getLblsize()
           
 java.lang.String getMapname()
           
 int getMapnameAsInt()
           
 java.lang.String getMpsName()
           
 int getNetsize()
           
 int getNodsize()
           
 int getNumBlocks(int bs)
          Get the number of blocks at the given block size.
 int getNumHeaderSlots(int blockSize)
          Get the number of blocks required at a particular block size.
 int getProductId()
           
 int getRgnsize()
           
 java.lang.String getSeriesName()
           
 int getTresize()
           
 boolean isImg()
           
 void setArgs(CommandArgs args)
           
protected  void setCopyrights(java.lang.String[] copyrights)
           
protected  void setDescription(java.lang.String description)
           
protected  void setKind(uk.me.parabola.mkgmap.combiners.FileKind kind)
           
protected  void setLblsize(int lblsize)
           
protected  void setMapname(java.lang.String mapname)
           
protected  void setNetsize(int netsize)
           
protected  void setNodsize(int nodsize)
           
protected  void setRgnsize(int rgnsize)
           
protected  void setTresize(int tresize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMapname

public java.lang.String getMapname()

setMapname

protected void setMapname(java.lang.String mapname)

getDescription

public java.lang.String getDescription()

setDescription

protected void setDescription(java.lang.String description)

getRgnsize

public int getRgnsize()

setRgnsize

protected void setRgnsize(int rgnsize)

getTresize

public int getTresize()

setTresize

protected void setTresize(int tresize)

getLblsize

public int getLblsize()

setLblsize

protected void setLblsize(int lblsize)

getBounds

public Area getBounds()

getFileInfo

public static FileInfo getFileInfo(java.lang.String inputName)
                            throws java.io.FileNotFoundException
Create a file info the the given file.

Parameters:
inputName - The filename to examine.
Returns:
The FileInfo structure giving information about the file.
Throws:
java.io.FileNotFoundException - If the file doesn't actually exist.

getFilename

public java.lang.String getFilename()

isImg

public boolean isImg()

setKind

protected void setKind(uk.me.parabola.mkgmap.combiners.FileKind kind)

getKind

public uk.me.parabola.mkgmap.combiners.FileKind getKind()

getNumHeaderSlots

public int getNumHeaderSlots(int blockSize)
Get the number of blocks required at a particular block size. Each subfile will need at least one block and so we go through each separately and round up for each and return the total.

Parameters:
blockSize - The block size.
Returns:
The number of blocks that would be needed for all the subfiles in this .img file.

getNumBlocks

public int getNumBlocks(int bs)
Get the number of blocks at the given block size. Note that a complete block is always used for a file.

Parameters:
bs - The block size at which to calculate the value.

getMapnameAsInt

public int getMapnameAsInt()

setCopyrights

protected void setCopyrights(java.lang.String[] copyrights)

getCopyrights

public java.lang.String[] getCopyrights()

getNetsize

public int getNetsize()

setNetsize

protected void setNetsize(int netsize)

getNodsize

public int getNodsize()

setNodsize

protected void setNodsize(int nodsize)

setArgs

public void setArgs(CommandArgs args)

getFamilyName

public java.lang.String getFamilyName()

getSeriesName

public java.lang.String getSeriesName()

getFamilyId

public int getFamilyId()

getProductId

public int getProductId()

getMpsName

public java.lang.String getMpsName()