| java.lang.Object org.apache.xml.dtm.ref.ExpandedNameTable
ExpandedNameTable | public class ExpandedNameTable (Code) | | This is a default implementation of a table that manages mappings from
expanded names to expandedNameIDs.
%OPT% The performance of the getExpandedTypeID() method is very important
to DTM building. To get the best performance out of this class, we implement
a simple hash algorithm directly into this class, instead of using the
inefficient java.util.Hashtable. The code for the get and put operations
are combined in getExpandedTypeID() method to share the same hash calculation
code. We only need to implement the rehash() interface which is used to
expand the hash table.
|
Method Summary | |
public int | getExpandedTypeID(String namespace, String localName, int type) Given an expanded name represented by namespace, local name and node type,
return an ID. | public int | getExpandedTypeID(String namespace, String localName, int type, boolean searchOnly) Given an expanded name represented by namespace, local name and node type,
return an ID. | public int | getExpandedTypeID(int type) Given a type, return an expanded name ID.Any additional nodes that are
created that have this expanded name will use this ID. | public ExtendedType[] | getExtendedTypes() | public String | getLocalName(int ExpandedNameID) Given an expanded-name ID, return the local name part.
Parameters: ExpandedNameID - an ID that represents an expanded-name. | final public int | getLocalNameID(int ExpandedNameID) Given an expanded-name ID, return the local name ID.
Parameters: ExpandedNameID - an ID that represents an expanded-name. | public String | getNamespace(int ExpandedNameID) Given an expanded-name ID, return the namespace URI part.
Parameters: ExpandedNameID - an ID that represents an expanded-name. | final public int | getNamespaceID(int ExpandedNameID) Given an expanded-name ID, return the namespace URI ID.
Parameters: ExpandedNameID - an ID that represents an expanded-name. | public int | getSize() | final public short | getType(int ExpandedNameID) Given an expanded-name ID, return the local name ID.
Parameters: ExpandedNameID - an ID that represents an expanded-name. |
ATTRIBUTE | final public static int ATTRIBUTE(Code) | | |
CDATA_SECTION | final public static int CDATA_SECTION(Code) | | |
COMMENT | final public static int COMMENT(Code) | | |
DOCUMENT | final public static int DOCUMENT(Code) | | |
DOCUMENT_FRAGMENT | final public static int DOCUMENT_FRAGMENT(Code) | | |
DOCUMENT_TYPE | final public static int DOCUMENT_TYPE(Code) | | |
ELEMENT | final public static int ELEMENT(Code) | | |
ENTITY | final public static int ENTITY(Code) | | |
ENTITY_REFERENCE | final public static int ENTITY_REFERENCE(Code) | | |
NAMESPACE | final public static int NAMESPACE(Code) | | |
NOTATION | final public static int NOTATION(Code) | | |
PROCESSING_INSTRUCTION | final public static int PROCESSING_INSTRUCTION(Code) | | |
TEXT | final public static int TEXT(Code) | | |
ExpandedNameTable | public ExpandedNameTable()(Code) | | Create an expanded name table.
|
getExpandedTypeID | public int getExpandedTypeID(String namespace, String localName, int type)(Code) | | Given an expanded name represented by namespace, local name and node type,
return an ID. If the expanded-name does not exist in the internal tables,
the entry will be created, and the ID will be returned. Any additional
nodes that are created that have this expanded name will use this ID.
Parameters: namespace - The namespace Parameters: localName - The local name Parameters: type - The node type the expanded-name id of the node. |
getExpandedTypeID | public int getExpandedTypeID(String namespace, String localName, int type, boolean searchOnly)(Code) | | Given an expanded name represented by namespace, local name and node type,
return an ID. If the expanded-name does not exist in the internal tables,
the entry will be created, and the ID will be returned. Any additional
nodes that are created that have this expanded name will use this ID.
If searchOnly is true, we will return -1 if the name is not found in the
table, otherwise the name is added to the table and the expanded name id
of the new entry is returned.
Parameters: namespace - The namespace Parameters: localName - The local name Parameters: type - The node type Parameters: searchOnly - If it is true, we will only search for the expanded name.-1 is return is the name is not found. the expanded-name id of the node. |
getExpandedTypeID | public int getExpandedTypeID(int type)(Code) | | Given a type, return an expanded name ID.Any additional nodes that are
created that have this expanded name will use this ID.
the expanded-name id of the node. |
getExtendedTypes | public ExtendedType[] getExtendedTypes()(Code) | | Return the array of extended types
The array of extended types |
getLocalName | public String getLocalName(int ExpandedNameID)(Code) | | Given an expanded-name ID, return the local name part.
Parameters: ExpandedNameID - an ID that represents an expanded-name. String Local name of this node, or null if the node has no name. |
getLocalNameID | final public int getLocalNameID(int ExpandedNameID)(Code) | | Given an expanded-name ID, return the local name ID.
Parameters: ExpandedNameID - an ID that represents an expanded-name. The id of this local name. |
getNamespace | public String getNamespace(int ExpandedNameID)(Code) | | Given an expanded-name ID, return the namespace URI part.
Parameters: ExpandedNameID - an ID that represents an expanded-name. String URI value of this node's namespace, or null if nonamespace was resolved. |
getNamespaceID | final public int getNamespaceID(int ExpandedNameID)(Code) | | Given an expanded-name ID, return the namespace URI ID.
Parameters: ExpandedNameID - an ID that represents an expanded-name. The id of this namespace. |
getSize | public int getSize()(Code) | | Return the size of the ExpandedNameTable
The size of the ExpandedNameTable |
getType | final public short getType(int ExpandedNameID)(Code) | | Given an expanded-name ID, return the local name ID.
Parameters: ExpandedNameID - an ID that represents an expanded-name. The id of this local name. |
|
|