Logo Search packages:      
Sourcecode: cdk version File versions  Download package

DebugChemObjectBuilder.java

/* $Revision: 7636 $ $Author: egonw $ $Date: 2007-01-04 18:46:10 +0100 (Thu, 04 Jan 2007) $
 *
 * Copyright (C) 2005-2007  Egon Willighagen <egonw@users.sf.net>
 *
 * Contact: cdk-devel@lists.sourceforge.net
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 */
package org.openscience.cdk.debug;

import javax.vecmath.Point2d;
import javax.vecmath.Point3d;

import org.openscience.cdk.interfaces.IAminoAcid;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IAtomContainerSet;
import org.openscience.cdk.interfaces.IAtomParity;
import org.openscience.cdk.interfaces.IAtomType;
import org.openscience.cdk.interfaces.IBioPolymer;
import org.openscience.cdk.interfaces.IBond;
import org.openscience.cdk.interfaces.IChemFile;
import org.openscience.cdk.interfaces.IChemModel;
import org.openscience.cdk.interfaces.IChemObject;
import org.openscience.cdk.interfaces.IChemObjectBuilder;
import org.openscience.cdk.interfaces.IChemSequence;
import org.openscience.cdk.interfaces.ICrystal;
import org.openscience.cdk.interfaces.IElectronContainer;
import org.openscience.cdk.interfaces.IElement;
import org.openscience.cdk.interfaces.IIsotope;
import org.openscience.cdk.interfaces.ILonePair;
import org.openscience.cdk.interfaces.IMapping;
import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.interfaces.IMoleculeSet;
import org.openscience.cdk.interfaces.IMonomer;
import org.openscience.cdk.interfaces.IPDBAtom;
import org.openscience.cdk.interfaces.IPDBMonomer;
import org.openscience.cdk.interfaces.IPDBPolymer;
import org.openscience.cdk.interfaces.IPDBStructure;
import org.openscience.cdk.interfaces.IPolymer;
import org.openscience.cdk.interfaces.IPseudoAtom;
import org.openscience.cdk.interfaces.IReaction;
import org.openscience.cdk.interfaces.IReactionSet;
import org.openscience.cdk.interfaces.IRing;
import org.openscience.cdk.interfaces.IRingSet;
import org.openscience.cdk.interfaces.ISingleElectron;
import org.openscience.cdk.interfaces.IStrand;

/**
 * A helper class to instantiate a IChemObject for the debug implementation.
 *
 * @author        egonw
 * @cdk.module    datadebug
 */
