Package org.rumbledb.items
Class SequenceArrayItem
java.lang.Object
org.rumbledb.items.AbstractArrayItem
org.rumbledb.items.SequenceArrayItem
- All Implemented Interfaces:
Serializable,Item
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendItem(Item item) Appends an item to the item, if it is an array.voidappendSequence(List<Item> sequence) Appends a sequence to the item, if it is an array.XDM 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.getItemAt(int position) Returns the member of the item at the specified position if it is an array.Returns the members of the item, if it is an array.intReturns the mutability level of the item.Returns the path from the top level object of a DeltaFile for the item.getSequenceAt(int position) Returns the member of the item at the specified position if it is an array.Returns the member sequences of the item, if it is an array.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 location of the DeltaFile for the item.longReturns the top level ID of the item.Returns the Object containing the converted value of the item for a DataFrame.booleanisArray()Tests whether the item is an array.booleanTests whether the item is an array of items.voidPuts an item at the given index, if it is an array.voidputItemsAt(List<Item> items, int i) Add all items in items at index i, if it is an array.voidputSequenceAt(List<Item> sequence, int index) Puts a sequence at the given index, if it is an array.voidputSequencesAt(List<List<Item>> sequences, int index) Puts sequences at the given index, if it is an array.voidremoveItemAt(int index) Removes the item at the given index, if it is an array.voidremoveSequenceAt(int index) Removes the sequence at the given index, if it is an array.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.Methods inherited from class org.rumbledb.items.AbstractArrayItem
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, 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, getItemByKey, getItemByKey, getItemKeys, getItemValues, getLocalVariablesInClosure, getMinute, getModuleDynamicContext, getMonth, getNanosecond, getNotationValue, getOffset, getParameterNames, getPeriodValue, getQNameValue, getRDDVariablesInClosure, getSchemaTypeAnnotation, getSecond, getSequenceByKey, getSequenceByKey, getSequenceValues, getSignature, getStringKeys, getStringValue, getTextValue, getTimeValue, getTopLevelOrder, getTransformer, getXmlDocumentPosition, getYear, hasDateTime, hasKey, hasKey, hasTimeZone, isAnyURI, 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, isMap, isNamespaceNode, isNaN, isNode, isNotation, isNull, isNumeric, isObject, isPeriod, isProcessingInstructionNode, isQName, isString, isTextNode, isTime, isTransformer, isUntypedAtomic, isYearMonthDuration, namespaceNodes, nilled, nodeKind, nodeName, parent, physicalEquals, putItemByKey, putItemByKey, putLazyItemByKey, putSequenceByKey, putSequenceByKey, removeItemByKey, removeItemByKey, serialize, serializeAsJSON, setParent, setSchemaType, setSchemaType, setTopLevelOrder, setXmlDocumentPosition, setXmlSchemaIdentityProperties, setXmlSchemaNilled, typedValue, typeName, unparsedEntityPublicId, unparsedEntitySystemId
-
Constructor Details
-
SequenceArrayItem
-
-
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
-
isArray
public boolean isArray()Description copied from interface:ItemTests whether the item is an array.- Returns:
- true if it is an array, false otherwise.
-
isArrayOfItems
public boolean isArrayOfItems()Description copied from interface:ItemTests whether the item is an array of items. Arrays of items are arrays whose members are singletons.- Returns:
- true if it is an array of items, false otherwise.
-
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.
-
getItemMembers
Description copied from interface:ItemReturns the members of the item, if it is an array.- Returns:
- the list of the members.
- Throws:
OurBadException- if any member of the array is a non-singleton.
-
getSequenceMembers
Description copied from interface:ItemReturns the member sequences of the item, if it is an array.- Returns:
- the list of the members.
-
getItemAt
Description copied from interface:ItemReturns the member of the item at the specified position if it is an array.- Parameters:
position- the position of the member.- Returns:
- the member.
- Throws:
OurBadException- if the member is a non-singleton.
-
getSequenceAt
Description copied from interface:ItemReturns the member of the item at the specified position if it is an array.- Parameters:
position- the position of the member.- Returns:
- the member.
-
appendItem
Description copied from interface:ItemAppends an item to the item, if it is an array.- Parameters:
item- the item to append.
-
appendSequence
Description copied from interface:ItemAppends a sequence to the item, if it is an array.- Parameters:
sequence- the sequence to append.
-
putItemAt
Description copied from interface:ItemPuts an item at the given index, if it is an array.- Parameters:
item- the item to put.index- the index to put the item at.
-
putSequenceAt
Description copied from interface:ItemPuts a sequence at the given index, if it is an array.- Parameters:
sequence- the sequence to put.index- the index to put the sequence at.
-
putItemsAt
Description copied from interface:ItemAdd all items in items at index i, if it is an array.- Parameters:
items- a list of items.i- an integer.
-
putSequencesAt
Description copied from interface:ItemPuts sequences at the given index, if it is an array.- Parameters:
sequences- the sequences to put.index- the index to put the sequence at.
-
removeItemAt
public void removeItemAt(int index) Description copied from interface:ItemRemoves the item at the given index, if it is an array.- Parameters:
index- the index to remove the item at.
-
removeSequenceAt
public void removeSequenceAt(int index) Description copied from interface:ItemRemoves the sequence at the given index, if it is an array.- Parameters:
index- the index to remove the sequence at.
-
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.
-
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(). -
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.
-
setCollection
Description copied from interface:ItemSets the collection to which the item belongs. Only defined for top-level items.- Parameters:
collection- the collection.
-
getCollection
Description copied from interface:ItemReturns the collection to which the item belongs, if any. Only defined for top-level items.- Returns:
- the collection.
-