1
2
3
4
5
6
7
8
9 package org.xmlhammer.model.tools.xpath;
10
11 import javax.xml.bind.annotation.XmlAccessType;
12 import javax.xml.bind.annotation.XmlAccessorType;
13 import javax.xml.bind.annotation.XmlAttribute;
14 import javax.xml.bind.annotation.XmlRootElement;
15 import javax.xml.bind.annotation.XmlType;
16 import org.xmlhammer.model.tools.Tool;
17
18
19 /***
20 * <p>Java class for xpath element declaration.
21 *
22 * <p>The following schema fragment specifies the expected content contained within this class.
23 *
24 * <pre>
25 * <element name="xpath">
26 * <complexType>
27 * <complexContent>
28 * <extension base="{http://www.xmlhammer.org/2007/tools}tool">
29 * <attribute name="context" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
30 * <attribute name="expression" use="required" type="{http://www.w3.org/2001/XMLSchema}anySimpleType" />
31 * <attribute name="returnType" default="NODESET">
32 * <simpleType>
33 * <restriction base="{http://www.w3.org/2001/XMLSchema}string">
34 * <enumeration value="NUMBER"/>
35 * <enumeration value="STRING"/>
36 * <enumeration value="BOOLEAN"/>
37 * <enumeration value="NODESET"/>
38 * <enumeration value="NODE"/>
39 * </restriction>
40 * </simpleType>
41 * </attribute>
42 * </extension>
43 * </complexContent>
44 * </complexType>
45 * </element>
46 * </pre>
47 *
48 *
49 */
50 @XmlAccessorType(XmlAccessType.FIELD)
51 @XmlType(name = "")
52 @XmlRootElement(name = "xpath")
53 public class XPath
54 extends Tool
55 {
56
57 @XmlAttribute
58 protected String context;
59 @XmlAttribute(required = true)
60 protected String expression;
61 @XmlAttribute
62 protected String returnType;
63
64 /***
65 * Gets the value of the context property.
66 *
67 * @return
68 * possible object is
69 * {@link String }
70 *
71 */
72 public String getContext() {
73 return context;
74 }
75
76 /***
77 * Sets the value of the context property.
78 *
79 * @param value
80 * allowed object is
81 * {@link String }
82 *
83 */
84 public void setContext(String value) {
85 this.context = value;
86 }
87
88 /***
89 * Gets the value of the expression property.
90 *
91 * @return
92 * possible object is
93 * {@link String }
94 *
95 */
96 public String getExpression() {
97 return expression;
98 }
99
100 /***
101 * Sets the value of the expression property.
102 *
103 * @param value
104 * allowed object is
105 * {@link String }
106 *
107 */
108 public void setExpression(String value) {
109 this.expression = value;
110 }
111
112 /***
113 * Gets the value of the returnType property.
114 *
115 * @return
116 * possible object is
117 * {@link String }
118 *
119 */
120 public String getReturnType() {
121 if (returnType == null) {
122 return "NODESET";
123 } else {
124 return returnType;
125 }
126 }
127
128 /***
129 * Sets the value of the returnType property.
130 *
131 * @param value
132 * allowed object is
133 * {@link String }
134 *
135 */
136 public void setReturnType(String value) {
137 this.returnType = value;
138 }
139
140 }