chemaxon.jchem.db
Class DatabaseProperties

java.lang.Object
  extended by chemaxon.jchem.db.DatabaseProperties
All Implemented Interfaces:
TableTypeConstants

public class DatabaseProperties
extends java.lang.Object
implements TableTypeConstants

Methods for reading and writing the JChemProperties table that contains information about the database and the structure tables. The content of the JChemProperties table informs JChem how to

The table has 3 columns:

prop_name Key column (stores the name of each property which is used as a unique key).
prop_value. Basic value column (short values are stored here).
prop_value_ext. Extended value column (large values are stored here).

Author:
Ferenc Csizmadia, Szilard Dorant, Peter Kovacs (pkovacs), Roland Molnar, Tamas Csizmazia, Edvard Buki, Peter Kovacs (pkovacs84)

Field Summary
static java.lang.String DEFAULT_PROPERTY_TABLE
          The default name of the property table (JChemProperties).
static java.lang.String MD_PROPERTY_PREFIX
           
static java.lang.String NAME_COLUMN
          The name of the key column (prop_name).
static java.lang.String PROP_READONLY_DATABASE_NAME
           
static java.lang.String VALUE_COLUMN
          The name of the value column (prop_value).
static java.lang.String VALUE_COLUMN_EXT
          The name of the value column extension (prop_value_ext).
 
Fields inherited from interface chemaxon.jchem.db.TableTypeConstants
FP_DEFAULT_BITS_PER_PATTERN, FP_DEFAULT_LENGTH_IN_INTS, FP_DEFAULT_PATTERN_LENGTH, MYSQL_DEFAULT_TABLE_TYPE, MYSQL_FORCE_INNO_DB, MYSQL_FORCE_MYISAM, TABLE_TYPE_ANY_STRUCTURES, TABLE_TYPE_DEFAULT, TABLE_TYPE_EXPLANATIONS, TABLE_TYPE_IS_NOT_SUPPORTED, TABLE_TYPE_MARKUSH_LIBRARIES, TABLE_TYPE_MOLECULES, TABLE_TYPE_NAMES, TABLE_TYPE_QUERY_STRUCTURES, TABLE_TYPE_REACTIONS
 
Constructor Summary
DatabaseProperties(ConnectionHandler conh)
          Deprecated. in JChem 5.8 Please use DatabaseProperties(ConnectionHandler, boolean) instead. The constructor DatabaseProperties(conh) is equivalent to DatabaseProperties(conh, false).
DatabaseProperties(ConnectionHandler conh, boolean indexTable)
          Constructs an instance for use with JChem structure tables or JChem Cartridge index tables.
 
Method Summary
 void addProperty(java.lang.String name, java.lang.String value)
          Inserts the property with the specified key and value into the JChemProperties table.
 void close()
          Should be called only if the use of prepared statements are enabled with setUsePreparedStatement(boolean).
static void createPropertyTable(ConnectionHandler conh)
          Creates a new property table for storing JChem's settings.
static void createPropertyTable(ConnectionHandler conh, int mySqlTableType)
          Creates a new property table for storing JChem's settings.
 void deleteChemTermForColumn(java.lang.String tableName, java.lang.String columnName)
          Deletes the property defining the Chemical Terms expression that should be used to compute the value for the given column.
 void deleteMDTableProperty(java.lang.String tableName, java.lang.String descrName, java.lang.String propName)
          Removes MD table property from the JChemProperties table.
 void deleteProperty(java.lang.String name)
          Removes the row with the specified key from the JChemProperties table, if it exists.
 void deleteTableProperties(java.lang.String tableName)
          Removes all table properties related to the given structure table from the JChemProperties table.
 void deleteTableProperty(java.lang.String tableName, java.lang.String propName)
          Removes a table property from the JChemProperties table.
 java.lang.StringBuilder getAllProperties()
          Returns all properties in the JChem property table.
 java.lang.String getCacheRegistrationTableName()
          Get the cache registration table name of the currently used property table.
