Package org.rumbledb.items
Class MapEntryItem
java.lang.Object
org.rumbledb.items.AbstractMapItem
org.rumbledb.items.MapEntryItem
- All Implemented Interfaces:
Serializable,Item
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionXDM 3.1 Section 5.12 string-value Accessor.copy(boolean mutable) Makes a copy.Returns the collection to which the item belongs, if any.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.intReturns the mutability level of the item.Returns the path from the top level object of a DeltaFile for the item.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.intgetSize()Returns the size of the item, if it is an array, or the number of keys if it is a map.Returns the SparkSQL type of the item for use in a query.Returns the SparkSQL value of the item for use in a query.getSparkSQLValue(ItemType itemType) Returns the SparkSQL value of the item for use in a query.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.Returns the location of the DeltaFile for the item.longReturns the top level ID of the item.doubleReturns the top level order (sequence number) identifierReturns the Object containing the converted value of the item for a DataFrame.booleanChecks whether the item has a key, if it is a map.booleanChecks whether the item has a key, if it is a map.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.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.voidsetCollection(Collection collection) Sets the collection to which the item belongs.voidsetMutabilityLevel(int mutabilityLevel) Sets the mutability level of the item to a supplied value.voidSets the path from the top level object of a DeltaFile for the item to a supplied value.voidsetTableLocation(String location) Sets the location of the DeltaFile for the item to a supplied value.voidsetTopLevelID(long topLevelID) Sets the top level ID of the item to a supplied value.voidsetTopLevelOrder(double topLevelOrder) Sets the top level order parameter (rowOrder)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, attributes, baseUri, castToDecimalValue, castToDoubleValue, castToFloatValue, castToIntegerValue, castToIntValue, children, clearSchemaType, declaredNamespaceNodes, documentUri, generateNativeQuery, getBinaryValue, getBodyIterator, getBooleanValue, getContent, getDateTimeValue, getDay, getDayTimeDurationComponent, getDecimalValue, getDFVariablesInClosure, getDoubleValue, getDurationValue, getEpochMillis, getEstimator, getFloatValue, getHour, getIdentifier, getIntegerValue, getIntValue, getItemAt, getItemMembers, getLocalVariablesInClosure, getMinute, getModuleDynamicContext, getMonth, getNanosecond, getNotationValue, getOffset, getParameterNames, getPeriodValue, getQNameValue, getRDDVariablesInClosure, getSchemaTypeAnnotation, getSecond, getSequenceAt, getSequenceMembers, getSignature, getTextValue, getTimeValue, getTransformer, getXmlDocumentPosition, getYear, hasDateTime, 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, putLazyItemByKey, putSequenceAt, putSequencesAt, removeItemAt, removeSequenceAt, serialize, serializeAsJSON, setParent, setSchemaType, setSchemaType, setXmlDocumentPosition, setXmlSchemaIdentityProperties, setXmlSchemaNilled, typedValue, typeName, unparsedEntityPublicId, unparsedEntitySystemId
-
Constructor Details
-
MapEntryItem
-
-
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.
-
getSize
public int getSize()Description copied from interface:ItemReturns the size of the item, if it is an array, or the number of keys if it is a map.- Returns:
- the size as an int.
-
hasKey
Description copied from interface:ItemChecks whether the item has a key, if it is a map.- Returns:
- true if the item has the key, false otherwise.
- Throws:
UnsupportedOperationException- if the item is not an array or a map.
-
hasKey
Description copied from interface:ItemChecks whether the item has a key, if it is a map.- Returns:
- true if the item has the key, false otherwise.
- Throws:
UnsupportedOperationException- if the item is not an array or a map.
-
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.
-
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.
-
getEffectiveBooleanValue
public boolean getEffectiveBooleanValue()Description copied from interface:ItemReturns the effective boolean value of the item, if atomic.- Returns:
- the effective boolean value.
-
getMutabilityLevel
public int getMutabilityLevel()Description copied from interface:ItemReturns the mutability level of the item.- Returns:
- an int representing nestedness of the item inside transform expressions.
-
setMutabilityLevel
public void setMutabilityLevel(int mutabilityLevel) Description copied from interface:ItemSets the mutability level of the item to a supplied value.- Parameters:
mutabilityLevel- new mutability level.
-
getTopLevelID
public long getTopLevelID()Description copied from interface:ItemReturns the top level ID of the item.- Returns:
- int representing the rowID of the item within a DeltaFile.
-
setTopLevelID
public void setTopLevelID(long topLevelID) Description copied from interface:ItemSets the top level ID of the item to a supplied value.- Parameters:
topLevelID- new top level ID.
-
getTopLevelOrder
public double getTopLevelOrder()Description copied from interface:ItemReturns the top level order (sequence number) identifier- Returns:
- double representing rowOrder of the tuple
-
setTopLevelOrder
public void setTopLevelOrder(double topLevelOrder) Description copied from interface:ItemSets the top level order parameter (rowOrder)- Parameters:
topLevelOrder- new rowOrder value
-
getPathIn
Description copied from interface:ItemReturns the path from the top level object of a DeltaFile for the item.- Returns:
- String representing the path of the item from the top level within a DeltaFile.
-
setPathIn
Description copied from interface:ItemSets the path from the top level object of a DeltaFile for the item to a supplied value.- Parameters:
pathIn- new path from top level.
-
getTableLocation
Description copied from interface:ItemReturns the location of the DeltaFile for the item.- Returns:
- String representing the location of the DeltaFile for the item.
-
setTableLocation
Description copied from interface:ItemSets the location of the DeltaFile for the item to a supplied value.- Parameters:
location- new location of the DeltaFile for the item.
-
getSparkSQLValue
Description copied from interface:ItemReturns the SparkSQL value of the item for use in a query.- Returns:
- String representing the SparkSQL value of the item.
-
getSparkSQLValue
Description copied from interface:ItemReturns the SparkSQL value of the item for use in a query.- Returns:
- String representing the SparkSQL value of the item.
-
getSparkSQLType
Description copied from interface:ItemReturns the SparkSQL type of the item for use in a query.- Returns:
- String representing the SparkSQL type of the item.
-
atomizedValue
Description copied from interface:ItemXDM 3.1 Section 5.12 string-value Accessor. dm:string-value($n as node()) as xs:string "The dm:string-value accessor returns the string-value of the node as defined for each node kind." In this API, node string values are exposed via getStringValue() and the default implementation of dm:typed-value delegates to atomizedValue(). -
getStringValue
Description copied from interface:ItemReturns the string value of the item, if it is an atomic item.- Returns:
- the string value.
-
getVariantValue
Description copied from interface:ItemReturns the Object containing the converted value of the item for a DataFrame. For use to build Variant columns.- Returns:
- Object representing the converted value of the item.
-
getCollection
Description copied from interface:ItemReturns the collection to which the item belongs, if any. Only defined for top-level items.- Returns:
- the collection.
-
setCollection
Description copied from interface:ItemSets the collection to which the item belongs. Only defined for top-level items.- Parameters:
collection- the collection.
-