Skip to content

Commit

Permalink
x1170 (RT#798250) Accept more column headings in block registration
Browse files Browse the repository at this point in the history
"Humfre number" for Humfre.
"Spatial location number" for spatial location.
  • Loading branch information
khelwood committed Feb 29, 2024
1 parent 1633917 commit 04e38a3
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ enum Column implements IColumn {
Life_stage,
Collection_date(LocalDate.class, Pattern.compile("(if.*)date.*collection.*", Pattern.CASE_INSENSITIVE)),
Species,
HuMFre,
HuMFre(Pattern.compile("humfre\\s*(number)?", Pattern.CASE_INSENSITIVE)),
Tissue_type,
External_identifier(Pattern.compile("external\\s*id.*", Pattern.CASE_INSENSITIVE)),
Spatial_location(Integer.class),
Spatial_location(Integer.class, Pattern.compile("spatial\\s*location\\s*(number)?", Pattern.CASE_INSENSITIVE)),
Replicate_number,
Last_known_section(Integer.class, Pattern.compile("last.*section.*", Pattern.CASE_INSENSITIVE)),
Labware_type,
Expand All @@ -47,10 +47,6 @@ enum Column implements IColumn {
this(null, pattern);
}

Column(Class<?> dataType) {
this(dataType, null);
}

Column(Class<?> dataType, Pattern pattern) {
this.pattern = (pattern!=null ? pattern : Pattern.compile(this.name().replace("_", "\\s*"), Pattern.CASE_INSENSITIVE));
this.dataType = (dataType!=null ? dataType : String.class);
Expand Down

1 comment on commit 04e38a3

@sabrine33
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@khelwood , Looks good to me

Please sign in to comment.