Class IsotopeReader


  • public class IsotopeReader
    extends Object
    Reader that instantiates an XML parser and customized handler to process the isotope information in the CML2 isotope data file. The Reader first tries to instantiate a JAXP XML parser available from Sun JVM 1.4.0 and later. If not found it tries the Aelfred2 parser, and as last try the Xerces parser.
    Author:
    Egon Willighagen
    Source code:
    main
    Belongs to CDK module:
    extra
    • Constructor Detail

      • IsotopeReader

        public IsotopeReader​(InputStream input,
                             IChemObjectBuilder builder)
        Instantiates a new reader that parses the XML from the given input.
        Parameters:
        input - InputStream with the XML source
        builder - The IChemObjectBuilder used to create new IIsotope's.
    • Method Detail

      • readIsotopes

        public List<IIsotope> readIsotopes()
        Triggers the XML parsing of the data file and returns the read Isotopes. It turns of XML validation before parsing.
        Returns:
        a List of Isotope's. Returns an empty list is some reading error occurred.