Skip to content

StringArrFilter: Indented categories

sampStat, collSrc and storage filters have entries that are actually categories with sub-categories:

Example for "TYPE OF GERMPLASM STORAGE": "Long term seed collection" is a subcategory of "Seed collection":

"10": "Seed collection",
      "11": "Short term seed collection",
      "12": "Medium term seed collection",
      "13": "Long term seed collection",
"20": "Field collection",

image

By checking the "super" category, all sub-categories should be automatically ticked. On un-ticking, no changes are needed.

Example for "SAMPSTAT":

"100": "Wild",
  "110": "Natural",
  "120": "Semi-natural/wild",
  "130": "Semi-natural/sown",
"200": "Weedy",
"300": "Traditional cultivar/Landrace",
"400": "Breeding/Research Material",
  "410": "Breeders Line",
    "411": "Synthetic population",
    "412": "Hybrid",
    "413": "Founder stock/base population",
    "414": "Inbred line",
    "415": "Segregating population",
    "416": "Clonal selection",
  "420": "Genetic stock",
    "421": "Mutant",
    "422": "Cytogenetic stocks",
    "423": "Other genetic stocks",
"500": "Advanced/improved cultivar",
"600": "GMO",
"999": "Other"

Identifying categories and their sub-categories

Regexp ^(\d+)(0+)$ should identify potential "parents". Child records are those that start with regexp match group $1.

For "100": "Wild", ^(\d+)(0+)$ on "100" matches and gives two groups: "1" and "00". Children are those that start with "1".

For "410": "Breeders Line", ^(\d+)(0+)$ on "410" matches and gives two groups: "41" and "0". Children are those categories that start with "41".

If supplying <StringArrFilter indented flag, the component should operate in "indented mode" as described here.

Edited by Matija Obreza
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information