01: package org.enhydra.shark.xpdl.elements;
02:
03: import org.enhydra.shark.xpdl.XMLAttribute;
04: import org.enhydra.shark.xpdl.XMLComplexElement;
05: import org.enhydra.shark.xpdl.XPDLConstants;
06:
07: /**
08: * Represents coresponding element from XPDL schema.
09: *
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 ,
21: "Execution", false, new String[] {
22: XPDLConstants.EXECUTION_NONE,
23: XPDLConstants.EXECUTION_ASYNCHR,
24: XPDLConstants.EXECUTION_SYNCHR }, 0);
25: ActualParameters refActualParameters = new ActualParameters(
26: this ); // min=0
27:
28: add(attrId);
29: add(attrExecution);
30: add(refActualParameters);
31: }
32:
33: public String getId() {
34: return get("Id").toValue();
35: }
36:
37: public void setId(String id) {
38: set("Id", id);
39: }
40:
41: public XMLAttribute getExecutionAttribute() {
42: return (XMLAttribute) get("Execution");
43: }
44:
45: public String getExecution() {
46: return getExecutionAttribute().toValue();
47: }
48:
49: public void setExecutionNONE() {
50: getExecutionAttribute().setValue(XPDLConstants.EXECUTION_NONE);
51: }
52:
53: public void setExecutionASYNCHR() {
54: getExecutionAttribute().setValue(
55: XPDLConstants.EXECUTION_ASYNCHR);
56: }
57:
58: public void setExecutionSYNCHR() {
59: getExecutionAttribute()
60: .setValue(XPDLConstants.EXECUTION_SYNCHR);
61: }
62:
63: public ActualParameters getActualParameters() {
64: return (ActualParameters) get("ActualParameters");
65: }
66:
67: }
|