static java.lang.String getCacheRegistrationTableName(ConnectionHandler conh)
          Get the table name containing the registration information
 java.lang.String[] getChemTermColumns(java.lang.String tableName)
          Returns the name of columns with values automatically calculated based on Chemical Terms expressions.
 java.lang.String getChemTermForColumn(java.lang.String tableName, java.lang.String columnName)
          Gets the Chemical Terms expression that should be used to compute the value for the given column.
 java.lang.String[] getFingerprintParams(java.lang.String tableName)
          Return the fingerprint parameters of a table.
 int getIntProperty(java.lang.String name)
          Searches for the property with the specified key in the JChemProperties table.
 java.lang.String[] getMDConfigs(java.lang.String tableName, java.lang.String descriptorName)
          Retrieves the names of stored configurations associated with a certain Molecular Descriptor.
 java.lang.String getMDTableProperty(java.lang.String tableName, java.lang.String descrName, java.lang.String propName)
          Gets MD table property from the JChemProperties table.
 java.lang.String[] getMolecularDescriptors(java.lang.String tableName)
          Retrieves the names of MolecularDescriptors assigned to the structure table and stored in the JChem database.
 java.lang.String getProperty(java.lang.String name)
          Searches for the property with the specified key in the JChemProperties table.
 java.util.Vector<java.lang.String> getStructureTableNames()
          Returns the names of structure tables registered in the JChemProperties table.
 int getTableIntProperty(java.lang.String tableName, java.lang.String propName)
          Gets an integer table property from the JChemProperties table.
 java.util.Map<java.lang.String,java.lang.String> getTableProperties(java.lang.String tableName)
          Return all properties for a table.
 java.lang.String getTableProperty(java.lang.String tableName, java.lang.String propName)
          Gets a table property from the JChemProperties table.
 int getTableType(java.lang.String tableName)
          Returns the type of the specified table.
 long incrementProperty(java.lang.String name)
          Increments the value of property with the specified key by one.
 boolean isChemTermColumnDefined()
          Retrieve whether at least one Chemical Term column is defined for any table or not.
 boolean isDatabaseReadonly()
          Returns whether database of the current JChem property table is readonly.
 boolean isDuplicateFilteringOption(java.lang.String tableName)
          Returns the state of the Duplicate Filtering table option.
 boolean isGenericTautomerProtectsChirality(java.lang.String tableName)
          Returns whether generic tautomer protects chirality in tautomer region.
 boolean isMolecularDescriptorDefined()
          Retrieve whether at least one MolecularDescriptor is defined for any table or not.
 boolean isSetSwitchOffAllProtectionsForTDF(java.lang.String tableName)
          Returns whether all protections for tautomer duplicate filtering is switched off.
 boolean isTautomerDuplicateFilteringEnabled(java.lang.String tableName)
          Returns whether tautomers are considered during duplicate filtering for this table.
 boolean isUsePreparedStatement()
           
static boolean propertyTableExists(ConnectionHandler conh)
          Checks if JChem property table exists.
 void setAbsoluteStereoOption(java.lang.String tableName, boolean value)
          Sets the Absolute stereo table property with the specified value in the JChemProperties table.
 java.lang.String setCacheRegistrationTableName()
          Set the name of the cache registration table for the current property table.
 void setChemTermForColumn(java.lang.String tableName, java.lang.String columnName, java.lang.String expression)
          Sets the Chemical Terms expression that should be used to compute the value for the given column.
 void setDuplicateFilteringOption(java.lang.String tableName, boolean value)
          Sets the Duplicate filtering table property with the specified value in the JChemProperties table.
 void setMDTableProperty(java.lang.String tableName, java.lang.String descrName, java.lang.String propName, java.lang.String propValue)
          Sets the given MD table property in the JChemProperties table.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets the property with the specified key and value in the JChemProperties table.
 void setStandardizerConfigOption(java.lang.String tableName, java.lang.String value)
          Sets the standardizer configuration table property to the specified value in the JChemProperties table.
 void setTableProperty(java.lang.String tableName, java.lang.String propName, java.lang.String propValue)
          Sets the given table property in the JChemProperties table.
 void setTautomerDuplicateFilteringOption(java.lang.String tableName, boolean value)
          Sets the Tautomer duplicate checking table property with the specified value in the JChemProperties table.
 void setUsePreparedStatement(boolean usePreparedStatement)
          Specifies if PreparedStatement should be used for property lookup.
 void updateProperty(java.lang.String name, java.lang.String value)
          Updates the property with the specified key and value in the JChemProperties table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PROPERTY_TABLE

