Package org.openscience.cdk.config
Class XMLIsotopeFactory
- java.lang.Object
-
- org.openscience.cdk.config.IsotopeFactory
-
- org.openscience.cdk.config.XMLIsotopeFactory
-
public class XMLIsotopeFactory extends IsotopeFactory
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
- Source code:
- main
- Belongs to CDK module:
- extra
- 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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static XMLIsotopeFactory
getInstance(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 Detail
-
getInstance
public static XMLIsotopeFactory getInstance(IChemObjectBuilder builder) throws IOException
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.
-
-