KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Helper class to properly write namespaces in XML.
8  *
9  * @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", true); //required
20

21       add(attrName);
22       add(attrLocation);
23    }
24
25    public String JavaDoc getName() {
26       return get("Name").toValue();
27    }
28    public void setName(String JavaDoc name) {
29       set("Name",name);
30    }
31    public String JavaDoc getLocation() {
32       return get("location").toValue();
33    }
34    public void setLocation(String JavaDoc location) {
35       set("location",location);
36    }
37    
38 }
39
Popular Tags