@Beta public interface StructureRecord
This intermediate wrapper supplies read molecules from MRecordReader
and MolImporter
based
implementations.
Thread safety: a single record instance is not thread safe, however method parseMolecule()
of multiple
instances resulting from the same source can accessed on different threads.
Please note that this interface is marked with Beta
annotation, so it can be subject of incompatible
changes or removal in later releases.
Modifier and Type | Method and Description |
---|---|
int |
getReadIndex()
Represented structure/record index.
|
Optional<String> |
getStructureSource()
Structure source if applicable.
|
Molecule |
parseMolecule()
Parse molecule if not parsed successfully already.
|
Optional<String> |
parseMoleculeName()
Parse molecule name if present.
|
Map<String,String> |
parseProperties()
Parse properties if not parsed already.
|
int getReadIndex()
0-based index of the structure in the structure file.
Optional<String> getStructureSource()
Structure source when returned by MRecord.getMolString()
or otherwise applicable.
Optional<String> parseMoleculeName() throws MolFormatException
MolFormatException
- re-thrown parse exceptionMolecule parseMolecule() throws MolFormatException
MolFormatException
- re-thrown parse exceptionMap<String,String> parseProperties() throws MolFormatException
MolFormatException
- re-thrown parse exception