~ubuntu-branches/ubuntu/trusty/cdk/trusty-proposed

« back to all changes in this revision

Viewing changes to src/org/openscience/cdk/debug/DebugChemSequence.java

  • Committer: Bazaar Package Importer
  • Author(s): Paul Cager
  • Date: 2008-04-09 21:17:53 UTC
  • Revision ID: james.westby@ubuntu.com-20080409211753-46lmjw5z8mx5pd8d
Tags: upstream-1.0.2
ImportĀ upstreamĀ versionĀ 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Revision: 7636 $ $Author: egonw $ $Date: 2007-01-04 18:46:10 +0100 (Thu, 04 Jan 2007) $
 
2
 *
 
3
 * Copyright (C) 2005-2007  Egon Willighagen <egonw@users.sf.net>
 
4
 *
 
5
 * Contact: cdk-devel@lists.sourceforge.net
 
6
 *
 
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.
 
11
 *
 
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.
 
16
 *
 
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.
 
20
 */
 
21
package org.openscience.cdk.debug;
 
22
 
 
23
import java.util.Hashtable;
 
24
 
 
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;
 
31
 
 
32
/**
 
33
 * Debugging data class.
 
34
 * 
 
35
 * @author     egonw
 
36
 * @cdk.module datadebug
 
37
 */
 
38
public class DebugChemSequence extends org.openscience.cdk.ChemSequence
 
39
    implements IChemSequence {
 
40
 
 
41
    private static final long serialVersionUID = -628120469241907704L;
 
42
    
 
43
    LoggingTool logger = new LoggingTool(DebugChemSequence.class);
 
44
 
 
45
        public void addListener(IChemObjectListener col) {
 
46
                logger.debug("Adding listener: ", col);
 
47
                super.addListener(col);
 
48
        }
 
49
 
 
50
        public int getListenerCount() {
 
51
                logger.debug("Getting listener count: ", super.getListenerCount());
 
52
                return super.getListenerCount();
 
53
        }
 
54
 
 
55
        public void removeListener(IChemObjectListener col) {
 
56
                logger.debug("Removing listener: ", col);
 
57
                super.removeListener(col);
 
58
        }
 
59
 
 
60
        public void notifyChanged() {
 
61
                logger.debug("Notifying changed");
 
62
                super.notifyChanged();
 
63
        }
 
64
 
 
65
        public void notifyChanged(IChemObjectChangeEvent evt) {
 
66
                logger.debug("Notifying changed event: ", evt);
 
67
                super.notifyChanged(evt);
 
68
        }
 
69
 
 
70
        public void setProperty(Object description, Object property) {
 
71
                logger.debug("Setting property: ", description + "=" + property);
 
72
                super.setProperty(description, property);
 
73
        }
 
74
 
 
75
        public void removeProperty(Object description) {
 
76
                logger.debug("Removing property: ", description);
 
77
                super.removeProperty(description);
 
78
        }
 
79
 
 
80
        public Object getProperty(Object description) {
 
81
                logger.debug("Getting property: ", description + "=" + super.getProperty(description));
 
82
                return super.getProperty(description);
 
83
        }
 
84
 
 
85
        public Hashtable getProperties() {
 
86
                logger.debug("Getting properties");
 
87
                return super.getProperties();
 
88
        }
 
89
 
 
90
        public String getID() {
 
91
                logger.debug("Getting ID: ", super.getID());
 
92
                return super.getID();
 
93
        }
 
94
 
 
95
        public void setID(String identifier) {
 
96
                logger.debug("Setting ID: ", identifier);
 
97
                super.setID(identifier);
 
98
        }
 
99
 
 
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);
 
103
        }
 
104
 
 
105
        public boolean getFlag(int flag_type) {
 
106
                logger.debug("Setting flag: ", flag_type + "=" + super.getFlag(flag_type));
 
107
                return super.getFlag(flag_type);
 
108
        }
 
109
 
 
110
        public void setProperties(Hashtable properties) {
 
111
                logger.debug("Setting properties: ", properties);
 
112
                super.setProperties(properties);
 
113
        }
 
114
 
 
115
        public void setFlags(boolean[] flagsNew) {
 
116
                logger.debug("Setting flags:", flagsNew.length);
 
117
                super.setFlags(flagsNew);
 
118
        }
 
119
 
 
120
        public boolean[] getFlags() {
 
121
                logger.debug("Getting flags:", super.getFlags().length);
 
122
                return super.getFlags();
 
123
        }
 
124
 
 
125
        public Object clone() throws CloneNotSupportedException {
 
126
        Object clone = null;
 
127
        try {
 
128
                clone = super.clone();
 
129
        } catch (Exception exception) {
 
130
                logger.error("Could not clone DebugAtom: " + exception.getMessage(), exception);
 
131
                logger.debug(exception);
 
132
        }
 
133
        return clone;
 
134
        }
 
135
 
 
136
        public IChemObjectBuilder getBuilder() {
 
137
                return DebugChemObjectBuilder.getInstance();
 
138
        }
 
139
 
 
140
        public void addChemModel(IChemModel chemModel) {
 
141
                logger.debug("Adding chemModel: ", chemModel);
 
142
                super.addChemModel(chemModel);
 
143
        }
 
144
 
 
145
        public void removeChemModel(int pos) {
 
146
                logger.debug("Remove chemModel: ", pos);
 
147
                super.removeChemModel(pos);
 
148
        }
 
149
        
 
150
        public java.util.Iterator chemModels() {
 
151
                logger.debug("Getting chemModels");
 
152
                return super.chemModels();
 
153
        }
 
154
 
 
155
        public IChemModel getChemModel(int number) {
 
156
                logger.debug("Getting chemModel at: ", number);
 
157
                return super.getChemModel(number);
 
158
        }
 
159
 
 
160
        public int getChemModelCount() {
 
161
                logger.debug("Getting ChemModel count: ", super.getChemModelCount());
 
162
                return super.getChemModelCount();
 
163
        }
 
164
 
 
165
}