KickJava   Java API By Example, From Geeks To Geeks.

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


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 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",
20             false,new String JavaDoc[] {
21                "",
22                XPDLConstants.JOIN_SPLIT_TYPE_AND,
23                XPDLConstants.JOIN_SPLIT_TYPE_XOR
24             }, 0);
25
26       add(attrType);
27    }
28
29    public XMLAttribute getTypeAttribute() {
30       return (XMLAttribute)get("Type");
31    }
32    
33    public String JavaDoc getType () {
34       return getTypeAttribute().toValue();
35    }
36    public void setTypeNONE () {
37       getTypeAttribute().setValue("");
38    }
39    public void setTypeAND () {
40       getTypeAttribute().setValue(XPDLConstants.JOIN_SPLIT_TYPE_AND);
41    }
42    public void setTypeXOR () {
43       getTypeAttribute().setValue(XPDLConstants.JOIN_SPLIT_TYPE_XOR);
44    }
45 }
46
Popular Tags