Class Namespace

java.lang.Object
com.persequor.event.Namespace

public class Namespace extends Object
Namespace is a typed value to represent an xml namespace. Namespace to alias bindings is setup in
See Also:
  • Method Details

    • getFull

      public String getFull()
    • getAlias

      public String getAlias()
    • alias

      public static Namespace alias(String namespaceAlias)
      Build a namespace based only on alias. For example to match the xml tag <my:mytag /> you could use Namespace.alias("my") to represent the namespace If a matching namespace config is found in XmlNamespaceConfiguration, the configuration version is returned including the full namespace and unqualified flag set
      Parameters:
      namespaceAlias - the alias as a string
      Returns:
      the requested namespace.
      See Also:
    • full

      public static Namespace full(String namespace)
      Build a namespace based only on full namespace. For example to match the xml tag <my:mytag xmlns:my="urn:my:namespace" /> you could use Namespace.full("urn:my:namespace") to represent the namespace If a matching namespace config is found in XmlNamespaceConfiguration, the configuration version is returned including the full namespace and unqualified flag set
      Parameters:
      namespace - the full namespace as a string
      Returns:
      the requested namespace
    • full

      public static Namespace full(String namespace, String alias)
      Build a namespace based only on full namespace and the alias. For example to match the xml tag <my:mytag xmlns:my="urn:my:namespace" /> you could use Namespace.full("urn:my:namespace") to represent the namespace If a matching namespace config is found in XmlNamespaceConfiguration, the configuration version is returned including the full namespace and unqualified flag set
      Parameters:
      namespace - the full namespace as a string
      alias - the alias/prefix
      Returns:
      the requested namespace
    • full

      public static Namespace full(String namespace, String alias, boolean unqualified)
      Build a namespace based only on full namespace, the alias and the unqualified. For example to match the xml tag <my:mytag xmlns:my="urn:my:namespace" /> you could use Namespace.full("urn:my:namespace") to represent the namespace If a matching namespace config is found in XmlNamespaceConfiguration, the configuration version is returned including the full namespace and unqualified flag set
      Parameters:
      namespace - the full namespace as a string
      alias - the alias/prefix
      unqualified - flag to show if this namespace is qualified or not
      Returns:
      the requested namespace
    • isUnqualified

      public boolean isUnqualified()
      Flag saying if Namespace forces its nested tags to be namespace prefixed (qualified)
      Returns:
      true if prefixing is not forced, false otherwise
    • isVoid

      public boolean isVoid()
      Is this the special "no value"-namespace. Name and prefix (alias) is not specified.
      Returns:
      true if empty
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object