Package chemaxon.descriptors
Class MDArrayReader
java.lang.Object
chemaxon.descriptors.MDReader
chemaxon.descriptors.MDArrayReader
Reads MolecularDescriptors from an array. Intended for use when chemical descriptors are read more than once.
Typical usage:
MDArrayReader r = new MDArrayReader( sampleDescriptorSet, cdFileReader );
After that all methods of MDReaders can be called, the number of MDSets is known, reading is fast, and can be reset without problems.
- Since:
- JChem 2.0
-
Field Summary
Fields inherited from class chemaxon.descriptors.MDReader
cloneResult, firstId, generateDescriptor, generateId, id, idTagName, lastReadMolecule, mdSet, takeTags -
Constructor Summary
ConstructorsConstructorDescriptionMDArrayReader(MDReader reader) Constructor from another MDReader.MDArrayReader(MDSet[] elements) Constructor from standard array (to ease use of methods requiring MDReader input). -
Method Summary
Methods inherited from class chemaxon.descriptors.MDReader
createMDSetComponent, getCloneResult, getMDSet, getMolecule, setCloneResult, setFirstId, setGenerateId, setIdTagName, setTakeTag
-
Constructor Details
-
MDArrayReader
Constructor from standard array (to ease use of methods requiring MDReader input).- Parameters:
elements- Array of MDSets to be put into the reader.
-
MDArrayReader
Constructor from another MDReader.- Parameters:
reader- MDReader to be copied into an array reader.- Throws:
MDReaderException- if the reader encounter an unreadable record.
-
-
Method Details
-
reset
Resets the reader to beginning- Overrides:
resetin classMDReader- Throws:
MDReaderException- when failed to reset the reader
-
next
Gets the next element from reader.- Specified by:
nextin classMDReader- Returns:
- Next element or null if no more elements
- Throws:
MDReaderException- when failed reading the next descriptor set
-
size
public int size()Gets number of MDSets in the reader- Returns:
- number of MDSets in the reader
-
close
Closes the reader- Specified by:
closein classMDReader- Throws:
MDReaderException- when failed to close the input stream
-