Class XPathQName


  • public class XPathQName
    extends java.lang.Object

    This class represents the pairing of a local name and a namespace uri. Additionally it can be marked as namespace aware or not. When an XPathQName is not namespace aware then the namespace uri will be ignored during equality checks even if an namespaceUri is set.

    Since:
    Eclipselink 2.4
    • Constructor Summary

      Constructors 
      Constructor Description
      XPathQName()
      Create a new XPathQName.
      XPathQName​(java.lang.String localName, boolean namespaceAware)
      Create a new XPathQName with the specified local name.
      XPathQName​(java.lang.String namespaceUri, java.lang.String localName, boolean namespaceAware)
      Create a new XPathQName with the specified local name and namespace
      XPathQName​(javax.xml.namespace.QName qname, boolean namespaceAware)
      Create a new XPathQName with the specified QName
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • XPathQName

        public XPathQName()
        Create a new XPathQName. namespaceUri will be "" and isNamespaceAware will be true.
        Parameters:
        localName - The local name to associate with this XPathQName
      • XPathQName

        public XPathQName​(java.lang.String localName,
                          boolean namespaceAware)
        Create a new XPathQName with the specified local name. namespaceUri will be null and isNamespaceAware will be set based on the MediaType.
        Parameters:
        localName - The local name to associate with this XPathQName
        mediaType - the mediaType associate with this XPathQName
      • XPathQName

        public XPathQName​(java.lang.String namespaceUri,
                          java.lang.String localName,
                          boolean namespaceAware)
        Create a new XPathQName with the specified local name and namespace
        Parameters:
        namespaceUri - The namespace to associate with this XPathQName
        localName - The local name to associate with this XPathQName
        namespaceAware - set if namespaces should be processed or ignored
      • XPathQName

        public XPathQName​(javax.xml.namespace.QName qname,
                          boolean namespaceAware)
        Create a new XPathQName with the specified QName
        Parameters:
        QName - The QName to build this XPathQName from
        namespaceAware - set if namespaces should be processed or ignored
    • Method Detail

      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object