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: * Helper class to properly write namespaces in XML.
08: *
09: * @author Sasa Bojanic
10: */
11: public class Namespace extends XMLComplexElement {
12:
13: public Namespace(Namespaces parent) {
14: super (parent, true);
15: }
16:
17: protected void fillStructure() {
18: XMLAttribute attrName = new XMLAttribute(this , "Name", true); // required
19: XMLAttribute attrLocation = new XMLAttribute(this , "location",
20: true); //required
21:
22: add(attrName);
23: add(attrLocation);
24: }
25:
26: public String getName() {
27: return get("Name").toValue();
28: }
29:
30: public void setName(String name) {
31: set("Name", name);
32: }
33:
34: public String getLocation() {
35: return get("location").toValue();
36: }
37:
38: public void setLocation(String location) {
39: set("location", location);
40: }
41:
42: }
|