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 TypeDeclaration extends XMLCollectionElement {
12:
13: public TypeDeclaration(TypeDeclarations parent) {
14: super (parent, true);
15: }
16:
17: protected void fillStructure() {
18: XMLAttribute attrName = new XMLAttribute(this , "Name", false);
19: DataTypes refType = new DataTypes(this );
20: refType.getChoices();
21: Description refDescription = new Description(this ); // min=0
22: ExtendedAttributes refExtendedAttributes = new ExtendedAttributes(
23: this );
24:
25: super .fillStructure();
26: add(attrName);
27: add(refType);
28: add(refDescription);
29: add(refExtendedAttributes);
30: }
31:
32: public String getName() {
33: return get("Name").toValue();
34: }
35:
36: public void setName(String name) {
37: set("Name", name);
38: }
39:
40: public DataTypes getDataTypes() {
41: return (DataTypes) get("DataTypes");
42: }
43:
44: public String getDescription() {
45: return get("Description").toValue();
46: }
47:
48: public void setDescription(String description) {
49: set("Description", description);
50: }
51:
52: public ExtendedAttributes getExtendedAttributes() {
53: return (ExtendedAttributes) get("ExtendedAttributes");
54: }
55:
56: }
|