X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fsrc%2Fdol%2Fdatamodel%2Farchitecture%2FConfiguration.java;fp=dol%2Fsrc%2Fdol%2Fdatamodel%2Farchitecture%2FConfiguration.java;h=b370b952325fa83e0ab960a5cd269753d6f12515;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/src/dol/datamodel/architecture/Configuration.java b/dol/src/dol/datamodel/architecture/Configuration.java new file mode 100644 index 0000000..b370b95 --- /dev/null +++ b/dol/src/dol/datamodel/architecture/Configuration.java @@ -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; +}