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

DebugChemModel.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.Map;

import org.openscience.cdk.ChemModel;
import org.openscience.cdk.interfaces.IChemModel;
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.IMoleculeSet;
import org.openscience.cdk.interfaces.IReactionSet;
import org.openscience.cdk.interfaces.IRingSet;
import org.openscience.cdk.tools.LoggingTool;

/**
 * Debugging data class.
 * 
 * @author     egonw
 * @cdk.module datadebug
 * @cdk.githash
 */
00043 public class DebugChemModel extends ChemModel
    implements IChemModel {

00046     private static final long serialVersionUID = -920209300005079592L;
    
    LoggingTool logger = new LoggingTool(DebugChemModel.class);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

00145       public IMoleculeSet getMoleculeSet() {
            logger.debug("Getting setOfMolecules: ", super.getMoleculeSet());
            return super.getMoleculeSet();
      }

00150       public void setMoleculeSet(IMoleculeSet setOfMolecules) {
            logger.debug("Setting setOfMolecules: ", setOfMolecules);
            super.setMoleculeSet(setOfMolecules);
      }

00155       public IRingSet getRingSet() {
            logger.debug("Getting ringSet: ", super.getRingSet());
            return super.getRingSet();
      }

00160       public void setRingSet(IRingSet ringSet) {
            logger.debug("Setting ringSet: ", ringSet);
            super.setRingSet(ringSet);
      }

00165       public ICrystal getCrystal() {
            logger.debug("Getting crystal: ", super.getCrystal());
            return super.getCrystal();
      }

00170       public void setCrystal(ICrystal crystal) {
            logger.debug("Setting crystal: ", crystal);
            super.setCrystal(crystal);
      }

00175       public IReactionSet getReactionSet() {
            logger.debug("Getting setOfReactions: ", super.getReactionSet());
            return super.getReactionSet();
      }

00180       public void setReactionSet(IReactionSet sor) {
            logger.debug("Setting setOfReactions: ", sor);
            super.setReactionSet(sor);
      }

}

Generated by  Doxygen 1.6.0   Back to index