1 /***
2 * AbstractGraphProcessor.java
3 *
4 * Project: Dependency Tool
5 *
6 * WHEN WHO WHAT
7 * 06.06.2003 pko initial public release
8 * 10-12-2002 pko creation
9 *
10 * Copyright 2003 ELCA Informatique SA
11 * Av. de la Harpe 22-24, 1000 Lausanne 13, Switzerland
12 * www.elca.ch
13 *
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public License
16 * as published by the Free Software Foundation; either version 2.1 of
17 * the License, or (at your option) any later version.
18 *
19 * This library is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with this library; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
27 * USA
28 */
29
30 package ch.elca.dependency.graph;
31
32 import org.apache.log4j.Logger;
33
34 import ch.elca.dependency.util.StringManager;
35
36 /***
37 * <code>AbstractGraphProcessor</code> is a named
38 * <code>GraphProcessor</code>. To be subclassed by all classes that
39 * need to implement a <code>GraphProcessor</code> and need to have a
40 * name aswell.
41 *
42 * @see ch.elca.dependency.graph.GraphProcessor
43 *
44 * @author Pawel Kowalski
45 * @version 1.0-beta
46 */
47 public abstract class AbstractGraphProcessor implements GraphProcessor {
48
49 /***
50 * Log4j Logger.
51 */
52 private static final Logger LOG = Logger.getLogger(AbstractGraphProcessor.class);
53
54 /***
55 * A StringManager to access Strings
56 */
57 private static final StringManager STR = StringManager.getManager(AbstractGraphProcessor.class);
58
59 /***
60 * A name associated with this GraphProcessor
61 */
62 protected String m_name = "";
63
64 //****************************************************************************************/
65 // create an AbstractGraphProcessor
66 //****************************************************************************************/
67
68 /***
69 * Creates a new <code>AbstractGraphProcessor</code> instance.
70 */
71 protected AbstractGraphProcessor() {
72 }
73
74 /***
75 * Creates a new <code>AbstractGraphProcessor</code> instance.
76 *
77 * @param name a <code>String</code> value
78 */
79 protected AbstractGraphProcessor(String name) {
80 setName(name);
81 }
82
83 /***
84 * Set this <code>GraphProcessor</code>'s name.
85 *
86 * @param name a <code>String</code> value
87 */
88 public void setName(String name) {
89 m_name = name;
90 }
91
92 /***
93 * Get this <code>GraphProcessor</code>'s name.
94 *
95 * @return a <code>String</code> value
96 */
97 public String getName() {
98 return m_name;
99 }
100
101 /***
102 * Retrieve a String representation of this object.
103 *
104 * @return a <code>String</code> representation of this object.
105 * @see Object#toString()
106 */
107 public String toString() {
108 return m_name;
109 }
110 }
This page was automatically generated by Maven