    001    package org.maltparser.core.flow.system.elem;
    002
    003    import org.maltparser.core.exception.MaltChainedException;
    004    import org.maltparser.core.flow.system.FlowChartSystem;
    005    import org.w3c.dom.Element;
    006    /**
    007    *
    008    *
    009    * @author Johan Hall
    010    */
    011    public class ChartAttribute {
    012            private String name;
    013            private String defaultValue;
    014
    015
    016            public String getName() {
    017                    return name;
    018            }
    019
    020            public void setName(String name) {
    021                    this.name = name;
    022            }
    023
    024            public String getDefaultValue() {
    025                    return defaultValue;
    026            }
    027
    028            public void setDefaultValue(String defaultValue) {
    029                    this.defaultValue = defaultValue;
    030            }
    031
    032            public void read(Element attrElem, FlowChartSystem flowChartSystem) throws MaltChainedException {
    033                    setName(attrElem.getAttribute("name"));
    034                    setDefaultValue(attrElem.getAttribute("default"));
    035            }
    036
    037            public String toString() {
    038                    StringBuilder sb = new StringBuilder();
    039                    sb.append(name);
    040                    sb.append(' ');
    041                    sb.append(defaultValue);
    042                    return sb.toString();
    043            }
    044    }