public class MySQLInput extends SerialInput
| Constructor | Description |
|---|---|
MySQLInput(MySQLSession session,
java.lang.String isfName) |
The constructor sets a connection to the database.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
getAttributeCount() |
Returns the number of attributes stored in the database
|
Attribute[] |
getAttributes() |
Gets attributes
|
java.lang.String |
getAttrName(int i) |
Returns a string containing the name of the attribute.
|
java.lang.String |
getSubtype(int i) |
Returns a string containing the attribute subtype.
|
java.lang.String |
getType(int i) |
Returns a string containing the attribute type.
|
Example |
inputExample() |
Reads the next example from the data reprezentation.
|
Metadata |
inputMetadata() |
Reads the metadata (attributes and file's information) from the data
reprezentation.
|
void |
reset() |
Resets the cursor into the data stored in the EXAMPLES table.
|
public MySQLInput(MySQLSession session, java.lang.String isfName) throws SerialIOException
session - this object contains the database url, username and passwordisfName - the name of the decision problem associated with the containerSerialIOException - if can't connect to the databasepublic Metadata inputMetadata() throws SerialIOException
SerialInputinputMetadata in class SerialInputMetadata objectSerialIOException - if an error is detected in data reprezentationSerialInput.inputMetadata()public void reset()
throws SerialIOException
SerialIOException - when the database operation failespublic int getAttributeCount()
throws java.sql.SQLException
java.sql.SQLException - when the database operation failespublic java.lang.String getSubtype(int i)
throws java.sql.SQLException
i - the attribute indexjava.sql.SQLException - when the database operation failespublic java.lang.String getType(int i)
throws java.sql.SQLException
i - the attribute indexjava.sql.SQLException - when the database operation failespublic java.lang.String getAttrName(int i)
throws java.sql.SQLException
i - the attribute indexjava.sql.SQLException - when the database operation failespublic Attribute[] getAttributes() throws SerialIOException
SerialIOExceptionpublic Example inputExample() throws SerialIOException
SerialInputnull when end of data has been reached.
This method is allowed to return reference to a single instance of
Example class, modifying it during invocations.
inputExample in class SerialInputnull when end of data has been reachedSerialIOException - if an error is detected in data reprezentationSerialInput.inputExample()