@PublicAPI public class MDDBReader extends MDReader
cloneResult, firstId, generateDescriptor, generateId, id, idTagName, lastReadMolecule, mdSet, takeTags
Constructor and Description |
---|
MDDBReader(ConnectionHandler ch,
java.lang.String strucTableName,
MDSet mdSet,
java.lang.String sqlCondition)
Deprecated.
|
MDDBReader(ConnectionHandler ch,
java.lang.String strucTableName,
java.lang.String[] mdNames,
java.lang.String sqlCondition)
Deprecated.
|
MDDBReader(java.lang.String strucTableName,
ConnectionHandler ch,
MDSet mdSet,
java.lang.String query)
Constructs a new MDDBReader object.
|
MDDBReader(java.lang.String strucTableName,
ConnectionHandler ch,
java.lang.String[] mdNames,
java.lang.String query)
Constructs a new MDDBReader object.
|
MDDBReader(java.lang.String strucTableName,
ConnectionHandler ch,
java.lang.String[] mdNames,
java.lang.String query,
int[] filterIDList,
int[] filterIDNotList,
boolean indexTable)
Constructs a new MDDBReader object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes down the descriptor stream.
|
int |
getLastID()
Gets the cd_id that belongs to the last processed descriptor from
the structure table
|
MDSet |
getMDSet()
Gets the molecular descriptor set.
|
Molecule |
getMolecule()
Gets the molecule that belongs to the last processed descriptor from
the structure table
|
MDSet |
next()
Fetches the next element form the stream or returns
null
when there are no more accessible data. |
void |
reset()
Initializes the
MolecularDescriptor stream. |
createMDSetComponent, getCloneResult, setCloneResult, setFirstId, setGenerateId, setIdTagName, setTakeTag
@Deprecated public MDDBReader(ConnectionHandler ch, java.lang.String strucTableName, MDSet mdSet, java.lang.String sqlCondition)
MDDBReader(java.lang.String, chemaxon.util.ConnectionHandler, chemaxon.descriptors.MDSet, java.lang.String)
instead.ch
- a ConnectionHandler with an open connection to the databasestrucTableName
- name of the structure tablemdSet
- the contains the appropriate descriptorssqlCondition
- a condition to be used in an SQL where clause
(e.g: "cd_id > 1000"). If null
, then all rows are retrieved.public MDDBReader(java.lang.String strucTableName, ConnectionHandler ch, MDSet mdSet, java.lang.String query)
ch
- a ConnectionHandler with an open connection to the databasestrucTableName
- name of the structure tablemdSet
- the contains the appropriate descriptorsquery
- SQL query for filtering. It should contain the cd_id values.
Example "select cd_id from mystructures where cd_id > 1000").
If null
, then all rows are retrieved.@Deprecated public MDDBReader(ConnectionHandler ch, java.lang.String strucTableName, java.lang.String[] mdNames, java.lang.String sqlCondition)
MDDBReader(java.lang.String, chemaxon.util.ConnectionHandler, java.lang.String[], java.lang.String)
instead.ch
- a ConnectionHandler with an open connection to the databasestrucTableName
- name of the structure tablemdNames
- the names of the descriptors stored in the databasesqlCondition
- a condition to be used in an SQL where clause
(e.g: "cd_id > 1000").If null
or empty string
all rows are retrieved.public MDDBReader(java.lang.String strucTableName, ConnectionHandler ch, java.lang.String[] mdNames, java.lang.String query)
ch
- a ConnectionHandler with an open connection to the databasestrucTableName
- name of the structure tablemdNames
- the names of the descriptors stored in the databasequery
- SQL query for filtering. It should contain the cd_id values.
Example "select cd_id from mystructures where cd_id > 1000").
If null
, then all rows are retrieved.public MDDBReader(java.lang.String strucTableName, ConnectionHandler ch, java.lang.String[] mdNames, java.lang.String query, int[] filterIDList, int[] filterIDNotList, boolean indexTable)
ch
- a ConnectionHandler with an open connection to the databasestrucTableName
- name of the structure tablemdNames
- the names of the descriptors stored in the databasequery
- SQL query for filtering. It should contain the cd_id values.
Example "select cd_id from mystructures where cd_id > 1000").
If null
, then all rows are retrieved.filterIDList
- a cd_id list to filter with.
No filtering if null
.filterIDNotList
- excluded cd_id listindexTable
- true if used from cartridgepublic MDSet getMDSet()
public void reset() throws MDReaderException
MolecularDescriptor
stream. If the stream
is not empty the consequent call to next()
returns the first
element.reset
in class MDReader
MDReaderException
- when failed to reset the readerpublic MDSet next() throws MDReaderException
null
when there are no more accessible data.
Also initializes the stream, if necessary.next
in class MDReader
null
if couldn't read descriptor or
no more descriptors to readMDReaderException
- when failed reading the next descriptor setpublic Molecule getMolecule() throws MDReaderException
getMolecule
in class MDReader
null
if not foundMDReaderException
- when failed reading the next descriptor setpublic int getLastID()
public void close() throws MDReaderException
close
in class MDReader
MDReaderException
- when failed to close the input stream