/*
 * @author <a href="mailto:novotny@aei.mpg.de">Jason Novotny</a>
 * @version $Id$
 */
package org.gridlab.gridsphere.core.persistence.castor.descriptor;

import java.io.Serializable;
import java.util.Locale;

/**
 * <code>Description</code> is used to store a locale dependent titloe or description
 */
public class Description implements Serializable, Cloneable {

    private String lang = Locale.ENGLISH.getLanguage();
    private String text = "";

    /**
     * Constructs an instance of a Description
     */
    public Description() {
    }

    /**
     * Sets the language locale of this text
     *
     * @param lang the relative path to load a text file
     */
    public void setLang(String lang) {
        this.lang = lang;
    }

    /**
     * Returns the language locale of this text
     *
     * @return the language locale of this text
     */
    public String getLang() {
        return lang;
    }

    /**
     * Sets the text
     *
     * @param text the text
     */
    public void setText(String text) {
        this.text = text;
    }

    /**
     * Returns the text
     *
     * @return the text
     */
    public String getText() {
        return text;
    }

    public String toString() {
        return this.text;        
    }

    public Object clone() throws CloneNotSupportedException {
        Description t = (Description) super.clone();
        t.lang = this.lang;
        t.text = this.text;
        return t;
    }

}

@@ -447,16 +447,45 @@
 xt = %22%22;
+%0A    private String key = %22%22;
 %0A%0A    /*
@@ -941,32 +941,346 @@
 rn lang;%0A    %7D%0A%0A
+    /**%0A     * Sets the key of this text%0A     *%0A     * @param key the key of this text%0A     */%0A    public void setKey(String key) %7B%0A        this.key = key;%0A    %7D%0A%0A    /**%0A     * Returns the key of this text%0A     *%0A     * @return the key of this text%0A     */%0A    public String getKey() %7B%0A        return key;%0A    %7D%0A%0A
     /**%0A     * S
@@ -1747,24 +1747,24 @@
  this.lang;%0A
-
         t.te
@@ -1775,24 +1775,50 @@
  this.text;%0A
+        t.key = this.key;%0A
         retu

add key for specifyiung more than one text