01: package org.enhydra.shark.xpdl.elements;
02:
03: import org.enhydra.shark.xpdl.XMLAttribute;
04: import org.enhydra.shark.xpdl.XMLCollectionElement;
05:
06: /**
07: * Represents coresponding element from XPDL schema.
08: *
09: * @author Sasa Bojanic
10: */
11: public class Application extends XMLCollectionElement {
12:
13: public Application(Applications aps) {
14: super (aps, true);
15: }
16:
17: protected void fillStructure() {
18: Description refDescription = new Description(this ); // min=0
19: // can be FormalParameters or ExternalReference
20: // if fp->must be defined,if er->min=0
21: ApplicationTypes refChoice = new ApplicationTypes(this );
22: ExtendedAttributes refExtendedAttributes = new ExtendedAttributes(
23: this ); // min=0
24: XMLAttribute attrName = new XMLAttribute(this , "Name", false);
25:
26: super .fillStructure();
27: //attrName.setRequired(true);
28: add(attrName);
29: add(refDescription);
30: add(refChoice);
31: add(refExtendedAttributes);
32: }
33:
34: public String getName() {
35: return get("Name").toValue();
36: }
37:
38: public void setName(String name) {
39: set("Name", name);
40: }
41:
42: public String getDescription() {
43: return get("Description").toValue();
44: }
45:
46: public void setDescription(String description) {
47: set("Description", description);
48: }
49:
50: public ApplicationTypes getApplicationTypes() {
51: return (ApplicationTypes) get("Choice");
52: }
53:
54: public ExtendedAttributes getExtendedAttributes() {
55: return (ExtendedAttributes) get("ExtendedAttributes");
56: }
57: }
|