01: package org.enhydra.shark.xpdl.elements;
02:
03: import java.util.ArrayList;
04:
05: import org.enhydra.shark.xpdl.XMLComplexChoice;
06: import org.enhydra.shark.xpdl.XMLElement;
07:
08: /**
09: * Represents choice of application types from XPDL schema.
10: *
11: * @author Sasa Bojanic
12: */
13: public class ApplicationTypes extends XMLComplexChoice {
14:
15: public ApplicationTypes(Application parent) {
16: super (parent, "Choice", true);
17: }
18:
19: protected void fillChoices() {
20: choices = new ArrayList();
21: choices.add(new FormalParameters(this ));
22: choices.add(new ExternalReference(this , false));
23: choosen = (XMLElement) choices.get(0);
24: }
25:
26: public FormalParameters getFormalParameters() {
27: return (FormalParameters) choices.get(0);
28: }
29:
30: public void setFormalParameters() {
31: setChoosen((FormalParameters) choices.get(0));
32: }
33:
34: public ExternalReference getExternalReference() {
35: return (ExternalReference) choices.get(1);
36: }
37:
38: public void setExternalReference() {
39: setChoosen((ExternalReference) choices.get(1));
40: }
41:
42: }
|