@PublicAPI public class MDTableHandler extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MD_PROPERTY_COMMENT |
static java.lang.String |
MD_PROPERTY_CONF_PREFIX |
static java.lang.String |
MD_PROPERTY_SETTINGS |
static java.lang.String |
MD_PROPERTY_TYPE |
static java.lang.String |
MD_PROPERTY_UPDATE |
Constructor and Description |
---|
MDTableHandler(ConnectionHandler conh,
java.lang.String strucTableName)
Creates a new instance of MDTableHandler
|
MDTableHandler(ConnectionHandler conh,
java.lang.String tableName,
boolean indexTable)
Internally used.
|
Modifier and Type | Method and Description |
---|---|
MolecularDescriptor |
createMD(java.lang.String mdName)
Creates an MolecularDescriptor based on settings stored in the database
|
MDSet |
createMDSet(java.lang.String[] mdNames)
Creates an MDSet based on settings stored in the database
|
void |
createMDTable(java.lang.String descriptorName,
java.lang.String descType,
java.lang.String descSettings,
java.lang.String descComment)
Creates a Molecular Descriptor Table.
|
void |
createMDTable(java.lang.String descriptorName,
java.lang.String descType,
java.lang.String descSettings,
java.lang.String descComment,
boolean updateOnInsert)
Creates a Molecular Descriptor Table.
|
void |
deleteMDConfig(java.lang.String mdName,
java.lang.String configName)
Deletes the specified MolecularDescriptor setting
|
void |
deleteMDTable(java.lang.String descriptorName)
Deletes a Molecular Descriptor Table.
|
java.lang.String |
getMDComment(java.lang.String mdName)
Gets the value of the Comment property of the MolecularDescriptor
specified by its name from the property table of the JChem database.
|
java.lang.String |
getMDConfig(java.lang.String mdName,
java.lang.String configName)
Retrieves the value of the specified MolecularDescriptor configuration
|
java.lang.String[] |
getMDConfigs(java.lang.String descriptorName)
Retrieves the names of stored configurations associated with a certain
Molecular Descriptor
|
java.lang.String |
getMDSettings(java.lang.String mdName)
Gets the value of the Settings property of the MolecularDescriptor
specified by its name from the property table of the JChem database.
|
static java.lang.String |
getMDTableName(java.lang.String strucTableName,
java.lang.String descriptorName)
Generates table name for storing Molecular Descriptors
|
java.lang.String[] |
getMDTables()
Retrieves the names of Molecular Descriptor tables assigned to the
structure table and
stored in the JChem database.
|
java.lang.String |
getMDType(java.lang.String mdName)
Gets the Type property of the MolecularDescriptor specified by its name.
|
boolean |
getMDUpdateOnInsert(java.lang.String mdName)
Gets the value of the UpdateOnInsert property of the MolecularDescriptor
specified by its name from the property table of the JChem database.
|
java.lang.String[] |
getMolecularDescriptors()
Retrieves the names of MolecularDescriptors assigned to the structure
table and stored in the JChem database.
|
void |
incRegenerateDescriptorTable(java.lang.String descriptorName)
Calculates missing lines in MD table
|
boolean |
isMDTableValid(java.lang.String descriptorName)
Tests, if a given MD table is valid or not.
|
boolean |
isMDTableValidByAllIDs(java.lang.String descriptorName)
Tests, whether a given MD table is valid.
|
void |
setMDConfig(java.lang.String mdName,
java.lang.String configName,
java.lang.String config)
Sets the value of the specified MolecularDescriptor configuration
|
public static final java.lang.String MD_PROPERTY_TYPE
public static final java.lang.String MD_PROPERTY_SETTINGS
public static final java.lang.String MD_PROPERTY_COMMENT
public static final java.lang.String MD_PROPERTY_UPDATE
public static final java.lang.String MD_PROPERTY_CONF_PREFIX
public MDTableHandler(ConnectionHandler conh, java.lang.String strucTableName) throws java.sql.SQLException
conh
- ConnectionHanlder opened to the databasestrucTableName
- the name of the structure table, the Molecular
Descriptors were created using these structuresjava.sql.SQLException
- if an sql error encounteredpublic MDTableHandler(ConnectionHandler conh, java.lang.String tableName, boolean indexTable) throws java.sql.SQLException
conh
- ConnectionHanlder opened to the databasetableName
- the name of the structure tableindexTable
- strucTableName is an index tablejava.sql.SQLException
- if an sql error encounteredpublic static java.lang.String getMDTableName(java.lang.String strucTableName, java.lang.String descriptorName)
strucTableName
- the name of the structure tabledescriptorName
- the name of the descriptorpublic void createMDTable(java.lang.String descriptorName, java.lang.String descType, java.lang.String descSettings, java.lang.String descComment) throws java.sql.SQLException
descriptorName
- the name of the Molecular DescriptordescType
- the type of the descriptor as a fully qualified class namedescSettings
- the descriptor settings to be used for descriptor
generationdescComment
- a comment text for the descriptor tablejava.sql.SQLException
- if an sql error encounteredpublic void createMDTable(java.lang.String descriptorName, java.lang.String descType, java.lang.String descSettings, java.lang.String descComment, boolean updateOnInsert) throws java.sql.SQLException
descriptorName
- the name of the Molecular DescriptordescType
- the type of the descriptor as a fully qualified class namedescSettings
- the descriptor settings to be used for descriptor
generationdescComment
- a comment text for the descriptor tableupdateOnInsert
- if set to true
, the descriptors will
be automatically added for inserted structures. The default setting is
false
.java.sql.SQLException
- if an sql error encounteredpublic void deleteMDTable(java.lang.String descriptorName) throws java.sql.SQLException
descriptorName
- the name of the Molecular Descriptorjava.sql.SQLException
- if an sql error encounteredpublic boolean isMDTableValid(java.lang.String descriptorName) throws java.sql.SQLException
descriptorName
- the name of the Molecular Descriptortrue
if every row has a pair in the two tablesfalse
if the structure table contains rows not listed in the
MD table (import occurred after generation, regeneration is necessary)java.sql.SQLException
- in case of database error, or if there are rows
in the MD table that are not represented in the structure table
(this shouldn't occur)public boolean isMDTableValidByAllIDs(java.lang.String descriptorName) throws java.sql.SQLException
descriptorName
- the name of the Molecular Descriptortrue
if every row has a pair in the two tablesfalse
if the structure table contains rows not listed in the
MD table (import occurred after generation, regeneration is necessary)java.sql.SQLException
- in case of database error, or if there are rows
in the MD table that are not represented in the structure table
(this shouldn't occur)public void incRegenerateDescriptorTable(java.lang.String descriptorName) throws java.sql.SQLException
descriptorName
- the name of the Molecular Descriptorjava.sql.SQLException
- if an sql error encounteredpublic java.lang.String[] getMolecularDescriptors() throws java.sql.SQLException
java.sql.SQLException
- if an sql error encounteredpublic java.lang.String[] getMDConfigs(java.lang.String descriptorName) throws java.sql.SQLException
descriptorName
- the name of the molecular descriptorjava.sql.SQLException
- if an sql error encounteredpublic java.lang.String getMDConfig(java.lang.String mdName, java.lang.String configName) throws java.sql.SQLException
mdName
- symbolic (user defined) name of the molecular descriptorconfigName
- the name of the configurationjava.sql.SQLException
- if an sql error encounteredpublic void setMDConfig(java.lang.String mdName, java.lang.String configName, java.lang.String config) throws java.sql.SQLException
mdName
- symbolic (user defined) name of the molecular descriptorconfigName
- the name of the configurationconfig
- the configuration stringjava.sql.SQLException
- if an sql error encounteredpublic void deleteMDConfig(java.lang.String mdName, java.lang.String configName) throws java.sql.SQLException
mdName
- symbolic (user defined) name of the molecular descriptorconfigName
- the name of the configurationjava.sql.SQLException
- if an sql error encounteredpublic java.lang.String getMDSettings(java.lang.String mdName) throws java.sql.SQLException
mdName
- name of the MolecularDescriptorjava.sql.SQLException
- if an sql error encounteredpublic java.lang.String getMDType(java.lang.String mdName) throws java.sql.SQLException
mdName
- name of the MolecularDescriptorjava.sql.SQLException
- if an sql error encounteredpublic java.lang.String getMDComment(java.lang.String mdName) throws java.sql.SQLException
mdName
- name of the MolecularDescriptorjava.sql.SQLException
- if an sql error encounteredpublic boolean getMDUpdateOnInsert(java.lang.String mdName) throws java.sql.SQLException
mdName
- name of the MolecularDescriptortrue
if the descriptor should be updated on insert.java.sql.SQLException
- if an sql error encounteredpublic MDSet createMDSet(java.lang.String[] mdNames) throws java.sql.SQLException
mdNames
- the names of the Molecular Descriptorsjava.sql.SQLException
- if an sql error encounteredpublic MolecularDescriptor createMD(java.lang.String mdName) throws java.sql.SQLException
mdName
- the name of the Molecular Descriptorjava.sql.SQLException
- if an sql error encounteredpublic java.lang.String[] getMDTables() throws java.sql.SQLException
java.sql.SQLException
- if an sql error encountered