@PublicAPI public class MDDBWriter extends MDWriter
Constructor and Description |
---|
MDDBWriter() |
MDDBWriter(boolean indexTable)
Used internally.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes down the descriptor output stream.
|
ConnectionHandler |
getConnectionHandler()
Gets the ConnectionHandler object used to reach the database.
|
java.lang.String[] |
getMDNames()
Gets the names of the Molecular Descriptors in database
|
MDParameters |
getMDParameters(int id)
Gets the actual parameter settings of the specified component.
|
java.lang.String |
getStructureTable()
Gets the name of the structure table
|
void |
put(Molecule mol,
int id)
Inserts descriptor data into the database
|
void |
put(java.lang.String molString,
int id)
Inserts descriptor data into the database
|
void |
setConnectionHandler(ConnectionHandler ch)
Sets the ConnectionHandler object used to reach the database.
|
void |
setMDNames(java.lang.String[] mdNames)
Sets the names of the Molecular Descriptors in database
|
void |
setStructureTable(java.lang.String strucTableName)
Sets the name of the structure table
|
void |
setUpdateMode(boolean updateMode)
Specifies whether new records will be added, or existing records updated.
|
public MDDBWriter()
public MDDBWriter(boolean indexTable)
indexTable
- true
, if writer operates on an index table.public void setConnectionHandler(ConnectionHandler ch)
ch
- the ConnectionHandler with an open connection to the database.public ConnectionHandler getConnectionHandler()
public void setStructureTable(java.lang.String strucTableName)
strucTableName
- the name of the structure tablepublic java.lang.String getStructureTable()
public void setMDNames(java.lang.String[] mdNames)
mdNames
- the name of the Molecular Descriptorspublic java.lang.String[] getMDNames()
public MDParameters getMDParameters(int id)
getMDParameters
in class MDWriter
id
- component indexpublic void setUpdateMode(boolean updateMode)
updateMode
- set to true
for updateing existing rows.public void put(java.lang.String molString, int id) throws MDWriterException
molString
- the string representation of molecule to generate descriptor
data fromid
- the cd_id of the table rows : should be the same, as in the
structure tableMDWriterException
- all exceptions (mainly io) are reinterpretedpublic void put(Molecule mol, int id) throws MDWriterException
put
in class MDWriter
mol
- the molecule to generate descriptor data fromid
- the cd_id of the table rows : should be the same, as in the
structure tableMDWriterException
- all exceptions (mainly io) are reinterpretedpublic void close() throws MDWriterException
close
guarantees that
all data put so far are permanently saved in the stream. close
in class MDWriter
MDWriterException
- all exceptions (mainly io) are reinterpreted