Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ode.utils
Class NSContext

    java.lang.Object
      org.apache.ode.utils.NSContext

All Implemented Interfaces:
  java.io.Externalizable, java.io.Serializable, javax.xml.namespace.NamespaceContext

    public class NSContext

extends java.lang.Object
implements javax.xml.namespace.NamespaceContext, java.io.Externalizable

A simple in-memory implementation of the `NamespaceContext` interface with fairly generic applicability. This class allows clients to manipulate the context through publicly accessible methods, and provides serialization support.

See Also:
  `NamespaceContext`, Serialized Form

Constructor Summary
`NSContext()`
`NSContext(NSContext map)`

Method Summary
`javax.xml.namespace.QName` | `derefQName(java.lang.String qname)`
`java.lang.String` | `getNamespaceURI(java.lang.String prefix)`
`java.lang.String` | `getPrefix(java.lang.String uri)`
`java.util.Set<java.lang.String>` | `getPrefixes()` Get all the prefixes with a URI mapping in this context
`java.util.Iterator` | `getPrefixes(java.lang.String uri)`
`java.util.Set<java.lang.String>` | `getUriSet()` Get all the URIs with a prefix mapping in this context
`void` | `readExternal(java.io.ObjectInput in)`
`void` | `register(java.util.Map<java.lang.String,java.lang.String> prefixMapping)` Register a set of URI mappings at once.
`void` | `register(java.lang.String prefix, java.lang.String uri)` Add a prefix to URI mapping to this context.
`java.util.Map<java.lang.String,java.lang.String>` | `toMap()`
`void` | `writeExternal(java.io.ObjectOutput out)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NSContext

    public NSContext()

### NSContext

    public NSContext(NSContext map)

Method Detail

### getNamespaceURI

    public java.lang.String getNamespaceURI(java.lang.String prefix)

  Specified by:
    `getNamespaceURI` in interface `javax.xml.namespace.NamespaceContext`
  See Also:
    `NamespaceContext.getNamespaceURI(java.lang.String)`

### getPrefix

    public java.lang.String getPrefix(java.lang.String uri)

  Specified by:
    `getPrefix` in interface `javax.xml.namespace.NamespaceContext`
  See Also:
    `NamespaceContext.getPrefix(java.lang.String)`

### getPrefixes

    public java.util.Iterator getPrefixes(java.lang.String uri)

  Specified by:
    `getPrefixes` in interface `javax.xml.namespace.NamespaceContext`
  See Also:
    `NamespaceContext.getPrefixes(java.lang.String)`

### getPrefixes

    public java.util.Set<java.lang.String> getPrefixes()

  Get all the prefixes with a URI mapping in this context

### getUriSet

    public java.util.Set<java.lang.String> getUriSet()

  Get all the URIs with a prefix mapping in this context

### readExternal

    public void readExternal(java.io.ObjectInput in)
                      throws java.io.IOException,
                             java.lang.ClassNotFoundException

  Specified by:
    `readExternal` in interface `java.io.Externalizable`
  Throws:
    `java.io.IOException`
    `java.lang.ClassNotFoundException`
  See Also:
    `Externalizable.readExternal(java.io.ObjectInput)`

### register

    public void register(java.lang.String prefix,
                         java.lang.String uri)

  Add a prefix to URI mapping to this context.

  Parameters:
    `prefix` - prefix
    `uri` - URI

### register

    public void register(java.util.Map<java.lang.String,java.lang.String> prefixMapping)

  Register a set of URI mappings at once.

  Parameters:
    `prefixMapping` - set (map rather) of prefix-to-URI mappings.

### writeExternal

    public void writeExternal(java.io.ObjectOutput out)
                       throws java.io.IOException

  Specified by:
    `writeExternal` in interface `java.io.Externalizable`
  Throws:
    `java.io.IOException`
  See Also:
    `Externalizable.writeExternal(java.io.ObjectOutput)`

### derefQName

    public javax.xml.namespace.QName derefQName(java.lang.String qname)

### toMap

    public java.util.Map<java.lang.String,java.lang.String> toMap()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD