Skip to content

Commit

Permalink
mbari-org/kb#10 - Added additional ranks
Browse files Browse the repository at this point in the history
  • Loading branch information
hohonuuli committed Feb 19, 2025
1 parent 5155758 commit 3b41ff7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ConceptService(entityManagerFactory: EntityManagerFactory):
)

/**
* Inserts an eRantire tree of concepts in the database. Requires that the database is empty. This is a non-ACID as
* Inserts an entire tree of concepts in the database. Requires that the database is empty. This is a non-ACID as
* one concept (and it's associated metadata) is inserted at a time. This is useful for testing and for very large
* trees.
* @param root
Expand Down
24 changes: 19 additions & 5 deletions oni/src/main/scala/org/mbari/oni/services/RankValidator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,53 @@ import org.mbari.oni.domain.{ConceptCreate, ConceptUpdate}

object RankValidator:

// Scraped from https://en.wikipedia.org/wiki/Taxonomic_rank
val ValidRankLevelsAndNames: Seq[(Option[String], Option[String])] = Seq(
(None, None),
(None, Some("realm")),
(None, Some("domain")),
(Some("sub"), Some("domain")),
(None, Some("realm")), // virology
(Some("sub"), Some("realm")),
(Some("super"), Some("kingdom")),
(None, Some("kingdom")),
(Some("sub"), Some("kingdom")),
(Some("infra"), Some("kingdom")),
(Some("super"), Some("phylum")),
(None, Some("phylum")),
(Some("sub"), Some("phylum")),
(None, Some("division")),
(Some("sub"), Some("division")),
(Some("infra"), Some("phylum")),
(Some("micro"), Some("phylum")),
(Some("super"), Some("class")),
(None, Some("class")),
(Some("infra"), Some("class")),
(Some("sub"), Some("class")),
(Some("super"), Some("division")),
(None, Some("division")),
(Some("sub"), Some("division")),
(Some("infra"), Some("division")),
(Some("super"), Some("order")),
(None, Some("order")),
(Some("sub"), Some("order")),
(Some("infra"), Some("order")),
(None, Some("section")),
(Some("sub"), Some("section")),
(Some("super"), Some("family")),
(Some("epi"), Some("family")),
(None, Some("family")),
(Some("sub"), Some("family")),
(Some("infra"), Some("family")),
(Some("super"), Some("tribe")),
(None, Some("tribe")),
(Some("sub"), Some("tribe")),
(Some("infra"), Some("tribe")),
(Some("super"), Some("genus")),
(None, Some("genus")),
(Some("sub"), Some("genus")),
(None, Some("section")),
(Some("sub"), Some("section")),
(None, Some("species complex")),
(None, Some("species")),
(Some("sub"), Some("species")),
(None, Some("variety")),
(Some("sub"), Some("variety")),
(None, Some("form"))
)

Expand Down

0 comments on commit 3b41ff7

Please sign in to comment.