dol: initial dol commit
[jump.git] / dol / src / dol / datamodel / architecture / Configuration.java
diff --git a/dol/src/dol/datamodel/architecture/Configuration.java b/dol/src/dol/datamodel/architecture/Configuration.java
new file mode 100644 (file)
index 0000000..b370b95
--- /dev/null
@@ -0,0 +1,113 @@
+/* $Id: Configuration.java 1 2010-02-24 13:03:05Z haidw $ */
+package dol.datamodel.architecture;
+
+
+/**
+ * This class represents a name-value pair of a configuration tag in XML.
+ */
+public class Configuration {
+
+    /**
+     * Constructor to create a Configuration.
+     */
+    public Configuration(String name) {
+        _name = name;
+    }
+
+    /**
+     * Accept a Visitor.
+     *
+     * @param x visitor object
+
+    public void accept(PNVisitor x) {
+        x.visitComponent(this);
+    }
+     */
+
+    
+    /**
+     * Clone this Configuration.
+     *
+     * @return new instance of the Configuration.
+     */
+    public Object clone() {
+        try {
+            Configuration newObj = (Configuration) super.clone();
+            newObj.setName(_name);
+            newObj.setValue(_value);
+            return (newObj);
+        } catch (CloneNotSupportedException e) {
+            System.out.println("Error Clone not Supported");
+        }
+        return null;
+    }
+
+    /**
+     * Get the value of the Configuration.
+     *
+     * @return the value of the configuration.
+     */
+    public String getValue() {
+        return _value;
+    }
+
+    /**
+     * Set the value of the Configuration.
+     *
+     * @param value the value of the configuration.
+     */
+    public void setValue(String value) {
+        _value = value;
+    }
+
+    /**
+     * Get the name of this configuration.
+     *
+     * @return  the name
+     */
+    public String getName() {
+        return _name;
+    }
+
+    /**
+     * Set the name of this configuration.
+     *
+     * @param name name of the configuration
+     */
+    public void setName(String name) {
+        _name = name;
+    }
+
+    /**
+     * Get the hierarchical parent of this resource.
+     *
+     * @return parent of this resource
+
+     public Resource getParentResource() {
+        return _parentResource;
+    }
+     */
+    
+    /**
+     * Set the hierarchical parent of this resource.
+     *
+     * @param parentResource new parent
+
+    public void setParentResource(Resource parentResource) {
+        _parentResource = parentResource;
+    }
+     */
+    
+    /**
+     * Return a string representation of the Configuration.
+     *
+     * @return string representation of the Configuration
+     */
+    public String toString() {
+        return "Configuration: " + getName();
+    }
+
+    protected String _value = null;
+    protected String _name = null;
+    protected ArchiResource _parentResource = null;
+}