1 /* $Id: Configuration.java 1 2010-02-24 13:03:05Z haidw $ */
\r
2 package dol.datamodel.mapping;
\r
4 import dol.visitor.MapVisitor;
\r
7 * This class represents a name-value pair of a configuration tag in XML.
\r
9 public class Configuration {
\r
12 * Constructor to create a Configuration.
\r
14 public Configuration(String name, String value) {
\r
22 * @param x visitor object
\r
24 public void accept(MapVisitor x) {
\r
25 x.visitComponent(this);
\r
29 * Clone this Configuration.
\r
31 * @return new instance of the Configuration.
\r
33 public Object clone() {
\r
35 Configuration newObj = (Configuration) super.clone();
\r
36 newObj._name = _name;
\r
37 newObj._value = _value;
\r
39 } catch (CloneNotSupportedException e) {
\r
40 System.out.println("Error Clone not Supported");
\r
46 * Get the value of the Configuration.
\r
48 * @return the value of the configuration.
\r
50 public String getValue() {
\r
55 * Get the name of this configuration.
\r
59 public String getName() {
\r
64 * Return a string representation of the Configuration.
\r
66 * @return string representation of the Configuration
\r
68 public String toString() {
\r
69 return "Configuration: " + _name + "/" + _value;
\r
72 protected String _value = null;
\r
73 protected String _name = null;
\r