1
|
/**
|
2
|
* Copyright (C) 2019 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.io.pesi.fauEu2Cdm;
|
10
|
|
11
|
import java.util.HashMap;
|
12
|
import java.util.Map;
|
13
|
import java.util.UUID;
|
14
|
|
15
|
import eu.etaxonomy.cdm.api.application.ICdmRepository;
|
16
|
import eu.etaxonomy.cdm.io.common.CdmImportBase;
|
17
|
import eu.etaxonomy.cdm.io.common.ImportStateBase;
|
18
|
import eu.etaxonomy.cdm.model.common.CdmBase;
|
19
|
|
20
|
/**
|
21
|
* @author a.mueller
|
22
|
* @since 17.08.2019
|
23
|
*/
|
24
|
public class FauEu2CdmImportState
|
25
|
extends ImportStateBase<FauEu2CdmImportConfigurator,CdmImportBase>{
|
26
|
|
27
|
private ICdmRepository sourceRepository;
|
28
|
|
29
|
private Map<UUID, CdmBase> permanentCache = new HashMap<>();
|
30
|
|
31
|
protected FauEu2CdmImportState(FauEu2CdmImportConfigurator config) {
|
32
|
super(config);
|
33
|
}
|
34
|
|
35
|
public ICdmRepository getSourceRepository() {
|
36
|
return sourceRepository;
|
37
|
}
|
38
|
public void setSourceRepository(ICdmRepository sourceRepository) {
|
39
|
this.sourceRepository = sourceRepository;
|
40
|
}
|
41
|
|
42
|
public CdmBase getPermanent(UUID uuid) {
|
43
|
return permanentCache.get(uuid);
|
44
|
}
|
45
|
public void putPermanent(UUID uuid, CdmBase cdmBase) {
|
46
|
permanentCache.put(uuid, cdmBase);
|
47
|
}
|
48
|
}
|