Package org.rumbledb.items.xml
Class ElementItem
java.lang.Object
org.rumbledb.items.xml.ElementItem
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable,Serializable,Item
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for an element item. -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod sets the parent item for all descendents of the current item.children()booleanTests for logical equality.Returns the dynamic type of the item (only for error message purposes).booleanReturns the effective boolean value of the item, if atomic.Returns the string value of the item, if it is an atomic item.Get the position of the Node inside the XML document (and path incase of multiple docs) for sorting / uniquenessinthashCode()Computes a hash code.booleanTests whether the item is an XML Element node.booleanisNode()Tests whether the item is an XML node.nodeName()parent()voidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) voidintsetXmlDocumentPosition(String path, int current) Set the position of the Node inside the XML document (and path incase of multiple docs) for sorting / uniquenessvoidwrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.rumbledb.api.Item
append, castToDecimalValue, castToDoubleValue, castToFloatValue, castToIntegerValue, castToIntValue, generateNativeQuery, getBinaryValue, getBodyIterator, getBooleanValue, getContent, getDateTimeValue, getDay, getDecimalValue, getDFVariablesInClosure, getDoubleValue, getDurationValue, getEpochMillis, getEstimator, getFloatValue, getHour, getIdentifier, getIntegerValue, getIntValue, getItemAt, getItemByKey, getItems, getKeys, getLocalVariablesInClosure, getMinute, getModuleDynamicContext, getMonth, getMutabilityLevel, getNanosecond, getOffset, getParameterNames, getPathIn, getPeriodValue, getRDDVariablesInClosure, getSecond, getSignature, getSize, getSparkSQLType, getSparkSQLValue, getSparkSQLValue, getTableLocation, getTextValue, getTimeValue, getTopLevelID, getTopLevelOrder, getTransformer, getValues, getVariantValue, getYear, hasDateTime, hasTimeZone, isAnyURI, isArray, isAtomic, isAttributeNode, isBase64Binary, isBinary, isBoolean, isDate, isDateTime, isDayTimeDuration, isDecimal, isDocumentNode, isDouble, isDuration, isEstimator, isFloat, isFunction, isGDay, isGMonth, isGMonthDay, isGYear, isGYearMonth, isHexBinary, isInt, isInteger, isNaN, isNull, isNumeric, isObject, isPeriod, isString, isTextNode, isTime, isTransformer, isYearMonthDuration, physicalEquals, putItem, putItemAt, putItemByKey, putItemsAt, putLazyItemByKey, removeItemAt, removeItemByKey, serialize, serializeAsJSON, setMutabilityLevel, setPathIn, setTableLocation, setTopLevelID, setTopLevelOrder
-
Constructor Details
-
ElementItem
public ElementItem() -
ElementItem
Constructor for an element item.- Parameters:
nodeName- The name of the elementchildren- The children items of the elementattributes- The attributes items of the element
-
ElementItem
-
-
Method Details
-
setXmlDocumentPosition
Description copied from interface:ItemSet the position of the Node inside the XML document (and path incase of multiple docs) for sorting / uniqueness- Specified by:
setXmlDocumentPositionin interfaceItem- Parameters:
path- the path of the XML documentcurrent- the current position- Returns:
- the new position
-
getXmlDocumentPosition
Description copied from interface:ItemGet the position of the Node inside the XML document (and path incase of multiple docs) for sorting / uniqueness- Specified by:
getXmlDocumentPositionin interfaceItem- Returns:
- the XML document position
-
addParentToDescendants
public void addParentToDescendants()Description copied from interface:ItemMethod sets the parent item for all descendents of the current item.- Specified by:
addParentToDescendantsin interfaceItem
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
writein interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
readin interfacecom.esotericsoftware.kryo.KryoSerializable
-
isNode
public boolean isNode()Description copied from interface:ItemTests whether the item is an XML node. -
isElementNode
public boolean isElementNode()Description copied from interface:ItemTests whether the item is an XML Element node.- Specified by:
isElementNodein interfaceItem- Returns:
- true if it is an XML Element node, false otherwise.
-
equals
Description copied from interface:ItemTests for logical equality. The semantics are that of the eq operator. -
attributes
- Specified by:
attributesin interfaceItem
-
children
-
nodeName
-
parent
-
getStringValue
Description copied from interface:ItemReturns the string value of the item, if it is an atomic item.- Specified by:
getStringValuein interfaceItem- Returns:
- the string value.
-
getDynamicType
Description copied from interface:ItemReturns the dynamic type of the item (only for error message purposes).- Specified by:
getDynamicTypein interfaceItem- Returns:
- the dynamic type as an item type.
-
setParent
-
hashCode
public int hashCode()Description copied from interface:ItemComputes a hash code. -
atomizedValue
- Specified by:
atomizedValuein interfaceItem
-
getEffectiveBooleanValue
public boolean getEffectiveBooleanValue()Description copied from interface:ItemReturns the effective boolean value of the item, if atomic.- Specified by:
getEffectiveBooleanValuein interfaceItem- Returns:
- the effective boolean value.
-