databionics.io
Class BMFile

java.lang.Object
  extended by databionics.io.BaseFile
      extended by databionics.io.ListFile
          extended by databionics.io.MapFile
              extended by databionics.io.BMFile

public class BMFile
extends MapFile

File that stores a list of best matches.


Field Summary
protected  int cols
          Number of columns from header.
protected static org.apache.log4j.Logger log
          Log4j logging.
protected  int rows
          Number of rows from header.
 
Fields inherited from class databionics.io.MapFile
map
 
Fields inherited from class databionics.io.ListFile
data
 
Fields inherited from class databionics.io.BaseFile
allowEmptyLines, comment, commentPrefix, delimiter, delimiters, file, header, headerPrefix, loc, nf
 
Constructor Summary
BMFile()
          Standard constructor
BMFile(java.lang.String filename)
          Constructor with a filename
 
Method Summary
protected  void buildHeader()
          Generate header.
protected  void checkHeader()
          Check consistency of header information.
protected  void fillBMMatrix()
           
 int getBMIndexByCoordinates(int x, int y)
           
 Bestmatch getByIndex(int index)
          Get a best match by its index.
 cern.colt.list.IntArrayList getColData()
           
 int getCols()
          Get the value of cols.
static FileType getFileType()
          Get the type of file.
 cern.colt.list.IntArrayList getIndices()
           
 cern.colt.list.IntArrayList getRowData()
           
 int getRows()
          Get the number of rows in the map
 boolean keysMatch(cern.colt.list.IntArrayList keys)
           
protected  void parseHeader()
          Parse the header.
protected  void parseLine(int row, java.lang.String line)
          Parse a line.
 void setCols(int v)
          Set the value of cols.
 void setRows(int v)
          Set the number of rows in the map
 
Methods inherited from class databionics.io.MapFile
add, getMap, remove, remove, setData, setMap
 
Methods inherited from class databionics.io.ListFile
buildLine, getData, getSize
 
Methods inherited from class databionics.io.BaseFile
checkHeaderAgainstSize, getComment, getFile, getFilename, getHeader, getLocale, getNumberFormat, init, isHeader, isNaN, isNumber, load, load, parseError, save, save, setComment, setFilename, setLocale, writeStringList, writeStringList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
Log4j logging.


rows

protected int rows
Number of rows from header.


cols

protected int cols
Number of columns from header.

Constructor Detail

BMFile

public BMFile()
Standard constructor


BMFile

public BMFile(java.lang.String filename)
Constructor with a filename

Parameters:
filename - Name of the file
Method Detail

parseHeader

protected void parseHeader()
Parse the header.

Overrides:
parseHeader in class BaseFile

parseLine

protected void parseLine(int row,
                         java.lang.String line)
Parse a line.

Overrides:
parseLine in class BaseFile
Parameters:
row - Number of current line.
line - Current line.

checkHeader

protected void checkHeader()
Check consistency of header information.

Overrides:
checkHeader in class BaseFile

buildHeader

protected void buildHeader()
Generate header.

Overrides:
buildHeader in class BaseFile

getByIndex

public Bestmatch getByIndex(int index)
Get a best match by its index.

Parameters:
index - Index field of item

getRows

public int getRows()
Get the number of rows in the map

Returns:
value of rows.

setRows

public void setRows(int v)
Set the number of rows in the map

Parameters:
v - Value to assign to rows.

getCols

public int getCols()
Get the value of cols.

Returns:
value of cols.

setCols

public void setCols(int v)
Set the value of cols.

Parameters:
v - Value to assign to cols.

getRowData

public cern.colt.list.IntArrayList getRowData()

getColData

public cern.colt.list.IntArrayList getColData()

getFileType

public static FileType getFileType()
Get the type of file.


getIndices

public cern.colt.list.IntArrayList getIndices()

keysMatch

public boolean keysMatch(cern.colt.list.IntArrayList keys)

getBMIndexByCoordinates

public int getBMIndexByCoordinates(int x,
                                   int y)

fillBMMatrix

protected void fillBMMatrix()


Copyright © 2005-2006 Databionics Research Group. All Rights Reserved.