Revision 7848
Added by Jing Tao over 11 years ago
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/IndexGenerator.java | ||
---|---|---|
398 | 398 |
if(!resourceMapIds.isEmpty()) { |
399 | 399 |
if(sysDate.getTime() > resourceMapPreviousDate.getTime()) { |
400 | 400 |
resourceMapIds.add(identifier.getValue());//append to the end of the list if current is later than the previous one |
401 |
resourceMapPreviousDate = sysDate;//reset resourceMapPreviousDate to the bigger one |
|
401 | 402 |
} else { |
402 | 403 |
int size = resourceMapIds.size();// |
403 | 404 |
resourceMapIds.add(size -1, identifier.getValue());//keep the previous one at the end of the list. |
404 | 405 |
} |
405 | 406 |
} else { |
406 | 407 |
resourceMapIds.add(identifier.getValue()); |
408 |
resourceMapPreviousDate = sysDate;//init resourcemapPreviousDate |
|
407 | 409 |
} |
408 |
resourceMapPreviousDate = sysDate; |
|
410 |
|
|
409 | 411 |
} else if (correctTimeRange) { |
410 | 412 |
if(!otherIds.isEmpty()) { |
411 | 413 |
if(sysDate.getTime() > otherPreviousDate.getTime()) { |
412 | 414 |
otherIds.add(identifier.getValue()); |
415 |
otherPreviousDate = sysDate;//reset otherPreviousDate to the bigger one |
|
413 | 416 |
} else { |
414 | 417 |
int size = otherIds.size(); |
415 | 418 |
otherIds.add(size-1, identifier.getValue()); |
416 | 419 |
} |
417 | 420 |
} else { |
418 | 421 |
otherIds.add(identifier.getValue()); |
422 |
otherPreviousDate = sysDate;//init otherPreviousDate |
|
419 | 423 |
} |
420 |
otherPreviousDate = sysDate; |
|
424 |
|
|
421 | 425 |
} |
422 | 426 |
|
423 | 427 |
} |
Also available in: Unified diff
Fixed a bug that the event log can't save the real lastest process date.