|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.flow.core.AbstractActor
adams.flow.source.AbstractSource
adams.flow.source.WekaDatabaseReader
public class WekaDatabaseReader
Executes a query and returns the data either in batch or incremental mode.
Input/output:-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-name <java.lang.String> (property: name) The name of the actor. default: WekaDatabaseReader
-annotation <adams.core.base.BaseText> (property: annotations) The annotations to attach to this actor. default:
-skip (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is.
-stop-flow-on-error (property: stopFlowOnError) If set to true, the flow gets stopped in case this actor encounters an error; useful for critical actors.
-url <java.lang.String> (property: URL) The JDBC URL of the database to query.
-user <java.lang.String> (property: user) The user for connecting to the database.
-password <adams.core.base.BasePassword> (property: password) The password for the database user.
-query <java.lang.String> (property: query) The SQL query to execute. default: select * from result0
-keys <java.lang.String> (property: keys) The keys to use for identifying a single row (comma-separated list of column names). default:
-incremental (property: incremental) If set to true, then single Instance objects are output, otherwise just one Instances object.
| Field Summary | |
|---|---|
protected PlaceholderFile |
m_CustomPropsFile
a custom properties file to use instead of default one. |
protected weka.core.Instances |
m_Data
the full data. |
protected boolean |
m_Incremental
whether to output the data row-by-row. |
protected String |
m_Keys
the keys that uniquely identify a single row. |
protected weka.core.Instance |
m_NextInstance
the next instance to output. |
protected BasePassword |
m_Password
the password for the user used for connecting. |
protected SQLStatement |
m_Query
the query to execute. |
protected weka.core.converters.DatabaseLoader |
m_Source
the actual loader for loading the data. |
protected boolean |
m_SparseFormat
whether to output data in sparse format. |
protected weka.core.Instances |
m_Structure
the structure. |
protected String |
m_URL
the database URL to query. |
protected String |
m_User
the database user to use for connecting. |
| Fields inherited from class adams.flow.core.AbstractActor |
|---|
FILE_EXTENSION, FILE_EXTENSION_GZ, m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
WekaDatabaseReader()
|
|
| Method Summary | |
|---|---|
String |
customPropsFileTipText()
Returns the tip text for this property. |
void |
defineOptions()
Adds options to the internal list of options. |
protected String |
doExecute()
Executes the flow item. |
Class[] |
generates()
Returns the class of objects that it generates. |
PlaceholderFile |
getCustomPropsFile()
Returns the custom properties file to use for initializing the database setup instead of WEKA's default one. |
boolean |
getIncremental()
Returns whether to output single Instance objects or just one Instances object. |
String |
getKeys()
Returns the keys to use for identifying a single row (comma-separated list). |
BasePassword |
getPassword()
Returns the database password. |
SQLStatement |
getQuery()
Returns the query to execute. |
String |
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI. |
boolean |
getSparseFormat()
Returns whether data is output in sparse format. |
String |
getURL()
Returns the query to execute. |
String |
getUser()
Returns the database user. |
String |
globalInfo()
Returns a string describing the object. |
boolean |
hasPendingOutput()
Checks whether there is pending output to be collected after executing the flow item. |
String |
incrementalTipText()
Returns the tip text for this property. |
String |
keysTipText()
Returns the tip text for this property. |
Token |
output()
Returns the generated token. |
String |
passwordTipText()
Returns the tip text for this property. |
String |
queryTipText()
Returns the tip text for this property. |
protected void |
reset()
Resets the scheme. |
void |
setCustomPropsFile(PlaceholderFile value)
Sets the custom properties file to use for initializing the database setup instead of WEKA's default one. |
void |
setIncremental(boolean value)
Sets whether to output single Instance objects or just one Instances object. |
void |
setKeys(String value)
Sets the keys to use for identifying a single row (comma-separated list). |
void |
setPassword(BasePassword value)
Sets the database password. |
void |
setQuery(SQLStatement value)
Sets the query to execute. |
void |
setSparseFormat(boolean value)
Sets whether to output the data in sparse format. |
void |
setURL(String value)
Sets the database URL to query. |
void |
setUser(String value)
Sets the database user. |
String |
sparseFormatTipText()
Returns the tip text for this property. |
void |
updateProvenance(ProvenanceContainer cont)
Updates the provenance information in the provided container. |
String |
URLTipText()
Returns the tip text for this property. |
String |
userTipText()
Returns the tip text for this property. |
void |
wrapUp()
Cleans up after the execution has finished. |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String m_URL
protected String m_User
protected BasePassword m_Password
protected SQLStatement m_Query
protected String m_Keys
protected boolean m_Incremental
protected boolean m_SparseFormat
protected PlaceholderFile m_CustomPropsFile
protected weka.core.Instances m_Structure
protected weka.core.converters.DatabaseLoader m_Source
protected weka.core.Instance m_NextInstance
protected weka.core.Instances m_Data
| Constructor Detail |
|---|
public WekaDatabaseReader()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractActorpublic String getQuickInfo()
getQuickInfo in interface QuickInfoSupportergetQuickInfo in class AbstractActorpublic void setURL(String value)
setURL in interface DatabaseConnectionParameterHandlervalue - the JDBC URLpublic String getURL()
getURL in interface DatabaseConnectionParameterHandlerpublic String URLTipText()
URLTipText in interface DatabaseConnectionParameterHandlerpublic void setUser(String value)
setUser in interface DatabaseConnectionParameterHandlervalue - the userpublic String getUser()
getUser in interface DatabaseConnectionParameterHandlerpublic String userTipText()
userTipText in interface DatabaseConnectionParameterHandlerpublic void setPassword(BasePassword value)
setPassword in interface DatabaseConnectionParameterHandlervalue - the passwordpublic BasePassword getPassword()
getPassword in interface DatabaseConnectionParameterHandlerpublic String passwordTipText()
passwordTipText in interface DatabaseConnectionParameterHandlerpublic void setQuery(SQLStatement value)
value - the querypublic SQLStatement getQuery()
public String queryTipText()
public void setKeys(String value)
value - the keyspublic String getKeys()
public String keysTipText()
public void setIncremental(boolean value)
value - if true then a single Instance objects are outputpublic boolean getIncremental()
public String incrementalTipText()
public void setSparseFormat(boolean value)
value - if true then sparse format is usedpublic boolean getSparseFormat()
public String sparseFormatTipText()
public void setCustomPropsFile(PlaceholderFile value)
value - the custom props file, ignored if a directorypublic PlaceholderFile getCustomPropsFile()
public String customPropsFileTipText()
public Class[] generates()
generates in interface OutputProducerprotected void reset()
reset in class AbstractActorprotected String doExecute()
doExecute in class AbstractActorpublic Token output()
output in interface OutputProducerpublic boolean hasPendingOutput()
hasPendingOutput in interface OutputProducerpublic void updateProvenance(ProvenanceContainer cont)
updateProvenance in interface ProvenanceSupportercont - the provenance container to updatepublic void wrapUp()
wrapUp in class AbstractActor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||