org.keycloak.saml.processing.core.util

## Class NamespaceContext

- java.lang.Object
- - org.keycloak.saml.processing.core.util.NamespaceContext

- All Implemented Interfaces:
    NamespaceContext

      public class NamespaceContext
      extends Object
      implements NamespaceContext

  Helper class in process of parsing signature out of SAML token. usage example: `xpath.setNamespaceContext( NamespaceContext.create() .addNsUriPair(xmlSignatureNSPrefix, JBossSAMLURIConstants.XMLDSIG_NSURI.get()) );`
  Author:
    Peter Skopek: pskopek at redhat dot com

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NamespaceContext()`
    `NamespaceContext(String prefix, String uri)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `NamespaceContext` | `addNsUriPair(String ns, String uri)`
    `static NamespaceContext` | `create()` Create new NamespaceContext for use.
    `String` | `getNamespaceURI(String prefix)`
    `String` | `getPrefix(String namespaceURI)`
    `Iterator<String>` | `getPrefixes(String namespaceURI)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NamespaceContext

          public NamespaceContext()

    - #### NamespaceContext

          public NamespaceContext(String prefix,
                                  String uri)

  - ### Method Detail

    - #### getNamespaceURI

          public String getNamespaceURI(String prefix)

      Specified by:
        `getNamespaceURI` in interface `NamespaceContext`

    - #### getPrefix

          public String getPrefix(String namespaceURI)

      Specified by:
        `getPrefix` in interface `NamespaceContext`

    - #### getPrefixes

          public Iterator<String> getPrefixes(String namespaceURI)

      Specified by:
        `getPrefixes` in interface `NamespaceContext`

    - #### addNsUriPair

          public NamespaceContext addNsUriPair(String ns,
                                               String uri)

    - #### create

          public static NamespaceContext create()

      Create new NamespaceContext for use.
      Returns:

Copyright © 2016 JBoss by Red Hat. All rights reserved.