Qizx/open API

net.axyana.qizxopen.util
Class NSTable

java.lang.Object
  extended bynet.axyana.qizxopen.util.NSTable

public class NSTable
extends java.lang.Object

Management of a local table of qualified names (for documents or collections).

Names are accessed by index or by value (namespace+localname).


Constructor Summary
NSTable()
           
 
Method Summary
 int addName(java.lang.String uri, java.lang.String localName)
          Inserts a name without check (for loading).
 void clear()
          Clears all the contents.
 int enter(QName name)
           
 int enter(java.lang.String uri, java.lang.String localName)
          Searches a name and returns its index in the table.
 int find(QName name)
          Lookup of a qualified name.
 int find(java.lang.String uri, java.lang.String localName)
          Lookup of a qualified name.
 QName getName(int rank)
          Gets the unique name associated with an index.
 Namespace[] getNamespaces()
           
 int size()
          Returns the number of names stored in this table.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NSTable

public NSTable()
Method Detail

enter

public int enter(java.lang.String uri,
                 java.lang.String localName)
Searches a name and returns its index in the table. If the name is not found, it is inserted.

Parameters:
uri - Namespace URI.
localName -

enter

public int enter(QName name)

find

public int find(java.lang.String uri,
                java.lang.String localName)
Lookup of a qualified name.

Returns:
the index of the name in the table, or -1 if not found.

find

public int find(QName name)
Lookup of a qualified name.

Returns:
the index of the name in the table, or -1 if not found.

addName

public int addName(java.lang.String uri,
                   java.lang.String localName)
Inserts a name without check (for loading).


getName

public QName getName(int rank)
Gets the unique name associated with an index.


size

public int size()
Returns the number of names stored in this table.


clear

public void clear()
Clears all the contents.


getNamespaces

public Namespace[] getNamespaces()

© 2005 Axyana Software