at.tuwien.ifs.feature.extraction.audio.output
Class AbstractDataWriter
java.lang.Object
at.tuwien.ifs.feature.extraction.audio.output.AbstractDataWriter
- Direct Known Subclasses:
- ARFFFormatWriter, OSIRISFormatWriter, SOMLibFormatWriter, XMLFormatWriter
public abstract class AbstractDataWriter
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fileName
protected final java.lang.String fileName
outFile
protected final java.io.BufferedWriter outFile
nl
protected java.lang.String nl
featureVectorLength
protected int featureVectorLength
dataTypeID
protected java.lang.String dataTypeID
baseDirectory
protected java.lang.String baseDirectory
formatFloat
protected java.text.DecimalFormat formatFloat
formatDouble
protected java.text.DecimalFormat formatDouble
gzipped
protected boolean gzipped
classAssignmentResolver
protected ClassAssignmentResolver classAssignmentResolver
AbstractDataWriter
public AbstractDataWriter(java.lang.String outFileName)
throws java.io.IOException
- Throws:
java.io.IOException
AbstractDataWriter
public AbstractDataWriter(java.lang.String outFileName,
boolean gzipped)
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
setDataType
public void setDataType(java.lang.String dataType)
- If data type is set, e.g. the header line $DATA_TYPE will be included in the SOMLib vector
file.
- Parameters:
dataType
- set data type ID, e.g. "audio-rp"
setBaseDirectory
public void setBaseDirectory(java.lang.String baseDir)
- If the base directory is provided, it will be included in the header of the output files.
- Parameters:
baseDir
- base directory of files provided as fileLabel to the vectors
writeVector
public abstract void writeVector(FeatureVectorData featureVector)
throws java.io.IOException
- Throws:
java.io.IOException
checkVectorDim
protected void checkVectorDim(int vectorDim)
throws java.io.IOException
- Throws:
java.io.IOException
initDecimalFormats
protected void initDecimalFormats()
setClassAssignmentResolver
public void setClassAssignmentResolver(ClassAssignmentResolver classAssignmentResolver)