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 Tool extends XMLComplexElement { 13 14 public Tool (Tools parent){ 15 super(parent, true); 16 } 17 18 protected void fillStructure () { 19 XMLAttribute attrId=new XMLAttribute(this,"Id", true); XMLAttribute attrType=new XMLAttribute(this,"Type", 21 false,new String [] { 22 "", 23 XPDLConstants.TOOL_TYPE_APPLICATION, 24 XPDLConstants.TOOL_TYPE_PROCEDURE 25 }, 0); 26 ActualParameters refActualParameters=new ActualParameters(this); Description refDescription=new Description(this); ExtendedAttributes refExtendedAttributes=new ExtendedAttributes(this); 30 add(attrId); 31 add(attrType); 32 add(refActualParameters); 33 add(refDescription); 34 add(refExtendedAttributes); 35 } 36 37 public String getId () { 38 return get("Id").toValue(); 39 } 40 public void setId (String id) { 41 set("Id",id); 42 } 43 public XMLAttribute getTypeAttribute() { 44 return (XMLAttribute)get("Type"); 45 } 46 public String getType () { 47 return getTypeAttribute().toValue(); 48 } 49 public void setTypeNONE () { 50 getTypeAttribute().setValue(""); 51 } 52 public void setTypeAPPLICATION () { 53 getTypeAttribute().setValue(XPDLConstants.TOOL_TYPE_APPLICATION); 54 } 55 public void setTypePROCEDURE () { 56 getTypeAttribute().setValue(XPDLConstants.TOOL_TYPE_PROCEDURE); 57 } 58 public String getDescription() { 59 return get("Description").toValue(); 60 } 61 public void setDescription(String description) { 62 set("Description",description); 63 } 64 public ActualParameters getActualParameters() { 65 return (ActualParameters)get("ActualParameters"); 66 } 67 public ExtendedAttributes getExtendedAttributes() { 68 return (ExtendedAttributes)get("ExtendedAttributes"); 69 } 70 } 71 | Popular Tags |