KickJava   Java API By Example, From Geeks To Geeks.

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


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

13 public class ExternalReference extends XMLComplexElement {
14
15    public ExternalReference (XMLElement parent, boolean isRequired) {
16       super(parent, isRequired);
17       //isRequired=true;
18
}
19
20    protected void fillStructure () {
21       XMLAttribute attrXref=new XMLAttribute(this,"xref", false); // optional
22
XMLAttribute attrLocation=new XMLAttribute(this,"location", true); // required
23
XMLAttribute attrNamespace=new XMLAttribute(this,"namespace", false); // optional
24

25       add(attrXref);
26       add(attrLocation);
27       add(attrNamespace);
28    }
29
30    public String JavaDoc getLocation() {
31       return get("location").toValue();
32    }
33    public void setLocation(String JavaDoc location) {
34       set("location",location);
35    }
36    public String JavaDoc getNamespace() {
37       return get("namespace").toValue();
38    }
39    public void setNamespace(String JavaDoc namespace) {
40       set("namespace",namespace);
41    }
42    public String JavaDoc getXref() {
43       return get("xref").toValue();
44    }
45    public void setXref(String JavaDoc xref) {
46       set("xref",xref);
47    }
48 }
49
Popular Tags