- All Implemented Interfaces:
Serializable,Comparable<PathFormatSelection>
Enumeration of path format selection options for validation output.
This enum allows users to control how node paths are formatted in validation messages and other output. The selection can be explicit (forcing a specific format) or automatic (selecting based on document format).
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAuto-select the path format based on document format.Always use RFC 6901 JSON Pointer format regardless of document type.Always use Metapath format regardless of document type.Always use XPath 3.1 EQName format regardless of document type. -
Method Summary
Modifier and TypeMethodDescriptionstatic PathFormatSelectionReturns the enum constant of this type with the specified name.static PathFormatSelection[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AUTO
Auto-select the path format based on document format.When this option is selected:
- JSON documents use JSON Pointer format (RFC 6901)
- YAML documents use JSON Pointer format (RFC 6901)
- XML documents use XPath 3.1 EQName format
This is the default selection when no explicit format is specified.
-
METAPATH
Always use Metapath format regardless of document type.Produces paths like:
/root/assembly[1]/field[1]/@flag -
XPATH
Always use XPath 3.1 EQName format regardless of document type.Produces namespace-qualified paths like:
/Q{http://example.com}root/Q{http://example.com}assembly[1] -
JSON_POINTER
Always use RFC 6901 JSON Pointer format regardless of document type.Produces paths like:
/root/assemblies/0/id
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-