NodeProxy p = new NodeProxy(node); p.setIndexType(indexType);
NodeProxy p = new NodeProxy(node);
    public void endElement(final StoredNode node, NodePath currentPath, String content, long oldAddress) {        node.getQName().setNameType(ElementValue.ELEMENT);                final DocumentImpl doc = (DocumentImpl) node.getOwnerDocument();        final int indexType = ((ElementImpl) node).getIndexType();        NodeProxy p = new NodeProxy(node);        p.setIndexType(indexType);                        // TODO move_to NativeValueIndex        if (RangeIndexSpec.hasRangeIndex(indexType)) {            if (content == null) {                if (oldAddress != StoredNode.UNKNOWN_NODE_IMPL_ADDRESS)                    p.setInternalAddress(oldAddress);                content = getNodeValue(node, false);                //Curious...                p.setInternalAddress(node.getInternalAddress());            }            valueIndex.setDocument(doc);            valueIndex.storeElement(RangeIndexSpec.indexTypeToXPath(indexType),                     (ElementImpl) node, content.toString());        }                // TODO move_to NativeValueIndexByQName         if ( RangeIndexSpec.hasQNameIndex(indexType) ) {            if (content == null) {                if (oldAddress != StoredNode.UNKNOWN_NODE_IMPL_ADDRESS)                    p.setInternalAddress(oldAddress);                content = getNodeValue(node, false);                //Curious...                p.setInternalAddress(node.getInternalAddress());            }                        if (qnameValueIndex != null)                qnameValueIndex.endElement((ElementImpl) node, currentPath, content);        }                // TODO move_to NativeElementIndex; name change (See ContentLoadingObserver ): addRow() --> endElement()        // save element by calling ElementIndex        elementIndex.setDocument(doc);        elementIndex.addNode(node.getQName(), p);    }    