logger.warn("Parent taxon is null. Missing name parts can not be taken from parent");
return;
}
- INonViralName<?> parentName = parentTaxon.getName();
- INonViralName<?> childName = childTaxon.getName();
+ INonViralName parentName = parentTaxon.getName();
+ INonViralName childName = childTaxon.getName();
fillMissingEpithets(parentName, childName);
}
for (TaxonNode node : result){\r
Taxon taxon = CdmBase.deproxy(node.getTaxon(), Taxon.class);\r
CsvDemoRecord record = assembleRecord(state);\r
- INonViralName<?> name = taxon.getName();\r
+ INonViralName name = taxon.getName();\r
config.setClassificationTitleCache(classification.getTitleCache());\r
if (! this.recordExists(taxon)){\r
handleTaxonBase(record, taxon, name, classification, null, false, false, config, node);\r
for (TaxonNode node : result){\r
Taxon taxon = CdmBase.deproxy(node.getTaxon(), Taxon.class);\r
CsvDemoRecord record = assembleRecord(state);\r
- INonViralName<?> name = taxon.getName();\r
+ INonViralName name = taxon.getName();\r
// Classification classification = node.getClassification();\r
config.setClassificationTitleCache(classification.getTitleCache());\r
if (! this.recordExists(taxon)){\r
// for (Taxon misappliedName : misappliedNames ){\r
//// CsvTaxRecordRedlist record = new CsvTaxRecordRedlist(metaRecord, config);\r
// TaxonRelationshipType relType = TaxonRelationshipType.MISAPPLIED_NAME_FOR();\r
-// INonViralName<?> name = misappliedName.getName();\r
+// INonViralName name = misappliedName.getName();\r
//\r
// if (! this.recordExists(misappliedName)){\r
// handleTaxonBase(record, misappliedName, name, taxon, classification, relType, false, false, config, node);\r
* @param type\r
*/\r
private void handleTaxonBase(CsvDemoRecord record, TaxonBase<?> taxonBase,\r
- INonViralName<?> name, Classification classification,\r
+ INonViralName name, Classification classification,\r
RelationshipTermBase<?> relType, boolean isProParte, boolean isPartial,\r
CsvDemoExportConfigurator config, TaxonNode node) {\r
\r
*/\r
private void handleTaxonomicStatus(\r
CsvDemoRecord record,\r
- INonViralName<?> name,\r
+ INonViralName name,\r
RelationshipTermBase<?> type,\r
boolean isProParte,\r
boolean isPartial) {\r
if (type == null){ // should not happen\r
type = SynonymType.SYNONYM_OF();\r
}\r
- INonViralName<?> name = synonym.getName();\r
+ INonViralName name = synonym.getName();\r
synonymLabels.add(name.getTitleCache());\r
}\r
record.setSynonyms(synonymLabels);\r
for (TaxonNode node : filteredNodes){\r
Taxon taxon = CdmBase.deproxy(node.getTaxon(), Taxon.class);\r
CsvTaxRecordRedlist record = assembleRecord(state);\r
- INonViralName<?> name = taxon.getName();\r
+ INonViralName name = taxon.getName();\r
Classification classification = node.getClassification();\r
config.setClassificationTitleCache(classification.getTitleCache());\r
if (! this.recordExists(taxon)){\r
for (Taxon misappliedName : misappliedNames ){\r
// CsvTaxRecordRedlist record = new CsvTaxRecordRedlist(metaRecord, config);\r
TaxonRelationshipType relType = TaxonRelationshipType.MISAPPLIED_NAME_FOR();\r
- INonViralName<?> name = misappliedName.getName();\r
+ INonViralName name = misappliedName.getName();\r
\r
if (! this.recordExists(misappliedName)){\r
handleTaxonBase(record, misappliedName, name, taxon, classification, relType, false, false, config);\r
* @param type\r
*/\r
private void handleTaxonBase(CsvTaxRecordRedlist record,TaxonBase<?> taxonBase,\r
- INonViralName<?> name, Taxon acceptedTaxon, Classification classification,\r
+ INonViralName name, Taxon acceptedTaxon, Classification classification,\r
RelationshipTermBase<?> relType, boolean isProParte, boolean isPartial,\r
CsvTaxExportConfiguratorRedlist config) {\r
\r
\r
private void handleTaxonomicStatus(\r
CsvTaxRecordRedlist record,\r
- INonViralName<?> name,\r
+ INonViralName name,\r
RelationshipTermBase<?> type,\r
boolean isProParte,\r
boolean isPartial) {\r
if (type == null){ // should not happen\r
type = SynonymType.SYNONYM_OF();\r
}\r
- INonViralName<?> name = synonym.getName();\r
+ INonViralName name = synonym.getName();\r
synonymLabels.add(name.getTitleCache());\r
}\r
record.setSynonyms(synonymLabels);\r
if (isNotBlank(strType)){\r
if (strType.matches("Botanical Protologue")){\r
if (taxon.getName() != null && reference != null && taxon.getName().isInstanceOf(NonViralName.class)){\r
- INonViralName<?> nvn = taxon.getName();\r
+ INonViralName nvn = taxon.getName();\r
nvn.setNomenclaturalReference(reference);\r
isNomRef = true;\r
}else{\r
//if reference equals in author and year we assume that it is the nom ref\r
//this information is usually only available for ICZN names\r
if (taxon.getName() != null && reference != null && taxon.getName().isInstanceOf(NonViralName.class)){\r
- INonViralName<?> nvn = taxon.getName();\r
+ INonViralName nvn = taxon.getName();\r
String taxonAuthor = nvn.getAuthorshipCache();\r
String refAuthor = reference.getAuthorship().getNomenclaturalTitle();\r
Integer combYear = null;\r
\r
//Name relationship\r
//TODO\r
- INonViralName<?> name = taxon.getName();\r
+ INonViralName name = taxon.getName();\r
if (name == null){\r
String message = "There is a taxon node without taxon: " + node.getId();\r
logger.warn(message);\r
Taxon taxon = CdmBase.deproxy(node.getTaxon(), Taxon.class);\r
DwcaTaxRecord record = new DwcaTaxRecord(metaRecord, config);\r
\r
- INonViralName<?> name = taxon.getName();\r
+ INonViralName name = taxon.getName();\r
Taxon parent = node.getParent() == null ? null : node.getParent().getTaxon();\r
TaxonNameBase<?, ?> basionym = name.getBasionym();\r
Classification classification = node.getClassification();\r
if (type == null){ // should not happen\r
type = SynonymType.SYNONYM_OF();\r
}\r
- INonViralName<?> name = synonym.getName();\r
+ INonViralName name = synonym.getName();\r
//????\r
Taxon parent = null;\r
TaxonNameBase<?, ?> basionym = name.getBasionym();\r
for (Taxon misappliedName : misappliedNames ){\r
DwcaTaxRecord record = new DwcaTaxRecord(metaRecord, config);\r
TaxonRelationshipType relType = TaxonRelationshipType.MISAPPLIED_NAME_FOR();\r
- INonViralName<?> name = misappliedName.getName();\r
+ INonViralName name = misappliedName.getName();\r
//????\r
Taxon parent = null;\r
TaxonNameBase<?, ?> basionym = name.getBasionym();\r
* @param config\r
* @param type\r
*/\r
- private void handleTaxonBase(DwcaTaxRecord record, TaxonBase<?> taxonBase, INonViralName<?> name,\r
+ private void handleTaxonBase(DwcaTaxRecord record, TaxonBase<?> taxonBase, INonViralName name,\r
Taxon acceptedTaxon, Taxon parent, TaxonNameBase<?, ?> basionym, Classification classification,\r
RelationshipTermBase<?> relType, boolean isProParte, boolean isPartial, DwcaTaxExportConfigurator config) {\r
record.setId(taxonBase.getId());\r
* @param isProParte\r
*/\r
private void handleTaxonomicStatus(DwcaTaxRecord record,\r
- INonViralName<?> name, RelationshipTermBase<?> type,\r
+ INonViralName name, RelationshipTermBase<?> type,\r
boolean isProParte, boolean isPartial) {\r
if (type == null){\r
record.setTaxonomicStatus(name.getNomenclaturalCode().acceptedTaxonStatusLabel());\r
* @param record\r
* @param name\r
*/\r
- private void handleUninomialOrGenus(DwcaTaxRecord record, INonViralName<?> name) {\r
+ private void handleUninomialOrGenus(DwcaTaxRecord record, INonViralName name) {\r
//epethita\r
String firstEpi = name.getGenusOrUninomial();\r
if (!StringUtils.isBlank(firstEpi)){\r
* @param name\r
*/\r
private void handleNomStatus(DwcaTaxRecord record, TaxonBase<?> taxon,\r
- INonViralName<?> name) {\r
+ INonViralName name) {\r
int nStatus = name.getStatus().size();\r
if (nStatus > 0){\r
if (name.getStatus().size()> 1){\r
public String getScientificNameId() {\r
return scientificNameId.getId();\r
}\r
- public void setScientificNameId(ITaxonNameBase<?> scientificNameId) {\r
+ public void setScientificNameId(ITaxonNameBase scientificNameId) {\r
this.scientificNameId.setId(scientificNameId);\r
}\r
\r
}\r
\r
//type specimen\r
- INonViralName<?> nvn = taxon.getName();\r
+ INonViralName nvn = taxon.getName();\r
handleTypeName(writer, taxon, nvn, metaRecord, config);\r
for (Synonym synonym : taxon.getSynonyms()){\r
handleTypeName(writer, synonym, nvn, metaRecord, config);\r
* @return\r
*/\r
private Set<TypeDesignationBase> handleTypeName(PrintWriter writer, TaxonBase<?> taxonBase,\r
- INonViralName<?> nvn, DwcaMetaDataRecord metaRecord, DwcaTaxExportConfigurator config) {\r
+ INonViralName nvn, DwcaMetaDataRecord metaRecord, DwcaTaxExportConfigurator config) {\r
Set<TypeDesignationBase> designations = nvn.getTypeDesignations();\r
for (TypeDesignationBase<?> designation:designations){\r
DwcaTypesRecord record = new DwcaTypesRecord(metaRecord, config);\r
}
protected void handleFullName(MarkupImportState state, XMLEventReader reader,
- INonViralName<?> name, XMLEvent next) throws XMLStreamException {
+ INonViralName name, XMLEvent next) throws XMLStreamException {
String fullNameStr;
Map<String, Attribute> attrs = getAttributes(next);
String rankStr = getAndRemoveRequiredAttributeValue(next,
return "";
}
- INonViralName<?> name = taxon.getName();
+ INonViralName name = taxon.getName();
String strGenusName = name.getGenusOrUninomial();
String normalized = normalizeKeyString(strGoto, location);
Taxon taxon = state.getCurrentTaxon();
String num = state.getCurrentTaxonNum();
- INonViralName<?> nvn = taxon.getName();
+ INonViralName nvn = taxon.getName();
String nameString = nvn.getNameCache();
nameString = normalizeKeyString(nameString, event.getLocation());
nameString = removeTrailingDot(nameString);
} else if (isEndingElement(next, NAME_TYPE)) {
state.setNameType(false);
} else if (isStartingElement(next, NOM)) {
- INonViralName<?> name = handleNom(state, reader, next, homotypicalGroup);
+ INonViralName name = handleNom(state, reader, next, homotypicalGroup);
homotypicalGroup = name.getHomotypicalGroup();
hasNom = true;
} else if (isStartingElement(next, NAME_TYPE)) {
* @param infrankStr
*/
private void makeRankDecision(MarkupImportState state,
- Map<String, String> nameMap, INonViralName<?> name, XMLEvent event,
+ Map<String, String> nameMap, INonViralName name, XMLEvent event,
String infrankStr) {
// TODO ranks
for (String key : nameMap.keySet()) {
* @param infrParAut
* @param infrAut
*/
- private void makeNomenclaturalAuthors(MarkupImportState state, XMLEvent event, INonViralName<?> name,
+ private void makeNomenclaturalAuthors(MarkupImportState state, XMLEvent event, INonViralName name,
String authorStr, String paraut, String infrParAut, String infrAut) {
if (name.getRank() != null && name.getRank().isInfraSpecific()) {
if (StringUtils.isNotBlank(infrAut)) {
}
private void handleCitation(MarkupImportState state, XMLEventReader reader,
- XMLEvent parentEvent, INonViralName<?> name, Map<String, String> nameMap) throws XMLStreamException {
+ XMLEvent parentEvent, INonViralName name, Map<String, String> nameMap) throws XMLStreamException {
String classValue = getClassOnlyAttribute(parentEvent);
state.setCitation(true);
}
- private void doCitation(MarkupImportState state, INonViralName<?> name,
+ private void doCitation(MarkupImportState state, INonViralName name,
String classValue, Reference reference, String microCitation,
XMLEvent parentEvent) {
if (PUBLICATION.equalsIgnoreCase(classValue)) {
* @param infrParAut
* @param infrAut
*/
- private void testRankAuthorConsistency(INonViralName<?> name, XMLEvent event,
+ private void testRankAuthorConsistency(INonViralName name, XMLEvent event,
String authorStr, String paraut, String infrParAut, String infrAut) {
if (name.getRank() == null) {
return;
Taxon taxon = null;\r
Element elTaxonName = elScope.getChild("TaxonName", sddNamespace);\r
String ref = elTaxonName.getAttributeValue("ref");\r
- INonViralName<?> nonViralName = taxonNameBases.get(ref);\r
+ INonViralName nonViralName = taxonNameBases.get(ref);\r
\r
if(cdmState.getConfig().isReuseExistingTaxaWhenPossible()){\r
taxon = getTaxonService().findBestMatchingTaxon(nonViralName.getTitleCache());\r
* @param state: the ABCD import state
*/
protected void addParentTaxon(Taxon taxon, STATE state, boolean preferredFlag, Classification classification){
- INonViralName<?> nvname = taxon.getName();
+ INonViralName nvname = taxon.getName();
Rank rank = nvname.getRank();
Taxon genus =null;
Taxon subgenus =null;
}
//name
- INonViralName<?> name;
+ INonViralName name;
INonViralNameParser parser = NonViralNameParserImpl.NewInstance();
NomenclaturalCode nc = state.getConfig().getNomenclaturalCode();
if (StringUtils.isNotBlank(commonDetermination.fullName)){
- private void setAuthorship(INonViralName<?> name, String author, INonViralNameParser<NonViralName> parser) {
+ private void setAuthorship(INonViralName name, String author, INonViralNameParser<NonViralName> parser) {
if (name instanceof BotanicalName || name instanceof ZoologicalName){
try {
parser.parseAuthors(name, author);
* @param similarityAuthor
* @return
*/
- protected boolean askIfReuseBestMatchingTaxon(INonViralName<?> taxonnamebase2, Taxon bestMatchingTaxon, Reference refMods, double similarityScore, double similarityAuthor) {
+ protected boolean askIfReuseBestMatchingTaxon(INonViralName taxonnamebase2, Taxon bestMatchingTaxon, Reference refMods, double similarityScore, double similarityAuthor) {
Object[] options = { UIManager.getString("OptionPane.yesButtonText"),
UIManager.getString("OptionPane.noButtonText")};
boolean parseNameManually=false;
INonViralNameParser<?> parser = NonViralNameParserImpl.NewInstance();
- ITaxonNameBase<?> nameToBeFilledTest ;
+ ITaxonNameBase nameToBeFilledTest ;
//if selected the atomised version
if(newName==atomisedNameStr){
}
- private ITaxonNameBase<?> parseWithExtension(INonViralNameParser parser, String atomisedNameStr, Rank rank, String followingText, HashMap<String, String> atomisedMap) {
+ private ITaxonNameBase parseWithExtension(INonViralNameParser parser, String atomisedNameStr, Rank rank, String followingText, HashMap<String, String> atomisedMap) {
Object[] nameExtensionResult = getPossibleExtension(followingText, atomisedMap, nomenclaturalCode);
- ITaxonNameBase<?> name = parser.parseFullName(atomisedNameStr, nomenclaturalCode, rank);
+ ITaxonNameBase name = parser.parseFullName(atomisedNameStr, nomenclaturalCode, rank);
if (nameExtensionResult != null && nameExtensionResult[0] != null){
String ext = (String)nameExtensionResult[0];
- ITaxonNameBase<?> extName =parser.parseFullName(atomisedNameStr + " " + ext, nomenclaturalCode, rank);
+ ITaxonNameBase extName =parser.parseFullName(atomisedNameStr + " " + ext, nomenclaturalCode, rank);
if (! extName.hasProblem()){
name = extName;
this.usedFollowingTextPrefix = ext;
//logger.info("tmpList returned: "+tmpList.size());
- INonViralName<?> identicName = null;
+ INonViralName identicName = null;
boolean foundIdentic=false;
TaxonBase<?> tmpTaxonBase=null;
// Taxon tmpPartial=null;
}
if ((tmpTaxonBase == null || !foundIdentic) || (tmpTaxonBase != null && !statusMatch) || (tmpTaxonBase != null && !appendedMatch && !statusMatch)){
- INonViralName<?> tnb;
+ INonViralName tnb;
if (identicName == null){
tnb = getNonViralNameAccNomenclature();
tnb.setRank(rank);
* @param tnb
* @return
*/
- private Taxon findMatchingTaxon(INonViralName<?> tnb, Reference refMods) {
+ private Taxon findMatchingTaxon(INonViralName tnb, Reference refMods) {
logger.info("findMatchingTaxon");
Taxon tmp=null;
* @param similarityAuthor
* @return
*/
- private boolean compareAndCheckTaxon(INonViralName<?> tnb, Reference refMods, double similarityScore,
+ private boolean compareAndCheckTaxon(INonViralName tnb, Reference refMods, double similarityScore,
Taxon bestMatchingTaxon, double similarityAuthor) {
//logger.info("compareAndCheckTaxon");
boolean insertAsExisting;
* @param insertAsExisting
* @param refMods
*/
- private void logDecision(INonViralName<?> tnb, Taxon bestMatchingTaxon, boolean insertAsExisting, Reference refMods) {
+ private void logDecision(INonViralName tnb, Taxon bestMatchingTaxon, boolean insertAsExisting, Reference refMods) {
try{
FileWriter fstream = new FileWriter(TaxonXImport.LOG_FOLDER + "Decisions_"+classification.toString()+".txt", true);
BufferedWriter out = new BufferedWriter(fstream);
Namespace ns = elCanonicalAuthorship.getNamespace();
if (name instanceof NonViralName){
- INonViralName<?> nonViralName = name;
+ INonViralName nonViralName = name;
String childName = "Simple";
boolean obligatory = true;
@Override
public void set(String name, Object value, Document document, LuceneOptions luceneOptions) {
- INonViralName<?> n = null;
+ INonViralName n = null;
if(value instanceof TaxonBase) {
try {
}
}else if(value instanceof TaxonNameBase){
- n = (INonViralName<?>)value;
+ n = (INonViralName)value;
}
if(n == null) {
logger.error("Unsupported type: " + value.getClass().getName());
}
}
- private String standardize(INonViralName<?> nameToBeFilled, String fullReferenceString, boolean makeEmpty){
+ private String standardize(INonViralName nameToBeFilled, String fullReferenceString, boolean makeEmpty){
//Check null and standardize
if (fullReferenceString == null){
//return null;
* @param nameToBeFilled
* @return
*/
- private String getCodeSpecificFullNameRegEx(INonViralName<?> nameToBeFilledOrig){
+ private String getCodeSpecificFullNameRegEx(INonViralName nameToBeFilledOrig){
NonViralName<?> nameToBeFilled = HibernateProxyHelper.deproxy(nameToBeFilledOrig, NonViralName.class);
if (nameToBeFilled instanceof ZoologicalName){
return anyZooFullName;
* @param nameToBeFilled
* @return
*/
- private String getCodeSpecificSimpleNameRegEx(INonViralName<?> nameToBeFilled){
+ private String getCodeSpecificSimpleNameRegEx(INonViralName nameToBeFilled){
nameToBeFilled = HibernateProxyHelper.deproxy(nameToBeFilled, NonViralName.class);
if (nameToBeFilled instanceof ZoologicalName){
parsable.setProblemEnds(-1);
}
- private void makeNoFullRefMatch(INonViralName<?> nameToBeFilled, String fullReferenceString, Rank rank){
+ private void makeNoFullRefMatch(INonViralName nameToBeFilled, String fullReferenceString, Rank rank){
//try to parse first part as name, but keep in mind full string is not parsable
int start = 0;
logger.info("no applicable parsing rule could be found for \"" + fullReferenceString + "\"");
}
- private void makeNameWithReference(INonViralName<?> nameToBeFilled,
+ private void makeNameWithReference(INonViralName nameToBeFilled,
String fullReferenceString,
Matcher nameAndRefSeparatorMatcher,
Rank rank,
* The nomenclatural status part ist deleted from the reference String.
* @return String the new (shortend) reference String
*/
- public String parseNomStatus(String fullString, INonViralName<?> nameToBeFilled, boolean makeEmpty) {
+ public String parseNomStatus(String fullString, INonViralName nameToBeFilled, boolean makeEmpty) {
Set<NomenclaturalStatusType> existingStatusTypeSet = new HashSet<NomenclaturalStatusType>();
Set<NomenclaturalStatusType> newStatusTypeSet = new HashSet<NomenclaturalStatusType>();
for (NomenclaturalStatus existingStatus : nameToBeFilled.getStatus()){
}
- private void parseReference(INonViralName<?> nameToBeFilled, String strReference, boolean isInReference){
+ private void parseReference(INonViralName nameToBeFilled, String strReference, boolean isInReference){
INomenclaturalReference ref;
String originalStrReference = strReference;
* @param strReference
* @return
*/
- private Reference makeDetailYearUnparsable(INonViralName<?> nameToBeFilled, String strReference) {
+ private Reference makeDetailYearUnparsable(INonViralName nameToBeFilled, String strReference) {
Reference ref;
ref = ReferenceFactory.newGeneric();
@Override
public void parseFullName(INonViralName nameToBeFilledOrig, String fullNameStringOrig, Rank rank, boolean makeEmpty) {
- INonViralName<?> nameToBeFilled = nameToBeFilledOrig;
+ INonViralName nameToBeFilled = nameToBeFilledOrig;
//TODO prol. etc.
boolean hasCheckRankProblem = false; //was rank guessed in a previous parsing process?
notToBeDeleted.add(relToKeep);
}
- private void handleHybridBits(INonViralName<?> nameToBeFilled) {
+ private void handleHybridBits(INonViralName nameToBeFilled) {
//uninomial
String uninomial = CdmUtils.Nz(nameToBeFilled.getGenusOrUninomial());
boolean isUninomialHybrid = uninomial.startsWith(hybridSign);
*/
@Override
public void parseAuthors(INonViralName nonViralNameOrig, String authorString) throws StringNotParsableException{
- INonViralName<?> nonViralName = nonViralNameOrig;
+ INonViralName nonViralName = nonViralNameOrig;
TeamOrPersonBase<?>[] authors = new TeamOrPersonBase[4];
Integer[] years = new Integer[4];
Class clazz = nonViralName.getClass();
* @param fullNameString
* @param authorString
*/
- public void handleAuthors(INonViralName<?> nameToBeFilled, String fullNameString, String authorString) {
+ public void handleAuthors(INonViralName nameToBeFilled, String fullNameString, String authorString) {
TeamOrPersonBase<?>[] authors = new TeamOrPersonBase[4];
Integer[] years = new Integer[4];
try {
}
- private void makeEmpty(INonViralName<?> nameToBeFilled){
+ private void makeEmpty(INonViralName nameToBeFilled){
nameToBeFilled.setRank(null);
nameToBeFilled.setTitleCache(null, false);
nameToBeFilled.setFullTitleCache(null, false);
public static Integer insertTaxon(String speciesname){
logger.info("Populate database with a taxon");
IJournal sec = ReferenceFactory.newJournal();
- INonViralName<?> nvName = BotanicalName.NewInstance(Rank.SPECIES());
+ INonViralName nvName = BotanicalName.NewInstance(Rank.SPECIES());
Taxon tax = Taxon.NewInstance(nvName, (Reference)sec);
nvName.setNameCache(speciesname);
nvName.setTitleCache(speciesname, true);
nonViralName1.addHybridChild(child, HybridRelationshipType.FEMALE_PARENT(), "child rule");
- INonViralName<?> clone = (INonViralName)nonViralName1.clone();
+ INonViralName clone = (INonViralName)nonViralName1.clone();
Assert.assertEquals("Genus should be equal", "Aus", clone.getGenusOrUninomial());
Assert.assertEquals("Infragenus should be equal", "Infaus", clone.getInfraGenericEpithet());
Assert.assertEquals("Specific epithet should be equal", "bus", clone.getSpecificEpithet());
import eu.etaxonomy.cdm.api.service.pager.impl.DefaultPagerImpl;\r
import eu.etaxonomy.cdm.common.UriUtils;\r
import eu.etaxonomy.cdm.model.common.LSID;\r
+import eu.etaxonomy.cdm.model.name.ITaxonNameBase;\r
import eu.etaxonomy.cdm.model.taxon.Taxon;\r
import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
import eu.etaxonomy.cdm.model.view.AuditEvent;\r
return;\r
}\r
\r
- Taxon taxon = Taxon.NewInstance(null, null);\r
+ Taxon taxon = Taxon.NewInstance((ITaxonNameBase)null, null);\r
taxon.setTitleCache("TitleCache", true);\r
taxon.setCreated(new DateTime());\r
taxon.setLsid(new LSID("urn:lsid:example.org:taxonconcepts:1"));\r
for(TaxonNode node:allNodesOfClassification){
final TaxonNode tn = node;
Taxon taxon = node.getTaxon();
- INonViralName<?> name = taxon.getName();
+ INonViralName name = taxon.getName();
String genusOrUninomial = name.getGenusOrUninomial();
//if rank unknown split string and take first word
if(genusOrUninomial == null){
if (entity instanceof NonViralName ){
try{
- INonViralName<?> nvn = (INonViralName<?>) entity;
+ INonViralName nvn = (INonViralName) entity;
if (!nvn.isProtectedNameCache()){
nvn.setProtectedNameCache(true);
oldNameCache = nvn.getNameCache();
}
setOtherCachesNull(entity);
String newTitleCache= null;
- INonViralName<?> nvn = null; //TODO find better solution
+ INonViralName nvn = null; //TODO find better solution
try{
if (entity instanceof NonViralName){
nvn = (INonViralName) entity;