uk.ac.ed.inf.csb.taweka
Class ArffPropertiesDbWriter

java.lang.Object
  extended by uk.ac.ed.inf.csb.taweka.ArffPropertiesDbWriter

public class ArffPropertiesDbWriter
extends java.lang.Object

Writes into a database table the pointers needed to build an arff file (the name of the arff file, the query to select instances, attributes, class values etc)

Version:
16-Apr-2007
Author:
Luna De Ferrari luna.deferrari-at-ed.ac.uk

Constructor Summary
ArffPropertiesDbWriter(ArffGenerator arffGenerator)
          Constructor 1: initialises the table (uses given database connection file)
 
Method Summary
 void createArffPropertiesTable()
          Creates the table for the ARFF file records
 void dropAndCreateTable()
          Beware! This method drops and recreates the ARFF table.
 ArffGenerator getArffGenerator()
           
 int getArffRecordId()
           
 java.lang.String getPropertyFromTable(java.lang.String propertyName)
           
 uk.ac.ed.inf.csb.utils.databaseutils.Table getTable()
           
static void main(java.lang.String[] args)
          Main for recreating table
 void savePropertiesToDb()
          Insert the properties in the table, each property value is inserted in the table-field with the same name as the property key
 boolean writeTableToDb()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArffPropertiesDbWriter

public ArffPropertiesDbWriter(ArffGenerator arffGenerator)
Constructor 1: initialises the table (uses given database connection file)

Throws:
java.sql.SQLException
Method Detail

createArffPropertiesTable

public void createArffPropertiesTable()
Creates the table for the ARFF file records


writeTableToDb

public boolean writeTableToDb()

savePropertiesToDb

public void savePropertiesToDb()
Insert the properties in the table, each property value is inserted in the table-field with the same name as the property key


dropAndCreateTable

public void dropAndCreateTable()
Beware! This method drops and recreates the ARFF table. All arff files definitions already in the table will be lost!


getPropertyFromTable

public java.lang.String getPropertyFromTable(java.lang.String propertyName)

getTable

public uk.ac.ed.inf.csb.utils.databaseutils.Table getTable()

getArffGenerator

public ArffGenerator getArffGenerator()

getArffRecordId

public int getArffRecordId()

main

public static void main(java.lang.String[] args)
                 throws java.sql.SQLException
Main for recreating table

Parameters:
args -
Throws:
java.sql.SQLException