Skip to content

Commit

Permalink
add kingdom to recursing taxa
Browse files Browse the repository at this point in the history
  • Loading branch information
nleanba committed Dec 20, 2024
1 parent 4e0862a commit 4eca52b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/gg2rdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -905,12 +905,20 @@ export function gg2rdf(
`dwc:${nextRankLimit}`,
STR(normalizeSpace(taxon.getAttribute(nextRankLimit))),
);
// SynoSpecies only shows Taxa with Genus and Kingdom, so we add these
// for higher order taxa too, to make sure that they appear always.
if (ranks.includes("genus")) {
s.addProperty(
`dwc:genus`,
STR(normalizeSpace(taxon.getAttribute("genus"))),
);
}
if (ranks.includes("kingdom")) {
s.addProperty(
`dwc:kingdom`,
STR(normalizeSpace(taxon.getAttribute("kingdom"))),
);
}
}
} else {
ranks.map((n: string) => {
Expand Down

0 comments on commit 4eca52b

Please sign in to comment.