Revision f3e8dc28
Added by Andreas Müller about 1 year ago
app-import/src/main/java/eu/etaxonomy/cdm/app/mexico/MexicoReferenceUpdater.java | ||
---|---|---|
31 | 31 |
import eu.etaxonomy.cdm.model.reference.Reference; |
32 | 32 |
import eu.etaxonomy.cdm.model.reference.ReferenceFactory; |
33 | 33 |
import eu.etaxonomy.cdm.model.reference.ReferenceType; |
34 |
import eu.etaxonomy.cdm.model.term.DefinedTerm;
|
|
34 |
import eu.etaxonomy.cdm.model.term.IdentifierType;
|
|
35 | 35 |
import eu.etaxonomy.cdm.persistence.query.MatchMode; |
36 | 36 |
|
37 | 37 |
/** |
... | ... | |
50 | 50 |
|
51 | 51 |
dataSource.checkConnection(); |
52 | 52 |
CdmApplicationController app = CdmApplicationController.NewInstance(dataSource, hbm2dll); |
53 |
DefinedTerm identifierType = (DefinedTerm)app.getTermService().find(MexicoConabioTransformer.uuidConabioTaxonIdIdentifierType);
|
|
53 |
IdentifierType identifierType = (IdentifierType)app.getTermService().find(MexicoConabioTransformer.uuidConabioTaxonIdIdentifierType);
|
|
54 | 54 |
|
55 | 55 |
Map<String,Reference> journalMap = getJournalMap(app); |
56 | 56 |
try { |
... | ... | |
76 | 76 |
} |
77 | 77 |
} |
78 | 78 |
|
79 |
private void handleRef(CdmApplicationController app, String id, String nomRefStr, DefinedTerm identifierType, Map<String, Reference> journalMap, int line) {
|
|
79 |
private void handleRef(CdmApplicationController app, String id, String nomRefStr, IdentifierType identifierType, Map<String, Reference> journalMap, int line) {
|
|
80 | 80 |
String lineStr = " " + id +"; line: " + line; |
81 | 81 |
try { |
82 | 82 |
List<String> props = Arrays.asList(new String[]{"combinationAuthor.teamMembers","identifiers","nomenclaturalSource.citation.authorTeam.teamMembers"}); |
... | ... | |
130 | 130 |
} |
131 | 131 |
} |
132 | 132 |
|
133 |
private void handleRefs(Map<String, String> newRefs, CdmApplicationController app, DefinedTerm identifierType) {
|
|
133 |
private void handleRefs(Map<String, String> newRefs, CdmApplicationController app, IdentifierType identifierType) {
|
|
134 | 134 |
List<String> props = Arrays.asList(new String[]{"identifiers","nomenclaturalSource.citation"}); |
135 | 135 |
for (String id : newRefs.keySet()){ |
136 | 136 |
List<IdentifiedEntityDTO<TaxonName>> names = app.getNameService().findByIdentifier(TaxonName.class, id, identifierType, MatchMode.EXACT, true, null, null, props).getRecords(); |
Also available in: Unified diff
ref #10260 change IdentifierType class in app-import