metaCatDiffReplicationHandler.txt
1 |
431c431 |
---|---|
2 |
< if(guid != null && !idman.identifierExists(guid)) |
3 |
--- |
4 |
> if(guid != null && !(docName.trim().equals("systemMetadata")) && !idman.identifierExists(guid)) |
5 |
440,447c440,441 |
6 |
< else |
7 |
< { |
8 |
< logReplication.debug("No guid information was included with the replicated document"); |
9 |
< } |
10 |
< |
11 |
< //handle systemMetadata |
12 |
< if(docName.trim().equals("systemMetadata")) |
13 |
< { |
14 |
--- |
15 |
> else if (guid != null && docName.trim().equals("systemMetadata")) |
16 |
> {//handle systemMetadata |
17 |
465a460,464 |
18 |
> else |
19 |
> { |
20 |
> logReplication.debug("No guid information was included with the replicated document"); |
21 |
> } |
22 |
> |
23 |
575,576c574,585 |
24 |
< |
25 |
< |
26 |
--- |
27 |
> |
28 |
> // keep track of dataone guid's even for science data |
29 |
> String guid = docinfoHash.get("guid"); |
30 |
> logReplication.debug("guid passed from docinfo hash: " + guid); |
31 |
> IdentifierManager idman = IdentifierManager.getInstance(); |
32 |
> if(guid != null && !idman.identifierExists(guid)) |
33 |
> { //if the guid was passed in, put it in the identifiers table |
34 |
> logReplication.debug("ReplicationHandler.handleSingleDataFile -Creating guid/docid mapping for local/docid " + |
35 |
> docinfoHash.get("docid") + " and guid: " + guid); |
36 |
> idman.createMapping(guid, docinfoHash.get("docid")); |
37 |
> } |
38 |
> |