Revision bd1bdb28
Added by Andreas Müller over 4 years ago
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/erms/ErmsImportRankMap.java | ||
---|---|---|
61 | 61 |
NomenclaturalCode nc = ErmsTransformer.kingdomId2NomCode(kingdomId); |
62 | 62 |
|
63 | 63 |
Map<Integer, Rank> kingdomMap = makeKingdomMap(rankMap, rankId); |
64 |
rankName = rankName.replace("Forma", "Form").replace("Subforma", "Subform"); |
|
64 |
rankName = rankName.replace("Forma", "Form").replace("Subforma", "Subform") |
|
65 |
.replace("Phylum (Division)", "Phylum").replace("Subphylum (Subdivision)", "Subphylum"); |
|
66 |
|
|
65 | 67 |
Rank rank = null; |
66 | 68 |
@SuppressWarnings("unchecked") |
67 | 69 |
OrderedTermVocabulary<Rank> voc = CdmBase.deproxy(Rank.GENUS().getVocabulary(), OrderedTermVocabulary.class); |
... | ... | |
90 | 92 |
} |
91 | 93 |
} |
92 | 94 |
if (rank == null){ |
93 |
logger.warn("Rank could not be defined: " + rankName + "; nomcode = " + nc + ", kingdom_id = " + kingdomId); |
|
95 |
logger.warn("Rank could not be defined: " + rankName + "; nomcode = " + nc + ", kingdom_id = " + kingdomId + ", rank_id = " + rankId);
|
|
94 | 96 |
} |
95 | 97 |
kingdomMap.put(kingdomId, rank); |
96 | 98 |
} |
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/erms/ErmsReferenceImport.java | ||
---|---|---|
118 | 118 |
ref = ReferenceFactory.newGeneric(); |
119 | 119 |
MarkerType markerType = getMarkerType(state, ErmsTransformer.uuidMarkerRefInformal, "Informal", "Informal", "e"); |
120 | 120 |
ref.addMarker(markerType, true); |
121 |
}else if (type.equalsIgnoreCase("i")){ |
|
122 |
ref = ReferenceFactory.newGeneric(); |
|
123 |
MarkerType markerType = getMarkerType(state, ErmsTransformer.uuidMarkerRefTypeI, "Ref type i", "Ref type i", "i"); |
|
124 |
ref.addMarker(markerType, true); |
|
125 | 121 |
}else{ |
126 | 122 |
ref = ReferenceFactory.newGeneric(); |
127 | 123 |
logger.warn("Unknown reference type: " + type + ". Created generic instead."); |
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/erms/ErmsTransformer.java | ||
---|---|---|
69 | 69 |
public static final UUID uuidBalticProper = UUID.fromString("12ddfcad-bf8f-43d8-a772-15ae69d37b20"); |
70 | 70 |
public static final UUID uuidBalearSea = UUID.fromString("478f30f0-01b1-4772-9d01-3a0a571f41c3"); |
71 | 71 |
public static final UUID uuidBalticSea = UUID.fromString("0031cda2-4b27-49de-afa3-fdec75ee5060"); |
72 |
public static final UUID uuidBarentsSea = UUID.fromString("b6fd9a4d-0ad0-4481-a0b4-5dd71c8fda8b"); |
|
72 |
public static final UUID uuidBarentszSea = UUID.fromString("b6fd9a4d-0ad0-4481-a0b4-5dd71c8fda8b");
|
|
73 | 73 |
public static final UUID uuidBelgianExclusiveEconomicZone = UUID.fromString("02138b0f-cee1-4c56-ae12-72a5b36839af"); |
74 |
public static final UUID uuidBeltSea = UUID.fromString("780f4144-f157-45e8-ae42-cacb3ec369ba"); |
|
74 |
public static final UUID uuidBaeltSea = UUID.fromString("780f4144-f157-45e8-ae42-cacb3ec369ba");
|
|
75 | 75 |
public static final UUID uuidBiscayBay = UUID.fromString("36ffc01e-85a2-4f71-91fd-012d0b1eeff5"); |
76 | 76 |
public static final UUID uuidBlackSea = UUID.fromString("1f110909-7462-4ee8-a7ff-9f976701dd1d"); |
77 | 77 |
public static final UUID uuidBothnianSea = UUID.fromString("926f7fa3-b0a4-4763-85eb-4c3804a72333"); |
... | ... | |
114 | 114 |
public static final UUID uuidWaddenSea = UUID.fromString("ae0c4555-8e19-479d-8a4f-e1b62939c09b"); |
115 | 115 |
public static final UUID uuidWhiteSea = UUID.fromString("bf14bfb6-8925-4696-911c-56d3e90d4491"); |
116 | 116 |
|
117 |
|
|
118 |
public static final UUID uuidAfghanistan = UUID.fromString("9ecbc81b-9150-45b5-953d-1051cd519dd0"); |
|
117 | 119 |
public static final UUID uuidAlboranSea = UUID.fromString("a4f1ef1e-0bda-4be0-95f9-59ed4f536fb6"); |
118 | 120 |
public static final UUID uuidAlgeria = UUID.fromString("d254b5bb-e24c-4f79-88dd-80a75cd935db"); |
119 | 121 |
public static final UUID uuidAngola = UUID.fromString("fdb74fd7-e6a1-48ff-8721-f1db6e0d93ee"); |
122 |
public static final UUID uuidArcticOcean = UUID.fromString("4e68ddce-4472-4ae0-b6c3-406f39bf86ec"); |
|
120 | 123 |
public static final UUID uuidAustralianExclusiveEconomicZone = UUID.fromString("de8f70b9-3cac-48d5-b456-5cd489df5c26"); |
121 | 124 |
public static final UUID uuidAzoresExclusiveEconomicZone = UUID.fromString("e0297e2c-d28a-46aa-8b30-694148b0640d"); |
122 | 125 |
public static final UUID uuidBahamas = UUID.fromString("3e7eb2e5-975b-433c-9dc0-106ba16fd6e4"); |
... | ... | |
142 | 145 |
public static final UUID uuidFrance = UUID.fromString("b7876595-230d-4ac8-bbcf-0a271221aeb0"); |
143 | 146 |
public static final UUID uuidGhana = UUID.fromString("b550ba30-41b8-485a-a1de-ba79b4b6e152"); |
144 | 147 |
public static final UUID uuidGreece = UUID.fromString("c004a689-048b-4541-9371-063bca1ab20e"); |
145 |
public static final UUID uuidGreekExclusiveEconomicZone = UUID.fromString("6e587a2b-d681-46d3-bede-30411b0707a9"); |
|
148 |
public static final UUID uuidGermany = UUID.fromString("55d23f99-c517-49ef-936b-3815c10b6303"); |
|
149 |
public static final UUID uuidGreekExclusiveEconomicZone = UUID.fromString("6e587a2b-d681-46d3-bede-30411b0707a9"); |
|
146 | 150 |
public static final UUID uuidGulfOfBothnia = UUID.fromString("e0126fd6-a163-4483-92e4-abe1a96ed025"); |
147 | 151 |
public static final UUID uuidGulfOfFinland = UUID.fromString("d312ff30-18d0-4f8a-9c80-3a06772cefbb"); |
148 | 152 |
public static final UUID uuidGulfOfGuinea = UUID.fromString("ea6f3983-64ad-46c4-832a-51bed6507d95"); |
... | ... | |
162 | 166 |
public static final UUID uuidMediterraneanSea_EasternBasin = UUID.fromString("a67dfa4d-4a96-403b-a64c-1e294826c2ed"); |
163 | 167 |
public static final UUID uuidMediterraneanSea_WesternBasin = UUID.fromString("b3e81fa7-ee7a-45d2-965c-88020f9ee1ea"); |
164 | 168 |
public static final UUID uuidMexico = UUID.fromString("a9be5a5c-99ec-4627-9892-104a0c175118"); |
169 |
public static final UUID uuidMongolia = UUID.fromString("0385e6b1-4796-4e9f-8656-b6092c97c58f"); |
|
165 | 170 |
public static final UUID uuidMorocco = UUID.fromString("4948e1ef-f61e-462f-9920-ab44c71ca2ae"); |
166 | 171 |
public static final UUID uuidNetherlands = UUID.fromString("8d4152fb-bf29-4a24-a772-62ccb4a8c02f"); |
167 | 172 |
public static final UUID uuidNewZealand = UUID.fromString("f3ff8497-00e0-4d45-9d14-eb80fea0fee0"); |
... | ... | |
278 | 283 |
case 2: return NomenclaturalCode.ICZN; //Animalia |
279 | 284 |
case 3: return NomenclaturalCode.ICNAFP; //Plantae |
280 | 285 |
case 4: return NomenclaturalCode.ICNAFP; //Fungi |
281 |
case 5: return NomenclaturalCode.ICNAFP ; //Protozoa , not sure if correct, they have "subsp."
|
|
286 |
case 5: return NomenclaturalCode.ICNAFP ; //Protozoa, not sure if correct, they have "subsp." |
|
282 | 287 |
case 6: return NomenclaturalCode.ICNB ; //Bacteria |
283 | 288 |
case 7: return NomenclaturalCode.ICNAFP; //Chromista??, not sure if correct, they have "subsp." |
284 | 289 |
case 147415: return NomenclaturalCode.ICNB; //Monera, it is only an alternative name for Bacteria and should not be handled as separate kingdom |
285 | 290 |
//-> formatting of infrageneric taxa and available ranks (rank table) let me assume that ICZN is most suitable |
286 |
//at the same time time formatting of subsp. (with marker!) behaves like ICNAFP so this is unclear
|
|
291 |
//at the same time formatting of subsp. (with marker!) behaves like ICNAFP so this is unclear |
|
287 | 292 |
default: return null; |
288 | 293 |
} |
289 | 294 |
} |
... | ... | |
402 | 407 |
}else if (guName.equalsIgnoreCase("Balear Sea")){ return uuidBalearSea; |
403 | 408 |
}else if (guName.equalsIgnoreCase("Baltic Proper")){ return uuidBalticProper; |
404 | 409 |
}else if (guName.equalsIgnoreCase("Baltic Sea")){ return uuidBalticSea; |
405 |
}else if (guName.equalsIgnoreCase("Barents Sea")){ return uuidBarentsSea;
|
|
410 |
}else if (guName.equalsIgnoreCase("Barentsz Sea")){ return uuidBarentszSea;
|
|
406 | 411 |
}else if (guName.equalsIgnoreCase("Belgian Exclusive Economic Zone")){ return uuidBelgianExclusiveEconomicZone; |
407 |
}else if (guName.equalsIgnoreCase("Belt Sea") |
|
408 |
|| guName.equalsIgnoreCase("Baelt Sea")){ return uuidBeltSea; |
|
412 |
}else if (guName.equalsIgnoreCase("Baelt Sea")){ return uuidBaeltSea; |
|
409 | 413 |
}else if (guName.equalsIgnoreCase("Biscay Bay")){ return uuidBiscayBay; |
410 | 414 |
}else if (guName.equalsIgnoreCase("Black Sea")){ return uuidBlackSea; |
411 | 415 |
}else if (guName.equalsIgnoreCase("Bothnian Sea")){ return uuidBothnianSea; |
... | ... | |
456 | 460 |
}else if (guName.equalsIgnoreCase("Polish Exclusive Economic Zone")){ return uuidPolishExclusiveEconomicZone; |
457 | 461 |
}else if (guName.equalsIgnoreCase("Tyrrhenian Sea")){ return uuidTyrrhenianSea; |
458 | 462 |
|
463 |
}else if (guName.equalsIgnoreCase("Afghanistan")){ return uuidAfghanistan; |
|
459 | 464 |
}else if (guName.equalsIgnoreCase("Alboran Sea")){ return uuidAlboranSea; |
460 | 465 |
}else if (guName.equalsIgnoreCase("Algeria")){ return uuidAlgeria; |
461 | 466 |
}else if (guName.equalsIgnoreCase("Angola")){ return uuidAngola; |
462 |
}else if (guName.equalsIgnoreCase("Australian Exclusive Economic Zone")){ return uuidAustralianExclusiveEconomicZone; |
|
467 |
}else if (guName.equalsIgnoreCase("Arctic Ocean")){ return uuidArcticOcean; |
|
468 |
}else if (guName.equalsIgnoreCase("Australian Exclusive Economic Zone")){ return uuidAustralianExclusiveEconomicZone; |
|
463 | 469 |
}else if (guName.equalsIgnoreCase("Bahamas")){ return uuidBahamas; |
464 | 470 |
}else if (guName.equalsIgnoreCase("Balearic Sea")){ return uuidBalearicSea; |
465 | 471 |
}else if (guName.equalsIgnoreCase("Belgium")){ return uuidBelgium; |
... | ... | |
482 | 488 |
}else if (guName.equalsIgnoreCase("France")){ return uuidFrance; |
483 | 489 |
}else if (guName.equalsIgnoreCase("Ghana")){ return uuidGhana; |
484 | 490 |
}else if (guName.equalsIgnoreCase("Greece")){ return uuidGreece; |
485 |
}else if (guName.equalsIgnoreCase("Gulf of Bothnia")){ return uuidGulfOfBothnia; |
|
491 |
}else if (guName.equalsIgnoreCase("Germany")){ return uuidGermany; |
|
492 |
}else if (guName.equalsIgnoreCase("Gulf of Bothnia")){ return uuidGulfOfBothnia; |
|
486 | 493 |
}else if (guName.equalsIgnoreCase("Gulf of Finland")){ return uuidGulfOfFinland; |
487 | 494 |
}else if (guName.equalsIgnoreCase("Gulf of Guinea")){ return uuidGulfOfGuinea; |
488 | 495 |
}else if (guName.equalsIgnoreCase("Gulf of Mexico")){ return uuidGulfOfMexico; |
... | ... | |
501 | 508 |
}else if (guName.equalsIgnoreCase("Mediterranean Sea - Eastern Basin")){ return uuidMediterraneanSea_EasternBasin; |
502 | 509 |
}else if (guName.equalsIgnoreCase("Mediterranean Sea - Western Basin")){ return uuidMediterraneanSea_WesternBasin; |
503 | 510 |
}else if (guName.equalsIgnoreCase("Mexico")){ return uuidMexico; |
504 |
}else if (guName.equalsIgnoreCase("Morocco")){ return uuidMorocco; |
|
511 |
}else if (guName.equalsIgnoreCase("Mongolia")){ return uuidMongolia; |
|
512 |
}else if (guName.equalsIgnoreCase("Morocco")){ return uuidMorocco; |
|
505 | 513 |
}else if (guName.equalsIgnoreCase("Netherlands")){ return uuidNetherlands; |
506 | 514 |
}else if (guName.equalsIgnoreCase("New Zealand")){ return uuidNewZealand; |
507 | 515 |
}else if (guName.equalsIgnoreCase("New Zealand Exclusive Economic Zone")){ return uuidNewZealandExclusiveEconomicZone; |
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/out/PesiTransformer.java | ||
---|---|---|
538 | 538 |
private static int AREA_NORTH_SEA = 151; |
539 | 539 |
private static int AREA_BALTIC_SEA = 152; |
540 | 540 |
private static int AREA_BLACK_SEA = 153; |
541 |
private static int AREA_BARENTS_SEA = 154; |
|
541 |
private static int AREA_BARENTSZ_SEA = 154;
|
|
542 | 542 |
private static int AREA_CASPIAN_SEA = 155; |
543 | 543 |
private static int AREA_PORTUGUESE_EXCLUSIVE_ECONOMIC_ZONE = 156; |
544 | 544 |
private static int AREA_BELGIAN_EXCLUSIVE_ECONOMIC_ZONE = 157; |
... | ... | |
1298 | 1298 |
else if (uuidArea.equals(ErmsTransformer.uuidBalticSea)) { return AREA_BALTIC_SEA; } |
1299 | 1299 |
else if (//(namedArea.getRepresentation(Language.DEFAULT()).getAbbreviatedLabel()).equals("BLS") || /carefull: NPE! |
1300 | 1300 |
(uuidArea.equals(ErmsTransformer.uuidBlackSea))) { return AREA_BLACK_SEA; } // abbreviated label missing |
1301 |
else if (uuidArea.equals(ErmsTransformer.uuidBarentsSea)) { return AREA_BARENTS_SEA; }
|
|
1301 |
else if (uuidArea.equals(ErmsTransformer.uuidBarentszSea)) { return AREA_BARENTSZ_SEA; }
|
|
1302 | 1302 |
else if (//(namedArea.getRepresentation(Language.DEFAULT()).getAbbreviatedLabel()).equals("CAS") || /carefull: NPE! |
1303 | 1303 |
(uuidArea.equals(ErmsTransformer.uuidCaspianSea))) { return AREA_CASPIAN_SEA; } // abbreviated label missing |
1304 | 1304 |
else if (uuidArea.equals(ErmsTransformer.uuidPortugueseExclusiveEconomicZone)) { return AREA_PORTUGUESE_EXCLUSIVE_ECONOMIC_ZONE; } |
... | ... | |
1323 | 1323 |
else if (uuidArea.equals(ErmsTransformer.uuidSkagerrak)) { return AREA_SKAGERRAK; } |
1324 | 1324 |
else if (uuidArea.equals(ErmsTransformer.uuidTunisianExclusiveEconomicZone)) { return AREA_TUNISIAN_EXCLUSIVE_ECONOMIC_ZONE; } |
1325 | 1325 |
else if (uuidArea.equals(ErmsTransformer.uuidWaddenSea)) { return AREA_WADDEN_SEA; } |
1326 |
else if (uuidArea.equals(ErmsTransformer.uuidBeltSea)) { return AREA_BELT_SEA; } |
|
1326 |
else if (uuidArea.equals(ErmsTransformer.uuidBaeltSea)) { return AREA_BELT_SEA; }
|
|
1327 | 1327 |
else if (uuidArea.equals(ErmsTransformer.uuidMarmaraSea)) { return AREA_MARMARA_SEA; } |
1328 | 1328 |
else if (uuidArea.equals(ErmsTransformer.uuidSeaofAzov)) { return AREA_SEA_OF_AZOV; } |
1329 | 1329 |
else if (uuidArea.equals(ErmsTransformer.uuidAegeanSea)) { return AREA_AEGEAN_SEA; } |
... | ... | |
1345 | 1345 |
else if (uuidArea.equals(ErmsTransformer.uuidTurkishExclusiveEconomicZone)) { return AREA_TURKISH_EXCLUSIVE_ECONOMIC_ZONE; } |
1346 | 1346 |
else if (uuidArea.equals(ErmsTransformer.uuidDanishExclusiveEconomicZone)) { return AREA_DANISH_EXCLUSIVE_ECONOMIC_ZONE; } |
1347 | 1347 |
|
1348 |
else if (uuidArea.equals(ErmsTransformer.uuidAlboranSea)) { return 219; } |
|
1348 |
else if (uuidArea.equals(ErmsTransformer.uuidAfghanistan)) { return 297; } |
|
1349 |
else if (uuidArea.equals(ErmsTransformer.uuidAlboranSea)) { return 219; } |
|
1349 | 1350 |
else if (uuidArea.equals(ErmsTransformer.uuidAlgeria)) { return 220; } |
1350 | 1351 |
else if (uuidArea.equals(ErmsTransformer.uuidAngola)) { return 221; } |
1351 |
else if (uuidArea.equals(ErmsTransformer.uuidAustralianExclusiveEconomicZone)) { return 222; } |
|
1352 |
else if (uuidArea.equals(ErmsTransformer.uuidArcticOcean)) { return 296; } |
|
1353 |
else if (uuidArea.equals(ErmsTransformer.uuidAustralianExclusiveEconomicZone)) { return 222; } |
|
1352 | 1354 |
else if (uuidArea.equals(ErmsTransformer.uuidBahamas)) { return 223; } |
1353 | 1355 |
else if (uuidArea.equals(ErmsTransformer.uuidBalearicSea)) { return 224; } |
1354 | 1356 |
else if (uuidArea.equals(ErmsTransformer.uuidBelgium)) { return 225; } |
... | ... | |
1371 | 1373 |
else if (uuidArea.equals(ErmsTransformer.uuidFrance)) { return 240; } |
1372 | 1374 |
else if (uuidArea.equals(ErmsTransformer.uuidGhana)) { return 241; } |
1373 | 1375 |
else if (uuidArea.equals(ErmsTransformer.uuidGreece)) { return 242; } |
1374 |
else if (uuidArea.equals(ErmsTransformer.uuidGreekExclusiveEconomicZone)) { return AREA_GREEK_EXCLUSIVE_ECONOMIC_ZONE; } |
|
1376 |
else if (uuidArea.equals(ErmsTransformer.uuidGermany)) { return 298; } |
|
1377 |
else if (uuidArea.equals(ErmsTransformer.uuidGreekExclusiveEconomicZone)) { return AREA_GREEK_EXCLUSIVE_ECONOMIC_ZONE; } |
|
1375 | 1378 |
else if (uuidArea.equals(ErmsTransformer.uuidGulfOfBothnia)) { return 243; } |
1376 | 1379 |
else if (uuidArea.equals(ErmsTransformer.uuidGulfOfFinland)) { return 244; } |
1377 | 1380 |
else if (uuidArea.equals(ErmsTransformer.uuidGulfOfGuinea)) { return 245; } |
... | ... | |
1390 | 1393 |
else if (uuidArea.equals(ErmsTransformer.uuidMediterraneanSea_EasternBasin)) { return 258; } |
1391 | 1394 |
else if (uuidArea.equals(ErmsTransformer.uuidMediterraneanSea_WesternBasin)) { return 259; } |
1392 | 1395 |
else if (uuidArea.equals(ErmsTransformer.uuidMexico)) { return 260; } |
1393 |
else if (uuidArea.equals(ErmsTransformer.uuidMorocco)) { return 261; } |
|
1396 |
else if (uuidArea.equals(ErmsTransformer.uuidMongolia)) { return 299; } |
|
1397 |
else if (uuidArea.equals(ErmsTransformer.uuidMorocco)) { return 261; } |
|
1394 | 1398 |
else if (uuidArea.equals(ErmsTransformer.uuidNetherlands)) { return 262; } |
1395 | 1399 |
else if (uuidArea.equals(ErmsTransformer.uuidNewZealand)) { return 263; } |
1396 | 1400 |
else if (uuidArea.equals(ErmsTransformer.uuidNewZealandExclusiveEconomicZone)) { return 264; } |
Also available in: Unified diff
ref #1444 some changes due to upgrade to ERMS v2019