com.sun.org.apache.xalan.internal.xsltc.dom.KeyIndex

Here are the examples of the java api class com.sun.org.apache.xalan.internal.xsltc.dom.KeyIndex taken from open source projects.

1. AbstractTranslet#getKeyIndex()

Project: openjdk
File: AbstractTranslet.java
/**
     * Returns the index for a given key (or id).
     * The index implements our internal iterator interface
     * @param name the name of the index (the key or ##id)
     * @return a KeyIndex.
     */
public KeyIndex getKeyIndex(String name) {
    // Return an empty key index iterator if none are defined
    if (_keyIndexes == null) {
        return (_emptyKeyIndex != null) ? _emptyKeyIndex : (_emptyKeyIndex = new KeyIndex(1));
    }
    // Look up the requested key index
    final KeyIndex index = _keyIndexes.get(name);
    // Return an empty key index iterator if the requested index not found
    if (index == null) {
        return (_emptyKeyIndex != null) ? _emptyKeyIndex : (_emptyKeyIndex = new KeyIndex(1));
    }
    return (index);
}

2. AbstractTranslet#buildKeyIndex()

Project: openjdk
File: AbstractTranslet.java
/**
     * Create an empty KeyIndex in the DOM case
     *   @param name is the name of the index (the key or ##id)
     *   @param dom is the DOM
     */
public void buildKeyIndex(String name, DOM dom) {
    KeyIndex index = buildKeyIndexHelper(name);
    index.setDom(dom, dom.getDocument());
}

3. AbstractTranslet#buildKeyIndex()

Project: openjdk
File: AbstractTranslet.java
/**
     * Adds a value to a key/id index
     *   @param name is the name of the index (the key or ##id)
     *   @param node is the node handle of the node to insert
     *   @param value is the value that will look up the node in the given index
     */
public void buildKeyIndex(String name, int node, String value) {
    KeyIndex index = buildKeyIndexHelper(name);
    index.add(value, node, _currentRootForKeys);
}

4. AbstractTranslet#buildKeyIndexHelper()

Project: openjdk
File: AbstractTranslet.java
/**
     * Return KeyIndex for the buildKeyIndex methods. Note the difference from the
     * public getKeyIndex method, this method creates a new Map if keyIndexes does
     * not exist.
     *
     * @param name the name of the index (the key or ##id)
     * @return a KeyIndex.
     */
private KeyIndex buildKeyIndexHelper(String name) {
    if (_keyIndexes == null)
        _keyIndexes = new HashMap<>();
    KeyIndex index = _keyIndexes.get(name);
    if (index == null) {
        _keyIndexes.put(name, index = new KeyIndex(_indexSize));
    }
    return index;
}