org.xbis
Class DefaultNameMap

java.lang.Object
  extended byorg.xbis.DefaultNameMap

public class DefaultNameMap
extends java.lang.Object

XML Binary Information Set name mapping to handles. This class is used for models which do not include support for unique element and attribute qnames. It tracks and looks up handles for previously defined names, and allows new names to be added to the known set.

Version:
0.8
Author:
Dennis M. Sosnoski

Nested Class Summary
protected static class DefaultNameMap.LinkedQName
          Linkable form of name information.
 
Field Summary
protected  int m_nameCount
          Number of name handles defined.
protected  com.sosnoski.util.hashmap.ObjectObjectHashMap m_nameMap
          Map of heads of name lists corresponding to local names.
 
Constructor Summary
DefaultNameMap()
          Constructor.
 
Method Summary
 int addDefined(java.lang.String local, java.lang.Object ns)
          Add name to known set.
 void clear()
          Empty the known set of names.
 int getHandle(java.lang.String local, java.lang.Object ns)
          Get name handle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_nameMap

protected com.sosnoski.util.hashmap.ObjectObjectHashMap m_nameMap
Map of heads of name lists corresponding to local names.


m_nameCount

protected int m_nameCount
Number of name handles defined.

Constructor Detail

DefaultNameMap

public DefaultNameMap()
Constructor.

Method Detail

getHandle

public int getHandle(java.lang.String local,
                     java.lang.Object ns)
Get name handle.

Parameters:
local - local name
ns - namespace for name
Returns:
handle value (always strictly positive) if known, negative value if unknown name

addDefined

public int addDefined(java.lang.String local,
                      java.lang.Object ns)
Add name to known set.

Parameters:
local - local name
ns - namespace for name

clear

public void clear()
Empty the known set of names. Clears all state information so that the instance can be reused.



Company Web Site

XML Binary Information Set Home