1 package org.enhydra.shark.xpdl.elements; 2 3 import org.enhydra.shark.xpdl.XMLAttribute; 4 import org.enhydra.shark.xpdl.XMLComplexElement; 5 6 11 public class ExtendedAttribute extends XMLComplexElement { 12 13 public ExtendedAttribute (ExtendedAttributes parent) { 14 super(parent, true); 15 } 16 17 protected void fillStructure () { 18 XMLAttribute attrName=new XMLAttribute(this,"Name", true); XMLAttribute attrValue=new XMLAttribute(this,"Value", false); 20 21 add(attrName); 22 add(attrValue); 23 } 24 25 public void setValue(String v) { 26 if (isReadOnly) { 27 throw new RuntimeException ("Can't set the value of read only element!"); 28 } 29 this.value = v; 30 } 31 32 public String getName() { 33 return get("Name").toValue(); 34 } 35 public void setName(String name) { 36 set("Name",name); 37 } 38 public String getVValue() { 39 return get("Value").toValue(); 40 } 41 public void setVValue(String value) { 42 set("Value",value); 43 } 44 45 } 46 | Popular Tags |