Class XPathNode


  • public class XPathNode
    extends java.lang.Object
    INTERNAL:

    Purpose: XPathNodes are used together to build a tree. The tree is built from all of the XPath statements specified in the mapping metadata (mappings and policies). This tree is then navigated by an EventObjectBuilder to perform marshal and unmarshal operations.

    The XPaths "a/b" and "a/c" would result in a tree with the root "a" and two child nodes "b" and "c".

    Responsibilities:

    • All tree relationships must be bi-directional.
    • Reference a NodeValue, XPathNodes without a Node value represent grouping elements.
    • Reference an XPathFragment, XPathFragments contain name and namespace information.
    • Must differentiate between child nodes that correspond to elements and those that do not.
    • Must represent special mapping situations like any and self mappings.
    • Constructor Detail

      • XPathNode

        public XPathNode()
    • Method Detail

      • setXPathFragment

        public void setXPathFragment​(XPathFragment xPathFragment)
      • getNodeValue

        public NodeValue getNodeValue()
      • setNodeValue

        public void setNodeValue​(NodeValue nodeValue)
      • getUnmarshalNodeValue

        public NodeValue getUnmarshalNodeValue()
      • setUnmarshalNodeValue

        public void setUnmarshalNodeValue​(NodeValue nodeValue)
      • getMarshalNodeValue

        public NodeValue getMarshalNodeValue()
      • setMarshalNodeValue

        public void setMarshalNodeValue​(NodeValue nodeValue)
      • setNullCapableValue

        public void setNullCapableValue​(NullCapableValue nullCapableValue)
      • setParent

        public void setParent​(XPathNode parent)
      • getAttributeChildren

        public java.util.List<XPathNode> getAttributeChildren()
      • getNonAttributeChildren

        public java.util.List<XPathNode> getNonAttributeChildren()
      • getSelfChildren

        public java.util.List<XPathNode> getSelfChildren()
      • isChildrenLookupTableFilled

        public boolean isChildrenLookupTableFilled​(boolean isAttribute)
      • setChildrenLookupTableFilled

        public void setChildrenLookupTableFilled​(boolean isAttribute)
      • getChildrenLookupTable

        public java.util.Map<java.lang.String,​XPathNode> getChildrenLookupTable​(boolean isAttribute)
      • setAnyAttributeNodeValue

        public void setAnyAttributeNodeValue​(MappingNodeValue nodeValue)
      • getAnyAttributeNode

        public XPathNode getAnyAttributeNode()
      • setAnyNode

        public void setAnyNode​(XPathNode xPathNode)
      • getNextNode

        public XPathNode getNextNode()
      • getTextNode

        public XPathNode getTextNode()
      • setTextNode

        public void setTextNode​(XPathNode xPathNode)
      • hasTypeChild

        public boolean hasTypeChild()
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • hasPredicateSiblings

        public boolean hasPredicateSiblings()
      • marshalSelfAttributes

        public boolean marshalSelfAttributes​(MarshalRecord marshalRecord,
                                             java.lang.Object object,
                                             CoreAbstractSession session,
                                             NamespaceResolver namespaceResolver,
                                             Marshaller marshaller)
        Marshal any 'self' mapped attributes.
        Parameters:
        marshalRecord -
        object -
        session -
        namespaceResolver -
        marshaller -
        Returns:
      • isWhitespaceAware

        public boolean isWhitespaceAware()