Project

General

Profile

« Previous | Next » 

Revision 899

Added by berkley about 22 years ago

made a ton of changes related to keeping oracle SQL code out of the main classes. fixed a bug where the timing of the index thread was off so when it went to index a document, the document was not already in xml_documents thus breaking the FK relation between xml_documents and xml_index. I think that bug might be the reason for the blank resultset screens in morpho. made the postgres implementation much more robust.

View differences:

DocumentImpl.java
692 692
    String nodename = null;
693 693
    String nodeprefix = null;
694 694
    String nodedata = null;
695
    String quotechar = dbAdapter.getStringDelimiter();
695 696

  
696 697
    try {
697 698
      pstmt =
698 699
      conn.prepareStatement("SELECT nodeid,parentnodeid,nodeindex, " +
699
           "nodetype,nodename,nodeprefix,"+               
700
           "nodetype,nodename,nodeprefix,nodedata " +               
701
           /*"replace(" +
700 702
           "replace(" +
701
           "replace(" +
702
           "replace(nodedata,'&','&') " +
703
           ",'<','&lt;') " +
704
           ",'>','&gt;') " +
703
           "replace(nodedata," + quotechar + "&" + quotechar + "," + quotechar + "&amp;" +
704
           quotechar + ") " +
705
           "," + quotechar + "<" + quotechar + "," + quotechar + "&lt;" + 
706
           quotechar + ") " +
707
           "," + quotechar + ">" + quotechar + "," + quotechar + "&gt;" + 
708
           quotechar + ") " +*/
705 709
           "FROM xml_nodes WHERE rootnodeid = ?");
706 710

  
707 711
      // Bind the values to the query
......
718 722
        nodename = rs.getString(5);
719 723
        nodeprefix = rs.getString(6);
720 724
        nodedata = rs.getString(7);
721

  
725
        nodedata = MetaCatUtil.normalize(nodedata);
722 726
        // add the data to the node record list hashtable
723 727
        NodeRecord currentRecord = new NodeRecord(nodeid,parentnodeid,nodeindex,
724 728
                                       nodetype, nodename, nodeprefix, nodedata);

Also available in: Unified diff