|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproper.core.ProperObject
proper.database.ConnectorObject
proper.database.ExecutorObject
proper.database.Reader
public class Reader
This class reads all the data from a given SQL table and creates WEKA
instances from that.
A verbose level of 2 prints also the SQL statements for retrieving the
instances.
Field Summary | |
---|---|
static boolean |
INCLUDE_DATE
whether to include date fields |
static java.lang.String |
NOMINAL_DUMMY
the dummy used in nominal columns that consist of NULL values only |
static boolean |
USE_DUMMY
whether to include NULL value nominal columns, i.e. |
Fields inherited from interface proper.core.ProperInterface |
---|
VERSION |
Constructor Summary | |
---|---|
Reader(Connector conn)
initializes the object |
|
Reader(Connector conn,
java.lang.String table,
java.lang.String field)
initializes the object |
Method Summary | |
---|---|
boolean |
getClassified()
returns whether classified or unclassified (= NULL) instances are returned |
java.lang.String |
getField()
returns the field used as class |
java.lang.String |
getFieldList()
returns the list of fields to retrieve (comma separated list) |
weka.core.Instances |
getInstances()
returns the previously read instances |
java.lang.String |
getNominalList()
returns the list of fields to treat additionally as nominals (comma separated list) |
java.lang.String |
getNoNullsList()
returns the list of fields where no NULL values are allowed |
java.lang.String |
getOrderBy()
returns the field used for ordering |
double |
getPercentage()
returns the currently set percentage to retrieve from the table. |
java.lang.String |
getRelationName()
returns the name of the relation |
boolean |
getSort()
returns whether the attributes are sorted or not |
java.lang.String |
getTable()
returns the name of the table to read from |
void |
read()
reads the data from the table and creates the instances from it |
void |
setClassified(boolean classified)
sets whether classified or unclassified (= NULL) instances are returned |
void |
setExcludes(java.lang.String excludes)
sets the fields (String) to exclude from export |
void |
setExcludes(java.util.Vector excludes)
sets the fields (String) to exclude from export |
void |
setField(java.lang.String field)
sets the field to use as class |
void |
setFieldList(java.lang.String fields)
sets the list (comma separated) of fields to retrieve in this order from the table |
void |
setNominalList(java.lang.String fields)
sets the list (comma separated) of fields to treat additionally as nominals the table |
void |
setNoNullsList(java.lang.String fields)
sets the list (comma separated) of fields where no NULL values are allowed |
void |
setOrderBy(java.lang.String orderBy)
sets the fields to order by (only ASC!) |
void |
setPercentage(double percentage)
sets the percentage of instances we want to retrieve from the table. |
void |
setRelationName(java.lang.String relation)
sets the name of the relation |
void |
setSort(boolean sort)
sets whether to sort the attributes or not |
void |
setTable(java.lang.String table)
sets the name of the table to use |
Methods inherited from class proper.database.ExecutorObject |
---|
getExecutor, getLastException, getLastStatement |
Methods inherited from class proper.database.ConnectorObject |
---|
getConnector |
Methods inherited from class proper.core.ProperObject |
---|
addListener, addOutput, classInVerbose, debugprint, debugprint, debugprint, debugprint, debugprintln, debugprintln, debugprintln, debugprintln, debugprintln, getListeners, getRuntime, getVerbose, getVerboseLevel, getVerboseLevelForClass, getVerboseString, getVerboseStringForClass, notifyListener, notifyListeners, print, print, print, print, println, println, println, println, println, printMemory, removeListener, setOutput, setVerbose, setVerboseLevel, setVerboseString, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean INCLUDE_DATE
public static final boolean USE_DUMMY
public static final java.lang.String NOMINAL_DUMMY
Constructor Detail |
---|
public Reader(Connector conn)
conn
- the Connector used for Database-Handlingpublic Reader(Connector conn, java.lang.String table, java.lang.String field)
conn
- the Connector used for Database-Handlingtable
- the table to use for readingfield
- the field that contains the classMethod Detail |
---|
public void setRelationName(java.lang.String relation)
public java.lang.String getRelationName()
public void setTable(java.lang.String table)
public java.lang.String getTable()
public void setField(java.lang.String field)
public java.lang.String getField()
public void setOrderBy(java.lang.String orderBy)
public java.lang.String getOrderBy()
public void setSort(boolean sort)
public boolean getSort()
public void setClassified(boolean classified)
public boolean getClassified()
public void setFieldList(java.lang.String fields)
public java.lang.String getFieldList()
public void setNominalList(java.lang.String fields)
public java.lang.String getNominalList()
public void setNoNullsList(java.lang.String fields)
public java.lang.String getNoNullsList()
public void setPercentage(double percentage)
public double getPercentage()
public weka.core.Instances getInstances()
public void setExcludes(java.util.Vector excludes)
public void setExcludes(java.lang.String excludes)
public void read()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |