Revision 787b3ec2
Added by Andreas MÃ¼ller over 4 years ago
cdmpesi/src/main/java/eu/etaxonomy/cdm/io/pesi/out/PesiTransformer.java  

227  227 
public static String kINGDOM_BACTERIA_STRING = "Bacteria"; 
228  228 
public static String KINGDOM_CHROMISTA_STRING = "Chromista"; 
229  229  
230 
// Animalia Ranks 

231 
public static int Animalia_Kingdom = 10; 

232 
public static int Animalia_Subkingdom = 20; 

233 
public static int Animalia_Infrakingdom = 25; 

234 
public static int Animalia_Superphylum = 28; 

235 
public static int Animalia_Phylum = 30; 

236 
public static int Animalia_Subphylum = 40; 

237 
public static int Animalia_Infraphylum = 45; 

238 
public static int Animalia_Superclass = 50; 

239 
public static int Animalia_Class = 60; 

240 
public static int Animalia_Subclass = 70; 

241 
public static int Animalia_Infraclass = 80; 

242 
public static int Animalia_Subterclass = 85; 

243  
244 
public static int Animalia_Superorder = 90; 

245 
public static int Animalia_Order = 100; 

246 
public static int Animalia_Suborder = 110; 

247 
public static int Animalia_Infraorder = 120; 

248 
public static int Animalia_Parvorder = 122; 

249 
public static int Animalia_Section = 125; 

230 
//ranks all kingdoms 

231 
public static int Kingdom = 10; 

232 
public static int Subkingdom = 20; 

233 
public static int Phylum = 30; //Phylum and Division is same (#8541) according to ICNAFP 

234 
public static int Division = 30; 

235 
public static int Subphylum = 40; //See above comment 

236 
public static int Subdivision = 40; 

237 
public static int Class = 60; 

238 
public static int Subclass = 70; 

239 
public static int Order = 100; 

240 
public static int Suborder = 110; 

241 
public static int Family = 140; 

242 
public static int Subfamily = 150; 

243 
public static int Tribe = 160; 

244 
public static int Subtribe = 170; 

245 
public static int Genus = 180; 

246 
public static int Subgenus = 190; 

247 
public static int Species =220; 

248 
public static int Subspecies = 230; 

249 
public static int Variety = 240; 

250 
public static int Forma = 260; 

251  
252 
//ranks some kingdoms 

253 
public static int Infrakingdom = 25; //2,3,5,7 

254 
public static int Infraphylum = 45; //2,7 

255 
public static int Superclass = 50; //2,5,6,7 

256 
public static int Infraclass = 80; //2,5,6,7 

257 
public static int Superorder = 90; //2,3,5,6,7 

258 
public static int Infraorder = 120; //2,5,6,7 

259 
public static int Superfamily = 130; //2,5,6,7 

260 
public static int Bot_Section = 200; //3,4,7 

261 
public static int Bot_Subsection = 210; //3,4,7 

262 
public static int Subvariety = 250; //2,3,4,7 

263 
public static int Subform = 270; //2,3,4 

264 
public static int Forma_spec = 275; //3,4,5,7 

265  
266 
// Animalia Ranks 

267 
public static int Superphylum = 28; 

268 
public static int Subterclass = 85; 

269 
public static int Parvorder = 122; 

270 
public static int Animalia_Section = 125; 

250  271 
public static int Animalia_Subsection = 127; 
251 
public static int Animalia_Superfamily = 130; 

252 
public static int Animalia_Family = 140; 

253 
public static int Animalia_Subfamily = 150; 

254 
public static int Animalia_Tribe = 160; 

255 
public static int Animalia_Subtribe = 170; 

256 
public static int Animalia_Genus = 180; 

257 
public static int Animalia_Subgenus = 190; 

258 
public static int Animalia_Species =220; 

259 
public static int Animalia_Subspecies = 230; 

260 
public static int Animalia_Natio = 235; 

261 
public static int Animalia_Variety = 240; 

262 
public static int Animalia_Subvariety = 250; 

263 
public static int Animalia_Forma = 260; 

264 
public static int Animalia_Subform = 270; 

272 
public static int Natio = 235; 

265  273  
266  274 
// Plantae Ranks 
267 
public static int Plantae_Kingdom = 10; 

268 
public static int Plantae_Subkingdom = 20; 

269 
public static int Plantae_Infrakingdom = 25; 

270 
public static int Plantae_Phylum = 30; //Phylum and Division is same (#8541) 

271 
public static int Plantae_Division = 30; 

272 
public static int Plantae_Subphylum = 40; 

273 
public static int Plantae_Subdivision = 40; 

274 
public static int Plantae_Class = 60; 

275 
public static int Plantae_Subclass = 70; 

276 
public static int Plantae_Superorder = 90; 

277 
public static int Plantae_Order = 100; 

278 
public static int Plantae_Suborder = 110; 

279 
public static int Plantae_Family = 140; 

280 
public static int Plantae_Subfamily = 150; 

281 
public static int Plantae_Tribe = 160; 

282 
public static int Plantae_Subtribe = 170; 

283 
public static int Plantae_Genus = 180; 

284 
public static int Plantae_Subgenus = 190; 

285 
public static int Plantae_Section = 200; 

286 
public static int Plantae_Subsection = 210; 

287 
public static int Plantae_Series = 212; 

288 
public static int Plantae_Subseries = 214; 

289 
public static int Plantae_Aggregate = 216; 

290 
public static int Plantae_Coll_Species = 218; 

291 
public static int Plantae_Species = 220; 

292 
public static int Plantae_Grex = 225; 

293 
public static int Plantae_Subspecies = 230; 

294 
public static int Plantae_Proles = 232; 

295 
public static int Plantae_Race = 234; 

296 
public static int Plantae_Convarietas = 236; 

297 
public static int Plantae_Variety = 240; 

298 
public static int Plantae_Subvariety = 250; 

299 
public static int Plantae_Forma = 260; 

300 
public static int Plantae_Subforma = 270; 

301 
public static int Plantae_Forma_spec = 275; 

302 
public static int Plantae_Taxa_infragen = 280; 

303 
public static int Plantae_Taxa_infraspec = 285; 

304  
305 
// Fungi Ranks 

306 
public static int Fungi_Kingdom = 10; 

307 
public static int Fungi_Subkingdom = 20; 

308 
public static int Fungi_Division = 30; 

309 
public static int Fungi_Subdivision = 40; 

310 
public static int Fungi_Class = 60; 

311 
public static int Fungi_Subclass = 70; 

312 
public static int Fungi_Order = 100; 

313 
public static int Fungi_Suborder = 110; 

314 
public static int Fungi_Family = 140; 

315 
public static int Fungi_Subfamily = 150; 

316 
public static int Fungi_Tribe = 160; 

317 
public static int Fungi_Subtribe = 170; 

318 
public static int Fungi_Genus = 180; 

319 
public static int Fungi_Subgenus = 190; 

320 
public static int Fungi_Section = 200; 

321 
public static int Fungi_Subsection = 210; 

322 
public static int Fungi_Species = 220; 

323 
public static int Fungi_Subspecies = 230; 

324 
public static int Fungi_Variety = 240; 

325 
public static int Fungi_Subvariety = 250; 

326 
public static int Fungi_Forma = 260; 

327 
public static int Fungi_Subforma = 270; 

328 
public static int Fungi_Forma_spec = 275; 

329  
330 
//Protozoa Ranks 

331 
public static int Protozoa_Kingdom = 10; 

332 
public static int Protozoa_Subkingdom = 20; 

333 
public static int Protozoa_Infrakingdom = 35; 

334 
public static int Protozoa_Phylum = 30; 

335 
public static int Protozoa_Subphylum = 40; 

336 
public static int Protozoa_Superclass = 50; 

337 
public static int Protozoa_Class = 60; 

338 
public static int Protozoa_Subclass = 70; 

339 
public static int Protozoa_Infraclass = 80; 

340 
public static int Protozoa_Superorder = 90; 

341 
public static int Protozoa_Order = 100; 

342 
public static int Protozoa_Suborder = 110; 

343 
public static int Protozoa_Infraorder = 120; 

344 
public static int Protozoa_Superfamily = 130; 

345 
public static int Protozoa_Family = 140; 

346 
public static int Protozoa_Subfamily = 150; 

347 
public static int Protozoa_Tribe = 160; 

348 
public static int Protozoa_Subtribe = 170; 

349 
public static int Protozoa_Genus = 180; 

350 
public static int Protozoa_Subgenus = 190; 

351 
public static int Protozoa_Species = 220; 

352 
public static int Protozoa_Subspecies = 230; 

353 
public static int Protozoa_Variety = 240; 

354 
public static int Protozoa_Forma = 260; 

355  
356 
//Bacteria Ranks 

357 
public static int Bacteria_Kingdom = 10; 

358 
public static int Bacteria_Subkingdom = 20; 

359 
public static int Bacteria_Phylum = 30; 

360 
public static int Bacteria_Subphylum = 40; 

361 
public static int Bacteria_Superclass = 50; 

362 
public static int Bacteria_Class = 60; 

363 
public static int Bacteria_Subclass = 70; 

364 
public static int Bacteria_Infraclass = 80; 

365 
public static int Bacteria_Superorder = 90; 

366 
public static int Bacteria_Order = 100; 

367 
public static int Bacteria_Suborder = 110; 

368 
public static int Bacteria_Infraorder = 120; 

369 
public static int Bacteria_Superfamily = 130; 

370 
public static int Bacteria_Family = 140; 

371 
public static int Bacteria_Subfamily = 150; 

372 
public static int Bacteria_Tribe = 160; 

373 
public static int Bacteria_Subtribe = 170; 

374 
public static int Bacteria_Genus = 180; 

375 
public static int Bacteria_Subgenus = 190; 

376 
public static int Bacteria_Species = 220; 

377 
public static int Bacteria_Subspecies = 230; 

378 
public static int Bacteria_Variety = 240; 

379 
public static int Bacteria_Forma = 260; 

380  
381 
//Chromista Ranks 

382 
public static int Chromista_Kingdom = 10; 

383 
public static int Chromista_Subkingdom = 20; 

384 
public static int Chromista_Infrakingdom = 25; 

385 
public static int Chromista_Phylum = 30; 

386 
public static int Chromista_Subphylum = 40; 

387 
public static int Chromista_Infraphylum = 45; 

388 
public static int Chromista_Superclass = 50; 

389 
public static int Chromista_Class = 60; 

390 
public static int Chromista_Subclass = 70; 

391 
public static int Chromista_Infraclass = 80; 

392 
public static int Chromista_Superorder = 90; 

393 
public static int Chromista_Order = 100; 

394 
public static int Chromista_Suborder = 110; 

395 
public static int Chromista_Infraorder = 120; 

396 
public static int Chromista_Superfamily = 130; 

397 
public static int Chromista_Family = 140; 

398 
public static int Chromista_Subfamily = 150; 

399 
public static int Chromista_Tribe = 160; 

400 
public static int Chromista_Subtribe = 170; 

401 
public static int Chromista_Genus = 180; 

402 
public static int Chromista_Subgenus = 190; 

403 
public static int Chromista_Section = 200; 

404 
public static int Chromista_Subsection = 210; 

405 
public static int Chromista_Species = 220; 

406 
public static int Chromista_Subspecies = 230; 

407 
public static int Chromista_Variety = 240; 

408 
public static int Chromista_Subvariety = 250; 

409 
public static int Chromista_Forma = 260; 

275 
public static int Series = 212; 

276 
public static int Subseries = 214; 

277 
public static int Aggregate = 216; 

278 
public static int Coll_Species = 218; 

279 
public static int Grex = 225; 

280 
public static int Proles = 232; 

281 
public static int Race = 234; 

282 
public static int Convarietas = 236; 

283 
public static int Taxa_infragen = 280; 

284 
public static int Taxa_infraspec = 285; 

285  
410  286  
411  287 
//NoteCategory 
412  288 
public static int NoteCategory_description = 1; 
...  ...  
1618  1494 
return null; 
1619  1495 
}else if (rank.equals(Rank.DOMAIN())){ 
1620  1496 
return KINGDOM_NULL; 
1621 
} 

1497 
}else if (rank.equals(Rank.KINGDOM())) { 

1498 
result = Kingdom; 

1499 
}else if (rank.equals(Rank.SUBKINGDOM())) { 

1500 
result = Subkingdom; 

1501 
} else if (rank.equals(Rank.PHYLUM())) { 

1502 
result = Phylum; 

1503 
}else if (rank.equals(Rank.DIVISION())) { //same as Phylum 

1504 
result = Division; 

1505 
}else if (rank.equals(Rank.SUBPHYLUM())) { 

1506 
result = Subphylum; 

1507 
}else if (rank.equals(Rank.SUBDIVISION())) { //same as Subphylum 

1508 
result = Subdivision; 

1509 
}else if (rank.equals(Rank.CLASS())) { 

1510 
result = Class; 

1511 
} else if (rank.equals(Rank.SUBCLASS())) { 

1512 
result = Subclass; 

1513 
} else if (rank.equals(Rank.ORDER())) { 

1514 
result = Order; 

1515 
} else if (rank.equals(Rank.SUBORDER())) { 

1516 
result = Suborder; 

1517 
} else if (rank.equals(Rank.FAMILY())) { 

1518 
result = Family; 

1519 
} else if (rank.equals(Rank.SUBFAMILY())) { 

1520 
result = Subfamily; 

1521 
} else if (rank.equals(Rank.TRIBE())) { 

1522 
result = Tribe; 

1523 
} else if (rank.equals(Rank.SUBTRIBE())) { 

1524 
result = Subtribe; 

1525 
} else if (rank.equals(Rank.GENUS())) { 

1526 
result = Genus; 

1527 
} else if (rank.equals(Rank.SUBGENUS())) { 

1528 
result = Subgenus; 

1529 
} else if (rank.equals(Rank.SPECIES())) { 

1530 
result = Species; 

1531 
} else if (rank.equals(Rank.SUBSPECIES())) { 

1532 
result = Subspecies; 

1533 
} else if (rank.equals(Rank.VARIETY())) { 

1534 
result = Variety; 

1535 
} else if (rank.equals(Rank.FORM())) { 

1536 
result = Forma; 

1537 
} else 

1622  1538  
1623  1539 
// We differentiate between Animalia and Plantae only for now. 
1624  1540 
if (pesiKingdomId != null && pesiKingdomId.intValue() == KINGDOM_ANIMALIA) { 
1625 
if (rank.equals(Rank.KINGDOM())) { 

1626 
result = Animalia_Kingdom; 

1627 
} else if (rank.equals(Rank.SUBKINGDOM())) { 

1628 
result = Animalia_Subkingdom; 

1629 
} else if (rank.equals(Rank.INFRAKINGDOM())) { 

1630 
result = Animalia_Infrakingdom; 

1631 
} else if (rank.equals(Rank.SUPERPHYLUM())) { 

1632 
result = Animalia_Superphylum; 

1633 
} else if (rank.equals(Rank.PHYLUM())) { 

1634 
result = Animalia_Phylum; 

1635 
} else if (rank.equals(Rank.SUBPHYLUM())) { 

1636 
result = Animalia_Subphylum; 

1637 
} else if (rank.equals(Rank.INFRAPHYLUM())) { 

1638 
result = Animalia_Infraphylum; 

1639 
} else if (rank.equals(Rank.SUPERCLASS())) { 

1640 
result = Animalia_Superclass; 

1641 
} else if (rank.equals(Rank.CLASS())) { 

1642 
result = Animalia_Class; 

1643 
} else if (rank.equals(Rank.SUBCLASS())) { 

1644 
result = Animalia_Subclass; 

1645 
} else if (rank.equals(Rank.INFRACLASS())) { 

1646 
result = Animalia_Infraclass; 

1647 
} else if (rank.getUuid().equals(ErmsTransformer.uuidRankSubterclass)) { 

1648 
result = Animalia_Subterclass; 

1649 
} else if (rank.equals(Rank.SUPERORDER())) { 

1650 
result = Animalia_Superorder; 

1651 
} else if (rank.equals(Rank.ORDER())) { 

1652 
result = Animalia_Order; 

1653 
} else if (rank.equals(Rank.SUBORDER())) { 

1654 
result = Animalia_Suborder; 

1655 
} else if (rank.equals(Rank.INFRAORDER())) { 

1656 
result = Animalia_Infraorder; 

1657 
} else if (rank.getUuid().equals(ErmsTransformer.uuidRankParvorder)) { 

1658 
result = Animalia_Parvorder; 

1659 
} else if (rank.equals(Rank.SECTION_ZOOLOGY())) { 

1660 
result = Animalia_Section; 

1661 
} else if (rank.equals(Rank.SUBSECTION_ZOOLOGY())) { 

1662 
result = Animalia_Subsection; 

1663 
} else if (rank.equals(Rank.SUPERFAMILY())) { 

1664 
result = Animalia_Superfamily; 

1665 
} else if (rank.equals(Rank.FAMILY())) { 

1666 
result = Animalia_Family; 

1667 
} else if (rank.equals(Rank.SUBFAMILY())) { 

1668 
result = Animalia_Subfamily; 

1669 
} else if (rank.equals(Rank.TRIBE())) { 

1670 
result = Animalia_Tribe; 

1671 
} else if (rank.equals(Rank.SUBTRIBE())) { 

1672 
result = Animalia_Subtribe; 

1673 
} else if (rank.equals(Rank.GENUS())) { 

1674 
result = Animalia_Genus; 

1675 
} else if (rank.equals(Rank.SUBGENUS())) { 

1676 
result = Animalia_Subgenus; 

1677 
} else if (rank.equals(Rank.SPECIES())) { 

1678 
result = Animalia_Species; 

1679 
} else if (rank.equals(Rank.SUBSPECIES())) { 

1680 
result = Animalia_Subspecies; 

1681 
// } else if (rank.equals(Rank.)) { // not yet specified 

1682 
// result = Animalia_Natio; 

1683 
} else if (rank.equals(Rank.VARIETY())) { 

1684 
result = Animalia_Variety; 

1685 
} else if (rank.equals(Rank.SUBVARIETY())) { 

1686 
result = Animalia_Subvariety; 

1687 
} else if (rank.equals(Rank.FORM())) { 

1688 
result = Animalia_Forma; 

1689 
} else if (rank.equals(Rank.SUBFORM())) { 

1690 
result = Animalia_Subform; 

1541 
if (rank.equals(Rank.INFRAKINGDOM())) {result = Infrakingdom; 

1542 
} else if (rank.equals(Rank.SUPERPHYLUM())) {result = Superphylum; 

1543 
} else if (rank.equals(Rank.INFRAPHYLUM())) {result = Infraphylum; 

1544 
} else if (rank.equals(Rank.SUPERCLASS())) {result = Superclass; 

1545 
} else if (rank.equals(Rank.INFRACLASS())) {result = Infraclass; 

1546 
} else if (rank.getUuid().equals(ErmsTransformer.uuidRankSubterclass)) {result = Subterclass; 

1547 
} else if (rank.equals(Rank.SUPERORDER())) {result = Superorder; 

1548 
} else if (rank.equals(Rank.INFRAORDER())) {result = Infraorder; 

1549 
} else if (rank.getUuid().equals(ErmsTransformer.uuidRankParvorder)) {result = Parvorder; 

1550 
} else if (rank.equals(Rank.SECTION_ZOOLOGY())) {result = Animalia_Section; 

1551 
} else if (rank.equals(Rank.SUBSECTION_ZOOLOGY())) {result = Animalia_Subsection; 

1552 
} else if (rank.equals(Rank.SUPERFAMILY())) {result = Superfamily; 

1553 
} else if (rank.equals(Rank.NATIO())) {result = Natio; 

1554 
} else if (rank.equals(Rank.SUBVARIETY())) {result = Subvariety; 

1555 
} else if (rank.equals(Rank.SUBFORM())) {result = Subform; 

1691  1556 
} else { 
1692  1557 
//TODO Exception 
1693  1558 
logger.warn("Rank for Kingdom Animalia not yet supported in CDM: "+ rank.getLabel()); 
1694  1559 
return null; 
1695  1560 
} 
1696  1561 
} else if (pesiKingdomId != null && pesiKingdomId.intValue() == KINGDOM_PLANTAE) { 
1697 
if (rank.equals(Rank.KINGDOM())) { 

1698 
result = Plantae_Kingdom; 

1699 
} else if (rank.equals(Rank.INFRAKINGDOM())) { 

1700 
result = Plantae_Infrakingdom; 

1701 
} else if (rank.equals(Rank.SUBKINGDOM())) { 

1702 
result = Plantae_Subkingdom; 

1703 
}else if (rank.equals(Rank.PHYLUM())) { //is same as Division (#8541) 

1704 
result = Plantae_Phylum; 

1705 
}else if (rank.equals(Rank.DIVISION())) { 

1706 
result = Plantae_Division; 

1707 
} else if (rank.equals(Rank.SUBPHYLUM())) { 

1708 
result = Plantae_Subphylum; 

1709 
} else if (rank.equals(Rank.SUBDIVISION())) { 

1710 
result = Plantae_Subdivision; 

1711 
} else if (rank.equals(Rank.CLASS())) { 

1712 
result = Plantae_Class; 

1713 
} else if (rank.equals(Rank.SUBCLASS())) { 

1714 
result = Plantae_Subclass; 

1715 
} else if (rank.equals(Rank.SUPERORDER())) { 

1716 
result = Plantae_Superorder; 

1717 
} else if (rank.equals(Rank.ORDER())) { 

1718 
result = Plantae_Order; 

1719 
} else if (rank.equals(Rank.SUBORDER())) { 

1720 
result = Plantae_Suborder; 

1721 
} else if (rank.equals(Rank.FAMILY())) { 

1722 
result = Plantae_Family; 

1723 
} else if (rank.equals(Rank.SUBFAMILY())) { 

1724 
result = Plantae_Subfamily; 

1725 
} else if (rank.equals(Rank.TRIBE())) { 

1726 
result = Plantae_Tribe; 

1727 
} else if (rank.equals(Rank.SUBTRIBE())) { 

1728 
result = Plantae_Subtribe; 

1729 
} else if (rank.equals(Rank.GENUS())) { 

1730 
result = Plantae_Genus; 

1731 
} else if (rank.equals(Rank.SUBGENUS())) { 

1732 
result = Plantae_Subgenus; 

1733 
} else if (rank.equals(Rank.SECTION_BOTANY())) { 

1734 
result = Plantae_Section; 

1735 
} else if (rank.equals(Rank.SUBSECTION_BOTANY())) { 

1736 
result = Plantae_Subsection; 

1737 
} else if (rank.equals(Rank.SERIES())) { 

1738 
result = Plantae_Series; 

1739 
} else if (rank.equals(Rank.SUBSERIES())) { 

1740 
result = Plantae_Subseries; 

1741 
} else if (rank.equals(Rank.SPECIESAGGREGATE() )) { 

1742 
result = Plantae_Aggregate; 

1562 
if (rank.equals(Rank.INFRAKINGDOM())) {result = Infrakingdom; 

1563 
} else if (rank.equals(Rank.SUPERORDER())) {result = Superorder; 

1564 
} else if (rank.equals(Rank.SECTION_BOTANY())) {result = Bot_Section; 

1565 
} else if (rank.equals(Rank.SUBSECTION_BOTANY())) {result = Bot_Subsection; 

1566 
} else if (rank.equals(Rank.SERIES())) {result = Series; 

1567 
} else if (rank.equals(Rank.SUBSERIES())) {result = Subseries; 

1568 
} else if (rank.equals(Rank.SPECIESAGGREGATE() )) {result = Aggregate; 

1743  1569 
} else if (rank.equals(Rank.SPECIESGROUP())) { 
1744  1570 
logger.warn("Rank Species Group not yet implemented"); 
1745  1571 
result = null; 
1746 
} else if (rank.getUuid().equals(Rank.uuidCollSpecies)) { 

1747 
result = Plantae_Coll_Species; 

1748 
} else if (rank.equals(Rank.SPECIES())) { 

1749 
result = Plantae_Species; 

1750 
} else if (rank.equals(Rank.SUBSPECIES())) { 

1751 
result = Plantae_Subspecies; 

1752 
} else if (rank.equals(Rank.GREX())) { 

1753 
result = Plantae_Grex; 

1754 
} else if (rank.getUuid().equals(Rank.uuidProles) ) { 

1755 
result = Plantae_Proles; 

1756 
} else if (rank.getUuid().equals(Rank.uuidRace)) { 

1757 
result = Plantae_Race; 

1758 
} else if (rank.equals(Rank.CONVAR())) { 

1759 
result = Plantae_Convarietas; 

1760 
} else if (rank.equals(Rank.VARIETY())) { 

1761 
result = Plantae_Variety; 

1762 
} else if (rank.equals(Rank.SUBVARIETY())) { 

1763 
result = Plantae_Subvariety; 

1764 
} else if (rank.equals(Rank.FORM())) { 

1765 
result = Plantae_Forma; 

1766 
} else if (rank.equals(Rank.SUBFORM())) { 

1767 
result = Plantae_Subforma; 

1768 
// } else if (rank.equals(Rank.)) { // not yet specified 

1769 
// result = Plantae_Forma_spec; 

1770 
} else if (rank.equals(Rank.INFRAGENERICTAXON())) { 

1771 
result = Plantae_Taxa_infragen; 

1772 
} else if (rank.equals(Rank.INFRASPECIFICTAXON())) { 

1773 
result = Plantae_Taxa_infraspec; 

1572 
} else if (rank.getUuid().equals(Rank.uuidCollSpecies)) {result = Coll_Species; 

1573 
} else if (rank.equals(Rank.GREX())) {result = Grex; 

1574 
} else if (rank.getUuid().equals(Rank.uuidProles) ) {result = Proles; 

1575 
} else if (rank.getUuid().equals(Rank.uuidRace)) {result = Race; 

1576 
} else if (rank.equals(Rank.CONVAR())) {result = Convarietas; 

1577 
} else if (rank.equals(Rank.SUBVARIETY())) {result = Subvariety; 

1578 
} else if (rank.equals(Rank.SUBFORM())) {result = Subform; 

1579 
} else if (rank.equals(Rank.SPECIALFORM())) {result = Forma_spec; 

1580 
} else if (rank.equals(Rank.INFRAGENERICTAXON())) {result = Taxa_infragen; 

1581 
} else if (rank.equals(Rank.INFRASPECIFICTAXON())) {result = Taxa_infraspec; 

1774  1582 
} else { 
1775  1583 
//TODO Exception 
1776  1584 
logger.warn("Rank for Kingdom Plantae not yet supported in CDM: "+ rank.getLabel()); 
1777  1585 
return null; 
1778  1586 
} 
1587 
} else if (pesiKingdomId != null && pesiKingdomId.intValue() == KINGDOM_FUNGI) { 

1588 
if (rank.equals(Rank.SECTION_BOTANY())) { result = Bot_Section;} 

1589 
else if (rank.equals(Rank.SUBSECTION_BOTANY())) { result = Bot_Subsection;} 

1590 
else if (rank.equals(Rank.SUBVARIETY())) { result = Subvariety; } 

1591 
else if (rank.equals(Rank.SUBFORM())) { result = Subform;} 

1592 
else { 

1593 
//TODO Exception 

1594 
logger.warn("Rank for Kingdom Fungi not yet supported in CDM: "+ rank.getLabel()); 

1595 
return null; 

1596 
} 

1779  1597 
}else if (pesiKingdomId != null && pesiKingdomId.intValue() == KINGDOM_PROTOZOA) { 
1780 
if (rank.equals(Rank.KINGDOM())) { result = Protozoa_Kingdom; } 

1781 
else if (rank.equals(Rank.SUBKINGDOM())) { result = Protozoa_Subkingdom; } 

1782 
else if (rank.equals(Rank.INFRAKINGDOM())) { result = Protozoa_Infrakingdom; } 

1783 
else if (rank.equals(Rank.PHYLUM())) { result = Protozoa_Phylum; } 

1784 
else if (rank.equals(Rank.SUBPHYLUM())) { result = Protozoa_Subphylum; } 

1785 
else if (rank.equals(Rank.CLASS())) { result = Protozoa_Class; } 

1786 
else if (rank.equals(Rank.SUBCLASS())) { result = Protozoa_Subclass; } 

1787 
else if (rank.equals(Rank.ORDER())) { result = Protozoa_Order; } 

1788 
else if (rank.equals(Rank.SUBORDER())) { result = Protozoa_Suborder; } 

1789 
else if (rank.equals(Rank.INFRAORDER())) { result = Protozoa_Infraorder; } 

1790 
else if (rank.equals(Rank.SUPERFAMILY())) { result = Protozoa_Superfamily; } 

1791 
else if (rank.equals(Rank.FAMILY())) { result = Protozoa_Family; } 

1792 
else if (rank.equals(Rank.SUBFAMILY())) { result = Protozoa_Subfamily; } 

1793 
else if (rank.equals(Rank.TRIBE())) { result = Protozoa_Tribe; } 

1794 
else if (rank.equals(Rank.SUBTRIBE())) { result = Protozoa_Subtribe; } 

1795 
else if (rank.equals(Rank.GENUS())) { result = Protozoa_Genus; } 

1796 
else if (rank.equals(Rank.SUBGENUS())) { result = Protozoa_Subgenus; } 

1797 
else if (rank.equals(Rank.SPECIES())) { result = Protozoa_Species; } 

1798 
else if (rank.equals(Rank.SUBSPECIES())) { result = Protozoa_Subspecies; } 

1799 
else if (rank.equals(Rank.VARIETY())) { result = Protozoa_Variety; } 

1800 
else if (rank.equals(Rank.FORM())) { result = Protozoa_Forma; } 

1598 
if (rank.equals(Rank.INFRAKINGDOM())) { result = Infrakingdom; } 

1599 
else if (rank.equals(Rank.SUPERCLASS())) { result = Superclass; } 

1600 
else if (rank.equals(Rank.INFRACLASS())) { result = Infraclass; } 

1601 
else if (rank.equals(Rank.SUPERORDER())) { result = Superorder; } 

1602 
else if (rank.equals(Rank.INFRAORDER())) { result = Infraorder; } 

1603 
else if (rank.equals(Rank.SUPERFAMILY())) { result = Superfamily; } 

1801  1604 
else { 
1802  1605 
//TODO Exception 
1803  1606 
logger.warn("Rank for Kingdom Protozoa not yet supported in CDM: "+ rank.getLabel()); 
1804  1607 
return null; 
1805  1608 
} 
1806 
} else if (pesiKingdomId != null && pesiKingdomId.intValue() == KINGDOM_FUNGI) { 

1807 
if (rank.equals(Rank.KINGDOM())) { result = Fungi_Kingdom; } 

1808 
else if (rank.equals(Rank.SUBKINGDOM())) { result = Fungi_Subkingdom; } 

1809 
else if (rank.equals(Rank.PHYLUM())) { result = Fungi_Division;} //Phylum and Division is same in ICNAFP 

1810 
else if (rank.equals(Rank.DIVISION())) { result = Fungi_Division;} 

1811 
else if (rank.equals(Rank.SUBDIVISION())) { result = Fungi_Subdivision;} 

1812 
else if (rank.equals(Rank.CLASS())) { result = Fungi_Class; } 

1813 
else if (rank.equals(Rank.SUBCLASS())) { result = Fungi_Subclass; } 

1814 
else if (rank.equals(Rank.ORDER())) { result = Fungi_Order; } 

1815 
else if (rank.equals(Rank.SUBORDER())) { result = Fungi_Suborder; } 

1816 
else if (rank.equals(Rank.FAMILY())) { result = Fungi_Family; } 

1817 
else if (rank.equals(Rank.SUBFAMILY())) { result = Fungi_Subfamily; } 

1818 
else if (rank.equals(Rank.TRIBE())) { result = Fungi_Tribe; } 

1819 
else if (rank.equals(Rank.SUBTRIBE())) { result = Fungi_Subtribe; } 

1820 
else if (rank.equals(Rank.GENUS())) { result = Fungi_Genus; } 

1821 
else if (rank.equals(Rank.SUBGENUS())) { result = Fungi_Subgenus; } 

1822 
else if (rank.equals(Rank.SECTION_BOTANY())) { result = Fungi_Section;} 

1823 
else if (rank.equals(Rank.SUBSECTION_BOTANY())) { result = Fungi_Subsection;} 

1824 
else if (rank.equals(Rank.SPECIES())) { result = Fungi_Species; } 

1825 
else if (rank.equals(Rank.SUBSPECIES())) { result = Fungi_Subspecies; } 

1826 
else if (rank.equals(Rank.VARIETY())) { result = Fungi_Variety; } 

1827 
else if (rank.equals(Rank.SUBVARIETY())) { result = Fungi_Subvariety; } 

1828 
else if (rank.equals(Rank.FORM())) { result = Fungi_Forma; } 

1829 
else if (rank.equals(Rank.SUBFORM())) { result = Fungi_Subforma;} 

1830 
else { 

1831 
//TODO Exception 

1832 
logger.warn("Rank for Kingdom Fungi not yet supported in CDM: "+ rank.getLabel()); 

1833 
return null; 

1834 
} 

1835  1609 
} else if (pesiKingdomId != null && pesiKingdomId.intValue() == KINGDOM_BACTERIA) { 
1836 
if (rank.equals(Rank.KINGDOM())) { result = Bacteria_Kingdom; } 

1837 
else if (rank.equals(Rank.SUBKINGDOM())) { result = Bacteria_Subkingdom; } 

1838 
else if (rank.equals(Rank.PHYLUM())) { result = Bacteria_Phylum; } 

1839 
else if (rank.equals(Rank.SUBPHYLUM())) { result = Bacteria_Subphylum; } 

1840 
else if (rank.equals(Rank.SUPERCLASS())) { result = Bacteria_Superclass; } 

1841 
else if (rank.equals(Rank.CLASS())) { result = Bacteria_Class; } 

1842 
else if (rank.equals(Rank.SUBCLASS())) { result = Bacteria_Subclass; } 

1843 
else if (rank.equals(Rank.INFRACLASS())) { result = Bacteria_Infraclass; } 

1844 
else if (rank.equals(Rank.SUPERORDER())) { result = Bacteria_Superorder; } 

1845 
else if (rank.equals(Rank.ORDER())) { result = Bacteria_Order; } 

1846 
else if (rank.equals(Rank.SUBORDER())) { result = Bacteria_Suborder; } 

1847 
else if (rank.equals(Rank.INFRAORDER())) { result = Bacteria_Infraorder; } 

1848 
else if (rank.equals(Rank.SUPERFAMILY())) { result = Bacteria_Superfamily; } 

1849 
else if (rank.equals(Rank.FAMILY())) { result = Bacteria_Family; } 

1850 
else if (rank.equals(Rank.SUBFAMILY())) { result = Bacteria_Subfamily; } 

1851 
else if (rank.equals(Rank.TRIBE())) { result = Bacteria_Tribe; } 

1852 
else if (rank.equals(Rank.SUBTRIBE())) { result = Bacteria_Subtribe; } 

1853 
else if (rank.equals(Rank.GENUS())) { result = Bacteria_Genus; } 

1854 
else if (rank.equals(Rank.SUBGENUS())) { result = Bacteria_Subgenus; } 

1855 
else if (rank.equals(Rank.SPECIES())) { result = Bacteria_Species; } 

1856 
else if (rank.equals(Rank.SUBSPECIES())) { result = Bacteria_Subspecies; } 

1857 
else if (rank.equals(Rank.VARIETY())) { result = Bacteria_Variety; } 

1858 
else if (rank.equals(Rank.FORM())) { result = Bacteria_Forma; } 

1610 
if (rank.equals(Rank.SUPERCLASS())) { result = Superclass; } 

1611 
else if (rank.equals(Rank.INFRACLASS())) { result = Infraclass; } 

1612 
else if (rank.equals(Rank.SUPERORDER())) { result = Superorder; } 

1613 
else if (rank.equals(Rank.INFRAORDER())) { result = Infraorder; } 

1614 
else if (rank.equals(Rank.SUPERFAMILY())) { result = Superfamily; } 

1859  1615 
else { 
1860  1616 
//TODO Exception 
1861  1617 
logger.warn("Rank for Kingdom Bacteria not yet supported in CDM: "+ rank.getLabel()); 
1862  1618 
return null; 
1863  1619 
} 
1864  1620 
}else if (pesiKingdomId != null && pesiKingdomId.intValue() == KINGDOM_CHROMISTA) { 
1865 
if (rank.equals(Rank.KINGDOM())) { result = Chromista_Kingdom; } 

1866 
else if (rank.equals(Rank.SUBKINGDOM())) { result = Chromista_Subkingdom; } 

1867 
else if (rank.equals(Rank.INFRAKINGDOM())) { result = Chromista_Infrakingdom; } 

1868 
else if (rank.equals(Rank.PHYLUM())) { result = Chromista_Phylum; } 

1869 
else if (rank.equals(Rank.SUBPHYLUM())) { result = Chromista_Subphylum; } 

1870 
else if (rank.equals(Rank.INFRAPHYLUM())) { result = Chromista_Infraphylum; } 

1871 
else if (rank.equals(Rank.SUPERCLASS())) { result = Chromista_Superclass; } 

1872 
else if (rank.equals(Rank.CLASS())) { result = Chromista_Class; } 

1873 
else if (rank.equals(Rank.SUBCLASS())) { result = Chromista_Subclass; } 

1874 
else if (rank.equals(Rank.SUPERORDER())) { result = Chromista_Superorder; } 

1875 
else if (rank.equals(Rank.ORDER())) { result = Chromista_Order; } 

1876 
else if (rank.equals(Rank.SUBORDER())) { result = Chromista_Suborder; } 

1877 
else if (rank.equals(Rank.INFRAORDER())) { result = Chromista_Infraorder; } 

1878 
else if (rank.equals(Rank.SUPERFAMILY())) { result = Chromista_Superfamily; } 

1879 
else if (rank.equals(Rank.FAMILY())) { result = Chromista_Family; } 

1880 
else if (rank.equals(Rank.SUBFAMILY())) { result = Chromista_Subfamily; } 

1881 
else if (rank.equals(Rank.TRIBE())) { result = Chromista_Tribe; } 

1882 
else if (rank.equals(Rank.SUBTRIBE())) { result = Chromista_Subtribe; } 

1883 
else if (rank.equals(Rank.GENUS())) { result = Chromista_Genus; } 

1884 
else if (rank.equals(Rank.SUBGENUS())) { result = Chromista_Subgenus; } 

1885 
else if (rank.equals(Rank.SECTION_BOTANY())) { result = Chromista_Section;} 

1886 
else if (rank.equals(Rank.SUBSECTION_BOTANY())) { result = Chromista_Subsection;} 

1887 
else if (rank.equals(Rank.SPECIES())) { result = Chromista_Species; } 

1888 
else if (rank.equals(Rank.SUBSPECIES())) { result = Chromista_Subspecies; } 

1889 
else if (rank.equals(Rank.VARIETY())) { result = Chromista_Variety; } 

1890 
else if (rank.equals(Rank.SUBVARIETY())) { result = Chromista_Subvariety; } 

1891 
else if (rank.equals(Rank.FORM())) { result = Chromista_Forma; } 

1621 
if (rank.equals(Rank.INFRAKINGDOM())) { result = Infrakingdom; } 

1622 
else if (rank.equals(Rank.INFRAPHYLUM())) { result = Infraphylum; } 

1623 
else if (rank.equals(Rank.SUPERCLASS())) { result = Superclass; } 

1624 
else if (rank.equals(Rank.INFRACLASS())) { result = Infraclass; } 

1625 
else if (rank.equals(Rank.SUPERORDER())) { result = Superorder; } 

1626 
else if (rank.equals(Rank.INFRAORDER())) { result = Infraorder; } 

1627 
else if (rank.equals(Rank.SUPERFAMILY())) { result = Superfamily; } 

1628 
else if (rank.equals(Rank.SECTION_BOTANY())) { result = Bot_Section;} 

1629 
else if (rank.equals(Rank.SUBSECTION_BOTANY())) { result = Bot_Subsection;} 

1630 
else if (rank.equals(Rank.SUBVARIETY())) { result = Subvariety; } 

1892  1631 
else { 
1893  1632 
//TODO Exception 
1894  1633 
logger.warn("Rank for Kingdom Chromista not yet supported in CDM: "+ rank.getLabel()); 
Also available in: Unified diff
ref #8509 cleanup rank handling in PesiTranformer