00067 public class DebugChemObjectBuilder implements IChemObjectBuilder {

      private static DebugChemObjectBuilder instance = null;
      
      private DebugChemObjectBuilder() {}

      public static DebugChemObjectBuilder getInstance() {
            if (instance == null) {
                  instance = new DebugChemObjectBuilder();
            }
            return instance;
      }
      
00080       public IAminoAcid newAminoAcid() {
            return new DebugAminoAcid();
      }
      
00084       public IAtom newAtom() {
            return new DebugAtom();
      }
      
00088     public IAtom newAtom(String elementSymbol) {
      return new DebugAtom(elementSymbol);
    }
    
00092     public IAtom newAtom(String elementSymbol, javax.vecmath.Point2d point2d) {
      return new DebugAtom(elementSymbol, point2d);
    }

00096     public IAtom newAtom(String elementSymbol, javax.vecmath.Point3d point3d) {
      return new DebugAtom(elementSymbol, point3d);
    }
            
00100       public IAtomContainer newAtomContainer() {
            return new DebugAtomContainer();
      }
    
00104       public IAtomContainer newAtomContainer(int atomCount, int electronContainerCount, int lonePairCount, int singleElectronCount) {
            return new DebugAtomContainer(atomCount, electronContainerCount, lonePairCount, singleElectronCount);
      }
    
00108       public IAtomContainer newAtomContainer(IAtomContainer container) {
            return new DebugAtomContainer(container);
      }
      
00112     public IAtomParity newAtomParity(
            IAtom centralAtom, 
            IAtom first, 
            IAtom second, 
            IAtom third, 
            IAtom fourth,
            int parity) {
      return new DebugAtomParity(centralAtom, first, second, third, fourth, parity);
    }

00122       public IAtomType newAtomType(String elementSymbol) {
            return new DebugAtomType(elementSymbol);
      }

00126       public IAtomType newAtomType(String identifier, String elementSymbol) {
            return new DebugAtomType(identifier, elementSymbol);
      }

00130       public IBioPolymer newBioPolymer(){
            return new DebugBioPolymer();
      }
      
00134       public IPDBAtom newPDBAtom(IElement element) {
      return new DebugPDBAtom(element);
    }
      
00138       public IPDBAtom newPDBAtom(String elementSymbol) {
      return new DebugPDBAtom(elementSymbol);
    }
    
    public IPDBAtom newPDBAtom(String elementSymbol, javax.vecmath.Point3d point3d) {
      return new DebugPDBAtom(elementSymbol, point3d);
    }
    
00146     public IPDBStructure newPDBStructure() {
      return new DebugPDBStructure();
    }
    
00150       public IPDBPolymer newPDBPolymer(){
            return new DebugPDBPolymer();
      }
      
00154       public IPDBMonomer newPDBMonomer(){
            return new DebugPDBMonomer();
      }
      
      public IPDBStructure newStructure(){
            return new DebugPDBStructure();
      }

00162       public IBond newBond() {
            return new DebugBond();
      }
      
00166       public IBond newBond(IAtom atom1, IAtom atom2) {
            return new DebugBond(atom1, atom2);
      }
      
00170       public IBond newBond(IAtom atom1, IAtom atom2, double order) {
            return new DebugBond(atom1, atom2, order);
      }
      
00174       public IBond newBond(IAtom atom1, IAtom atom2, double order, int stereo) {
            return new DebugBond(atom1, atom2, order, stereo);
      }
      
00178       public IChemFile newChemFile() {
            return new DebugChemFile();
      }

00182       public IChemModel newChemModel() {
            return new DebugChemModel();
      }
      
00186       public IChemObject newChemObject() {
            return new DebugChemObject();
      }
      
00190       public IChemSequence newChemSequence() {
            return new DebugChemSequence();   
      }
      
00194     public ICrystal newCrystal() {
      return new DebugCrystal();
    }
    
00198     public ICrystal newCrystal(IAtomContainer container) {
      return new DebugCrystal(container);
    }
    
00202     public IElectronContainer newElectronContainer() {
      return new DebugElectronContainer();
    }
    
00206     public IElement newElement() {
      return new DebugElement();
    }

00210     public IElement newElement(String symbol) {
      return new DebugElement(symbol);
    }

00214     public IElement newElement(String symbol, int atomicNumber) {
      return new DebugElement(symbol, atomicNumber);
    }

00218       public IIsotope newIsotope(String elementSymbol) {
            return new DebugIsotope(elementSymbol);
      }
      
00222       public IIsotope newIsotope(int atomicNumber, String elementSymbol, 
                  int massNumber, double exactMass, double abundance) {
            return new DebugIsotope(atomicNumber, elementSymbol, massNumber, exactMass, abundance);
      }

00227       public IIsotope newIsotope(int atomicNumber, String elementSymbol, 
                  double exactMass, double abundance) {
            return new DebugIsotope(atomicNumber, elementSymbol, exactMass, abundance);
      }

00232       public IIsotope newIsotope(String elementSymbol, int massNumber) {
            return new DebugIsotope(elementSymbol, massNumber);
      }

00236     public ILonePair newLonePair() {
      return new DebugLonePair();
    }

00240     public ILonePair newLonePair(IAtom atom) {
      return new DebugLonePair(atom);
    }

00244     public IMapping newMapping(IChemObject objectOne, IChemObject objectTwo) {
            return new DebugMapping(objectOne, objectTwo);
      }
    
00248       public IMolecule newMolecule() {
            return new DebugMolecule();
      }

00252       public IMolecule newMolecule(int atomCount, int electronContainerCount, int lonePairCount, int singleElectronCount) {
            return new DebugMolecule(atomCount, electronContainerCount, lonePairCount, singleElectronCount);
      }

00256       public IMolecule newMolecule(IAtomContainer container) {
            return new DebugMolecule(container);
      }

00260       public IMonomer newMonomer () {
            return new DebugMonomer();
      }
      
00264       public IPolymer newPolymer() {
            return new DebugPolymer();
      }

00268     public IReaction newReaction() {
      return new DebugReaction();   
    }
      
00272       public IRing newRing() {
            return new DebugRing();
      }
      
00276       public IRing newRing(IAtomContainer container) {
            return new DebugRing(container);
      }
      
00280       public IRing newRing(int ringSize, String elementSymbol) {
            return new DebugRing(ringSize, elementSymbol);
      }
      
00284       public IRing newRing(int ringSize) {
            return new DebugRing(ringSize);
      }

00288       public IRingSet newRingSet() {
            return new DebugRingSet();
      }

00292       public IAtomContainerSet newAtomContainerSet() {
            return new DebugAtomContainerSet();
      }

00296       public IMoleculeSet newMoleculeSet() {
            return new DebugMoleculeSet();
      }

00300       public IReactionSet newReactionSet() {
            return new DebugReactionSet();
      }
      
00304     public ISingleElectron newSingleElectron() {
      return new DebugSingleElectron();
    }
    
00308     public ISingleElectron newSingleElectron(IAtom atom) {
      return new DebugSingleElectron(atom);   
    }

00312       public IStrand newStrand() {
            return new DebugStrand();
      }

00316       public IPseudoAtom newPseudoAtom() {
            return new DebugPseudoAtom();
      }

00320       public IPseudoAtom newPseudoAtom(String label) {
            return new DebugPseudoAtom(label);
      }

      public IPseudoAtom newPseudoAtom(IAtom atom) {
            return new DebugPseudoAtom(atom);
      }

      public IPseudoAtom newPseudoAtom(String label, Point3d point3d) {
            return new DebugPseudoAtom(label, point3d);
      }

      public IPseudoAtom newPseudoAtom(String label, Point2d point2d) {
            return new DebugPseudoAtom(label, point2d);
      }

00336       public IAtom newAtom(IElement element) {
            return new DebugAtom(element);
      }

00340       public IAtomType newAtomType(IElement element) {
            return new DebugAtomType(element);
      }

00344       public IChemObject newChemObject(IChemObject object) {
            return new DebugChemObject(object);
      }

00348       public IElement newElement(IElement element) {
            return new DebugElement(element);
      }

00352       public IIsotope newIsotope(IElement element) {
            return new DebugIsotope(element);
      }

00356       public IPseudoAtom newPseudoAtom(IElement element) {
            return new DebugPseudoAtom(element);
      }
}



Generated by  Doxygen 1.6.0   Back to index