public static final java.lang.String DEFAULT_PROPERTY_TABLE
The default name of the property table (JChemProperties).

See Also:
Constant Field Values

NAME_COLUMN

public static final java.lang.String NAME_COLUMN
The name of the key column (prop_name).

See Also:
Constant Field Values

VALUE_COLUMN

public static final java.lang.String VALUE_COLUMN
The name of the value column (prop_value).

See Also:
Constant Field Values

VALUE_COLUMN_EXT

public static final java.lang.String VALUE_COLUMN_EXT
The name of the value column extension (prop_value_ext).

See Also:
Constant Field Values

MD_PROPERTY_PREFIX

public static final java.lang.String MD_PROPERTY_PREFIX
See Also:
Constant Field Values

PROP_READONLY_DATABASE_NAME

public static final java.lang.String PROP_READONLY_DATABASE_NAME
See Also:
Constant Field Values
Constructor Detail

DatabaseProperties

@Deprecated
public DatabaseProperties(ConnectionHandler conh)
                   throws java.sql.SQLException
Deprecated. in JChem 5.8 Please use DatabaseProperties(ConnectionHandler, boolean) instead. The constructor DatabaseProperties(conh) is equivalent to DatabaseProperties(conh, false).

Constructs an instance for use with JChem structure tables.

Parameters:
conh - the ConnectionHandler object that contains at least a valid JDBC connection and property table name.
Throws:
java.sql.SQLException

DatabaseProperties

public DatabaseProperties(ConnectionHandler conh,
                          boolean indexTable)
                   throws java.sql.SQLException
Constructs an instance for use with JChem structure tables or JChem Cartridge index tables.

Parameters:
conh - the ConnectionHandler object that contains at least a valid JDBC connection and property table name.
indexTable - true if this instance is to be used with JChem Cartridge index tables, false in case of JChem structure tables.
Throws:
java.sql.SQLException
Since:
JChem 5.0
Method Detail

getProperty

public java.lang.String getProperty(java.lang.String name)
                             throws java.sql.SQLException
Searches for the property with the specified key in the JChemProperties table. If value is null, retruns the extended value.

Parameters:
name - the property key.
Returns:
the value in this property list with the specified key value, or null if the property doesn't exist.
Throws:
java.sql.SQLException

getIntProperty

public int getIntProperty(java.lang.String name)
                   throws java.sql.SQLException
Searches for the property with the specified key in the JChemProperties table.

Parameters:
name - the property key.
Returns:
the value converted to int, or Integer.MINVALUE, if not found in the table.
Throws:
java.lang.NumberFormatException - if the property value cannot be parsed as an integer
java.sql.SQLException

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String value)
                 throws java.sql.SQLException
Inserts the property with the specified key and value into the JChemProperties table. If the specified value is null, the property is deleted.

Parameters:
name - the property key.
value - the property value. If null, the property is deleted.
Throws:
java.sql.SQLException

updateProperty

public void updateProperty(java.lang.String name,
                           java.lang.String value)
                    throws java.sql.SQLException
Updates the property with the specified key and value in the JChemProperties table. If the specified value is null, the property is deleted.

Parameters:
name - the property key.
value - the property value. If null, the property is deleted.
Throws:
java.sql.SQLException

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
                 throws java.sql.SQLException
