com.bluecast.xml
Class FastNamespaceSupport

java.lang.Object
  |
  +--com.bluecast.xml.FastNamespaceSupport

public class FastNamespaceSupport
extends java.lang.Object

This class improves performance over NamespaceSupport by assuming that most XML documents have very few namespaces. Therefore, instead of performing expensive copying operations of hash tables, arrays and linear searches are used instead. NOTE: This class is not a drop-in replacement for NamespaceSupport. This class assumes that passed URIs are already internalized! Also, getURI() returns "" instead of null if a prefix is not found.

Version:
$Revision: 1.2 $
Author:
Yuval Oren

Field Summary
static java.lang.String XMLNS
           
 
Constructor Summary
FastNamespaceSupport()
           
 
Method Summary
 void declarePrefix(java.lang.String prefix, java.lang.String uri)
           
 java.lang.String getContextPrefix(int index)
           
 int getContextSize()
           
 java.lang.String getContextURI(int index)
           
 java.lang.String getDefaultURI()
           
 java.lang.String getURI(java.lang.String prefix)
           
 void popContext()
           
 java.lang.String[] processName(java.lang.String qName, java.lang.String[] parts, boolean isAttribute)
           
 void pushContext()
           
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XMLNS

public static final java.lang.String XMLNS
See Also:
Constant Field Values
Constructor Detail

FastNamespaceSupport

public FastNamespaceSupport()
Method Detail

reset

public void reset()

pushContext

public void pushContext()

popContext

public void popContext()

declarePrefix

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

processName

public java.lang.String[] processName(java.lang.String qName,
                                      java.lang.String[] parts,
                                      boolean isAttribute)

getDefaultURI

public java.lang.String getDefaultURI()

getURI

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

getContextSize

public int getContextSize()

getContextPrefix

public java.lang.String getContextPrefix(int index)

getContextURI

public java.lang.String getContextURI(int index)