1 package org.enhydra.shark.xpdl.elements; 2 3 import org.enhydra.shark.xpdl.XMLAttribute; 4 import org.enhydra.shark.xpdl.XMLComplexElement; 5 import org.enhydra.shark.xpdl.XPDLConstants; 6 7 12 public class BasicType extends XMLComplexElement { 13 14 public BasicType (DataTypes parent) { 15 super(parent, true); 16 } 17 18 protected void fillStructure () { 19 XMLAttribute attrType=new XMLAttribute(this,"Type", 23 true,new String [] { 24 XPDLConstants.BASIC_TYPE_STRING, 25 XPDLConstants.BASIC_TYPE_FLOAT, 26 XPDLConstants.BASIC_TYPE_INTEGER, 27 XPDLConstants.BASIC_TYPE_REFERENCE, 28 XPDLConstants.BASIC_TYPE_DATETIME, 29 XPDLConstants.BASIC_TYPE_BOOLEAN, 30 XPDLConstants.BASIC_TYPE_PERFORMER 31 }, 0); 32 33 add(attrType); 34 } 35 36 public XMLAttribute getTypeAttribute() { 37 return (XMLAttribute)get("Type"); 38 } 39 40 public String getType () { 41 return getTypeAttribute().toValue(); 42 } 43 public void setTypeSTRING () { 44 getTypeAttribute().setValue(XPDLConstants.BASIC_TYPE_STRING); 45 } 46 public void setTypeFLOAT () { 47 getTypeAttribute().setValue(XPDLConstants.BASIC_TYPE_FLOAT); 48 } 49 public void setTypeINTEGER () { 50 getTypeAttribute().setValue(XPDLConstants.BASIC_TYPE_INTEGER); 51 } 52 public void setTypeREFERENCE () { 53 getTypeAttribute().setValue(XPDLConstants.BASIC_TYPE_REFERENCE); 54 } 55 public void setTypeDATETIME () { 56 getTypeAttribute().setValue(XPDLConstants.BASIC_TYPE_DATETIME); 57 } 58 public void setTypeBOOLEAN () { 59 getTypeAttribute().setValue(XPDLConstants.BASIC_TYPE_BOOLEAN); 60 } 61 public void setTypePERFORMER () { 62 getTypeAttribute().setValue(XPDLConstants.BASIC_TYPE_PERFORMER); 63 } 64 65 } 66 | Popular Tags |