Sets the property with the specified key and value in the JChemProperties table. If the property exists with the specified name, then it is updated, otherwise a new row is inserted. If the specified value is null, the property is deleted.

Parameters:
name - the property key.
value - the property value. If null, the property is deleted.
Throws:
java.sql.SQLException

setDuplicateFilteringOption

public void setDuplicateFilteringOption(java.lang.String tableName,
                                        boolean value)
                                 throws java.sql.SQLException
Sets the Duplicate filtering table property with the specified value in the JChemProperties table. If the property exists with the specified name, then it is updated, otherwise a new row is inserted.

Parameters:
tableName - Name of the structure table.
value - The duplicate filtering property value.
Throws:
java.sql.SQLException
Since:
JChem 5.4

setAbsoluteStereoOption

public void setAbsoluteStereoOption(java.lang.String tableName,
                                    boolean value)
                             throws java.sql.SQLException
Sets the Absolute stereo table property with the specified value in the JChemProperties table. If the property exists with the specified name, then it is updated, otherwise a new row is inserted.

Parameters:
tableName - Name of the structure table.
value - The absolute stereo property value.
Throws:
java.sql.SQLException

setTautomerDuplicateFilteringOption

public void setTautomerDuplicateFilteringOption(java.lang.String tableName,
                                                boolean value)
                                         throws java.sql.SQLException
Sets the Tautomer duplicate checking table property with the specified value in the JChemProperties table. If the property exists with the specified name, then it is updated, otherwise a new row is inserted.

Parameters:
tableName - Name of the structure table.
value - The tautomer duplicate checking property value.
Throws:
java.sql.SQLException

setStandardizerConfigOption

public void setStandardizerConfigOption(java.lang.String tableName,
                                        java.lang.String value)
                                 throws java.sql.SQLException
Sets the standardizer configuration table property to the specified value in the JChemProperties table. If the property exists with the specified name, then it is updated, otherwise a new row is inserted.

Parameters:
tableName - Name of the structure table.
value - The standardizer configuration string.
Throws:
java.sql.SQLException

setTableProperty

public void setTableProperty(java.lang.String tableName,
                             java.lang.String propName,
                             java.lang.String propValue)
                      throws java.sql.SQLException
Sets the given table property in the JChemProperties table. If the property exists with the specified name, then it is updated, otherwise a new row is inserted.

Parameters:
tableName - Name of the structure table.
propName - Name of the property. It is case sensitive, e.g. "JChemVersion" is not the same as "jchemVersion". Use the constans defined in PropertyConstants.Table.
Throws:
java.sql.SQLException

getTableProperty

public java.lang.String getTableProperty(java.lang.String tableName,
                                         java.lang.String propName)
                                  throws java.sql.SQLException
Gets a table property from the JChemProperties table.

Parameters:
tableName - Name of the structure table.
propName - Name of the property. It is case sensitive, e.g. "JChemVersion" is not the same as "jchemVersion". Use the constans defined in PropertyConstants.Table.
Returns:
The value of table property if it is stored in the JChemProperties table, null otherwise.
Throws:
java.sql.SQLException

getTableIntProperty

public int getTableIntProperty(java.lang.String tableName,
                               java.lang.String propName)
                        throws java.lang.IllegalArgumentException,
                               java.lang.NumberFormatException,
                               java.sql.SQLException
Gets an integer table property from the JChemProperties table.

Parameters:
tableName - Name of the structure table.
propName - Name of the property. It is case sensitive, e.g. "JChemVersion" is not the same as "jchemVersion". Use the constans defined in PropertyConstants.Table.
Returns:
The value of table property if it is stored in the JChemProperties table and can be parsed to int.
Throws:
java.lang.IllegalArgumentException - if the given property is not found.
java.lang.NumberFormatException - if the given property cannot be parsed to int.
java.sql.SQLException

deleteTableProperty

