1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 package org.treetank.service.xml.xpath;
29
30 import org.treetank.exception.TTXPathException;
31
32 public enum EXPathError {
33
34
35 XPST0001("err:XPST0001: Some component of the static context has not " + "been assigned a value."),
36
37
38 XPDY0002("err:XPDY0002: Some part of the dynamic context has not " + "been assigned a value."),
39
40
41 XPST0003("err:XPST0003: Expression is not a valid instance of the grammar" + "defined in A.1 EBNF."),
42
43
44 XPTY0004("err:XPTY0004 The type is not appropriate the expression or the "
45 + "typedoes not match a required type as specified by the matching rules."),
46
47
48 XPST0005("err:XPST0005: The static type assigned to an expression other than the "
49 + "expression() or data(()) is empty-sequence()."),
50
51
52 XPST0008("err:XPST0008 Expression refers to a name that is not defined in the " + "static context"),
53
54
55 XPST0010("err:XPST0010: " + "Axis is not supported."),
56
57
58 XPST0017("err:XPST0017 The expanded QName and number of arguments in a "
59 + "function call do not match the name and arity of a function " + "signature."),
60
61
62 XPTY0018("err:XPTY0018 Result of the last step "
63 + "in a path expression contains both nodes and atomic values."),
64
65
66 XPTY0019("err:XPTY0019 Result of a step (other "
67 + "than the last step) in a path expression contains an atomic value."),
68
69
70 XPTY0020("err:XPTY0020 Context item in an axis step is not a node."),
71
72
73 XPDY0050("err:XPDY0050 " + "Dynamic type of the operand of a treat expression does not match"
74 + " the sequence type specified by the treat expression."),
75
76
77 XPST0051("err:XPST0051 " + "Type is not defined in the in-scope schema types as an " + "atomic type."),
78
79
80 XPST0080("err:XPST0080 " + "Target type of a cast or castable expression must not be "
81 + "xs:NOTATION or xs:anyAtomicType."),
82
83
84 XPST0081("err:XPST0081 " + "Namespace prefix cannot be expanded into a namespace URI by "
85 + "using the statically known namespaces."),
86
87 FOCA0001("err:FOCA0001, Input value too large for decimal."), FOCA0002(
88 "err:FOCA0002, Invalid lexical value."),
89 FOCA0003("err:FOCA0003, Input value too large for integer."), FOCA0005(
90 "err:FOCA0005, NaN supplied as float/double value."), FOCA0006(
91 "err:FOCA0006, String to be cast to decimal has too many digits of precision."), FOCH0001(
92 "err:FOCH0001, Code point not valid."), FOCH0002("err:FOCH0002, Unsupported collation."),
93 FOCH0003("err:FOCH0003, Unsupported normalization form."), FORH0004(
94 "err:FOCH0004, Collation does not support collation units."), FODC0001(
95 "err:FODC0001, No context document."), FODC0002("err:FODC0002, Error retrieving resource."),
96 FODC0003("err:FODC0003, Function stability not defined."), FODC0004(
97 "err:FODC0004, Invalid argument to fn:collection."), FODC0005(
98 "err:FODC0005, Invalid argument to fn:doc or fn:doc-available."), FODT0001(
99 "err:FODT0001, Overflow/underflow in date/time operation."), FODT0002(
100 "err:FODT0002, Overflow/underflow in duration operation."), FODT0003(
101 "err:FODT0003, Invalid timezone value."),
102 FONS0004("err:FONS0004, No namespace found for prefix."), FONS0005(
103 "err:FONS0005, Base-uri not defined in the static context."),
104
105
106
107
108 FOAR0001("err:FOAR0001: Division by zero."),
109
110
111
112
113 FOAR0002("err:FOAR0002: Numeric operation overflow/underflow."), FOER0000(
114 "err:FOER0000: Unidentified error."), FORG0001(
115 "err:FORG0001, Invalid value for cast/constructor."), FORG0002(
116 "err:FORG0002, Invalid argument to fn:resolve-uri()."), FORG0003(
117 "err:FORG0003, fn:zero-or-one called with a sequence containing more than one item."), FORG0004(
118 "err:FORG0004, fn:one-or-more called with a sequence containing no items."), FORG0005(
119 "err:FORG0005, fn:exactly-one called with a sequence containing zero or more than one item."),
120
121 FORG0006("err:FORG0006 Invalid argument type."), FORG0007(""), FORG0008(
122 "err:FORG0008, Both arguments to fn:dateTime have a specified timezone."), FORG0009(
123 "err:FORG0009, Error in resolving a relative URI against a base URI in fn:resolve-uri."),
124 FORX0001("err:FORX0001, Invalid regular expression. flags"), FORX0002(
125 "err:FORX0002, Invalid regular expression."), FORX0003(
126 "err:FORX0003, Regular expression matches zero-length string."), FORX0004(
127 "err:FORX0004, Invalid replacement string."), FOTY0012(
128 "err:FOTY0012, Argument node does not have a typed value."), ;
129
130
131 private final String mMessage;
132
133
134
135
136 private final TTXPathException mException;
137
138
139
140
141
142
143
144 private EXPathError(final String msg) {
145 mMessage = msg;
146 mException = new TTXPathException(mMessage);
147 }
148
149
150
151
152
153
154 public String getMsg() {
155 return mMessage;
156 }
157
158
159
160
161
162
163 public TTXPathException getEncapsulatedException() {
164 return mException;
165 }
166
167 }