KickJava   Java API By Example, From Geeks To Geeks.

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


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 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",
20             false,new String JavaDoc[] {
21                "",
22                XPDLConstants.JOIN_SPLIT_TYPE_AND,
23                XPDLConstants.JOIN_SPLIT_TYPE_XOR
24             }, 0);
25       TransitionRefs refTransitionRefs=new TransitionRefs(this); // min=0
26

27       add(attrType);
28       add(refTransitionRefs);
29    }
30
31    public XMLAttribute getTypeAttribute() {
32       return (XMLAttribute)get("Type");
33    }
34    
35    public String JavaDoc getType () {
36       return getTypeAttribute().toValue();
37    }
38    public void setTypeNONE () {
39       getTypeAttribute().setValue("");
40    }
41    public void setTypeAND () {
42       getTypeAttribute().setValue(XPDLConstants.JOIN_SPLIT_TYPE_AND);
43    }
44    public void setTypeXOR () {
45       getTypeAttribute().setValue(XPDLConstants.JOIN_SPLIT_TYPE_XOR);
46    }
47    
48    public TransitionRefs getTransitionRefs () {
49       return (TransitionRefs)get("TransitionRefs");
50    }
51 }
52
Popular Tags