Class SimpleNamespaceContext


  • public abstract class SimpleNamespaceContext
    extends java.lang.Object
    Implementation of NamespaceContext that is based on a number of key value pairs.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static javax.xml.namespace.NamespaceContext create​(KeyValuePairSet set)
      Create a NamespaceContext based on the supplied key value pairs.
      static javax.xml.namespace.NamespaceContext create​(KeyValuePairSet set, AdaptrisMessage msg)
      Create a NamespaceContext based on the supplied key value pairs or object metadata.
      • Methods inherited from class java.lang.Object

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

      • SimpleNamespaceContext

        public SimpleNamespaceContext()
    • Method Detail

      • create

        public static javax.xml.namespace.NamespaceContext create​(KeyValuePairSet set)
        Create a NamespaceContext based on the supplied key value pairs.

        For our purposes; each element of the KeyValuePairSet.

        • The key is the namespace prefix
        • The value is the namespace uri

        Parameters:
        set - the key values that will form the namespace context.
        Returns:
        a NamespaceContext implementation or null if the set was empty / null.
      • create

        public static javax.xml.namespace.NamespaceContext create​(KeyValuePairSet set,
                                                                  AdaptrisMessage msg)
        Create a NamespaceContext based on the supplied key value pairs or object metadata.

        In this instance, the NamespaceContext that may be present in the AdaptrisMessage will only be used if no context was created from the supplied KeyValuePairSet.

        Parameters:
        set - the values that will form the namespace context
        msg - the AdaptrisMessage which might contain the object metadata.
        Returns:
        a NamespaceContext implementation or null if none was available.
        See Also:
        create(KeyValuePairSet)