Package org.rumbledb.items.xml
Class DocumentItem
java.lang.Object
org.rumbledb.items.xml.DocumentItem
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
,Serializable
,Item
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentItem
(List<Item> children) Constructor for creating a document node with children items.DocumentItem
(Node documentNode, List<Item> children) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Method sets the parent item for all descendents of the current item.children()
boolean
Tests for logical equality.Returns the dynamic type of the item (only for error message purposes).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 / uniquenessint
hashCode()
Computes a hash code.boolean
Tests whether the item is an XML Document node.boolean
isNode()
Tests whether the item is an XML node.parent()
void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) int
setXmlDocumentPosition
(String path, int current) Set the position of the Node inside the XML document (and path incase of multiple docs) for sorting / uniquenessvoid
write
(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, wait
Methods inherited from interface org.rumbledb.api.Item
append, attributes, castToDecimalValue, castToDoubleValue, castToFloatValue, castToIntegerValue, castToIntValue, generateNativeQuery, getBinaryValue, getBodyIterator, getBooleanValue, getContent, getDateTimeValue, getDay, getDecimalValue, getDFVariablesInClosure, getDoubleValue, getDurationValue, getEffectiveBooleanValue, 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, isDouble, isDuration, isElementNode, isEstimator, isFloat, isFunction, isGDay, isGMonth, isGMonthDay, isGYear, isGYearMonth, isHexBinary, isInt, isInteger, isNaN, isNull, isNumeric, isObject, isPeriod, isString, isTextNode, isTime, isTransformer, isYearMonthDuration, nodeName, physicalEquals, putItem, putItemAt, putItemByKey, putItemsAt, putLazyItemByKey, removeItemAt, removeItemByKey, serialize, serializeAsJSON, setMutabilityLevel, setParent, setPathIn, setTableLocation, setTopLevelID, setTopLevelOrder
-
Constructor Details
-
DocumentItem
public DocumentItem() -
DocumentItem
-
DocumentItem
Constructor for creating a document node with children items. Used by document node constructors when no actual DOM node is available.- Parameters:
children
- the child nodes of the document
-
-
Method Details
-
setXmlDocumentPosition
Description copied from interface:Item
Set the position of the Node inside the XML document (and path incase of multiple docs) for sorting / uniqueness- Specified by:
setXmlDocumentPosition
in interfaceItem
- Parameters:
path
- the path of the XML documentcurrent
- the current position- Returns:
- the new position
-
getXmlDocumentPosition
Description copied from interface:Item
Get the position of the Node inside the XML document (and path incase of multiple docs) for sorting / uniqueness- Specified by:
getXmlDocumentPosition
in interfaceItem
- Returns:
- the XML document position
-
addParentToDescendants
public void addParentToDescendants()Description copied from interface:Item
Method sets the parent item for all descendents of the current item.- Specified by:
addParentToDescendants
in interfaceItem
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
children
-
parent
-
getStringValue
Description copied from interface:Item
Returns the string value of the item, if it is an atomic item.- Specified by:
getStringValue
in interfaceItem
- Returns:
- the string value.
-
getDynamicType
Description copied from interface:Item
Returns the dynamic type of the item (only for error message purposes).- Specified by:
getDynamicType
in interfaceItem
- Returns:
- the dynamic type as an item type.
-
equals
Description copied from interface:Item
Tests for logical equality. The semantics are that of the eq operator. -
isNode
public boolean isNode()Description copied from interface:Item
Tests whether the item is an XML node. -
isDocumentNode
public boolean isDocumentNode()Description copied from interface:Item
Tests whether the item is an XML Document node.- Specified by:
isDocumentNode
in interfaceItem
- Returns:
- true if it is an XML Document node, false otherwise.
-
hashCode
public int hashCode()Description copied from interface:Item
Computes a hash code. -
atomizedValue
- Specified by:
atomizedValue
in interfaceItem
-