Package org.rumbledb.items
Class LazyObjectItem
java.lang.Object
org.rumbledb.items.AbstractMapItem
org.rumbledb.items.LazyObjectItem
- All Implemented Interfaces:
Serializable,Item
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy(boolean mutable) Makes a copy.Returns the dynamic type of the item (only for error message purposes).booleanReturns the effective boolean value of the item, if atomic.getItemByKey(String key) Returns the value item associated with a specific key, if it is a map.getItemByKey(Item key) Returns the value item associated with a specific key, if it is an object.Returns the (possibly non-string) atomic keys of the item, if it is a map-like object.Returns the values of the item, if it is a map.getSequenceByKey(String key) Returns the value sequence associated with a string key, if it is a map.getSequenceByKey(Item key) Returns the value sequence associated with a key, if it is a map-like object.Returns the value sequences of the item, if it is a map.Returns the string keys of the item, if it is a map.Returns the string value of the item, if it is an atomic item.booleanisMap()Tests whether the item is a map.booleanisObject()Tests whether the item is an object.voidputItemByKey(String key, Item value) Adds a key-value pair, if it is a map.voidputItemByKey(Item key, Item value) Adds a key-value pair, if it is a map.voidputLazyItemByKey(String key, ItemRuntimePlan iterator, DynamicContext context, boolean isArray) Adds a key-value pair, if it is a lazy object item.voidputSequenceByKey(String key, List<Item> valueSequence) Adds a key-sequence pair, if it is a map.voidputSequenceByKey(Item key, List<Item> valueSequence) Adds a key-sequence pair, if it is a map.voidremoveItemByKey(String key) Removes a key-value pair, if it is a map.voidremoveItemByKey(Item key) Removes a key-value pair, if it is a map.Methods inherited from class org.rumbledb.items.AbstractMapItem
equals, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.rumbledb.api.Item
addOrReplaceNamespace, addParentToDescendants, appendItem, appendSequence, atomizedValue, attributes, baseUri, castToDecimalValue, castToDoubleValue, castToFloatValue, castToIntegerValue, castToIntValue, children, clearSchemaType, declaredNamespaceNodes, documentUri, generateNativeQuery, getBinaryValue, getBodyIterator, getBooleanValue, getCollection, getContent, getDateTimeValue, getDay, getDayTimeDurationComponent, getDecimalValue, getDFVariablesInClosure, getDoubleValue, getDurationValue, getEpochMillis, getEstimator, getFloatValue, getHour, getIdentifier, getIntegerValue, getIntValue, getItemAt, getItemMembers, getLocalVariablesInClosure, getMinute, getModuleDynamicContext, getMonth, getMutabilityLevel, getNanosecond, getNotationValue, getOffset, getParameterNames, getPathIn, getPeriodValue, getQNameValue, getRDDVariablesInClosure, getSchemaTypeAnnotation, getSecond, getSequenceAt, getSequenceMembers, getSignature, getSize, getSparkSQLType, getSparkSQLValue, getSparkSQLValue, getTableLocation, getTextValue, getTimeValue, getTopLevelID, getTopLevelOrder, getTransformer, getVariantValue, getXmlDocumentPosition, getYear, hasDateTime, hasKey, hasKey, hasTimeZone, isAnyURI, isArray, isArrayOfItems, isAtomic, isAttributeNode, isBase64Binary, isBinary, isBoolean, isBuiltinFunction, isCommentNode, isDate, isDateTime, isDayTimeDuration, isDecimal, isDocumentNode, isDouble, isDuration, isElementNode, isEstimator, isFloat, isFunction, isGDay, isGMonth, isGMonthDay, isGYear, isGYearMonth, isHexBinary, isId, isIdrefs, isInt, isInteger, isNamespaceNode, isNaN, isNode, isNotation, isNull, isNumeric, isPeriod, isProcessingInstructionNode, isQName, isString, isTextNode, isTime, isTransformer, isUntypedAtomic, isYearMonthDuration, namespaceNodes, nilled, nodeKind, nodeName, parent, physicalEquals, putItemAt, putItemsAt, putSequenceAt, putSequencesAt, removeItemAt, removeSequenceAt, serialize, serializeAsJSON, setCollection, setMutabilityLevel, setParent, setPathIn, setSchemaType, setSchemaType, setTableLocation, setTopLevelID, setTopLevelOrder, setXmlDocumentPosition, setXmlSchemaIdentityProperties, setXmlSchemaNilled, typedValue, typeName, unparsedEntityPublicId, unparsedEntitySystemId
-
Constructor Details
-
LazyObjectItem
public LazyObjectItem()
-
-
Method Details
-
copy
Description copied from interface:ItemMakes a copy.- Parameters:
mutable- whether the copy should be mutable (if supported by the item).- Returns:
- a copy
-
isMap
public boolean isMap()Description copied from interface:ItemTests whether the item is a map.- Returns:
- true if it is a map, false otherwise.
-
isObject
public boolean isObject()Description copied from interface:ItemTests whether the item is an object. Object items are legacy JSONiq objects, that allow only for- string keys
- singleton values
- Returns:
- true if it is an object, false otherwise.
-
getStringKeys
Description copied from interface:ItemReturns the string keys of the item, if it is a map.- Returns:
- a list of strings, corresponding to the keys of the map.
-
getItemKeys
Description copied from interface:ItemReturns the (possibly non-string) atomic keys of the item, if it is a map-like object.- Returns:
- the list of atomic keys as items.
-
getItemValues
Description copied from interface:ItemReturns the values of the item, if it is a map.- Returns:
- a list containing, for each key in the map, the item associated with that key.
-
getSequenceValues
Description copied from interface:ItemReturns the value sequences of the item, if it is a map.- Returns:
- a list containing, for each key in the map, the sequence of items associated with that key.
-
getItemByKey
Description copied from interface:ItemReturns the value item associated with a specific key, if it is a map.- Parameters:
key- a string key.- Returns:
- the item associated with the key, or null if absent.
-
getItemByKey
Description copied from interface:ItemReturns the value item associated with a specific key, if it is an object.- Parameters:
key- a key item.- Returns:
- the item associated with the key, or null if absent.
-
getSequenceByKey
Description copied from interface:ItemReturns the value sequence associated with a string key, if it is a map.- Parameters:
key- a string key.- Returns:
- the value sequence for the key, or null if absent.
-
getSequenceByKey
Description copied from interface:ItemReturns the value sequence associated with a key, if it is a map-like object.- Parameters:
key- an atomic key item.- Returns:
- the value sequence for the key, or null if absent.
-
putItemByKey
Description copied from interface:ItemAdds a key-value pair, if it is a map.- Parameters:
key- a key.value- a value.
-
putItemByKey
Description copied from interface:ItemAdds a key-value pair, if it is a map.- Parameters:
key- an atomic key.value- a value.
-
putSequenceByKey
Description copied from interface:ItemAdds a key-sequence pair, if it is a map.- Parameters:
key- an atomic key.valueSequence- a value sequence.
-
putSequenceByKey
Description copied from interface:ItemAdds a key-sequence pair, if it is a map.- Parameters:
key- an atomic key.valueSequence- a value sequence.
-
removeItemByKey
Description copied from interface:ItemRemoves a key-value pair, if it is a map.- Parameters:
key- a key.
-
removeItemByKey
Description copied from interface:ItemRemoves a key-value pair, if it is a map.- Parameters:
key- an atomic key.
-
putLazyItemByKey
public void putLazyItemByKey(String key, ItemRuntimePlan iterator, DynamicContext context, boolean isArray) Description copied from interface:ItemAdds a key-value pair, if it is a lazy object item. The value is lazily computed.- Parameters:
key- a key.iterator- a runtime iterator.context- a dynamic context.isArray- whether to always wrap the result in an array.
-
getDynamicType
Description copied from interface:ItemReturns the dynamic type of the item (only for error message purposes).- Returns:
- the dynamic type as an item type.
-
getStringValue
Description copied from interface:ItemReturns the string value of the item, if it is an atomic item.- Returns:
- the string value.
-
getEffectiveBooleanValue
public boolean getEffectiveBooleanValue()Description copied from interface:ItemReturns the effective boolean value of the item, if atomic.- Returns:
- the effective boolean value.
-