databionics.io
Class DiagnosisFile

java.lang.Object
  extended by databionics.io.BaseFile
      extended by databionics.io.ListFile
          extended by databionics.io.MapFile
              extended by databionics.io.ClsFile
                  extended by databionics.io.DiagnosisFile

public class DiagnosisFile
extends ClsFile

File that stores possibly multiple classification of data points or best matches.


Field Summary
protected  java.util.List allClasses
          Column with class numbers
protected static org.apache.log4j.Logger log
          Log4j logging.
 
Fields inherited from class databionics.io.ClsFile
boldClasses, classColors, classes, key2pos, keys
 
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
DiagnosisFile()
          Standard constructor
DiagnosisFile(java.lang.String filename)
          Constructor with a filename
 
Method Summary
 void add(int index, int cls)
          Add an index - class number pair
 void add(int index, java.lang.String cls)
          Add an index - class number pair
protected  java.lang.String buildLine(int row)
          Construct a line for saving.
protected  void checkHeader()
          Check consistency of header information.
 cern.colt.list.IntArrayList getAll(int pos)
          Get all class numbers of a classification by its position in the list
 cern.colt.list.IntArrayList getAllByIndex(int index)
          Get all class numbers of a classification by its index
 java.util.List getAllClasses()
          Get list of IntArrayLists with all class numbers.
static FileType getFileType()
          Get the type of file.
protected  void parseLine(int row, java.lang.String line)
          Parse a line.
 void setAllClasses(java.util.List allClasses)
          Set list of IntArrayLists with all class numbers.
 
Methods inherited from class databionics.io.ClsFile
add2bold, addClass, addClass, buildHeader, changeIndex, clear, clone, getBoldClasses, getByIndex, getClass, getClassByIndex, getClasses, getHighestClassIndex, getKeys, getQuick, getSize, hasClass, parseHeader, remove, remove, removeFromBold, removeOne, set, setBoldClasses, setBoldClasses, setClasses, setClasses, setKeys, setKeys, setKeys, size, size, sort
 
Methods inherited from class databionics.io.MapFile
add, getMap, remove, setData, setMap
 
Methods inherited from class databionics.io.ListFile
getData
 
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
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

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


allClasses

protected java.util.List allClasses
Column with class numbers

Constructor Detail

DiagnosisFile

public DiagnosisFile()
Standard constructor


DiagnosisFile

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

Parameters:
filename - Name of the file
Method Detail

parseLine

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

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

checkHeader

protected void checkHeader()
Check consistency of header information.

Overrides:
checkHeader in class ClsFile

buildLine

protected java.lang.String buildLine(int row)
Construct a line for saving.

Overrides:
buildLine in class ClsFile
Parameters:
row - Number of current line.
Returns:
Line with that number.

add

public void add(int index,
                int cls)
Add an index - class number pair

Overrides:
add in class ClsFile
Parameters:
index - of data point or best match
cls - class number

add

public void add(int index,
                java.lang.String cls)
         throws java.lang.NumberFormatException
Add an index - class number pair

Parameters:
index - of data point or best match
cls - class number
Throws:
java.lang.NumberFormatException

getAll

public cern.colt.list.IntArrayList getAll(int pos)
Get all class numbers of a classification by its position in the list

Parameters:
position - of classification

getAllByIndex

public cern.colt.list.IntArrayList getAllByIndex(int index)
Get all class numbers of a classification by its index

Parameters:
index - index of the data point

getAllClasses

public java.util.List getAllClasses()
Get list of IntArrayLists with all class numbers.


setAllClasses

public void setAllClasses(java.util.List allClasses)
Set list of IntArrayLists with all class numbers.


getFileType

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



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