1 /* $Id: Configuration.java 1 2010-02-24 13:03:05Z haidw $ */
2 package dol.datamodel.architecture;
6 * This class represents a name-value pair of a configuration tag in XML.
8 public class Configuration {
11 * Constructor to create a Configuration.
13 public Configuration(String name) {
20 * @param x visitor object
22 public void accept(PNVisitor x) {
23 x.visitComponent(this);
29 * Clone this Configuration.
31 * @return new instance of the Configuration.
33 public Object clone() {
35 Configuration newObj = (Configuration) super.clone();
36 newObj.setName(_name);
37 newObj.setValue(_value);
39 } catch (CloneNotSupportedException e) {
40 System.out.println("Error Clone not Supported");
46 * Get the value of the Configuration.
48 * @return the value of the configuration.
50 public String getValue() {
55 * Set the value of the Configuration.
57 * @param value the value of the configuration.
59 public void setValue(String value) {
64 * Get the name of this configuration.
68 public String getName() {
73 * Set the name of this configuration.
75 * @param name name of the configuration
77 public void setName(String name) {
82 * Get the hierarchical parent of this resource.
84 * @return parent of this resource
86 public Resource getParentResource() {
87 return _parentResource;
92 * Set the hierarchical parent of this resource.
94 * @param parentResource new parent
96 public void setParentResource(Resource parentResource) {
97 _parentResource = parentResource;
102 * Return a string representation of the Configuration.
104 * @return string representation of the Configuration
106 public String toString() {
107 return "Configuration: " + getName();
110 protected String _value = null;
111 protected String _name = null;
112 protected ArchiResource _parentResource = null;