01: package org.enhydra.shark.xpdl.elements;
02:
03: import org.enhydra.shark.xpdl.XMLAttribute;
04: import org.enhydra.shark.xpdl.XMLComplexElement;
05:
06: /**
07: * Represents coresponding element from XPDL schema.
08: *
09: * @author Sasa Bojanic
10: */
11: public class Script extends XMLComplexElement {
12:
13: public Script(Package 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",
20: false);
21: XMLAttribute attrGrammar = new XMLAttribute(this , "Grammar",
22: false);
23:
24: add(attrType);
25: add(attrVersion);
26: add(attrGrammar);
27: }
28:
29: public String getGrammar() {
30: return get("Grammar").toValue();
31: }
32:
33: public void setGrammar(String grammar) {
34: set("Grammar", grammar);
35: }
36:
37: public String getType() {
38: return get("Type").toValue();
39: }
40:
41: public void setType(String type) {
42: set("Type", type);
43: }
44:
45: public String getVersion() {
46: return get("Version").toValue();
47: }
48:
49: public void setVersion(String version) {
50: set("Version", version);
51: }
52: }
|