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

DebugCrystal.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.List;
import java.util.Map;

import javax.vecmath.Vector3d;

import org.openscience.cdk.Crystal;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IAtomParity;
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.ICrystal;
import org.openscience.cdk.interfaces.IElectronContainer;
import org.openscience.cdk.interfaces.ILonePair;
import org.openscience.cdk.interfaces.ISingleElectron;
import org.openscience.cdk.interfaces.IBond.Order;
import org.openscience.cdk.tools.LoggingTool;

/**
 * Debugging data class.
 * 
 * @author     egonw
 * @cdk.module datadebug
 * @cdk.githash
 */
00050 public class DebugCrystal extends Crystal
    implements ICrystal {

00053     private static final long serialVersionUID = -1749989529794094087L;
    
    LoggingTool logger;

      public DebugCrystal() {
            super();
            logger = new LoggingTool(DebugCrystal.class);
      }
    
      public DebugCrystal(IAtomContainer container) {
            super(container);
            logger = new LoggingTool(DebugCrystal.class);
      }

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

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

00077       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);
//    }

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

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

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

00102       public ILonePair getLonePair(int number) {
            logger.debug("Getting lone pair at: ", number);
            return super.getLonePair(number);
      }
      
00107       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);
//    }

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

00132       public Iterable<IBond> bonds() {
            logger.debug("Getting bonds iterator");
            return super.bonds();
      }
      
00137       public Iterable<ILonePair> lonePairs() {
            logger.debug("Getting lone pairs iterator");
            return super.lonePairs();
      }
      
00142       public Iterable<ISingleElectron> singleElectrons() {
            logger.debug("Getting single electrons iterator");
            return super.singleElectrons();
      }
      
00147       public Iterable<IElectronContainer> electronContainers() {
            logger.debug("Getting electron containers iterator");
            return super.electronContainers();
      }
      
00152       public IAtom getFirstAtom() {
            logger.debug("Getting first atom: ", super.getFirstAtom());
            return super.getFirstAtom();
      }

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

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

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

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

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

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

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

00212       public int getSingleElectronCount() {
            logger.debug("Getting single electron count");
            return super.getSingleElectronCount();
      }
      
00217       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);
//    }

00228       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);
//    }

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

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

00258       public int getConnectedAtomsCount(IAtom atom) {
            logger.debug("Getting connected atoms count for atom: ", atom);
            return super.getConnectedAtomsCount(atom);
      }
      
00263       public int getConnectedBondsCount(IAtom atom) {
            logger.debug("Getting connected bonds count for atom: ", atom);
            return super.getConnectedBondsCount(atom);
      }
      
00268       public int getConnectedLonePairsCount(IAtom atom) {
            logger.debug("Getting connected lone pairs count for atom: ", atom);
            return super.getConnectedLonePairsCount(atom);
      }
      
00273       public int getConnectedSingleElectronsCount(IAtom atom) {
            logger.debug("Getting connected single electrons count for atom: ", atom);
            return super.getConnectedSingleElectronsCount(atom);
      }
      
00278       public double getBondOrderSum(IAtom atom) {
            logger.debug("Getting bond order sum for atom: ", atom);
            return super.getBondOrderSum(atom);
      }

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

00288       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);
//    }

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

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

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

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

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

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

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

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

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

00353       public IBond removeBond(int pos) {
            logger.debug("Removing bond at " + pos);
            return super.removeBond(pos);
      }
      
00358       public IBond removeBond(IAtom atom1, IAtom atom2) {
            logger.debug("Removing bond: atom1=" + atom1 + " atom2=" + atom2);
            return super.removeBond(atom1, atom2);
      }
      
00363       public void removeBond(IBond bond) {
            logger.debug("Removing bond=" + bond);
            super.removeBond(bond);
      }
      
00368       public ILonePair removeLonePair(int pos) {
            logger.debug("Removing bond at " + pos);
            return super.removeLonePair(pos);
      }
      
00373       public void removeLonePair(ILonePair ec) {
            logger.debug("Removing bond=" + ec);
            super.removeLonePair(ec);
      }
      
00378       public ISingleElectron removeSingleElectron(int pos) {
            logger.debug("Removing bond at " + pos);
            return super.removeSingleElectron(pos);
      }
      
00383       public void removeSingleElectron(ISingleElectron ec) {
            logger.debug("Removing bond=" + ec);
            super.removeSingleElectron(ec);
      }
      
00388       public void removeAtomAndConnectedElectronContainers(IAtom atom) {
            logger.debug("Removing atom and connected electron containers: ", atom);
            super.removeAtomAndConnectedElectronContainers(atom);       
      }
      
00393       public void removeAllElements() {
            logger.debug("Removing all elements");
            super.removeAllElements();
      }

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

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

00408       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);
      }

00413       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);
      }

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

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

00433       public boolean contains(IBond bond) {
            logger.debug("Contains bond: ", bond);
            return super.contains(bond);
      }
      
00438       public boolean contains(ILonePair ec) {
            logger.debug("Contains lone pair: ", ec);
            return super.contains(ec);
      }
      
00443       public boolean contains(ISingleElectron ec) {
            logger.debug("Contains single electron: ", ec);
            return super.contains(ec);
      }
      
00448       public boolean contains(IElectronContainer electronContainer) {
            logger.debug("Contains electron container: ", electronContainer);
            return super.contains(electronContainer);
      }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

00533       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;
      }

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

00548       public void setA(Vector3d newAxis) {
            logger.debug("Setting A axis to: ", newAxis);
            super.setA(newAxis);
      }

00553       public Vector3d getA() {
            logger.debug("Getting A axis: ", super.getA());
            return super.getA();
      }

00558       public void setB(Vector3d newAxis) {
            logger.debug("Setting B axis to: ", newAxis);
            super.setB(newAxis);
      }

00563       public Vector3d getB() {
            logger.debug("Getting B axis: ", super.getB());
            return super.getB();
      }

00568       public void setC(Vector3d newAxis) {
            logger.debug("Setting C axis to: ", newAxis);
            super.setC(newAxis);
      }

00573       public Vector3d getC() {
            logger.debug("Getting C axis: ", super.getC());
            return super.getC();
      }

00578       public String getSpaceGroup() {
            logger.debug("Getting space group: ", super.getSpaceGroup());
            return super.getSpaceGroup();
      }

00583       public void setSpaceGroup(String group) {
            logger.debug("Setting space group to: ", group);
            super.setSpaceGroup(group);
      }

00588       public Integer getZ() {
            logger.debug("Getting Z: ", super.getZ());
            return super.getZ();
      }

00593       public void setZ(Integer value) {
            logger.debug("Settting Z to: ", value);
            super.setZ(value);
      }

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

}

Generated by  Doxygen 1.6.0   Back to index