public void deleteTableProperty(java.lang.String tableName,
                                java.lang.String propName)
                         throws java.sql.SQLException
Removes a table property from the JChemProperties table.

Parameters:
tableName - Name of the structure table.
propName - Name of the property. It is case sensitive, e.g. "JChemVersion" is not the same as "jchemVersion". Use the constans defined in PropertyConstants.Table.
Throws:
java.sql.SQLException

deleteTableProperties

public void deleteTableProperties(java.lang.String tableName)
                           throws java.sql.SQLException
Removes all table properties related to the given structure table from the JChemProperties table.

Parameters:
tableName - Name of the structure table.
Throws:
java.sql.SQLException

setMDTableProperty

public void setMDTableProperty(java.lang.String tableName,
                               java.lang.String descrName,
                               java.lang.String propName,
                               java.lang.String propValue)
                        throws java.sql.SQLException
Sets the given MD table property in the JChemProperties table. If the property exists with the specified name, then it is updated, otherwise a new row is inserted.

Parameters:
tableName - Name of the structure table.
descrName - Name of the descriptor.
propName - Name of the property. It is case sensitive, e.g. "JChemVersion" is not the same as "jchemVersion". Use the constans defined in PropertyConstants.Table.
Throws:
java.sql.SQLException

getMDTableProperty

public java.lang.String getMDTableProperty(java.lang.String tableName,
                                           java.lang.String descrName,
                                           java.lang.String propName)
                                    throws java.sql.SQLException
Gets MD table property from the JChemProperties table.

Parameters:
tableName - Name of the structure table.
descrName - Name of the descriptor.
propName - Name of the property. It is case sensitive, e.g. "JChemVersion" is not the same as "jchemVersion". Use the constans defined in PropertyConstants.Table.
Returns:
The value of table property if it is stored in the JChemProperties table, null otherwise.
Throws:
java.sql.SQLException

deleteMDTableProperty

public void deleteMDTableProperty(java.lang.String tableName,
                                  java.lang.String descrName,
                                  java.lang.String propName)
                           throws java.sql.SQLException
Removes MD table property from the JChemProperties table.

Parameters:
tableName - Name of the structure table.
descrName - Name of the descriptor.
propName - Name of the property. It is case sensitive, e.g. "JChemVersion" is not the same as "jchemVersion". Use the constans defined in PropertyConstants.Table.
Throws:
java.sql.SQLException

incrementProperty

public long incrementProperty(java.lang.String name)
                       throws java.sql.SQLException
Increments the value of property with the specified key by one. Value has to be in integer format. If the property doesn't exist with the specified name, then a row with the value 1 is inserted.

Parameters:
name - the property key.
Returns:
the new value of the property
Throws:
java.sql.SQLException

deleteProperty

public void deleteProperty(java.lang.String name)
                    throws java.sql.SQLException
Removes the row with the specified key from the JChemProperties table, if it exists.

Parameters:
name - the property key.
Throws:
java.sql.SQLException

propertyTableExists

public static boolean propertyTableExists(ConnectionHandler conh)
Checks if JChem property table exists.

Parameters:
conh - must contain at minimum a live connection and a property table name

createPropertyTable

public static void createPropertyTable(ConnectionHandler conh)
                                throws java.sql.SQLException
Creates a new property table for storing JChem's settings. It is recommended to test first if the table exists, by calling propertyTableExists

Parameters:
conh - it should contain at minimum a live connection and a property table name If your database server type is MySql, recommend to use the other createPropertyTable method
Throws:
java.sql.SQLException
See Also:
createPropertyTable(ConnectionHandler, int)

createPropertyTable

public static void createPropertyTable(ConnectionHandler conh,
                                       int mySqlTableType)
                                throws java.sql.SQLException
Creates a new property table for storing JChem's settings. It is recommended to test first if the table exists, by calling propertyTableExists

Parameters:
conh - it should contain at minimum a live connection and a property table name
mySqlTableType - table type for MySQL, for other RDBMS ignored. Accepted values:
Throws:
java.sql.SQLException
See Also:
createPropertyTable(chemaxon.util.ConnectionHandler)

