KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.enhydra.shark.xpdl.elements;
2
3 import org.enhydra.shark.xpdl.XMLAttribute;
4 import org.enhydra.shark.xpdl.XMLComplexElement;
5
6 /**
7  * Represents coresponding element from XPDL schema.
8  *
9  * @author Sasa Bojanic
10  */

11 public class Script extends XMLComplexElement {
12
13    public Script (Package JavaDoc parent) {
14       super(parent, false);
15    }
16
17    protected void fillStructure () {
18       XMLAttribute attrType=new XMLAttribute(this,"Type", true); // required
19
XMLAttribute attrVersion=new XMLAttribute(this,"Version", false);
20       XMLAttribute attrGrammar=new XMLAttribute(this,"Grammar", false);
21
22       add(attrType);
23       add(attrVersion);
24       add(attrGrammar);
25    }
26
27    public String JavaDoc getGrammar() {
28       return get("Grammar").toValue();
29    }
30    public void setGrammar(String JavaDoc grammar) {
31       set("Grammar",grammar);
32    }
33    public String JavaDoc getType() {
34       return get("Type").toValue();
35    }
36    public void setType(String JavaDoc type) {
37       set("Type",type);
38    }
39    public String JavaDoc getVersion() {
40       return get("Version").toValue();
41    }
42    public void setVersion(String JavaDoc version) {
43       set("Version",version);
44    }
45 }
46
Popular Tags