1
/* $Revision: 7636 $ $Author: egonw $ $Date: 2007-01-04 18:46:10 +0100 (Thu, 04 Jan 2007) $
3
* Copyright (C) 2005-2007 Egon Willighagen <egonw@users.sf.net>
5
* Contact: cdk-devel@lists.sourceforge.net
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public License
9
* as published by the Free Software Foundation; either version 2.1
10
* of the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU Lesser General Public License for more details.
17
* You should have received a copy of the GNU Lesser General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21
package org.openscience.cdk.debug;
23
import java.util.Hashtable;
25
import org.openscience.cdk.interfaces.IChemModel;
26
import org.openscience.cdk.interfaces.IChemObjectBuilder;
27
import org.openscience.cdk.interfaces.IChemObjectChangeEvent;
28
import org.openscience.cdk.interfaces.IChemObjectListener;
29
import org.openscience.cdk.interfaces.IChemSequence;
30
import org.openscience.cdk.tools.LoggingTool;
33
* Debugging data class.
36
* @cdk.module datadebug
38
public class DebugChemSequence extends org.openscience.cdk.ChemSequence
39
implements IChemSequence {
41
private static final long serialVersionUID = -628120469241907704L;
43
LoggingTool logger = new LoggingTool(DebugChemSequence.class);
45
public void addListener(IChemObjectListener col) {
46
logger.debug("Adding listener: ", col);
47
super.addListener(col);
50
public int getListenerCount() {
51
logger.debug("Getting listener count: ", super.getListenerCount());
52
return super.getListenerCount();
55
public void removeListener(IChemObjectListener col) {
56
logger.debug("Removing listener: ", col);
57
super.removeListener(col);
60
public void notifyChanged() {
61
logger.debug("Notifying changed");
62
super.notifyChanged();
65
public void notifyChanged(IChemObjectChangeEvent evt) {
66
logger.debug("Notifying changed event: ", evt);
67
super.notifyChanged(evt);
70
public void setProperty(Object description, Object property) {
71
logger.debug("Setting property: ", description + "=" + property);
72
super.setProperty(description, property);
75
public void removeProperty(Object description) {
76
logger.debug("Removing property: ", description);
77
super.removeProperty(description);
80
public Object getProperty(Object description) {
81
logger.debug("Getting property: ", description + "=" + super.getProperty(description));
82
return super.getProperty(description);
85
public Hashtable getProperties() {
86
logger.debug("Getting properties");
87
return super.getProperties();
90
public String getID() {
91
logger.debug("Getting ID: ", super.getID());
95
public void setID(String identifier) {
96
logger.debug("Setting ID: ", identifier);
97
super.setID(identifier);
100
public void setFlag(int flag_type, boolean flag_value) {
101
logger.debug("Setting flag: ", flag_type + "=" + flag_value);
102
super.setFlag(flag_type, flag_value);
105
public boolean getFlag(int flag_type) {
106
logger.debug("Setting flag: ", flag_type + "=" + super.getFlag(flag_type));
107
return super.getFlag(flag_type);
110
public void setProperties(Hashtable properties) {
111
logger.debug("Setting properties: ", properties);
112
super.setProperties(properties);
115
public void setFlags(boolean[] flagsNew) {
116
logger.debug("Setting flags:", flagsNew.length);
117
super.setFlags(flagsNew);
120
public boolean[] getFlags() {
121
logger.debug("Getting flags:", super.getFlags().length);
122
return super.getFlags();
125
public Object clone() throws CloneNotSupportedException {
128
clone = super.clone();
129
} catch (Exception exception) {
130
logger.error("Could not clone DebugAtom: " + exception.getMessage(), exception);
131
logger.debug(exception);
136
public IChemObjectBuilder getBuilder() {
137
return DebugChemObjectBuilder.getInstance();
140
public void addChemModel(IChemModel chemModel) {
141
logger.debug("Adding chemModel: ", chemModel);
142
super.addChemModel(chemModel);
145
public void removeChemModel(int pos) {
146
logger.debug("Remove chemModel: ", pos);
147
super.removeChemModel(pos);
150
public java.util.Iterator chemModels() {
151
logger.debug("Getting chemModels");
152
return super.chemModels();
155
public IChemModel getChemModel(int number) {
156
logger.debug("Getting chemModel at: ", number);
157
return super.getChemModel(number);
160
public int getChemModelCount() {
161
logger.debug("Getting ChemModel count: ", super.getChemModelCount());
162
return super.getChemModelCount();