KickJava   Java API By Example, From Geeks To Geeks.

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


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 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       Description refDescription=new Description(this); // min=0
21
ExtendedAttributes refExtendedAttributes=new ExtendedAttributes(this);
22
23       super.fillStructure();
24       add(attrName);
25       add(refType);
26       add(refDescription);
27       add(refExtendedAttributes);
28    }
29
30    public String JavaDoc getName() {
31       return get("Name").toValue();
32    }
33    public void setName(String JavaDoc name) {
34       set("Name",name);
35    }
36    public DataTypes getDataTypes() {
37       return (DataTypes)get("Type");
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 ExtendedAttributes getExtendedAttributes() {
46       return (ExtendedAttributes)get("ExtendedAttributes");
47    }
48    
49 }
50
Popular Tags