KickJava   Java API By Example, From Geeks To Geeks.

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


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 SimulationInformation extends XMLComplexElement {
13
14    public SimulationInformation (Activity parent) {
15       super(parent, false);
16    }
17
18    protected void fillStructure () {
19       XMLAttribute attrInstantiation=new XMLAttribute(this,"Instantiation",
20             false,new String JavaDoc[] {
21                "",
22                XPDLConstants.INSTANTIATION_ONCE,
23                XPDLConstants.INSTANTIATION_MULTIPLE
24             }, 0);
25       Cost refCost=new Cost(this);
26       TimeEstimation refTimeEstimation=new TimeEstimation(this);
27
28       add(attrInstantiation);
29       add(refCost);
30       add(refTimeEstimation);
31    }
32
33    public XMLAttribute getInstantiationAttribute() {
34       return (XMLAttribute)get("Instantiation");
35    }
36    public String JavaDoc getInstantiation() {
37       return getInstantiationAttribute().toValue();
38    }
39    public void setInstantiationNONE() {
40       getInstantiationAttribute().setValue("");
41    }
42    public void setInstantiationONCE() {
43       getInstantiationAttribute().setValue(XPDLConstants.INSTANTIATION_ONCE);
44    }
45    public void setInstantiationMULTIPLE() {
46       getInstantiationAttribute().setValue(XPDLConstants.INSTANTIATION_MULTIPLE);
47    }
48    public String JavaDoc getCost() {
49       return get("Cost").toValue();
50    }
51    public void setCost(String JavaDoc cost) {
52       set("Cost",cost);
53    }
54    public TimeEstimation getTimeEstimation() {
55       return (TimeEstimation)get("TimeEstimation");
56    }
57 }
58
Popular Tags