Class CMLBridge

java.lang.Object
org.episteme.natural.chemistry.loaders.cml.CMLBridge

public class CMLBridge extends Object
Bridge for converting CML (Chemical Markup Language) DTOs to core Episteme chemistry objects.

CML is the XML standard for representing molecular data in chemistry. This bridge converts parsed CML structures to the core Episteme chemistry domain model.

Architecture

CML XML → CMLReader → CML DTOs → CMLBridge → Core Episteme Objects
                                             ├── Molecule
                                             ├── Atom
                                             ├── Bond
                                             └── Element
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • CMLBridge

      public CMLBridge()
  • Method Details

    • toMolecule

      public Molecule toMolecule(CMLMolecule cmlMolecule)
      Converts a CML molecule representation to a Episteme Molecule.
      Parameters:
      cmlMolecule - the CML molecule DTO
      Returns:
      a fully populated Molecule object
    • convertAtom

      public Atom convertAtom(CMLAtom cmlAtom)
      Converts a CML atom to a Episteme Atom.
    • convertBond

      public Bond convertBond(CMLBond cmlBond, Map<String,Atom> atomMap)
      Converts a CML bond to a Episteme Bond.
    • toMolecules

      public List<Molecule> toMolecules(List<CMLMolecule> cmlMolecules)
      Converts multiple CML molecules to Episteme Molecules.