KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > xpdl > elements > Deadline


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 /**
8  * Represents coresponding element from XPDL schema.
9  *
10  * @author Sasa Bojanic
11  */

12 public class Deadline extends XMLComplexElement {
13
14    public Deadline (Deadlines parent) {
15       super(parent, true);
16    }
17
18    protected void fillStructure () {
19       DeadlineCondition refDeadlineCondition=new DeadlineCondition(this); // min=1, max=1
20
ExceptionName refExceptionName=new ExceptionName(this); // min=1, max=1
21
XMLAttribute attrExecution=new XMLAttribute(this,"Execution",
22          false,new String JavaDoc[] {
23             "",
24             XPDLConstants.EXECUTION_ASYNCHR,
25             XPDLConstants.EXECUTION_SYNCHR
26          }, 0);
27
28       add(attrExecution);
29       add(refDeadlineCondition);
30       add(refExceptionName);
31    }
32
33    public XMLAttribute getExecutionAttribute () {
34       return (XMLAttribute)get("Execution");
35    }
36    public String JavaDoc getExecution() {
37       return getExecutionAttribute().toValue();
38    }
39    public void setExecutionNONE() {
40       getExecutionAttribute().setValue("");
41    }
42    public void setExecutionASYNCHR() {
43       getExecutionAttribute().setValue(XPDLConstants.EXECUTION_ASYNCHR);
44    }
45    public void setExecutionSYNCHR() {
46       getExecutionAttribute().setValue(XPDLConstants.EXECUTION_SYNCHR);
47    }
48    public String JavaDoc getDeadlineCondition() {
49       return get("DeadlineCondition").toValue();
50    }
51    public void setDeadlineCondition(String JavaDoc deadlineCondition) {
52       set("DeadlineCondition",deadlineCondition);
53    }
54    public String JavaDoc getExceptionName() {
55       return get("ExceptionName").toValue();
56    }
57    public void setExceptionName(String JavaDoc exceptionName) {
58       set("ExceptionName",exceptionName);
59    }
60 }
61
Popular Tags