Class XPathFragment<XML_FIELD extends Field>


  • public class XPathFragment<XML_FIELD extends Field>
    extends Object
    INTERNAL:

    Purpose: Represents a token from an XPath statement.

    For example the following XPath statment a/b[2]/text() corresponds to three XPathFragments: "a", "b[2]", and "text()".

    Responsibilities:

    • Maintain name, namespace, and prefix information.
    • Maintain information about the corresponding node type.
    • Maintain index information if any. The XPathFragment corresponding to b[2] would have an index value of 2.
    • Field Detail

      • CHARSET

        public static final Charset CHARSET
      • hasAttribute

        protected boolean hasAttribute
      • nameIsText

        protected boolean nameIsText
      • isSelfFragment

        protected boolean isSelfFragment
    • Constructor Detail

      • XPathFragment

        public XPathFragment()
      • XPathFragment

        public XPathFragment​(String xpathString)
      • XPathFragment

        public XPathFragment​(String xpathString,
                             char namespaceSeparator,
                             boolean namespaceAware)
    • Method Detail

      • setPredicate

        public void setPredicate​(XPathPredicate condition)
      • isNamespaceAware

        public boolean isNamespaceAware()
      • setNamespaceAware

        public void setNamespaceAware​(boolean isNamespaceAware)
      • getNamespaceSeparator

        public char getNamespaceSeparator()
      • setNamespaceSeparator

        public void setNamespaceSeparator​(char namespaceSeparator)
      • setNextFragment

        public void setNextFragment​(XPathFragment nextFragment)
      • setXPath

        public void setXPath​(String xpathString)
      • isAttribute

        public boolean isAttribute()
      • setAttribute

        public void setAttribute​(boolean isAttribute)
      • getShortName

        public String getShortName()
      • getPrefix

        public String getPrefix()
      • getPrefixBytes

        public byte[] getPrefixBytes()
      • setPrefix

        public void setPrefix​(String prefix)
      • getLocalName

        public String getLocalName()
      • getLocalNameBytes

        public byte[] getLocalNameBytes()
      • setLocalName

        public void setLocalName​(String localName)
      • getNamespaceURI

        public String getNamespaceURI()
      • setNamespaceURI

        public void setNamespaceURI​(String namespaceURI)
      • getIndexValue

        public int getIndexValue()
      • setIndexValue

        public void setIndexValue​(int indexValue)
      • getXPath

        public String getXPath()
      • hasNamespace

        public boolean hasNamespace()
      • isSelfFragment

        public boolean isSelfFragment()
        INTERNAL: Indicates if the xpath is "."
        Returns:
        true if the xpath is ".", false otherwise
      • nameIsText

        public boolean nameIsText()
      • setHasText

        public void setHasText​(boolean hasText)
      • getHasText

        public boolean getHasText()
      • setContainsIndex

        public void setContainsIndex​(boolean containsIndex)
      • containsIndex

        public boolean containsIndex()
      • setShouldExecuteSelectNodes

        public void setShouldExecuteSelectNodes​(boolean newShouldExecuteSelectNodes)
      • shouldExecuteSelectNodes

        public boolean shouldExecuteSelectNodes()
      • equals

        public boolean equals​(Object object,
                              boolean ignorePredicate)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getLeafElementType

        public QName getLeafElementType()
      • hasLeafElementType

        public boolean hasLeafElementType()
      • setLeafElementType

        public void setLeafElementType​(QName type)
      • setGeneratedPrefix

        public void setGeneratedPrefix​(boolean isGenerated)
      • isGeneratedPrefix

        public boolean isGeneratedPrefix()
      • getXMLField

        public XML_FIELD getXMLField()
      • setXMLField

        public void setXMLField​(XML_FIELD field)
      • getChildrenCollisionSet

        public Set<String> getChildrenCollisionSet​(boolean isAttribute)
        INTERNAL: Gets auxiliary set for determining collisions during case insensitive unmarshalling.
        Parameters:
        isAttribute - Determine if retrieving an element or an attribute collision set.
        Returns:
        Set containing localNames of attributes or elements of an XPathFragment.