01: package org.enhydra.shark.xpdl.elements;
02:
03: import org.enhydra.shark.xpdl.XMLAttribute;
04: import org.enhydra.shark.xpdl.XMLComplexElement;
05: import org.enhydra.shark.xpdl.XMLElement;
06:
07: /**
08: * Represents coresponding element from XPDL schema.
09: *
10: * @author Sasa Bojanic
11: */
12: public class ExternalReference extends XMLComplexElement {
13:
14: public ExternalReference(XMLElement parent, boolean isRequired) {
15: super (parent, isRequired);
16: //isRequired=true;
17: }
18:
19: protected void fillStructure() {
20: XMLAttribute attrXref = new XMLAttribute(this , "xref", false); // optional
21: XMLAttribute attrLocation = new XMLAttribute(this , "location",
22: true); // required
23: XMLAttribute attrNamespace = new XMLAttribute(this ,
24: "namespace", false); // optional
25:
26: add(attrXref);
27: add(attrLocation);
28: add(attrNamespace);
29: }
30:
31: public String getLocation() {
32: return get("location").toValue();
33: }
34:
35: public void setLocation(String location) {
36: set("location", location);
37: }
38:
39: public String getNamespace() {
40: return get("namespace").toValue();
41: }
42:
43: public void setNamespace(String namespace) {
44: set("namespace", namespace);
45: }
46:
47: public String getXref() {
48: return get("xref").toValue();
49: }
50:
51: public void setXref(String xref) {
52: set("xref", xref);
53: }
54: }
|