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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
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 tablevoid
Inserts descriptor data into the databasevoid
Inserts descriptor data into the databasevoid
Sets the ConnectionHandler object used to reach the database.void
setMDNames
(String[] mdNames) Sets the names of the Molecular Descriptors in databasevoid
setStructureTable
(String strucTableName) Sets the name of the structure tablevoid
setUpdateMode
(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:
getMDParameters
in 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 totrue
for 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:
put
in 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. Callingclose
guarantees 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:
close
in classMDWriter
- Throws:
MDWriterException
- all exceptions (mainly io) are reinterpreted
-