Package org.openscience.cdk.config
Class XMLIsotopeFactory
java.lang.Object
org.openscience.cdk.config.IsotopeFactory
org.openscience.cdk.config.XMLIsotopeFactory
Used to store and return data of a particular isotope. As this class is a
singleton class, one gets an instance with:
IsotopeFactory ifac = IsotopFactory.getInstance(new IChemObject().getNewBuilder());
Data about the isotopes are read from the file org.openscience.cdk.config.isotopes.xml in the cdk-standard module. Part of the data in this file was collected from the website webelements.org.
The use of this class is exemplified as follows. To get information about the major isotope of hydrogen, one can use this code:
IsotopeFactory factory = XMLIsotopeFactory.getInstance(DefaultChemObjectBuilder.getInstance());
Isotope major = factory.getMajorIsotope("H");
- Author:
- steinbeck
- Keywords:
- isotope, element
- Created on:
- 2001-08-29
-
Field Summary
Fields inherited from class org.openscience.cdk.config.IsotopeFactory
EMPTY_ISOTOPE_ARRAY, logger -
Method Summary
Modifier and TypeMethodDescriptionstatic XMLIsotopeFactorygetInstance(IChemObjectBuilder builder) Returns an IsotopeFactory instance.Methods inherited from class org.openscience.cdk.config.IsotopeFactory
add, configure, configure, configureAtoms, getElement, getElement, getElementSymbol, getExactMass, getIsotope, getIsotope, getIsotopes, getIsotopes, getIsotopes, getIsotopes, getMajorIsotope, getMajorIsotope, getMajorIsotopeMass, getNaturalMass, getNaturalMass, getSize, isElement
-
Method Details
-
getInstance
Returns an IsotopeFactory instance.- Parameters:
builder- ChemObjectBuilder used to construct the Isotope's- Returns:
- The instance value
- Throws:
IOException- if isotopic data files could not be read.
-