getStructureTableNames

public java.util.Vector<java.lang.String> getStructureTableNames()
                                                          throws java.sql.SQLException
Returns the names of structure tables registered in the JChemProperties table.

Throws:
java.sql.SQLException

getMolecularDescriptors

public java.lang.String[] getMolecularDescriptors(java.lang.String tableName)
                                           throws java.sql.SQLException
Retrieves the names of MolecularDescriptors assigned to the structure table and stored in the JChem database.

Parameters:
tableName - the name of the structure table
Returns:
the descriptor names
Throws:
java.sql.SQLException

isMolecularDescriptorDefined

public boolean isMolecularDescriptorDefined()
                                     throws java.sql.SQLException
Retrieve whether at least one MolecularDescriptor is defined for any table or not.

Returns:
true if at least one descriptor table exists
Throws:
java.sql.SQLException

getMDConfigs

public java.lang.String[] getMDConfigs(java.lang.String tableName,
                                       java.lang.String descriptorName)
                                throws java.sql.SQLException
Retrieves the names of stored configurations associated with a certain Molecular Descriptor.
Doesn't support JChem Cartridge index tables.

Parameters:
tableName - the name of the structure table
descriptorName - the name of the molecular descriptor
Returns:
the names of the configurations
Throws:
java.sql.SQLException

isUsePreparedStatement

public boolean isUsePreparedStatement()

setUsePreparedStatement

public void setUsePreparedStatement(boolean usePreparedStatement)
Specifies if PreparedStatement should be used for property lookup. Recommended if properties are read from the table very frequently. NOTE: If set to true, close() should be called after usage.

Parameters:
usePreparedStatement - set to true to use preapared statements for reading data. Default is false

getChemTermColumns

public java.lang.String[] getChemTermColumns(java.lang.String tableName)
                                      throws java.sql.SQLException
Returns the name of columns with values automatically calculated based on Chemical Terms expressions.

Parameters:
tableName - the table, the Chemical Terms-based columns of which should be returned.
Returns:
the name of columns with values automatically calculated based on Chemical Terms expressions.
Throws:
java.sql.SQLException
Since:
3.2

isChemTermColumnDefined

public boolean isChemTermColumnDefined()
                                throws java.sql.SQLException
Retrieve whether at least one Chemical Term column is defined for any table or not.

Returns:
boolean
Throws:
java.sql.SQLException

setChemTermForColumn

public void setChemTermForColumn(java.lang.String tableName,
                                 java.lang.String columnName,
                                 java.lang.String expression)
                          throws java.sql.SQLException
Sets the Chemical Terms expression that should be used to compute the value for the given column.

Parameters:
tableName - name of the table containing the column
columnName - name fo the column with pre-computed Chemical Terms values.
expression - the Chemical Terms expression that should be used to compute the value for the given column.
Throws:
java.sql.SQLException
Since:
3.2

getChemTermForColumn

public java.lang.String getChemTermForColumn(java.lang.String tableName,
                                             java.lang.String columnName)
                                      throws java.sql.SQLException
Gets the Chemical Terms expression that should be used to compute the value for the given column.

Parameters:
tableName - name of the table containing the column
columnName - name fo the column with pre-computed Chemical Terms values.
Returns:
the Chemical Terms expression that should be used to compute the value for the given column.
Throws:
java.sql.SQLException
Since:
3.2

deleteChemTermForColumn

public void deleteChemTermForColumn(java.lang.String tableName,
                                    java.lang.String columnName)
                             throws java.sql.SQLException
Deletes the property defining the Chemical Terms expression that should be used to compute the value for the given column.

Parameters:
tableName - name of the table containing the column
columnName - name fo the column with pre-computed Chemical Terms values.
Throws:
java.sql.SQLException
Since:
3.2

getTableType

