Revision b029bf34
Added by Katja Luther over 3 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/cdmLight/CdmLightClassificationExport.java | ||
---|---|---|
1240 | 1240 |
for (TaggedText taggedText: taggedName){ |
1241 | 1241 |
if (taggedText.getType().equals(TagEnum.name)){ |
1242 | 1242 |
fullTitleWithHtml += "<i>" + taggedText.getText() + "</i> "; |
1243 |
}else if (taggedText.getType().equals(TagEnum.separator)){ |
|
1244 |
fullTitleWithHtml = fullTitleWithHtml.trim() + taggedText.getText() ; |
|
1243 | 1245 |
}else{ |
1244 | 1246 |
fullTitleWithHtml += taggedText.getText() + " "; |
1245 | 1247 |
} |
... | ... | |
1603 | 1605 |
String typifiedNamesWithSecString = ""; |
1604 | 1606 |
String typifiedNamesWithoutAccepted = ""; |
1605 | 1607 |
String typifiedNamesWithoutAcceptedWithSec = ""; |
1608 |
int index = 0; |
|
1606 | 1609 |
for (TaxonName name : typifiedNames) { |
1607 | 1610 |
// Concatenated output string for homotypic group (names and |
1608 | 1611 |
// citations) + status + some name relations (e.g. “non”) |
... | ... | |
1612 | 1615 |
|
1613 | 1616 |
String sec = ""; |
1614 | 1617 |
String nameString = name.getFullTitleCache(); |
1618 |
|
|
1615 | 1619 |
if (state.getConfig().isAddHTML()){ |
1616 | 1620 |
nameString = createNameWithItalics(name.getTaggedFullTitle()) ; |
1617 | 1621 |
} |
1622 |
|
|
1623 |
if (index > 0){ |
|
1624 |
boolean isInvalid = false; |
|
1625 |
for (NomenclaturalStatus status: name.getStatus()){ |
|
1626 |
if (status.getType().isInvalidType()){ |
|
1627 |
isInvalid = true; |
|
1628 |
break; |
|
1629 |
} |
|
1630 |
} |
|
1631 |
if (isInvalid){ |
|
1632 |
nameString = "\u2212 " + nameString; |
|
1633 |
}else{ |
|
1634 |
nameString = "\u2261 " + nameString; |
|
1635 |
} |
|
1636 |
} |
|
1618 | 1637 |
boolean isAccepted = false; |
1619 | 1638 |
|
1620 | 1639 |
if (taxonBases.size() == 1){ |
... | ... | |
1632 | 1651 |
} |
1633 | 1652 |
|
1634 | 1653 |
// typifiedNamesWithoutAcceptedName += name.getTitleCache() + extractStatusString(state, name, true) + "; "; |
1635 |
typifiedNamesWithoutAccepted += nameString + "; ";
|
|
1636 |
typifiedNamesWithoutAcceptedWithSec += nameString + sec + "; ";
|
|
1654 |
typifiedNamesWithoutAccepted += nameString ; |
|
1655 |
typifiedNamesWithoutAcceptedWithSec += nameString + sec ; |
|
1637 | 1656 |
}else{ |
1638 | 1657 |
sec = ""; |
1639 | 1658 |
if (!(((Taxon)taxonBase).isProparteSynonym() || ((Taxon)taxonBase).isMisapplication())){ |
... | ... | |
1644 | 1663 |
|
1645 | 1664 |
}else{ |
1646 | 1665 |
//there are names used more than once? |
1647 |
state.getResult().addWarning("There are more than one taxonBase for name " + name.getUuid() + " - " + name.getTitleCache() + " it is not possible to decide which syn sec should be used in homotypical group strings"); |
|
1666 |
// state.getResult().addWarning("There are more than one taxonBase for name " + name.getUuid() + " - " + name.getTitleCache() + " it is not possible to decide which syn sec should be used in homotypical group strings");
|
|
1648 | 1667 |
for (TaxonBase tb: taxonBases){ |
1649 | 1668 |
Reference secRef = tb.getSec(); |
1650 | 1669 |
if (secRef != null){ |
... | ... | |
1675 | 1694 |
typifiedNamesWithoutAcceptedWithSec += nameString + sec + "; "; |
1676 | 1695 |
} |
1677 | 1696 |
} |
1678 |
typifiedNamesString += nameString + "; ";
|
|
1679 |
typifiedNamesWithSecString += nameString + sec + "; ";
|
|
1697 |
typifiedNamesString += nameString ; |
|
1698 |
typifiedNamesWithSecString += nameString + sec; |
|
1680 | 1699 |
|
1681 | 1700 |
// typifiedNamesString = typifiedNamesString.substring(0, typifiedNamesString.length() - 2); |
1682 | 1701 |
// typifiedNamesWithSecString = typifiedNamesWithSecString.substring(0, typifiedNamesString.length() - 2); |
... | ... | |
1706 | 1725 |
} else { |
1707 | 1726 |
csvLine[table.getIndex(CdmLightExportTable.HOMOTYPIC_GROUP_WITHOUT_ACCEPTEDWITHSEC)] = ""; |
1708 | 1727 |
} |
1709 |
|
|
1728 |
index++; |
|
1710 | 1729 |
} |
1711 | 1730 |
|
1712 | 1731 |
Set<TypeDesignationBase<?>> typeDesigantionSet = group.getTypeDesignations(); |
Also available in: Unified diff
fix test and cdmlight export with html tags