Skip to content

Commit b214c7c

Browse files
committed
Merge branch 'master' of github.com:OpenTreeOfLife/reference-taxonomy
2 parents 4ee64ca + 6daa84d commit b214c7c

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

org/opentreeoflife/smasher/AlignmentByName.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ Map<Taxon, String> getCandidates(Taxon node) {
239239
Map<Taxon, String> candidateMap = new HashMap<Taxon, String>();
240240
getCandidatesViaName(node, "C", candidateMap); // canonical
241241
for (Synonym syn : node.getSynonyms())
242-
getCandidatesViaName(syn, "S", candidateMap);
242+
if (!syn.type.equals("common name"))
243+
getCandidatesViaName(syn, "S", candidateMap);
243244
if (candidateMap.size() == 0)
244245
getCandidatesViaGender(node, candidateMap);
245246
return candidateMap;

org/opentreeoflife/taxa/InterimFormat.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -488,17 +488,18 @@ else if (losers == 10)
488488

489489
if (type.equals("type material")) // NCBI
490490
continue;
491-
if (type.equals("authority")) // NCBI
491+
else if (type.equals("authority")) // NCBI
492492
continue;
493-
if (type.endsWith("common name")) // NCBI
493+
else if (type.endsWith("common name")) { // NCBI
494+
if (!type.equals("common name")) // NCBI
495+
continue;
496+
} else if (type.equals("blast name")) // NCBI
494497
continue;
495-
if (type.equals("blast name")) // NCBI
498+
else if (type.equals("in-part")) // NCBI
496499
continue;
497-
if (type.equals("in-part")) // NCBI
500+
else if (type.equals("valid")) // IRMNG - redundant - ?
498501
continue;
499-
if (type.equals("valid")) // IRMNG - redundant - ?
500-
continue;
501-
if (type.equals("") || type.equals("None"))
502+
else if (type.equals("") || type.equals("None"))
502503
type = "synonym";
503504

504505
Node syn = node.addSynonym(name, type, sid);

org/opentreeoflife/taxa/Synonym.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public class Synonym extends Node {
44

55
// name inherited from class Node
66

7-
String type; // synonym, authority, common name, etc.
7+
public String type; // synonym, authority, common name, etc.
88

99
public Synonym(String name, String kind, Taxon taxon) {
1010
super(name);

0 commit comments

Comments
 (0)