Project

General

Profile

« Previous | Next » 

Revision 3349

Added by Jing Tao over 17 years ago

Removed a code to check if there is a docid in a vector since every docid should exist once.

View differences:

src/edu/ucsb/nceas/metacat/DBQuery.java
1056 1056
          Hashtable controlPairs = new Hashtable();
1057 1057
          doclist.deleteCharAt(doclist.length() - 1); //remove the last comma
1058 1058
          boolean tableHasRows = false;
1059
          // check if user has permission to see the return field data
1060
          /*String accessControlSQL =
1061
                 qspec.printAccessControlSQLForReturnField(doclist.toString());
1062
          pstmt = dbconn.prepareStatement(accessControlSQL);
1063
          //increase dbconnection usage count
1064
          dbconn.increaseUsageCount(1);
1065
          pstmt.execute();
1066
          rs = pstmt.getResultSet();
1067
          tableHasRows = rs.next();
1068
          while (tableHasRows)
1069
          {
1070
            long startNodeId = rs.getLong(1);
1071
            long endNodeId = rs.getLong(2);
1072
            controlPairs.put(new Long(startNodeId), new Long(endNodeId));
1073
            tableHasRows = rs.next();
1074
          }*/
1059
        
1075 1060

  
1076
           /*double extendedAccessQueryEnd = System.currentTimeMillis() / 1000;
1077
           logMetacat.info( "Time for execute access extended query: "
1078
                          + (extendedAccessQueryEnd - extendedQueryStart));*/
1079

  
1080 1061
           String extendedQuery =
1081 1062
               qspec.printExtendedSQL(doclist.toString(), useXMLIndex);
1082 1063
           logMetacat.info("Extended query: " + extendedQuery);
......
2438 2419
          return;
2439 2420
        if(rd.document == null)
2440 2421
          rd.document = "";
2441
        if (!containsDocid(rd.docid))
2442
        {
2422
       
2443 2423
           docids.addElement(rd.docid);
2444 2424
           documents.addElement(rd.document);
2445
        }
2425
        
2446 2426
      }
2447 2427
      
2448 2428
      /**

Also available in: Unified diff