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 eu.etaxonomy.cdm.api.application.CdmApplicationController;
|
12
|
import eu.etaxonomy.cdm.api.application.ICdmRepository;
|
13
|
import eu.etaxonomy.cdm.database.DbSchemaValidation;
|
14
|
import eu.etaxonomy.cdm.io.common.CdmImportBase;
|
15
|
|
16
|
/**
|
17
|
* @author a.mueller
|
18
|
* @since 17.08.2019
|
19
|
*/
|
20
|
public abstract class FauEu2CdmImportBase
|
21
|
extends CdmImportBase<FauEu2CdmImportConfigurator, FauEu2CdmImportState> {
|
22
|
|
23
|
private static final long serialVersionUID = 8917991155285743172L;
|
24
|
|
25
|
protected ICdmRepository source(FauEu2CdmImportState state){
|
26
|
|
27
|
ICdmRepository repo = state.getSourceRepository();
|
28
|
if (repo == null){
|
29
|
boolean omitTermLoading = true;
|
30
|
repo = CdmApplicationController.NewInstance(state.getConfig().getSource(),
|
31
|
DbSchemaValidation.VALIDATE, omitTermLoading);
|
32
|
state.setSourceRepository(repo);
|
33
|
}
|
34
|
return repo;
|
35
|
}
|
36
|
|
37
|
}
|