public int getTableType(java.lang.String tableName)
                 throws java.sql.SQLException
Returns the type of the specified table.

Parameters:
tableName - the name of the JChem structure table
Returns:
one of the following:
Throws:
java.sql.SQLException
Since:
JChem 3.2

setCacheRegistrationTableName

public java.lang.String setCacheRegistrationTableName()
                                               throws java.sql.SQLException
Set the name of the cache registration table for the current property table.

Returns:
the newly generated table name.
Throws:
java.sql.SQLException

getCacheRegistrationTableName

public java.lang.String getCacheRegistrationTableName()
                                               throws java.sql.SQLException
Get the cache registration table name of the currently used property table.

Returns:
the cache registration table name.
Throws:
java.sql.SQLException

isTautomerDuplicateFilteringEnabled

public boolean isTautomerDuplicateFilteringEnabled(java.lang.String tableName)
                                            throws java.sql.SQLException
Returns whether tautomers are considered during duplicate filtering for this table.

Parameters:
tableName - the name of the JChem structure table
Returns:
true if tautomer duplicate filtering is enabled for the table
Throws:
java.sql.SQLException
Since:
JChem 5.0

isGenericTautomerProtectsChirality

public boolean isGenericTautomerProtectsChirality(java.lang.String tableName)
                                           throws java.sql.SQLException
Returns whether generic tautomer protects chirality in tautomer region.

Parameters:
tableName - the name of the JChem structure table
Returns:
true if generic tautomer protects chirality
Throws:
java.sql.SQLException
Since:
JChem 5.2.4

isSetSwitchOffAllProtectionsForTDF

public boolean isSetSwitchOffAllProtectionsForTDF(java.lang.String tableName)
                                           throws java.sql.SQLException
Returns whether all protections for tautomer duplicate filtering is switched off.

Parameters:
tableName - the name of the JChem structure table
Returns:
true if all protects are switched off
Throws:
java.sql.SQLException
Since:
JChem 5.5

isDatabaseReadonly

public boolean isDatabaseReadonly()
                           throws java.sql.SQLException
Returns whether database of the current JChem property table is readonly.

Returns:
true if the database is readonly
Throws:
java.sql.SQLException
Since:
JChem 5.3.2

close

public void close()
           throws java.sql.SQLException
Should be called only if the use of prepared statements are enabled with setUsePreparedStatement(boolean).

Throws:
java.sql.SQLException

getFingerprintParams

public java.lang.String[] getFingerprintParams(java.lang.String tableName)
                                        throws java.sql.SQLException
Return the fingerprint parameters of a table.

Parameters:
tableName -
Returns:
array that contains 3 elements, the first is the number of bits, the second is the number of ones, the third is the number of edges.
Throws:
java.sql.SQLException

getTableProperties

public java.util.Map<java.lang.String,java.lang.String> getTableProperties(java.lang.String tableName)
                                                                    throws java.sql.SQLException
Return all properties for a table.

Parameters:
tableName - Name of the structure table
Returns:
the property names and values
Throws:
java.sql.SQLException

isDuplicateFilteringOption

public boolean isDuplicateFilteringOption(java.lang.String tableName)
                                   throws java.sql.SQLException
Returns the state of the Duplicate Filtering table option.

Parameters:
tableName - Name of the structure table
Returns:
the state of the Duplicate Filtering option from the JChem Property Table.
Throws:
java.sql.SQLException
Since:
Jchem 5.4

getAllProperties

public java.lang.StringBuilder getAllProperties()
                                         throws java.sql.SQLException
Returns all properties in the JChem property table.

Returns:
all property names and values in a formatted StringBuffer
Throws:
java.sql.SQLException

getCacheRegistrationTableName

public static java.lang.String getCacheRegistrationTableName(ConnectionHandler conh)
                                                      throws java.sql.SQLException
Get the table name containing the registration information

Parameters:
conh - ConnectionHandler to use
Returns:
registration table name
Throws:
java.sql.SQLException