KickJava   Java API By Example, From Geeks To Geeks.

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


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 SubFlow extends XMLComplexElement {
13
14    public SubFlow (ImplementationTypes parent) {
15       super(parent, true);
16    }
17
18    protected void fillStructure () {
19       XMLAttribute attrId=new XMLAttribute(this,"Id", true); // required
20
XMLAttribute attrExecution=new XMLAttribute(this,"Execution",
21          false,new String JavaDoc[] {
22             "",
23             XPDLConstants.EXECUTION_ASYNCHR,
24             XPDLConstants.EXECUTION_SYNCHR
25          }, 0);
26       ActualParameters refActualParameters=new ActualParameters(this); // min=0
27

28       add(attrId);
29       add(attrExecution);
30       add(refActualParameters);
31    }
32
33    public String JavaDoc getId () {
34       return get("Id").toValue();
35    }
36    public void setId (String JavaDoc id) {
37       set("Id",id);
38    }
39    public XMLAttribute getExecutionAttribute () {
40       return (XMLAttribute)get("Execution");
41    }
42    public String JavaDoc getExecution() {
43       return getExecutionAttribute().toValue();
44    }
45    public void setExecutionNONE() {
46       getExecutionAttribute().setValue("");
47    }
48    public void setExecutionASYNCHR() {
49       getExecutionAttribute().setValue(XPDLConstants.EXECUTION_ASYNCHR);
50    }
51    public void setExecutionSYNCHR() {
52       getExecutionAttribute().setValue(XPDLConstants.EXECUTION_SYNCHR);
53    }
54    public ActualParameters getActualParameters() {
55       return (ActualParameters)get("ActualParameters");
56    }
57    
58 }
59
Popular Tags