Revision 2713
Added by Jing Tao about 19 years ago
src/edu/ucsb/nceas/metacat/ReplicationHandler.java | ||
---|---|---|
1012 | 1012 |
//local DB, it might be out of date. |
1013 | 1013 |
if (localrev == -1) |
1014 | 1014 |
{ |
1015 |
//insert this document as new because it is not in the local DB |
|
1016 |
action = "INSERT"; |
|
1017 |
flag = true; |
|
1015 |
// check if the revision is in the revision table |
|
1016 |
Vector localRevVector = DBUtil.getRevListFromRevisionTable(docid); |
|
1017 |
if (localRevVector != null && localRevVector.contains(new Integer(rev))) |
|
1018 |
{ |
|
1019 |
// this version was deleted, so don't need replicate |
|
1020 |
flag = false; |
|
1021 |
} |
|
1022 |
else |
|
1023 |
{ |
|
1024 |
//insert this document as new because it is not in the local DB |
|
1025 |
action = "INSERT"; |
|
1026 |
flag = true; |
|
1027 |
} |
|
1018 | 1028 |
} |
1019 | 1029 |
else |
1020 | 1030 |
{ |
Also available in: Unified diff
Add code to handle replication document in xml_document table.