Interface MoleculeImporterIface

All Known Implementing Classes:
DocumentAnnotator, MoleculeImporter, MolImporter

@PublicApi public interface MoleculeImporterIface
Interface for molecule importer classes.
Since:
5.7
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the underlying input stream.
    default Stream<MDocument>
    Creates a stream of MDocuments from the imported molecuels.
    default Stream<Molecule>
    Creates a Molecule Stream from the imported molecules.
    Read the next molecule from the stream/file.
  • Method Details

    • read

      Molecule read() throws IOException
      Read the next molecule from the stream/file.
      Returns:
      the next molecule, or null if no more molecules can be imported.
      Throws:
      IOException - If an error occurred during reading.
    • close

      void close() throws IOException
      Close the underlying input stream. IMPORTANT: call this after reading molecules to close concurrent processing properly.
      Throws:
      IOException - If an error has occurred.
    • getMolStream

      default Stream<Molecule> getMolStream()
      Creates a Molecule Stream from the imported molecules.
    • getMDocumentStream

      default Stream<MDocument> getMDocumentStream()
      Creates a stream of MDocuments from the imported molecuels. Adds MDocument to molecules that have none.