Project

General

Profile

« Previous | Next » 

Revision 3098

Added by perry over 17 years ago

Ensure that spatial operations are only triggered when runSpatialOption is set to true.

View differences:

MetaCatServlet.java
213 213

  
214 214
            /*
215 215
             *  If spatial option is turned on and set to regenerate the
216
             *  spatial cache on restart, trigger the harvester 
216
             *  spatial cache on restart, trigger the harvester regeneratation method 
217 217
             */
218 218
            if ( MetaCatUtil.getOption("runSpatialOption").equals("true") &&
219 219
                 MetaCatUtil.getOption("regenerateCacheOnRestart").equals("true") ) {
......
2255 2255
                    out.println("</success>");
2256 2256
                    logMetacat.info("Document deleted.");
2257 2257

  
2258
                    // Delete from spatial cache
2259
                    SpatialHarvester sh = new SpatialHarvester();
2260
                    sh.addToDeleteQue( MetaCatUtil.getSmartDocId( docid[0] ) );
2261
                    sh.destroy();
2258
                    // Delete from spatial cache if runningSpatialOption
2259
		    if ( MetaCatUtil.getOption("runSpatialOption").equals("true") ) {
2260
                        SpatialHarvester sh = new SpatialHarvester();
2261
                        sh.addToDeleteQue( MetaCatUtil.getSmartDocId( docid[0] ) );
2262
                        sh.destroy();
2263
	            }
2262 2264

  
2263 2265
                }
2264 2266
                catch (AccessionNumberException ane) {

Also available in: Unified diff