Interface IMicroQName

All Superinterfaces:
Comparable<IMicroQName>, com.helger.commons.compare.IComparable<IMicroQName>
All Known Implementing Classes:
MicroQName

@MustImplementEqualsAndHashcode @MustImplementComparable public interface IMicroQName extends com.helger.commons.compare.IComparable<IMicroQName>
Represents a simple qualified name. A combination of namespace URI and local name.
Author:
Philip Helger
  • Method Details

    • getNamespaceURI

      @Nullable String getNamespaceURI()
      Get the namespace URI
      Returns:
      May be null if no namespace URI is present.
    • hasNamespaceURI

      default boolean hasNamespaceURI()
      Check if a namespace URI is present.
      Returns:
      true if a specified namespace URI is present, false otherwise
    • hasNoNamespaceURI

      default boolean hasNoNamespaceURI()
      Check if no namespace URI is present.
      Returns:
      true if no namespace URI is present, false otherwise
    • hasNamespaceURI

      default boolean hasNamespaceURI(@Nullable String sNamespaceURI)
      Check if the specified namespace URI is present.
      Parameters:
      sNamespaceURI - The namespace URI to check. May not be null.
      Returns:
      true if the specified namespace URI matches the URI of this name, false otherwise
    • getName

      @Nonnull @Nonempty String getName()
      Returns:
      The local name without the namespace URI or the prefix. Never null.
    • compareTo

      default int compareTo(@Nonnull IMicroQName o)
      Specified by:
      compareTo in interface Comparable<IMicroQName>
    • getAsXMLQName

      @Nonnull default QName getAsXMLQName()
      Returns:
      This micro QName as a regular XML QName using an empty prefix.
    • getAsXMLQName

      @Nonnull default QName getAsXMLQName(@Nonnull String sPrefix)
      Parameters:
      sPrefix - the namespace prefix to be used in the resulting object. May not be null but maybe empty.
      Returns:
      This micro QName as a regular XML QName using the provided prefix.