Project

General

Profile

« Previous | Next » 

Revision 2262

Added by sgarg almost 20 years ago

fixed some bugs in document update

View differences:

src/edu/ucsb/nceas/metacat/Eml200SAXHandler.java
381 381
                long startNodeId = rs.getLong(2);
382 382
                long endNodeId = rs.getLong(3);
383 383
                // create a new access section
384
                AccessSection accessObj = new AccessSection();
385
                accessObj.setControlLevel(TOPLEVEL);
386
                accessObj.setDocId(docid);
387
                accessObj.setSubTreeId(sectionId);
388
                accessObj.setStartNodeId(startNodeId);
389
                accessObj.setEndNodeId(endNodeId);
384
                topAccess = new AccessSection();
385
                topAccess.setControlLevel(TOPLEVEL);
386
                topAccess.setDocId(docid);
387
                topAccess.setSubTreeId(sectionId);
388
                topAccess.setStartNodeId(startNodeId);
389
                topAccess.setEndNodeId(endNodeId);
390 390
            }
391 391
            pstmt.close();
392 392
        }//try
......
1745 1745
       }
1746 1746
       Stack nodeStackFromDBTable = fromDBTable.getSubTreeNodeStack();
1747 1747
       Stack nodeStackFromParser  = fromParser.getStoredTmpNodeStack();
1748
       comparingNodeStacks(nodeStackFromDBTable, nodeStackFromParser);
1748

  
1749
       Stack tempStack = new Stack();
1750
       while(!nodeStackFromDBTable.isEmpty()){
1751
           tempStack.push(nodeStackFromDBTable.pop());
1752
       }
1753
       comparingNodeStacks(tempStack, nodeStackFromParser);
1749 1754
    }
1750 1755

  
1751 1756
    /* Compare two node stacks to see if they are same */
......
1775 1780
              MetaCatUtil
1776 1781
                      .debugMessage(
1777 1782
                              "Two records from new and old stack are not "
1778
                                      + "same!", 30);
1783
                                      + "same!" + record1 + "--" +record2, 30);
1779 1784
              throw new SAXException(UPDATEACCESSERROR);
1780 1785
          }//if
1781 1786
      }//while
......
2669 2674
          }
2670 2675
          else
2671 2676
          {
2672
            throw new SAXException("User will try update access rules for " +
2673
                  "data file "+ docid +" which you don't have all permission");
2677
            throw new SAXException("User does not have permission to update " +
2678
                  "of access rules for data file "+ docid);
2674 2679
          }
2675 2680
        }//try
2676 2681
        catch(Exception e)

Also available in: Unified diff