public void store( NodeImpl node, String path ) {
public void store( NodeImpl node, CharSequence path ) {
    public void store( NodeImpl node, String path ) {        switch ( node.getNodeType() ) {            case Node.ELEMENT_NODE:            {                ElementImpl temp = (ElementImpl) node;                int elementId = -1;                String nodeName = temp.getNodeName();                // first, try to get an elementId for this node-name.                // elementId's are cached                if ( elementIds.containsKey( nodeName ) )                    elementId = ( (Integer) elementIds.get( nodeName ) ).intValue();                else {                    Object lock = elementIdsLock.acquire();                    try {                        if ( mDatabaseType != MYSQL )                            m_insertElementId.getConnection().setAutoCommit( true );                        m_getElementId.setString( 1, nodeName );                        ResultSet r = m_getElementId.executeQuery();                        if ( !r.next() ) {                            elementId = getNextElementId();                            m_insertElementId.setInt( 1, elementId );                            m_insertElementId.setString( 2, nodeName );                            m_insertElementId.executeUpdate();                            if ( mDatabaseType != MYSQL )                                m_insertElementId.getConnection().setAutoCommit( false );                        }                        else                            elementId = r.getInt( 1 );                        elementIds.put( nodeName, new Integer( elementId ) );                    } catch ( SQLException e ) {                        LOG.warn( "sql exception while storing element id: " + e );                    } finally {                        elementIdsLock.release( lock );                    }                }                node.setNodeNameRef( elementId );                // save element by calling ElementIndex                NodeProxy proxy =                    new NodeProxy( (DocumentImpl) temp.getOwnerDocument(),                    temp.getGID() );                t_elementIndex.setDocument( (DocumentImpl) temp.getOwnerDocument() );                t_elementIndex.addRow( elementId, proxy );                break;            }            case Node.TEXT_NODE:            {                TextImpl temp = (TextImpl) node;                Object[] textData = new Object[3];                textData[0] = new Integer( ( (DocumentImpl) temp.getOwnerDocument() ).getDocId() );                textData[1] = new Long( temp.getGID() );                // save text-data to file if user want's this                if ( m_toFiles ) {                    textData[2] = temp.getData();                    try {                        s_cdata.writeRow( textData );                    } catch ( IOException io ) {                        LOG.debug( io );                    }                }                else {                    // otherwise, store it directly to the database                    textData[2] = escapeCharacters( temp.getData() );                    t_insertTextStmt.append( textData );                }                // check if this textual content should be fulltext-indexed                // by calling IndexPaths.match(path)                IndexPaths idx =                    (IndexPaths) config.getProperty( "indexScheme." +                    temp.getOwnerDocument().getDoctype().getName() );                if ( idx == null || idx.match( path ) )                    textEngine.storeText( idx, temp );                break;            }            case Node.ATTRIBUTE_NODE:            {                AttrImpl attrib = (AttrImpl) node;                Object[] attrData = {                    new Integer( ( (DocumentImpl) attrib.getOwnerDocument() ).getDocId() ),                    new Long( attrib.getGID() ),                    attrib.getName(),                    attrib.getValue()                    };                if ( m_toFiles )                    try {                        s_attr.writeRow( attrData );                    } catch ( IOException io ) {                        LOG.debug( io );                    }                else                    t_insertAttr.append( attrData );                break;            }            case Node.PROCESSING_INSTRUCTION_NODE:            {                try {                    ProcessingInstructionImpl pi = (ProcessingInstructionImpl) node;                    m_storePI.setInt( 1,                        ( (DocumentImpl) pi.getOwnerDocument() ).getDocId() );                    m_storePI.setLong( 2, pi.getGID() );                    m_storePI.setString( 3, pi.getTarget() );                    m_storePI.setString( 4, pi.getData() );                    m_storePI.executeUpdate();                    if ( mDatabaseType != MYSQL )                        m_storePI.getConnection().commit();                } catch ( SQLException sqe ) {                    LOG.debug( "sql exception while storing pi: " + sqe );                    return;                }                break;            }            case Node.COMMENT_NODE:            {                try {                    CommentImpl comment = (CommentImpl) node;                    m_storeComment.setInt( 1,                        ( (DocumentImpl) comment.getOwnerDocument() ).getDocId() );                    m_storeComment.setLong( 2, comment.getGID() );                    m_storeComment.setString( 3, comment.getData() );                    m_storeComment.executeUpdate();                    if ( mDatabaseType != MYSQL )                        m_storePI.getConnection().commit();                } catch ( SQLException sqe ) {                    LOG.debug( "sql exception while storing comment: " + sqe );                }                break;            }            default:                return;        }        // get namespace prefixes used in this element        StringBuffer prefixes = new StringBuffer();        if ( node.getNodeType() == Node.ELEMENT_NODE &&            ( (ElementImpl) node ).declaresNamespacePrefixes() )            for ( Iterator i = ( (ElementImpl) node ).getNamespacePrefixes(); i.hasNext();  ) {                if ( prefixes.length() > 0 )                    prefixes.append( ';' );                prefixes.append( (String) i.next() );            }        // now store the node's data to the dom-table        if ( m_toFiles ) {            Object[] row = {                new Integer( ( (DocumentImpl) node.getOwnerDocument() ).getDocId() ),                new Long( node.getGID() ), new Short( node.getNodeType() ),                new Integer( node.getChildCount() ),                new Integer( node.getNodeNameRef() ),                new Integer( node.getAttributesCount() ), prefixes.toString()                };            try {                s_dom.writeRow( row );            } catch ( IOException io ) {                LOG.debug( io );            }        }        else            try {                m_insertNodeStmt.setInt( 1, ( (DocumentImpl) node.getOwnerDocument() ).getDocId() );                m_insertNodeStmt.setLong( 2, node.getGID() );                m_insertNodeStmt.setShort( 3, node.getNodeType() );                m_insertNodeStmt.setInt( 4, node.getChildCount() );                m_insertNodeStmt.setInt( 5, node.getNodeNameRef() );                m_insertNodeStmt.setInt( 6, node.getAttributesCount() );                m_insertNodeStmt.setString( 7, prefixes.toString() );                m_insertNodeStmt.executeUpdate();            } catch ( SQLException e ) {                LOG.debug( e );            }    }