Revision 9638
Added by Jing Tao over 8 years ago
src/edu/ucsb/nceas/metacat/IdentifierManager.java | ||
---|---|---|
1024 | 1024 |
". It is illegal. So the head pid maybe is wrong."); |
1025 | 1025 |
hasError = true; |
1026 | 1026 |
} |
1027 |
logMetacat.debug("Put "+guidStr+"(a value) Obsoletes "+obsoletesStr+" (a key) into the vector."); |
|
1027 | 1028 |
obsoletesIdGuidMap.put(obsoletesStr, guidStr); |
1028 | 1029 |
} |
1029 | 1030 |
if(first) { |
... | ... | |
1175 | 1176 |
*/ |
1176 | 1177 |
private Identifier checkObsoletesChain(Identifier latestDateUpload, HashMap<String, String>obsoletesIdGuidMap) { |
1177 | 1178 |
Identifier pid = latestDateUpload; |
1178 |
if(obsoletesIdGuidMap != null && latestDateUpload != null && obsoletesIdGuidMap.containsKey(latestDateUpload)) { |
|
1179 |
if(obsoletesIdGuidMap != null && latestDateUpload != null && obsoletesIdGuidMap.containsKey(latestDateUpload.getValue())) {
|
|
1179 | 1180 |
logMetacat.debug("Another object obsoletes the lasted uploaded object "+latestDateUpload.getValue()); |
1180 | 1181 |
//another object obsoletes the lastedDateUpload object |
1181 |
String pidStr = obsoletesIdGuidMap.get(latestDateUpload); |
|
1182 |
String pidStr = obsoletesIdGuidMap.get(latestDateUpload.getValue());
|
|
1182 | 1183 |
while (obsoletesIdGuidMap.containsKey(pidStr)) { |
1183 | 1184 |
pidStr = obsoletesIdGuidMap.get(pidStr); |
1184 | 1185 |
logMetacat.debug("Another object "+pidStr+" obsoletes the object "); |
Also available in: Unified diff
Fixed a bug to use an identifier object to get a value in a vector.