at.tuwien.ifs.somtoolbox.database
Class VectorFile2DatabaseImporter.TemplateVectorImporter

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.data.AbstractSOMLibTemplateVector
      extended by at.tuwien.ifs.somtoolbox.data.SOMLibTemplateVector
          extended by at.tuwien.ifs.somtoolbox.database.VectorFile2DatabaseImporter.TemplateVectorImporter
All Implemented Interfaces:
TemplateVector
Enclosing class:
VectorFile2DatabaseImporter

private class VectorFile2DatabaseImporter.TemplateVectorImporter
extends SOMLibTemplateVector

This class customises the handling of data read from the file by storing it in the DB.

Author:
Rudolf Mayer

Field Summary
private  MySQLConnector dbConnector
           
 
Fields inherited from class at.tuwien.ifs.somtoolbox.data.AbstractSOMLibTemplateVector
dim, elementMap, elements, longestStringLength, numInfo, numVectors, templateFileName
 
Fields inherited from interface at.tuwien.ifs.somtoolbox.data.TemplateVector
templateFileNameSuffix
 
Constructor Summary
VectorFile2DatabaseImporter.TemplateVectorImporter(String templateFileName, MySQLConnector dbConnector)
           
 
Method Summary
protected  void processLine(int index, String[] lineElements)
          Stores the information read in the database.
 
Methods inherited from class at.tuwien.ifs.somtoolbox.data.SOMLibTemplateVector
readTemplateVectorFile, readTemplateVectorFileHeader, setComponentNames, setLabel
 
Methods inherited from class at.tuwien.ifs.somtoolbox.data.AbstractSOMLibTemplateVector
containsLabel, dim, getDocumentFrequency, getElement, getElement, getIndex, getIndexOfFeature, getLabel, getLabels, getLabelsAsList, getLongestStringLength, getTFxIDFVectorFromTerms, incNumVectors, numinfo, numVectors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbConnector

private MySQLConnector dbConnector
Constructor Detail

VectorFile2DatabaseImporter.TemplateVectorImporter

public VectorFile2DatabaseImporter.TemplateVectorImporter(String templateFileName,
                                                          MySQLConnector dbConnector)
                                                   throws IOException
Throws:
IOException
Method Detail

processLine

protected void processLine(int index,
                           String[] lineElements)
Stores the information read in the database.

Overrides:
processLine in class SOMLibTemplateVector
Parameters:
index - the index (number) of this attribute
lineElements - the elements of this line, split by the delimiter