Package chemaxon.descriptors
Class MDDBWriter
java.lang.Object
chemaxon.descriptors.MDWriter
chemaxon.descriptors.MDDBWriter
Class for inserting Molecular Descriptors into database tables.
- Since:
- JChem 2.0
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes down the descriptor output stream.Gets the ConnectionHandler object used to reach the database.String[]Gets the names of the Molecular Descriptors in databasegetMDParameters(int id) Gets the actual parameter settings of the specified component.Gets the name of the structure tablevoidInserts descriptor data into the databasevoidInserts descriptor data into the databasevoidSets the ConnectionHandler object used to reach the database.voidsetMDNames(String[] mdNames) Sets the names of the Molecular Descriptors in databasevoidsetStructureTable(String strucTableName) Sets the name of the structure tablevoidsetUpdateMode(boolean updateMode) Specifies whether new records will be added, or existing records updated.
-
Constructor Details
-
MDDBWriter
public MDDBWriter() -
MDDBWriter
public MDDBWriter(boolean indexTable) Used internally.- Parameters:
indexTable-true, if writer operates on an index table.
-
-
Method Details
-
setConnectionHandler
Sets the ConnectionHandler object used to reach the database.- Parameters:
ch- the ConnectionHandler with an open connection to the database.
-
getConnectionHandler
Gets the ConnectionHandler object used to reach the database.- Returns:
- the ConnectionHandler
-
setStructureTable
Sets the name of the structure table- Parameters:
strucTableName- the name of the structure table
-
getStructureTable
Gets the name of the structure table- Returns:
- the name of the structure table
-
setMDNames
Sets the names of the Molecular Descriptors in database- Parameters:
mdNames- the name of the Molecular Descriptors
-
getMDNames
Gets the names of the Molecular Descriptors in database- Returns:
- the name of the Molecular Descriptors
-
getMDParameters
Gets the actual parameter settings of the specified component.- Specified by:
getMDParametersin classMDWriter- Parameters:
id- component index- Returns:
- parameter settings
- Since:
- JChem 2.1
-
setUpdateMode
public void setUpdateMode(boolean updateMode) Specifies whether new records will be added, or existing records updated.- Parameters:
updateMode- set totruefor updateing existing rows.
-
put
Inserts descriptor data into the database- Parameters:
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 table- Throws:
MDWriterException- all exceptions (mainly io) are reinterpreted- Since:
- JChem 5.3
-
put
Inserts descriptor data into the database- Specified by:
putin classMDWriter- Parameters:
mol- the molecule to generate descriptor data fromid- the cd_id of the table rows : should be the same, as in the structure table- Throws:
MDWriterException- all exceptions (mainly io) are reinterpreted
-
close
Closes down the descriptor output stream. After this, no more operation is permitted on the stream. Callingcloseguarantees that all data put so far are permanently saved in the stream.
NOTE: Doesn't close the database connection specified in the ConnectionHandler.- Specified by:
closein classMDWriter- Throws:
MDWriterException- all exceptions (mainly io) are reinterpreted
-