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

DebugBioPolymer.java
/* $Revision$ $Author$ $Date$
 *
 * 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 java.util.Collection;
import java.util.List;
import java.util.Map;

import org.openscience.cdk.BioPolymer;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IAtomParity;
import org.openscience.cdk.interfaces.IBioPolymer;
import org.openscience.cdk.interfaces.IBond;
import org.openscience.cdk.interfaces.IChemObjectBuilder;
import org.openscience.cdk.interfaces.IChemObjectChangeEvent;
import org.openscience.cdk.interfaces.IChemObjectListener;
import org.openscience.cdk.interfaces.IElectronContainer;
import org.openscience.cdk.interfaces.ILonePair;
import org.openscience.cdk.interfaces.IMonomer;
import org.openscience.cdk.interfaces.ISingleElectron;
import org.openscience.cdk.interfaces.IStrand;
import org.openscience.cdk.interfaces.IBond.Order;
import org.openscience.cdk.tools.LoggingTool;

/**
 * Debugging data class.
 * 
 * @author     egonw
 * @cdk.module datadebug
 * @cdk.githash
 */
00051 public class DebugBioPolymer extends BioPolymer
    implements IBioPolymer {

00054     private static final long serialVersionUID = 5349870327516864575L;
    
    LoggingTool logger = new LoggingTool(DebugAtomContainer.class);

00058     public void addAtomParity(IAtomParity parity) {
            logger.debug("Adding atom parity: ", parity);
            super.addAtomParity(parity);
      }

00063       public IAtomParity getAtomParity(IAtom atom) {
            logger.debug("Getting atom parity: ", atom);
            return super.getAtomParity(atom);
      }

00068       public void setAtoms(IAtom[] atoms) {
            logger.debug("Setting atoms: ", atoms.length);
            super.setAtoms(atoms);
      }

//    public void setElectronContainers(IElectronContainer[] electronContainers) {
//          logger.debug("Setting electron containers: ", electronContainers.length);
//          super.setElectronContainers(electronContainers);
//    }

00078       public void setAtom(int number, IAtom atom) {
            logger.debug("Setting atom at: pos=" + number, " atom=" + atom);
            super.setAtom(number, atom);
      }

00083       public IAtom getAtom(int number) {
            logger.debug("Getting atom at: ", number);
            return super.getAtom(number);
      }

00088       public IBond getBond(int number) {
            logger.debug("Getting bond at: ", number);
            return super.getBond(number);
      }

00093       public ILonePair getLonePair(int number) {
            logger.debug("Getting lone pair at: ", number);
            return super.getLonePair(number);
      }
      
00098       public ISingleElectron getSingleElectron(int number) {
            logger.debug("Getting single electron at: ", number);
            return super.getSingleElectron(number);
      }
      
//    public void setElectronContainer(int number, IElectronContainer electronContainer) {
//          logger.debug("Setting electron container at: pos=" + number, " electron container=" +electronContainer);
//          super.setElectronContainer(number, electronContainer);
//    }

//    public void setElectronContainerCount(int electronContainerCount) {
//          logger.debug("Setting electron container count: ", electronContainerCount);
//          super.setElectronContainerCount(electronContainerCount);
//    }

//    public void setAtomCount(int atomCount) {
//          logger.debug("Settting atom count: ", atomCount);
//          super.setAtomCount(atomCount);
//    }

00118       public Iterable<IAtom> atoms() {
            logger.debug("Getting atoms iterator");
            return super.atoms();
      }

00123       public Iterable<IBond> bonds() {
            logger.debug("Getting bonds iterator");
            return super.bonds();
      }
      
00128       public Iterable<ILonePair> lonePairs() {
            logger.debug("Getting lone pairs iterator");
            return super.lonePairs();
      }
      
00133       public Iterable<ISingleElectron> singleElectrons() {
            logger.debug("Getting single electrons iterator");
            return super.singleElectrons();
      }
      
00138       public Iterable<IElectronContainer> electronContainers() {
            logger.debug("Getting electron containers iterator");
            return super.electronContainers();
      }
      
00143       public IAtom getFirstAtom() {
            logger.debug("Getting first atom: ", super.getFirstAtom());
            return super.getFirstAtom();
      }

00148       public IAtom getLastAtom() {
            logger.debug("Getting last atom: ", super.getLastAtom());
            return super.getLastAtom();
      }

00153       public int getAtomNumber(IAtom atom) {
            logger.debug("Getting atom number: ", atom);
            return super.getAtomNumber(atom);
      }

00158       public int getBondNumber(IAtom atom1, IAtom atom2) {
            logger.debug("Getting bond number: atom1=" + atom1, " atom2=" + atom2);
            return super.getBondNumber(atom1, atom2);
      }

00163       public int getBondNumber(IBond bond) {
            logger.debug("Getting bond number: ", bond);
            return super.getBondNumber(bond);
      }

00168       public int getLonePairNumber(ILonePair bond) {
            logger.debug("Getting lone pair number: ", bond);
            return super.getLonePairNumber(bond);
      }
      
00173       public int getSingleElectronNumber(ISingleElectron bond) {
            logger.debug("Getting single electron number: ", bond);
            return super.getSingleElectronNumber(bond);
      }
      
00178       public IElectronContainer getElectronContainer(int number) {
            logger.debug("Getting electron container at: ", number);
            return super.getElectronContainer(number);
      }

00183       public IBond getBond(IAtom atom1, IAtom atom2) {
            logger.debug("Getting bond for atoms: atom1=" + atom1, " atom2=" + atom2);
            return super.getBond(atom1, atom2);
      }
      
00188       public int getAtomCount() {
            logger.debug("Getting atom count");
            return super.getAtomCount();
      }

00193       public int getBondCount() {
            logger.debug("Getting bond count");
            return super.getBondCount();
      }
      
00198       public int getLonePairCount() {
            logger.debug("Getting lone pair count");
            return super.getLonePairCount();
      }

00203       public int getSingleElectronCount() {
            logger.debug("Getting single electron count");
            return super.getSingleElectronCount();
      }
      
00208       public int getElectronContainerCount() {
            logger.debug("Getting electron container count");
            return super.getElectronContainerCount();
      }

      
//    public IAtom[] getConnectedAtoms(IAtom atom) {
//          logger.debug("Getting connected atoms for atom: ", atom);
//          return super.getConnectedAtoms(atom);
//    }

00219       public List getConnectedAtomsList(IAtom atom) {
            logger.debug("Getting connecting atoms vector for atom: ", atom);
            return super.getConnectedAtomsList(atom);
      }

//    public IBond[] getConnectedBonds(IAtom atom) {
//          logger.debug("Getting connected bonds for atom: ", atom);
//          return super.getConnectedBonds(atom);
//    }

00229       public List getConnectedBondsList(IAtom atom) {
            logger.debug("Getting connected bonds vector for atom: ", atom);
            return super.getConnectedBondsList(atom);
      }

00234       public List getConnectedLonePairsList(IAtom atom) {
            logger.debug("Getting lone pairs at atom: atom=" + atom, " lone pairs=" + super.getConnectedLonePairsCount(atom));
            return super.getConnectedLonePairsList(atom);
      }
      
00239       public List getConnectedSingleElectronsList(IAtom atom) {
            logger.debug("Getting single electrons at atom: atom=" + atom, " single electrons=" + super.getConnectedSingleElectronsCount(atom));
            return super.getConnectedSingleElectronsList(atom);
      }
      
00244       public java.util.List getConnectedElectronContainersList(IAtom atom) {
            logger.debug("Getting connected electron containers for atom: ", atom);
            return super.getConnectedElectronContainersList(atom);
      }

00249       public int getConnectedAtomsCount(IAtom atom) {
            logger.debug("Getting connected atoms count for atom: ", atom);
            return super.getConnectedAtomsCount(atom);
      }
      
00254       public int getConnectedBondsCount(IAtom atom) {
            logger.debug("Getting connected bonds count for atom: ", atom);
            return super.getConnectedBondsCount(atom);
      }
      
00259       public int getConnectedLonePairsCount(IAtom atom) {
            logger.debug("Getting connected lone pairs count for atom: ", atom);
            return super.getConnectedLonePairsCount(atom);
      }
      
00264       public int getConnectedSingleElectronsCount(IAtom atom) {
            logger.debug("Getting connected single electrons count for atom: ", atom);
            return super.getConnectedSingleElectronsCount(atom);
      }
      
00269       public double getBondOrderSum(IAtom atom) {
            logger.debug("Getting bond order sum for atom: ", atom);
            return super.getBondOrderSum(atom);
      }

00274       public Order getMaximumBondOrder(IAtom atom) {
            logger.debug("Getting maximum bond order for atom: ", atom);
            return super.getMaximumBondOrder(atom);
      }

00279       public Order getMinimumBondOrder(IAtom atom) {
            logger.debug("Getting minimum bond order for atom: ", atom);
            return super.getMinimumBondOrder(atom);
      }

//    public void addElectronContainers(IAtomContainer atomContainer) {
//          logger.debug("Adding electron containers from atom container: ", atomContainer);
//          super.addElectronContainers(atomContainer);
//    }

00289       public void add(IAtomContainer atomContainer) {
            logger.debug("Adding atom container: ", atomContainer);
            super.add(atomContainer);
      }

00294       public void addAtom(IAtom atom) {
            logger.debug("Adding atom: ", atom);
            super.addAtom(atom);
      }

00299       public void addBond(IBond bond) {
            logger.debug("Adding bond: ", bond);
            super.addBond(bond);
      }

00304       public void addLonePair(ILonePair ec) {
            logger.debug("Adding lone pair: ", ec);
            super.addLonePair(ec);
      }
      
00309       public void addSingleElectron(ISingleElectron ec) {
            logger.debug("Adding single electron: ", ec);
            super.addSingleElectron(ec);
      }
      
00314       public void addElectronContainer(IElectronContainer electronContainer) {
            logger.debug("Adding electron container: ", electronContainer);
            super.addElectronContainer(electronContainer);
      }

00319       public void remove(IAtomContainer atomContainer) {
            logger.debug("Removing atom container: ", atomContainer);
            super.remove(atomContainer);
      }

00324       public IElectronContainer removeElectronContainer(int position) {
            logger.debug("Removing electronContainer: ", position);
            return super.removeElectronContainer(position);
      }

00329       public void removeElectronContainer(IElectronContainer electronContainer) {
            logger.debug("Removing electron container: ", electronContainer);
            super.removeElectronContainer(electronContainer);
      }

00334       public void removeAtom(int position) {
            logger.debug("Removing atom: ", position);
            super.removeAtom(position);
      }

00339       public void removeAtom(IAtom atom) {
            logger.debug("Removing atom: ", atom);
            super.removeAtom(atom);
      }

00344       public IBond removeBond(int pos) {
            logger.debug("Removing bond at " + pos);
            return super.removeBond(pos);
      }
      
00349       public IBond removeBond(IAtom atom1, IAtom atom2) {
            logger.debug("Removing bond: atom1=" + atom1 + " atom2=" + atom2);
            return super.removeBond(atom1, atom2);
      }
      
00354       public void removeBond(IBond bond) {
            logger.debug("Removing bond=" + bond);
            super.removeBond(bond);
      }
      
00359       public ILonePair removeLonePair(int pos) {
            logger.debug("Removing bond at " + pos);
            return super.removeLonePair(pos);
      }
      
00364       public void removeLonePair(ILonePair ec) {
            logger.debug("Removing bond=" + ec);
            super.removeLonePair(ec);
      }
      
00369       public ISingleElectron removeSingleElectron(int pos) {
            logger.debug("Removing bond at " + pos);
            return super.removeSingleElectron(pos);
      }
      
00374       public void removeSingleElectron(ISingleElectron ec) {
            logger.debug("Removing bond=" + ec);
            super.removeSingleElectron(ec);
      }
      
00379       public void removeAtomAndConnectedElectronContainers(IAtom atom) {
            logger.debug("Removing atom and connected electron containers: ", atom);
            super.removeAtomAndConnectedElectronContainers(atom);       
      }
      
00384       public void removeAllElements() {
            logger.debug("Removing all elements");
            super.removeAllElements();
      }

00389       public void removeAllElectronContainers() {
            logger.debug("Removing all electron containers");
            super.removeAllElectronContainers();
      }

00394       public void removeAllBonds() {
            logger.debug("Removing all bonds");
            super.removeAllBonds();
      }

00399       public void addBond(int atom1, int atom2, IBond.Order order, int stereo) {
            logger.debug("Adding bond: atom1=" + atom1 + " atom2=" + atom2, " order=" + order + " stereo=" + stereo);
            super.addBond(atom1, atom2, order, stereo);
      }

00404       public void addBond(int atom1, int atom2, IBond.Order order) {
            logger.debug("Adding bond: atom1=" + atom1 + " atom2=" + atom2, " order=" + order);
            super.addBond(atom1, atom2, order);
      }

00409       public void addLonePair(int atomID) {
            logger.debug("Adding lone pair: ", atomID);
            super.addLonePair(atomID);
      }

00414       public void addSingleElectron(int atomID) {
            logger.debug("Adding single electron: ", atomID);
            super.addSingleElectron(atomID);
      }
      
00419       public boolean contains(IAtom atom) {
            logger.debug("Contains atom: ", atom);
            return super.contains(atom);
      }

00424       public boolean contains(IBond bond) {
            logger.debug("Contains bond: ", bond);
            return super.contains(bond);
      }
      
00429       public boolean contains(ILonePair ec) {
            logger.debug("Contains lone pair: ", ec);
            return super.contains(ec);
      }
      
00434       public boolean contains(ISingleElectron ec) {
            logger.debug("Contains single electron: ", ec);
            return super.contains(ec);
      }
      
00439       public boolean contains(IElectronContainer electronContainer) {
            logger.debug("Contains electron container: ", electronContainer);
            return super.contains(electronContainer);
      }

00444       public void addListener(IChemObjectListener col) {
            logger.debug("Adding listener: ", col);
            super.addListener(col);
      }

00449       public int getListenerCount() {
            logger.debug("Getting listener count: ", super.getListenerCount());
            return super.getListenerCount();
      }

00454       public void removeListener(IChemObjectListener col) {
            logger.debug("Removing listener: ", col);
            super.removeListener(col);
      }

00459       public void notifyChanged() {
            logger.debug("Notifying changed");
            super.notifyChanged();
      }

00464       public void notifyChanged(IChemObjectChangeEvent evt) {
            logger.debug("Notifying changed event: ", evt);
            super.notifyChanged(evt);
      }

00469       public void setProperty(Object description, Object property) {
            logger.debug("Setting property: ", description + "=" + property);
            super.setProperty(description, property);
      }

00474       public void removeProperty(Object description) {
            logger.debug("Removing property: ", description);
            super.removeProperty(description);
      }

00479       public Object getProperty(Object description) {
            logger.debug("Getting property: ", description + "=" + super.getProperty(description));
            return super.getProperty(description);
      }

00484       public Map<Object,Object> getProperties() {
            logger.debug("Getting properties");
            return super.getProperties();
      }

00489       public String getID() {
            logger.debug("Getting ID: ", super.getID());
            return super.getID();
      }

00494       public void setID(String identifier) {
            logger.debug("Setting ID: ", identifier);
            super.setID(identifier);
      }

00499       public void setFlag(int flag_type, boolean flag_value) {
            logger.debug("Setting flag: ", flag_type + "=" + flag_value);
            super.setFlag(flag_type, flag_value);
      }

00504       public boolean getFlag(int flag_type) {
            logger.debug("Setting flag: ", flag_type + "=" + super.getFlag(flag_type));
            return super.getFlag(flag_type);
      }

00509       public void setProperties(Map<Object,Object> properties) {
            logger.debug("Setting properties: ", properties);
            super.setProperties(properties);
      }

00514       public void setFlags(boolean[] flagsNew) {
            logger.debug("Setting flags:", flagsNew.length);
            super.setFlags(flagsNew);
      }

00519       public boolean[] getFlags() {
            logger.debug("Getting flags:", super.getFlags().length);
            return super.getFlags();
      }

00524       public Object clone() throws CloneNotSupportedException {
        Object clone = null;
        try {
            clone = super.clone();
        } catch (Exception exception) {
            logger.error("Could not clone DebugAtom: " + exception.getMessage(), exception);
            logger.debug(exception);
        }
        return clone;
      }

00535       public IChemObjectBuilder getBuilder() {
            return DebugChemObjectBuilder.getInstance();
      }

00539       public void stateChanged(IChemObjectChangeEvent event) {
            logger.debug("Receiving state changed event: ", event);
            super.stateChanged(event);
      }

00544       public void addAtom(IAtom oAtom, IMonomer oMonomer) {
            logger.debug("Adding atom to monomer: ", oAtom, oMonomer);
            super.addAtom(oAtom, oMonomer);
      }

00549       public int getMonomerCount() {
            logger.debug("Getting monomer count: ", super.getMonomerCount());
            return super.getMonomerCount();
      }

00554       public IMonomer getMonomer(String cName) {
            logger.debug("Getting monomer for String: ", cName);
            return super.getMonomer(cName);
      }

00559       public Collection getMonomerNames() {
            logger.debug("Getting monomer names");
            return super.getMonomerNames();
      }

00564       public void removeMonomer(String name) {
            logger.debug("Removing monomer by string: ", name);
            super.removeMonomer(name);
      }

00569       public void addAtom(IAtom oAtom, IStrand oStrand) {
            logger.debug("Adding stoms to strand: ", oAtom, oStrand);
            super.addAtom(oAtom, oStrand);
      }

00574       public void addAtom(IAtom oAtom, IMonomer oMonomer, IStrand oStrand) {
            logger.debug("Adding stoms to strand/monomer: ", oAtom, oMonomer, oStrand);
            super.addAtom(oAtom, oMonomer, oStrand);
      }

00579       public IMonomer getMonomer(String monName, String strandName) {
            logger.debug("Getting monomer from strand: ", monName, strandName);
            return super.getMonomer(monName, strandName);
      }

00584       public int getStrandCount() {
            logger.debug("Getting strand count: ", super.getStrandCount());
            return super.getStrandCount();
      }

00589       public IStrand getStrand(String cName) {
            logger.debug("Getting strand by name: ", cName);
            return super.getStrand(cName);
      }

00594       public Collection getStrandNames() {
            logger.debug("Getting strand names: ", super.getStrandNames());
            return super.getStrandNames();
      }

00599       public void removeStrand(String name) {
            logger.debug("Removing strand by name: ", name);
            super.removeStrand(name);
      }

00604       public Map getStrands() {
            logger.debug("Getting strands: ", super.getStrands());
            return super.getStrands();
      }

}

Generated by  Doxygen 1.6.0   Back to index