KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.xpdl.elements;
2
3 import org.enhydra.shark.xpdl.XMLAttribute;
4 import org.enhydra.shark.xpdl.XMLCollectionElement;
5
6 /**
7  * Represents coresponding element from XPDL schema.
8  *
9  * @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(this); // min=0
23
XMLAttribute attrName = new XMLAttribute(this, "Name", false);
24
25       super.fillStructure();
26       //attrName.setRequired(true);
27
add(attrName);
28       add(refDescription);
29       add(refChoice);
30       add(refExtendedAttributes);
31    }
32
33    public String JavaDoc getName() {
34       return get("Name").toValue();
35    }
36    public void setName(String JavaDoc name) {
37       set("Name",name);
38    }
39    public String JavaDoc getDescription() {
40       return get("Description").toValue();
41    }
42    public void setDescription(String JavaDoc description) {
43       set("Description",description);
44    }
45    public ApplicationTypes getApplicationTypes() {
46       return (ApplicationTypes)get("Choice");
47    }
48    public ExtendedAttributes getExtendedAttributes() {
49       return (ExtendedAttributes)get("ExtendedAttributes");
50    }
51 }
Popular Tags