Project

General

Profile

« Previous | Next » 

Revision 2996

Added by sgarg over 18 years ago

Modified code so that database is queried just once when a document is read. Currently the read is being done in the constructor and then again in
the function.

View differences:

src/edu/ucsb/nceas/metacat/DocumentImpl.java
994 994
         * unaccessableSubTree);
995 995
         *  } else { nodeRecordLists = getNodeRecordList(rootnodeid); }
996 996
         */
997
        nodeRecordLists = getNodeRecordList(rootnodeid);
997
        
998
        if(this.nodeRecordList == null){
999
            nodeRecordLists = getNodeRecordList(rootnodeid);
1000
        } else {
1001
        	nodeRecordLists = this.nodeRecordList;
1002
        }
998 1003
        Stack openElements = new Stack();
999 1004
        boolean atRootElement = true;
1000 1005
        boolean previousNodeWasElement = false;

Also available in: Unified diff