1 /* $Id: Configuration.java 1 2010-02-24 13:03:05Z haidw $ */
2 package dol.datamodel.pn;
4 import dol.visitor.PNVisitor;
7 * This class represents a name-value pair of a configuration tag in XML.
9 public class Configuration {
12 * Constructor to create a Configuration.
14 public Configuration(String name) {
21 * @param x visitor object
23 public void accept(PNVisitor x) {
24 x.visitComponent(this);
28 * Clone this Configuration.
30 * @return new instance of the Configuration.
32 public Object clone() {
34 Configuration newObj = (Configuration) super.clone();
35 newObj.setName(_name);
36 newObj.setValue(_value);
38 } catch (CloneNotSupportedException e) {
39 System.out.println("Error Clone not Supported");
45 * Get the value of the Configuration.
47 * @return the value of the configuration.
49 public String getValue() {
54 * Set the value of the Configuration.
56 * @param value the value of the configuration.
58 public void setValue(String value) {
63 * Get the name of this configuration.
67 public String getName() {
72 * Set the name of this configuration.
74 * @param name name of the configuration
76 public void setName(String name) {
81 * Get the hierarchical parent of this resource.
83 * @return parent of this resource
85 public Resource getParentResource() {
86 return _parentResource;
91 * Set the hierarchical parent of this resource.
93 * @param parentResource new parent
95 public void setParentResource(Resource parentResource) {
96 _parentResource = parentResource;
101 * Return a string representation of the Configuration.
103 * @return string representation of the Configuration
105 public String toString() {
106 return "Configuration: " + getName();
109 protected String _value = null;
110 protected String _name = null;
111 protected Resource _parentResource = null;