org.apache.xerces.impl.xs.util
Class XSNamedMap4Types

java.lang.Object
  |
  +--org.apache.xerces.impl.xs.util.XSNamedMapImpl
        |
        +--org.apache.xerces.impl.xs.util.XSNamedMap4Types
All Implemented Interfaces:
XSNamedMap

public class XSNamedMap4Types
extends XSNamedMapImpl

Containts the map between qnames and XSObject's.

Version:
$Id: XSNamedMap4Types.java,v 1.2 2002/05/21 21:41:50 sandygao Exp $
Author:
Sandy Gao, IBM

Constructor Summary
XSNamedMap4Types(java.lang.String[] namespaces, SymbolHash[] maps, int num, short type)
          Construct an XSNamedMap implmentation for a list of namespaces
XSNamedMap4Types(java.lang.String namespace, SymbolHash map, short type)
          Construct an XSNamedMap implmentation for one namespace
 
Method Summary
 XSObject getItem(int index)
          Returns the indexth item in the map.
 int getMapLength()
          The number of XSObjects in the XSObjectList.
 XSObject getNSItem(java.lang.String namespace, java.lang.String localName)
          Retrieves an XSObject specified by local name and namespace URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSNamedMap4Types

public XSNamedMap4Types(java.lang.String namespace,
                        SymbolHash map,
                        short type)
Construct an XSNamedMap implmentation for one namespace

Parameters:
namespace - the namespace to which the components belong
map - the map from local names to components
type - the type of components

XSNamedMap4Types

public XSNamedMap4Types(java.lang.String[] namespaces,
                        SymbolHash[] maps,
                        int num,
                        short type)
Construct an XSNamedMap implmentation for a list of namespaces

Parameters:
namespaces - the namespaces to which the components belong
maps - the maps from local names to components
num - the number of namespaces
type - the type of components
Method Detail

getMapLength

public int getMapLength()
The number of XSObjects in the XSObjectList. The range of valid child node indices is 0 to length-1 inclusive.

Specified by:
getMapLength in interface XSNamedMap
Overrides:
getMapLength in class XSNamedMapImpl

getNSItem

public XSObject getNSItem(java.lang.String namespace,
                          java.lang.String localName)
Retrieves an XSObject specified by local name and namespace URI.

Specified by:
getNSItem in interface XSNamedMap
Overrides:
getNSItem in class XSNamedMapImpl
Parameters:
namespace - The namespace URI of the XSObject to retrieve.
localName - The local name of the XSObject to retrieve.
Returns:
A XSObject (of any type) with the specified local name and namespace URI, or null if they do not identify any XSObject in this map.

getItem

public XSObject getItem(int index)
Returns the indexth item in the map. The index starts at 0. If index is greater than or equal to the number of nodes in the list, this returns null.

Specified by:
getItem in interface XSNamedMap
Overrides:
getItem in class XSNamedMapImpl
Parameters:
index - The position in the map from which the item is to be retrieved.
Returns:
The XSObject at the indexth position in the XSNamedMap, or null if that is not a valid index.


Copyright © 1999-2002 Apache XML Project. All Rights Reserved.