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 Join extends XMLComplexElement {
13:
14: public Join(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:
24: add(attrType);
25: }
26:
27: public XMLAttribute getTypeAttribute() {
28: return (XMLAttribute) get("Type");
29: }
30:
31: public String getType() {
32: return getTypeAttribute().toValue();
33: }
34:
35: public void setTypeNONE() {
36: getTypeAttribute().setValue(XPDLConstants.JOIN_SPLIT_TYPE_NONE);
37: }
38:
39: public void setTypeAND() {
40: getTypeAttribute().setValue(XPDLConstants.JOIN_SPLIT_TYPE_AND);
41: }
42:
43: public void setTypeXOR() {
44: getTypeAttribute().setValue(XPDLConstants.JOIN_SPLIT_TYPE_XOR);
45: }
46: }
|