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 Split extends XMLComplexElement {
13:
14: public Split(TransitionRestriction parent) {
15: super (parent, false);
16: }
17:
18: protected void fillStructure() {
19: XMLAttribute attrType = new XMLAttribute(this , "Type", false,
20: new String[] { XPDLConstants.JOIN_SPLIT_TYPE_NONE,
21: XPDLConstants.JOIN_SPLIT_TYPE_AND,
22: XPDLConstants.JOIN_SPLIT_TYPE_XOR }, 0);
23: TransitionRefs refTransitionRefs = new TransitionRefs(this ); // min=0
24:
25: add(attrType);
26: add(refTransitionRefs);
27: }
28:
29: public XMLAttribute getTypeAttribute() {
30: return (XMLAttribute) get("Type");
31: }
32:
33: public String getType() {
34: return getTypeAttribute().toValue();
35: }
36:
37: public void setTypeNONE() {
38: getTypeAttribute().setValue(XPDLConstants.JOIN_SPLIT_TYPE_NONE);
39: }
40:
41: public void setTypeAND() {
42: getTypeAttribute().setValue(XPDLConstants.JOIN_SPLIT_TYPE_AND);
43: }
44:
45: public void setTypeXOR() {
46: getTypeAttribute().setValue(XPDLConstants.JOIN_SPLIT_TYPE_XOR);
47: }
48:
49: public TransitionRefs getTransitionRefs() {
50: return (TransitionRefs) get("TransitionRefs");
51: }
52: }
|