com.ctc.wstx.util
Class BaseNsContext

java.lang.Object
  extended by com.ctc.wstx.util.BaseNsContext
All Implemented Interfaces:
NamespaceContext
Direct Known Subclasses:
CompactNsContext, EmptyNamespaceContext, MergedNsContext

public abstract class BaseNsContext
extends Object
implements NamespaceContext

Abstract base class that defines extra features defined by most NamespaceContext implementations Wodstox uses.


Field Summary
protected static String UNDECLARED_NS_URI
          This is the URI returned for default namespace, when it hasn't been explicitly declared; could be either "" or null.
 
Constructor Summary
BaseNsContext()
           
 
Method Summary
abstract  String doGetNamespaceURI(String prefix)
           
abstract  String doGetPrefix(String nsURI)
           
abstract  Iterator doGetPrefixes(String nsURI)
           
abstract  Iterator getNamespaces()
           
 String getNamespaceURI(String prefix)
           
 String getPrefix(String nsURI)
           
 Iterator getPrefixes(String nsURI)
           
abstract  void outputNamespaceDeclarations(Writer w)
          Method called by the matching start element class to output all namespace declarations active in current namespace scope, if any.
abstract  void outputNamespaceDeclarations(XMLStreamWriter w)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNDECLARED_NS_URI

protected static final String UNDECLARED_NS_URI
This is the URI returned for default namespace, when it hasn't been explicitly declared; could be either "" or null.

See Also:
Constant Field Values
Constructor Detail

BaseNsContext

public BaseNsContext()
Method Detail

getNamespaceURI

public final String getNamespaceURI(String prefix)
Specified by:
getNamespaceURI in interface NamespaceContext

getPrefix

public final String getPrefix(String nsURI)
Specified by:
getPrefix in interface NamespaceContext

getPrefixes

public final Iterator getPrefixes(String nsURI)
Specified by:
getPrefixes in interface NamespaceContext

getNamespaces

public abstract Iterator getNamespaces()

outputNamespaceDeclarations

public abstract void outputNamespaceDeclarations(Writer w)
                                          throws IOException
Method called by the matching start element class to output all namespace declarations active in current namespace scope, if any.

Throws:
IOException

outputNamespaceDeclarations

public abstract void outputNamespaceDeclarations(XMLStreamWriter w)
                                          throws XMLStreamException
Throws:
XMLStreamException

doGetNamespaceURI

public abstract String doGetNamespaceURI(String prefix)

doGetPrefix

public abstract String doGetPrefix(String nsURI)

doGetPrefixes

public abstract Iterator doGetPrefixes(String nsURI)


Copyright © 2011 Codehaus. All Rights Reserved.