Package com.api.jsonata4java.expressions
Class ExpressionsVisitor.SelectorArrayNode
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializable.Base
com.fasterxml.jackson.databind.JsonNode
com.fasterxml.jackson.databind.node.BaseJsonNode
com.fasterxml.jackson.databind.node.ContainerNode<com.fasterxml.jackson.databind.node.ArrayNode>
com.fasterxml.jackson.databind.node.ArrayNode
com.api.jsonata4java.expressions.ExpressionsVisitor.SelectorArrayNode
- All Implemented Interfaces:
com.fasterxml.jackson.core.TreeNode,com.fasterxml.jackson.databind.JsonSerializable,com.fasterxml.jackson.databind.node.JsonNodeCreator,Serializable,Iterable<com.fasterxml.jackson.databind.JsonNode>
- Enclosing class:
- ExpressionsVisitor
public static class ExpressionsVisitor.SelectorArrayNode
extends com.fasterxml.jackson.databind.node.ArrayNode
This is how we indicate to upstream operators that we are currently inside a
selection statement. E.g. [{"a":1}, {"a":2}}].a will return this special
subclass of array node. This is so that upstream operators (e.g. array
indexes) can have special handling applied to them.
For instance: [{"a":1}, {"a":2}}].a[0] does not return [1], but rather [1,2]
Parenthesis can be used to drop this context, e.g.: ([{"a":1},
{"a":2}}]).a[0] returns [1]
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonNode
com.fasterxml.jackson.databind.JsonNode.OverwriteModeNested classes/interfaces inherited from interface com.fasterxml.jackson.databind.JsonSerializable
com.fasterxml.jackson.databind.JsonSerializable.Base -
Field Summary
Fields inherited from class com.fasterxml.jackson.databind.node.ContainerNode
_nodeFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAsSelectionGroup(com.fasterxml.jackson.databind.JsonNode group) Adds the specified elements to two lists: 1.List<com.fasterxml.jackson.databind.JsonNode>Methods inherited from class com.fasterxml.jackson.databind.node.ArrayNode
_add, _at, _childrenEqual, _insert, _set, _withArray, _withArrayAddTailElement, _withObject, _withObjectAddTailElement, _withXxxSetArrayElement, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addAll, addAll, addArray, addNull, addObject, addPOJO, addRawValue, asToken, deepCopy, elements, equals, equals, findParent, findParents, findValue, findValues, findValuesAsText, get, get, getNodeType, hashCode, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insertArray, insertNull, insertObject, insertPOJO, insertRawValue, isArray, isEmpty, isEmpty, path, path, remove, removeAll, required, serialize, serializeWithType, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setNull, setPOJO, setRawValue, size, with, withArrayMethods inherited from class com.fasterxml.jackson.databind.node.ContainerNode
arrayNode, arrayNode, asText, binaryNode, binaryNode, booleanNode, missingNode, nullNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, objectNode, pojoNode, rawValueNode, textNodeMethods inherited from class com.fasterxml.jackson.databind.node.BaseJsonNode
_bigIntFromBigDec, _jsonPointerIfValid, _reportWrongNodeOperation, _reportWrongNodeType, _withXxxMayReplace, _withXxxVerifyReplace, findPath, numberType, required, toPrettyString, toString, traverse, traverse, withArray, withObjectMethods inherited from class com.fasterxml.jackson.databind.JsonNode
_reportRequiredViolation, _this, asBoolean, asBoolean, asDouble, asDouble, asInt, asInt, asLong, asLong, asText, at, at, bigIntegerValue, binaryValue, booleanValue, canConvertToExactIntegral, canConvertToInt, canConvertToLong, decimalValue, doubleValue, fieldNames, fields, findParents, findValues, findValuesAsText, floatValue, has, has, hasNonNull, hasNonNull, intValue, isBigDecimal, isBigInteger, isBinary, isBoolean, isContainerNode, isDouble, isFloat, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isObject, isPojo, isShort, isTextual, isValueNode, iterator, longValue, numberValue, properties, require, requiredAt, requiredAt, requireNonNull, shortValue, textValue, withArray, withArray, withObject, withObject, withObjectMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SelectorArrayNode
public SelectorArrayNode(com.fasterxml.jackson.databind.node.JsonNodeFactory nc)
-
-
Method Details
-
addAsSelectionGroup
public void addAsSelectionGroup(com.fasterxml.jackson.databind.JsonNode group) Adds the specified elements to two lists: 1. Adds flattened results to array - operators that don't care about selection groups will just see this as a normal array 2. Adds non-flattened results to the separately-maintained selectionGroups list. This will be used selector-aware operators (e.g. array index) to apply appropriate semantics- Parameters:
group- JsonNode containing the group definitions
-
getSelectionGroups
-