Package org.rumbledb.items.xml
Class NamespaceItem
java.lang.Object
org.rumbledb.items.xml.AbstractNodeItem
org.rumbledb.items.xml.NamespaceItem
- All Implemented Interfaces:
Serializable,Item
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod sets the parent item for all descendents of the current item.XDM 3.1 Section 5.12 string-value Accessor.XDM 3.1 Section 6.4 Namespace Node Accessors — attributes.baseUri()XDM 3.1 Section 6.4 Namespace Node Accessors — base-uri.children()XDM 3.1 Section 6.4 Namespace Node Accessors — children.copy(boolean mutable) Makes a copy.Helper accessor for XML element nodes: returns namespace nodes for the namespace bindings declared directly on the element.XDM 3.1 Section 6.4 Namespace Node Accessors — document-uri.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 / uniquenessbooleanisId()XDM 3.1 Section 6.4 Namespace Node Accessors — is-id.booleanisIdrefs()XDM 3.1 Section 6.4 Namespace Node Accessors — is-idrefs.booleanTests whether the item is an XML Namespace node.booleanisNode()Tests whether the item is an XML node.XDM 3.1 Section 5.7 namespace-nodes Accessor.nilled()XDM 3.1 Section 6.4 Namespace Node Accessors — nilled.nodeKind()XDM 3.1 Section 6.4 Namespace Node Accessors — node-kind.nodeName()XDM 3.1 Section 5.10 node-name Accessor.parent()XDM 3.1 Section 5.11 parent Accessor.voidintsetXmlDocumentPosition(String path, int current) Each Namespace Node represents the binding of a namespace URI to a namespace prefix or to the default namespace.typeName()XDM 3.1 Section 6.4 Namespace Node Accessors — type-name.Methods inherited from class org.rumbledb.items.xml.AbstractNodeItem
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, appendItem, appendSequence, castToDecimalValue, castToDoubleValue, castToFloatValue, castToIntegerValue, castToIntValue, clearSchemaType, generateNativeQuery, getBinaryValue, getBodyIterator, getBooleanValue, getCollection, getContent, getDateTimeValue, getDay, getDayTimeDurationComponent, getDecimalValue, getDFVariablesInClosure, getDoubleValue, getDurationValue, getEffectiveBooleanValue, getEpochMillis, getEstimator, getFloatValue, getHour, getIdentifier, getIntegerValue, getIntValue, getItemAt, getItemByKey, getItemByKey, getItemKeys, getItemMembers, getItemValues, getLocalVariablesInClosure, getMinute, getModuleDynamicContext, getMonth, getMutabilityLevel, getNanosecond, getNotationValue, getOffset, getParameterNames, getPathIn, getPeriodValue, getQNameValue, getRDDVariablesInClosure, getSchemaTypeAnnotation, getSecond, getSequenceAt, getSequenceByKey, getSequenceByKey, getSequenceMembers, getSequenceValues, getSignature, getSize, getSparkSQLType, getSparkSQLValue, getSparkSQLValue, getStringKeys, getTableLocation, getTextValue, getTimeValue, getTopLevelID, getTopLevelOrder, getTransformer, getVariantValue, 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, isInt, isInteger, isMap, isNaN, isNotation, isNull, isNumeric, isObject, isPeriod, isProcessingInstructionNode, isQName, isString, isTextNode, isTime, isTransformer, isUntypedAtomic, isYearMonthDuration, physicalEquals, putItemAt, putItemByKey, putItemByKey, putItemsAt, putLazyItemByKey, putSequenceAt, putSequenceByKey, putSequenceByKey, putSequencesAt, removeItemAt, removeItemByKey, removeItemByKey, removeSequenceAt, serialize, serializeAsJSON, setCollection, setMutabilityLevel, setPathIn, setSchemaType, setSchemaType, setTableLocation, setTopLevelID, setTopLevelOrder, setXmlSchemaIdentityProperties, setXmlSchemaNilled, typedValue, unparsedEntityPublicId, unparsedEntitySystemId
-
Constructor Details
-
NamespaceItem
Constructor for a namespace item.- Parameters:
prefix- The namespace prefix (possibly empty)uri- The namespace URI
-
-
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
-
setXmlDocumentPosition
Each Namespace Node represents the binding of a namespace URI to a namespace prefix or to the default namespace. Namespaces have the following properties: prefix , possibly empty uri parent , possibly empty A Namespace Node must not have the name xmlns nor the string-value http://www.w3.org/2000/xmlns/ .- 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- 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. -
isNode
public boolean isNode()Description copied from interface:ItemTests whether the item is an XML node.- Returns:
- true if it is an XML node, false otherwise.
-
isNamespaceNode
public boolean isNamespaceNode()Description copied from interface:ItemTests whether the item is an XML Namespace node.- Returns:
- true if it is an XML Namespace node, false otherwise.
-
nodeName
Description copied from interface:ItemXDM 3.1 Section 5.10 node-name Accessor. dm:node-name($n as node()) as xs:QName? "The dm:node-name accessor returns the name of the node as an xs:QName, or the empty sequence if the node does not have a name."- Returns:
- the expanded name (
Name) of the node, ornullwhen the accessor yields the empty sequence
-
parent
Description copied from interface:ItemXDM 3.1 Section 5.11 parent Accessor. dm:parent($n as node()) as node()? "The dm:parent accessor returns the parent of the node, or the empty sequence if the node has no parent." -
getStringValue
Description copied from interface:ItemReturns the string value of the item, if it is an atomic item.- Returns:
- the string value.
-
setParent
-
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.
-
nodeKind
XDM 3.1 Section 6.4 Namespace Node Accessors — node-kind. "For a Namespace Node, dm:node-kind returns the string \"namespace\"." -
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(). -
namespaceNodes
Description copied from interface:ItemXDM 3.1 Section 5.7 namespace-nodes Accessor. dm:namespace-nodes($n as node()) as namespace-node()* "The dm:namespace-nodes accessor returns the dynamic, unordered set of Namespace Nodes. It is defined on all seven node kinds." This default implementation is only a placeholder on the generic Item interface and must be overridden by XML node implementations that support namespaces. -
declaredNamespaceNodes
Description copied from interface:ItemHelper accessor for XML element nodes: returns namespace nodes for the namespace bindings declared directly on the element. This does not include inherited or statically known namespaces — only the bindings explicitly declared on the element (for example via xmlns attributes). Non-element nodes must override this to return the empty sequence. -
attributes
XDM 3.1 Section 6.4 Namespace Node Accessors — attributes. For a Namespace Node, dm:attributes returns the empty sequence. -
children
XDM 3.1 Section 6.4 Namespace Node Accessors — children. For a Namespace Node, dm:children returns the empty sequence. -
baseUri
XDM 3.1 Section 6.4 Namespace Node Accessors — base-uri. For a Namespace Node, dm:base-uri always returns the empty sequence. -
documentUri
XDM 3.1 Section 6.4 Namespace Node Accessors — document-uri. For a Namespace Node, dm:document-uri returns the document-uri of the document node that is the root of the tree containing the namespace node, if it has one; otherwise it returns the empty sequence. -
isId
public boolean isId()XDM 3.1 Section 6.4 Namespace Node Accessors — is-id. For a Namespace Node, dm:is-id returns false. -
isIdrefs
public boolean isIdrefs()XDM 3.1 Section 6.4 Namespace Node Accessors — is-idrefs. For a Namespace Node, dm:is-idrefs returns false. -
nilled
XDM 3.1 Section 6.4 Namespace Node Accessors — nilled. For a Namespace Node, dm:nilled returns the empty sequence. -
typeName
XDM 3.1 Section 6.4 Namespace Node Accessors — type-name. For a Namespace Node, dm:type-name returns the empty sequence.
-