Package com.consol.citrus.xml.xpath
Enum XPathExpressionResult
- java.lang.Object
-
- java.lang.Enum<XPathExpressionResult>
-
- com.consol.citrus.xml.xpath.XPathExpressionResult
-
- All Implemented Interfaces:
Serializable,Comparable<XPathExpressionResult>
public enum XPathExpressionResult extends Enum<XPathExpressionResult>
Enumeration representing the possible result types for XPath expression evaluation. In Citrus XPath expressions a prefix may determine the result type like this: string://MyExpressionString/Value number://MyExpressionString/Value boolean://MyExpressionString/Value The result type prefix is supposed to be stripped off before expression evaluation and determines the evaluation result.- Author:
- Christoph Deppisch
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringcutOffPrefix(String expression)Cut off the leading result type prefix in a XPath expression string.static XPathExpressionResultfromString(String value, XPathExpressionResult defaultResult)Get the enumeration value from an expression string.QNamegetAsQName()Get a constant QName instance from this enumerations value.static XPathExpressionResultvalueOf(String name)Returns the enum constant of this type with the specified name.static XPathExpressionResult[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NODE
public static final XPathExpressionResult NODE
-
NODESET
public static final XPathExpressionResult NODESET
-
STRING
public static final XPathExpressionResult STRING
-
BOOLEAN
public static final XPathExpressionResult BOOLEAN
-
NUMBER
public static final XPathExpressionResult NUMBER
-
INTEGER
public static final XPathExpressionResult INTEGER
-
-
Method Detail
-
values
public static XPathExpressionResult[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (XPathExpressionResult c : XPathExpressionResult.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static XPathExpressionResult valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
public static XPathExpressionResult fromString(String value, XPathExpressionResult defaultResult)
Get the enumeration value from an expression string. According to the leading prefix and a default result type the enumeration value is returned.- Parameters:
value-- Returns:
-
getAsQName
public QName getAsQName()
Get a constant QName instance from this enumerations value.- Returns:
-
-