1 package org.enhydra.shark.xpdl.elements; 2 3 import org.enhydra.shark.xpdl.XMLAttribute; 4 import org.enhydra.shark.xpdl.XMLCollectionElement; 5 import org.enhydra.shark.xpdl.XPDLConstants; 6 7 12 public class DataField extends XMLCollectionElement { 13 14 public DataField (DataFields dfs) { 15 super(dfs, true); 16 } 17 18 protected void fillStructure () { 19 DataType refDataType=new DataType(this); 20 InitialValue refInitialValue=new InitialValue(this); Length refLength=new Length(this); Description refDescription=new Description(this); ExtendedAttributes refExtendedAttributes=new ExtendedAttributes(this); 25 XMLAttribute attrName=new XMLAttribute(this,"Name", false); 26 XMLAttribute attrIsArray=new XMLAttribute(this,"IsArray", 28 false,new String [] { 29 XPDLConstants.DATA_FIELD_IS_ARRAY_TRUE, 30 XPDLConstants.DATA_FIELD_IS_ARRAY_FALSE 31 }, 1); 32 33 super.fillStructure(); 34 add(attrName); 35 add(attrIsArray); 36 add(refDataType); 37 add(refInitialValue); 38 add(refLength); 39 add(refDescription); 40 add(refExtendedAttributes); 41 42 } 43 44 public XMLAttribute getIsArrayAttribute () { 45 return (XMLAttribute)get("IsArray"); 46 } 47 48 public boolean getIsArray() { 49 return new Boolean (get("IsArray").toValue()).booleanValue(); 50 } 51 public void setIsArray(boolean isArray) { 52 set("IsArray",String.valueOf(isArray).toUpperCase()); 53 } 54 public String getName() { 55 return get("Name").toValue(); 56 } 57 public void setName(String name) { 58 set("Name",name); 59 } 60 public DataType getDataType() { 61 return (DataType)get("DataType"); 62 } 63 public String getDescription() { 64 return get("Description").toValue(); 65 } 66 public void setDescription(String description) { 67 set("Description",description); 68 } 69 public ExtendedAttributes getExtendedAttributes() { 70 return (ExtendedAttributes)get("ExtendedAttributes"); 71 } 72 public String getInitialValue() { 73 return get("InitialValue").toValue(); 74 } 75 public void setInitialValue(String initialValue) { 76 set("InitialValue",initialValue); 77 } 78 public String getLength() { 79 return get("Length").toValue(); 80 } 81 public void setLength(String length) { 82 set("Length",length); 83 } 84 } 85 | Popular Tags |