Class QualifiedName

  • All Implemented Interfaces:

    
    public final class QualifiedName
    
                        

    Namespace-aware XML node qualified names.

    Used for comparison and display purposes. Uses the XML namespace and local name if present in the Node. Falls back to using the default node name if a namespace isn't present.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getNamespaceUri()
      final String getLocalName()
      final String getNodeName()
      Boolean equals(Object other) When both do not have a namespace, check equality using node name.
      Integer hashCode() When a namespace isn't present, return the hash of the node name.
      String toString() Returns the qualified name using Clark-notation if a namespace is present, otherwise returns the node name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QualifiedName

        QualifiedName(Node node)
    • Method Detail

      • equals

         Boolean equals(Object other)

        When both do not have a namespace, check equality using node name. Otherwise, check equality using both namespace and local name.

      • hashCode

         Integer hashCode()

        When a namespace isn't present, return the hash of the node name. Otherwise, return the hash of the namespace and local name.

      • toString

         String toString()

        Returns the qualified name using Clark-notation if a namespace is present, otherwise returns the node name.

        Clark-notation uses the format {namespace}localname per https://sabre.io/xml/clark-notation/.