Package de.wwu.scdh.annotation.selection
Enum Class Mode
- All Implemented Interfaces:
Serializable,Comparable<Mode>,Constable
The
Mode is an enum type for selecting
an algorithm for the first stage of the normalization.
For corner cases, normalization is ambiguous.
Case 1: For the simple, but well-formed XML document
<r>Sol<t>ar</t>!</r> the normalization
of the XPath pointer `/r` refined by the character scheme
`char=3` is ambiguous:
<r>|S|o|l|<t>|a|r|</t>|!|</r>
/r;char= 0 1 2 3 3 4 5 5 6
/r/t[1];char= 0 1 2
Valid normalization results would be
/r[1]/text()[1} refined by char=3,
and also /r[1]/t[1]/text()[1] refined by
char=0.
Case 2: For the XML document
<r>Sol<t>ar</t><g>pan</g>el!</r>,
the selector /r;char=5 may select the position
after the character r in the node
/r/t[1]/text()[1] or the position before the
character p in the node
/r/g[1]/text()[1].-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDescend to the deepest text node.Descend to the deepest text node.Always take the first text node with the position, i.e., the first one in document order.Descend to the deepest text node.Descend to the deepest text node.Always take the second text node with the position, i.e., the second in document order. -
Method Summary
-
Enum Constant Details
-
FIRST
Always take the first text node with the position, i.e., the first one in document order. If the selector selects the first/last position in a subtree, this algorithm checks for the first text node on the preceding/following axis of the node selected by the XPath component. -
SECOND
Always take the second text node with the position, i.e., the second in document order. If the selector selects the first/last position in a subtree, this algorithm checks for the first text node on the preceding/following axis of the node selected by the XPath component. -
DEEP_NODE_STOP_AT_END
Descend to the deepest text node. In corner cases, stop at the first text node, that contains the position. This will return/r;char3for the first corner case described inMode. -
DEEP_NODE_STEP_OVER_END
Descend to the deepest text node. In corner cases, step over the end of a text node and try to get the position from the next text node. This will return/r/t[1];char=0for the first corner case described inMode. -
FIRST_OF_DEEPEST_NODES
Descend to the deepest text node. In corner cases, take the deepest text node. If there are equally deep text nodes, take the first one in document order. This will return/r/t[1];char=0for the first corner case described inMode. For case 2, it selects the text node in thetelement. -
LAST_OF_DEEPEST_NODES
Descend to the deepest text node. In corner cases, take the deepest text node. If there are equally deep text nodes, take the last one in document order. This will return/r/t[1];char=0for the first corner case described inMode. For case 2, it selects the text node in thegelement.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-