Project

General

Profile

« Previous | Next » 

Revision 7309

schemas/vegbien.sql: unscrubbed_taxondetermination_view: Include the accepted name's row next to the matched name's row instead of merging the two together into one TNRS row, to allow including separate taxondeterminations for the matched and accepted names. Added Max_score from TNRS.tnrs.

View differences:

inputs/.TNRS/public.unscrubbed_taxondetermination_view/map.csv
3 3
Time_submitted,*Time_submitted,,
4 4
Name_number,OMIT,,Identifies name only within one TNRS batch. Omitted because not globally unique.
5 5
Name_submitted,OMIT,,Omitted because taxonoccurrence_id used to identify the taxonoccurrence instead
6
Overall_score,matchedTaxonFit_fraction,,Assuming is a fraction based on the range of values
6
Overall_score,matchedTaxonFit_fraction,/_first/2,Assuming is a fraction based on the range of values
7 7
Name_matched,taxonName,,
8 8
Name_matched_rank,taxonRank,,
9 9
Name_score,*Name_score,,
......
27 27
Annotations,*Annotations,,
28 28
Unmatched_terms,morphospecies,,
29 29
Taxonomic_status,taxonomicStatus,,
30
Accepted_name,acceptedTaxonName,/_first/1,
31
Accepted_name_author,acceptedScientificNameAuthorship,/_first/1,
32
Accepted_name_rank,acceptedTaxonRank,/_first/1,
33
Accepted_name_url,*Accepted_name_url,/_first/1,
34
Accepted_name_species,*Accepted_name_species,/_first/1,Also contains genus. Omitted because Accepted_name contains more info.
35
Accepted_name_family,acceptedFamily,/_first/1/_nullIf:[null=Unknown]/value,
30 36
Selected,*Selected,,
31 37
Source,*Source,,
32 38
Warnings,*Warnings,,
39
Accepted_name_lsid,*Accepted_name_lsid,/_first/2,
40
Accepted_scientific_name,acceptedScientificName,/_first/1,
41
Max_score,matchedTaxonFit_fraction,/_first/1,
42
Accepted_name.Time_submitted,*Accepted_name.Time_submitted,/_first/2,
43
Accepted_name.Name_number,OMIT,/_first/2,Identifies name only within one TNRS batch. Omitted because not globally unique.
44
Accepted_name.Name_submitted,acceptedScientificName,/_first/2,
45
Accepted_name.Overall_score,OMIT,/_first/2,Scores come from the matched name instead
46
Accepted_name.Name_matched,acceptedTaxonName,/_first/2,
47
Accepted_name.Name_matched_rank,acceptedTaxonRank,/_first/2,
48
Accepted_name.Name_score,OMIT,/_first/2,Scores come from the matched name instead
49
Accepted_name.Name_matched_author,acceptedScientificNameAuthorship,/_first/2/_first/1,
50
Accepted_name.Name_matched_url,acceptedScientificNameID,/_first/2,
51
Accepted_name.Author_matched,acceptedScientificNameAuthorship,/_first/2/_first/2,
52
Accepted_name.Author_score,OMIT,/_first/2,Scores come from the matched name instead
53
Accepted_name.Family_matched,acceptedFamily,/_first/2/_first/2,
54
Accepted_name.Family_score,OMIT,/_first/2,Scores come from the matched name instead
55
Accepted_name.Name_matched_accepted_family,acceptedFamily,/_first/2/_first/1,
56
Accepted_name.Genus_matched,acceptedGenus,/_first/2,
57
Accepted_name.Genus_score,OMIT,/_first/2,Scores come from the matched name instead
58
Accepted_name.Specific_epithet_matched,acceptedSpecificEpithet,/_first/2,
59
Accepted_name.Specific_epithet_score,OMIT,/_first/2,Scores come from the matched name instead
60
Accepted_name.Infraspecific_rank,OMIT,,Omitted because Accepted_name.Name_matched_rank is populated more often
61
Accepted_name.Infraspecific_epithet_matched,acceptedInfraspecificEpithet,/_first/2,
62
Accepted_name.Infraspecific_epithet_score,OMIT,/_first/2,Scores come from the matched name instead
63
Accepted_name.Infraspecific_rank_2,UNUSED,/_first/2,
64
Accepted_name.Infraspecific_epithet_2_matched,UNUSED,/_first/2,
65
Accepted_name.Infraspecific_epithet_2_score,OMIT,/_first/2,Scores come from the matched name instead
66
Accepted_name.Annotations,*Accepted_name.Annotations,/_first/2,
67
Accepted_name.Unmatched_terms,OMIT,/_first/2,Should be empty
68
Accepted_name.Taxonomic_status,acceptedTaxonomicStatus,/_first/2,
69
Accepted_name.Accepted_name,acceptedTaxonName,/_first/3,
70
Accepted_name.Accepted_name_author,acceptedScientificNameAuthorship,/_first/3,
71
Accepted_name.Accepted_name_rank,acceptedTaxonRank,/_first/3,
72
Accepted_name.Accepted_name_url,*Accepted_name.Accepted_name_url,/_first/3,
73
Accepted_name.Accepted_name_species,*Accepted_name.Accepted_name_species,/_first/3,
74
Accepted_name.Accepted_name_family,acceptedFamily,/_first/3,
75
Accepted_name.Selected,*Accepted_name.Selected,/_first/2,
76
Accepted_name.Source,*Accepted_name.Source,/_first/2,
77
Accepted_name.Warnings,*Accepted_name.Warnings,/_first/2,
78
Accepted_name.Accepted_name_lsid,*Accepted_name.Accepted_name_lsid,/_first/3,
79
Accepted_name.Accepted_scientific_name,acceptedScientificName,/_first/3,
80
Accepted_name.Max_score,OMIT,/_first/2,Scores come from the matched name instead
33 81
:true,taxonIsCanonical,,"This table contains only canonicalized names. (Not all names are accepted, but those that aren’t don’t (yet) have an accepted match.)"
34 82
:matched,identificationType,,
35 83
:_,dateIdentified,/_now,
inputs/.TNRS/public.unscrubbed_taxondetermination_view/VegBIEN.csv
1 1
TNRS,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments
2 2
:0,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",Enables the taxonoccurrence CHECK constraint to pass
3
Accepted_name,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/cond/_exists/_first/1",
4
Accepted_scientific_name,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/cond/_exists/_first/1",
5
Accepted_name.Name_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/cond/_exists/_first/2",
6
Accepted_name.Name_submitted,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/cond/_exists/_first/2",
7
Accepted_name.Accepted_name,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/cond/_exists/_first/3",
8
Accepted_name.Accepted_scientific_name,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/cond/_exists/_first/3",
3 9
:true,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/matched_label_id/_if[@name=""if is canonical name""]:[then=0]/cond","This table contains only canonicalized names. (Not all names are accepted, but those that aren’t don’t (yet) have an accepted match.)"
10
Accepted_name.Specific_epithet_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=species]/taxonepithet/_first/2",
4 11
:true,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=genus]/_if[@name=""if is canonical name""]/cond/_exists","This table contains only canonicalized names. (Not all names are accepted, but those that aren’t don’t (yet) have an accepted match.)"
12
Accepted_name.Genus_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=genus]/_if[@name=""if is canonical name""]/then/matched_label_id/taxonlabel:[source_id/source/shortname=NCBI]/taxonomicname/_first/2",
13
Accepted_name.Genus_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=genus]/taxonepithet/_first/2",
5 14
:true,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/_if[@name=""if is canonical name""]/cond/_exists","This table contains only canonicalized names. (Not all names are accepted, but those that aren’t don’t (yet) have an accepted match.)"
15
Accepted_name_family,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/_if[@name=""if is canonical name""]/then/matched_label_id/taxonlabel:[source_id/source/shortname=NCBI]/taxonomicname/_first/1/_nullIf:[null=Unknown]/value",
16
Accepted_name.Name_matched_accepted_family,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/_if[@name=""if is canonical name""]/then/matched_label_id/taxonlabel:[source_id/source/shortname=NCBI]/taxonomicname/_first/2/_first/1",
17
Accepted_name.Family_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/_if[@name=""if is canonical name""]/then/matched_label_id/taxonlabel:[source_id/source/shortname=NCBI]/taxonomicname/_first/2/_first/2",
18
Accepted_name.Accepted_name_family,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/_if[@name=""if is canonical name""]/then/matched_label_id/taxonlabel:[source_id/source/shortname=NCBI]/taxonomicname/_first/3",
19
Accepted_name_family,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/taxonepithet/_first/1/_nullIf:[null=Unknown]/value",
20
Accepted_name.Name_matched_accepted_family,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/taxonepithet/_first/2/_first/1",
21
Accepted_name.Family_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/taxonepithet/_first/2/_first/2",
22
Accepted_name.Accepted_name_family,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,species,genus,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=family]/taxonepithet/_first/3",
23
Accepted_name_rank,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/rank/_first/1",
24
Accepted_name.Name_matched_rank,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/rank/_first/2",
25
Accepted_name.Accepted_name_rank,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/rank/_first/3",
26
Accepted_name.Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/parent_id/taxonlabel/taxonepithet/_first/2",
27
Accepted_name_rank,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/rank/_first/1",
28
Accepted_name.Name_matched_rank,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/rank/_first/2",
29
Accepted_name.Accepted_name_rank,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/rank/_first/3",
30
Accepted_name.Name_matched_url,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/sourceaccessioncode/_first/2",
31
Accepted_name_family,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family/_first/1/_nullIf:[null=Unknown]/value",
32
Accepted_name.Name_matched_accepted_family,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family/_first/2/_first/1",
33
Accepted_name.Family_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family/_first/2/_first/2",
34
Accepted_name.Accepted_name_family,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/prefix/_taxon_family_require_std/family/_first/3",
35
Accepted_scientific_name,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/1/_first/1",
36
Accepted_name.Name_submitted,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/1/_first/2",
37
Accepted_name.Accepted_scientific_name,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/1/_first/3",
38
Accepted_name,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/1/_first/1",
39
Accepted_name.Name_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/1/_first/2",
40
Accepted_name.Accepted_name,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/1/_first/3",
41
Accepted_name.Genus_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/2/_first/2",
42
Accepted_name.Specific_epithet_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1/_first/2",
43
Accepted_name.Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond/_first/2",
44
Accepted_name_rank,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then/_first/1",
45
Accepted_name.Name_matched_rank,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then/_first/2",
46
Accepted_name.Accepted_name_rank,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then/_first/3",
47
Accepted_name.Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2/_first/2",
48
Accepted_name_author,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/2/_first/1",
49
Accepted_name.Name_matched_author,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/2/_first/2/_first/1",
50
Accepted_name.Author_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/2/_first/2/_first/2",
51
Accepted_name.Accepted_name_author,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/*_id/taxonlabel:[taxonstatus=Accepted]/taxonomicname/_merge_prefix/value/_alt/2/_join_words/2/_first/3",
52
Accepted_name_author,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/author/_first/1",
53
Accepted_name.Name_matched_author,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/author/_first/2/_first/1",
54
Accepted_name.Author_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/author/_first/2/_first/2",
55
Accepted_name.Accepted_name_author,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/author/_first/3",
56
Accepted_name_family,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/family/_first/1/_nullIf:[null=Unknown]/value",
57
Accepted_name.Name_matched_accepted_family,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/family/_first/2/_first/1",
58
Accepted_name.Family_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/family/_first/2/_first/2",
59
Accepted_name.Accepted_name_family,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/family/_first/3",
60
Accepted_name.Genus_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/genus/_first/2",
61
Accepted_name.Specific_epithet_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/specific_epithet/_first/2",
62
Accepted_name,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/taxonname/_first/1",
63
Accepted_name.Name_matched,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/taxonname/_first/2",
64
Accepted_name.Accepted_name,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/taxonname/_first/3",
65
Accepted_scientific_name,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/taxonomicname/_first/1",
66
Accepted_name.Name_submitted,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/taxonomicname/_first/2",
67
Accepted_name.Accepted_scientific_name,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/taxonomicname/_first/3",
68
Accepted_name_rank,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/verbatimrank/_first/1",
69
Accepted_name.Name_matched_rank,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/verbatimrank/_first/2",
70
Accepted_name.Accepted_name_rank,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/*_id/taxonverbatim/verbatimrank/_first/3",
6 71
:_,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/determinationdate/_alt/1/_dateRangeStart/value/_now",
7 72
Family_score,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/taxonfit/_max/1",
8 73
Genus_score,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/taxonfit/_max/2",
9 74
Specific_epithet_score,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/taxonfit/_max/3",
10
Overall_score,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/taxonfit/_max/4",Assuming is a fraction based on the range of values
75
Max_score,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/taxonfit/_max/4/_first/1",
76
Overall_score,"/location/locationevent/taxonoccurrence/_if[@name=""if has accepted name""]/then/taxondetermination:[determinationtype=accepted]/taxonfit/_max/4/_first/2",Assuming is a fraction based on the range of values
11 77
Name_matched,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/3/_first/3",
12 78
:0,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",Enables the taxonoccurrence CHECK constraint to pass
13 79
:0,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/1,Enables the taxonoccurrence CHECK constraint to pass
......
52 118
Family_score,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/_if[@name=""if has taxondetermination""]/then/taxonfit/_max/1",
53 119
Genus_score,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/_if[@name=""if has taxondetermination""]/then/taxonfit/_max/2",
54 120
Specific_epithet_score,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/_if[@name=""if has taxondetermination""]/then/taxonfit/_max/3",
55
Overall_score,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/_if[@name=""if has taxondetermination""]/then/taxonfit/_max/4",Assuming is a fraction based on the range of values
121
Max_score,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/_if[@name=""if has taxondetermination""]/then/taxonfit/_max/4/_first/1",
122
Overall_score,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/_if[@name=""if has taxondetermination""]/then/taxonfit/_max/4/_first/2",Assuming is a fraction based on the range of values
56 123
:_,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/determinationdate/_alt/1/_dateRangeStart/value/_now,
57 124
:matched,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/determinationtype,
58 125
taxonoccurrence_id,/location/locationevent/taxonoccurrence/taxonoccurrence_id,
126
Accepted_name.Accepted_name_lsid,,** No join mapping for *Accepted_name.Accepted_name_lsid/_first/3 ** 
127
Accepted_name.Accepted_name_species,,** No join mapping for *Accepted_name.Accepted_name_species/_first/3 ** 
128
Accepted_name.Accepted_name_url,,** No join mapping for *Accepted_name.Accepted_name_url/_first/3 ** 
129
Accepted_name.Annotations,,** No join mapping for *Accepted_name.Annotations/_first/2 ** 
130
Accepted_name.Author_score,,** No non-empty join mapping for OMIT/_first/2 ** Scores come from the matched name instead
131
Accepted_name.Family_score,,** No non-empty join mapping for OMIT/_first/2 ** Scores come from the matched name instead
132
Accepted_name.Genus_score,,** No non-empty join mapping for OMIT/_first/2 ** Scores come from the matched name instead
133
Accepted_name.Infraspecific_epithet_2_matched,,** No non-empty join mapping for UNUSED/_first/2 ** 
134
Accepted_name.Infraspecific_epithet_2_score,,** No non-empty join mapping for OMIT/_first/2 ** Scores come from the matched name instead
135
Accepted_name.Infraspecific_epithet_score,,** No non-empty join mapping for OMIT/_first/2 ** Scores come from the matched name instead
136
Accepted_name.Infraspecific_rank,,** No non-empty join mapping for OMIT ** Omitted because Accepted_name.Name_matched_rank is populated more often
137
Accepted_name.Infraspecific_rank_2,,** No non-empty join mapping for UNUSED/_first/2 ** 
138
Accepted_name.Max_score,,** No non-empty join mapping for OMIT/_first/2 ** Scores come from the matched name instead
139
Accepted_name.Name_number,,** No non-empty join mapping for OMIT/_first/2 ** Identifies name only within one TNRS batch. Omitted because not globally unique.
140
Accepted_name.Name_score,,** No non-empty join mapping for OMIT/_first/2 ** Scores come from the matched name instead
141
Accepted_name.Overall_score,,** No non-empty join mapping for OMIT/_first/2 ** Scores come from the matched name instead
142
Accepted_name.Selected,,** No join mapping for *Accepted_name.Selected/_first/2 ** 
143
Accepted_name.Source,,** No join mapping for *Accepted_name.Source/_first/2 ** 
144
Accepted_name.Specific_epithet_score,,** No non-empty join mapping for OMIT/_first/2 ** Scores come from the matched name instead
145
Accepted_name.Taxonomic_status,,** No join mapping for acceptedTaxonomicStatus/_first/2 ** 
146
Accepted_name.Time_submitted,,** No join mapping for *Accepted_name.Time_submitted/_first/2 ** 
147
Accepted_name.Unmatched_terms,,** No non-empty join mapping for OMIT/_first/2 ** Should be empty
148
Accepted_name.Warnings,,** No join mapping for *Accepted_name.Warnings/_first/2 ** 
149
Accepted_name_lsid,,** No join mapping for *Accepted_name_lsid/_first/2 ** 
150
Accepted_name_species,,** No join mapping for *Accepted_name_species/_first/1 ** Also contains genus. Omitted because Accepted_name contains more info.
151
Accepted_name_url,,** No join mapping for *Accepted_name_url/_first/1 ** 
59 152
Annotations,,** No join mapping for *Annotations ** 
60 153
Author_score,,** No join mapping for *Author_score ** 
61 154
Infraspecific_epithet_2_matched,,** No non-empty join mapping for UNUSED ** 
inputs/.TNRS/public.unscrubbed_taxondetermination_view/test.xml.ref
9 9
                    <location>
10 10
                        <locationevent>
11 11
                            <taxonoccurrence>
12
                                <taxondetermination>
13
                                    <determinationtype>accepted</determinationtype>
14
                                    <taxonverbatim_id>
15
                                        <taxonverbatim>
16
                                            <taxonlabel_id>
17
                                                <taxonlabel>
18
                                                    <taxonstatus>Accepted</taxonstatus>
19
                                                    <matched_label_id>0</matched_label_id>
20
                                                    <parent_id>
21
                                                        <taxonlabel>
22
                                                            <parent_id>
23
                                                                <taxonlabel>
24
                                                                    <rank>cultivar</rank>
25
                                                                    <parent_id>
26
                                                                        <taxonlabel>
27
                                                                            <rank>forma</rank>
28
                                                                            <parent_id>
29
                                                                                <taxonlabel>
30
                                                                                    <rank>variety</rank>
31
                                                                                    <parent_id>
32
                                                                                        <taxonlabel>
33
                                                                                            <rank>subspecies</rank>
34
                                                                                            <parent_id>
35
                                                                                                <taxonlabel>
36
                                                                                                    <rank>species</rank>
37
                                                                                                    <taxonepithet>$Accepted_name.Specific_epithet_matched</taxonepithet>
38
                                                                                                    <parent_id>
39
                                                                                                        <taxonlabel>
40
                                                                                                            <rank>genus</rank>
41
                                                                                                            <matched_label_id>
42
                                                                                                                <taxonlabel>
43
                                                                                                                    <source_id><source><shortname>NCBI</shortname></source></source_id>
44
                                                                                                                    <taxonomicname>$Accepted_name.Genus_matched</taxonomicname>
45
                                                                                                                </taxonlabel>
46
                                                                                                            </matched_label_id>
47
                                                                                                            <taxonepithet>$Accepted_name.Genus_matched</taxonepithet>
48
                                                                                                            <parent_id>
49
                                                                                                                <taxonlabel>
50
                                                                                                                    <rank>family</rank>
51
                                                                                                                    <matched_label_id>
52
                                                                                                                        <taxonlabel>
53
                                                                                                                            <source_id><source><shortname>NCBI</shortname></source></source_id>
54
                                                                                                                            <taxonomicname>
55
                                                                                                                                <_nullIf>
56
                                                                                                                                    <null>Unknown</null>
57
                                                                                                                                    <value>$Accepted_name_family</value>
58
                                                                                                                                </_nullIf>
59
                                                                                                                            </taxonomicname>
60
                                                                                                                        </taxonlabel>
61
                                                                                                                    </matched_label_id>
62
                                                                                                                    <taxonepithet>
63
                                                                                                                        <_nullIf>
64
                                                                                                                            <null>Unknown</null>
65
                                                                                                                            <value>$Accepted_name_family</value>
66
                                                                                                                        </_nullIf>
67
                                                                                                                    </taxonepithet>
68
                                                                                                                </taxonlabel>
69
                                                                                                            </parent_id>
70
                                                                                                        </taxonlabel>
71
                                                                                                    </parent_id>
72
                                                                                                </taxonlabel>
73
                                                                                            </parent_id>
74
                                                                                        </taxonlabel>
75
                                                                                    </parent_id>
76
                                                                                </taxonlabel>
77
                                                                            </parent_id>
78
                                                                        </taxonlabel>
79
                                                                    </parent_id>
80
                                                                </taxonlabel>
81
                                                            </parent_id>
82
                                                            <rank>$Accepted_name_rank</rank>
83
                                                            <taxonepithet>$Accepted_name.Infraspecific_epithet_matched</taxonepithet>
84
                                                        </taxonlabel>
85
                                                    </parent_id>
86
                                                    <rank>$Accepted_name_rank</rank>
87
                                                    <sourceaccessioncode>$Accepted_name.Name_matched_url</sourceaccessioncode>
88
                                                    <taxonomicname>
89
                                                        <_merge_prefix>
90
                                                            <prefix>
91
                                                                <_taxon_family_require_std>
92
                                                                    <family>
93
                                                                        <_nullIf>
94
                                                                            <null>Unknown</null>
95
                                                                            <value>$Accepted_name_family</value>
96
                                                                        </_nullIf>
97
                                                                    </family>
98
                                                                </_taxon_family_require_std>
99
                                                            </prefix>
100
                                                            <value>
101
                                                                <_alt>
102
                                                                    <1>$Accepted_scientific_name</1>
103
                                                                    <2>
104
                                                                        <_join_words>
105
                                                                            <1>
106
                                                                                <_alt>
107
                                                                                    <1>$Accepted_name</1>
108
                                                                                    <2>
109
                                                                                        <_join_words>
110
                                                                                            <2>$Accepted_name.Genus_matched</2>
111
                                                                                            <3>$Accepted_name.Specific_epithet_matched</3>
112
                                                                                            <5>
113
                                                                                                <_join_words>
114
                                                                                                    <1>
115
                                                                                                        <_if name="if has infraspecificEpithet">
116
                                                                                                            <cond>$Accepted_name.Infraspecific_epithet_matched</cond>
117
                                                                                                            <then>$Accepted_name_rank</then>
118
                                                                                                        </_if>
119
                                                                                                    </1>
120
                                                                                                    <2>$Accepted_name.Infraspecific_epithet_matched</2>
121
                                                                                                </_join_words>
122
                                                                                            </5>
123
                                                                                        </_join_words>
124
                                                                                    </2>
125
                                                                                </_alt>
126
                                                                            </1>
127
                                                                            <2>$Accepted_name_author</2>
128
                                                                        </_join_words>
129
                                                                    </2>
130
                                                                </_alt>
131
                                                            </value>
132
                                                        </_merge_prefix>
133
                                                    </taxonomicname>
134
                                                </taxonlabel>
135
                                            </taxonlabel_id>
136
                                            <author>$Accepted_name_author</author>
137
                                            <family>
138
                                                <_nullIf>
139
                                                    <null>Unknown</null>
140
                                                    <value>$Accepted_name_family</value>
141
                                                </_nullIf>
142
                                            </family>
143
                                            <genus>$Accepted_name.Genus_matched</genus>
144
                                            <specific_epithet>$Accepted_name.Specific_epithet_matched</specific_epithet>
145
                                            <taxonname>$Accepted_name</taxonname>
146
                                            <taxonomicname>$Accepted_scientific_name</taxonomicname>
147
                                            <verbatimrank>$Accepted_name_rank</verbatimrank>
148
                                        </taxonverbatim>
149
                                    </taxonverbatim_id>
150
                                    <determinationdate><_dateRangeStart><value><_now>_</_now></value></_dateRangeStart></determinationdate>
151
                                    <taxonfit>
152
                                        <_max>
153
                                            <1>$Family_score</1>
154
                                            <2>$Genus_score</2>
155
                                            <3>$Specific_epithet_score</3>
156
                                            <4>$Max_score</4>
157
                                        </_max>
158
                                    </taxonfit>
159
                                </taxondetermination>
12 160
                                <sourceaccessioncode>0</sourceaccessioncode>
13 161
                                <taxondetermination>
14 162
                                    <taxonverbatim_id>
......
123 271
                                            <1>$Family_score</1>
124 272
                                            <2>$Genus_score</2>
125 273
                                            <3>$Specific_epithet_score</3>
126
                                            <4>$Overall_score</4>
274
                                            <4>$Max_score</4>
127 275
                                        </_max>
128 276
                                    </taxonfit>
129 277
                                    <determinationdate><_dateRangeStart><value><_now>_</_now></value></_dateRangeStart></determinationdate>
inputs/.TNRS/public.unscrubbed_taxondetermination_view/new_terms.csv
1 1
Name_number,OMIT,,Identifies name only within one TNRS batch. Omitted because not globally unique.
2 2
Name_submitted,OMIT,,Omitted because taxonoccurrence_id used to identify the taxonoccurrence instead
3
Overall_score,matchedTaxonFit_fraction,,Assuming is a fraction based on the range of values
3
Overall_score,matchedTaxonFit_fraction,/_first/2,Assuming is a fraction based on the range of values
4 4
Name_matched,taxonName,,
5 5
Name_matched_rank,taxonRank,,
6 6
Name_matched_author,scientificNameAuthorship,/_first/1,Contains author based on matched name
......
16 16
Infraspecific_rank,OMIT,,Omitted because Name_matched_rank is populated more often
17 17
Infraspecific_epithet_matched,infraspecificEpithet,,
18 18
Unmatched_terms,morphospecies,,
19
Accepted_name,acceptedTaxonName,/_first/1,
20
Accepted_name_author,acceptedScientificNameAuthorship,/_first/1,
21
Accepted_name_rank,acceptedTaxonRank,/_first/1,
22
Accepted_name_family,acceptedFamily,/_first/1/_nullIf:[null=Unknown]/value,
23
Max_score,matchedTaxonFit_fraction,/_first/1,
24
Accepted_name.Name_number,OMIT,/_first/2,Identifies name only within one TNRS batch. Omitted because not globally unique.
25
Accepted_name.Name_submitted,acceptedScientificName,/_first/2,
26
Accepted_name.Overall_score,OMIT,/_first/2,Scores come from the matched name instead
27
Accepted_name.Name_matched,acceptedTaxonName,/_first/2,
28
Accepted_name.Name_matched_rank,acceptedTaxonRank,/_first/2,
29
Accepted_name.Name_score,OMIT,/_first/2,Scores come from the matched name instead
30
Accepted_name.Name_matched_author,acceptedScientificNameAuthorship,/_first/2/_first/1,
31
Accepted_name.Name_matched_url,acceptedScientificNameID,/_first/2,
32
Accepted_name.Author_matched,acceptedScientificNameAuthorship,/_first/2/_first/2,
33
Accepted_name.Author_score,OMIT,/_first/2,Scores come from the matched name instead
34
Accepted_name.Family_matched,acceptedFamily,/_first/2/_first/2,
35
Accepted_name.Family_score,OMIT,/_first/2,Scores come from the matched name instead
36
Accepted_name.Name_matched_accepted_family,acceptedFamily,/_first/2/_first/1,
37
Accepted_name.Genus_matched,acceptedGenus,/_first/2,
38
Accepted_name.Genus_score,OMIT,/_first/2,Scores come from the matched name instead
39
Accepted_name.Specific_epithet_matched,acceptedSpecificEpithet,/_first/2,
40
Accepted_name.Specific_epithet_score,OMIT,/_first/2,Scores come from the matched name instead
41
Accepted_name.Infraspecific_rank,OMIT,,Omitted because Accepted_name.Name_matched_rank is populated more often
42
Accepted_name.Infraspecific_epithet_matched,acceptedInfraspecificEpithet,/_first/2,
43
Accepted_name.Infraspecific_epithet_score,OMIT,/_first/2,Scores come from the matched name instead
44
Accepted_name.Infraspecific_epithet_2_score,OMIT,/_first/2,Scores come from the matched name instead
45
Accepted_name.Unmatched_terms,OMIT,/_first/2,Should be empty
46
Accepted_name.Taxonomic_status,acceptedTaxonomicStatus,/_first/2,
47
Accepted_name.Accepted_name,acceptedTaxonName,/_first/3,
48
Accepted_name.Accepted_name_author,acceptedScientificNameAuthorship,/_first/3,
49
Accepted_name.Accepted_name_rank,acceptedTaxonRank,/_first/3,
50
Accepted_name.Accepted_name_family,acceptedFamily,/_first/3,
51
Accepted_name.Accepted_scientific_name,acceptedScientificName,/_first/3,
52
Accepted_name.Max_score,OMIT,/_first/2,Scores come from the matched name instead
inputs/.TNRS/public.unscrubbed_taxondetermination_view/unmapped_terms.csv
3 3
*Author_score
4 4
*Infraspecific_epithet_score
5 5
*Annotations
6
*Accepted_name_url
7
*Accepted_name_species
6 8
*Selected
7 9
*Source
8 10
*Warnings
11
*Accepted_name_lsid
12
*Accepted_name.Time_submitted
13
*Accepted_name.Annotations
14
acceptedTaxonomicStatus
15
*Accepted_name.Accepted_name_url
16
*Accepted_name.Accepted_name_species
17
*Accepted_name.Selected
18
*Accepted_name.Source
19
*Accepted_name.Warnings
20
*Accepted_name.Accepted_name_lsid
schemas/vegbien.sql
4555 4555
--
4556 4556

  
4557 4557
CREATE VIEW unscrubbed_taxondetermination_view AS
4558
    SELECT taxondetermination.taxonoccurrence_id, (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Time_submitted" AS "Time_submitted", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Name_number" AS "Name_number", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Name_submitted" AS "Name_submitted", tnrs."Overall_score", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Name_matched" AS "Name_matched", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Name_matched_rank" AS "Name_matched_rank", tnrs."Name_score", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Name_matched_author" AS "Name_matched_author", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Name_matched_url" AS "Name_matched_url", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Author_matched" AS "Author_matched", tnrs."Author_score", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Family_matched" AS "Family_matched", tnrs."Family_score", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Name_matched_accepted_family" AS "Name_matched_accepted_family", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Genus_matched" AS "Genus_matched", tnrs."Genus_score", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Specific_epithet_matched" AS "Specific_epithet_matched", tnrs."Specific_epithet_score", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Infraspecific_rank" AS "Infraspecific_rank", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Infraspecific_epithet_matched" AS "Infraspecific_epithet_matched", tnrs."Infraspecific_epithet_score", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Infraspecific_rank_2" AS "Infraspecific_rank_2", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Infraspecific_epithet_2_matched" AS "Infraspecific_epithet_2_matched", tnrs."Infraspecific_epithet_2_score", tnrs."Annotations", tnrs."Unmatched_terms", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Taxonomic_status" AS "Taxonomic_status", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Selected" AS "Selected", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Source" AS "Source", (CASE WHEN (tnrs_accepted."Name_submitted" IS NOT NULL) THEN tnrs_accepted.* ELSE tnrs.* END)."Warnings" AS "Warnings" FROM ((((taxondetermination JOIN taxonverbatim USING (taxonverbatim_id)) JOIN taxonlabel USING (taxonlabel_id)) JOIN "TNRS".tnrs ON ((tnrs."Name_submitted" = taxonlabel.taxonomicname))) LEFT JOIN "TNRS".tnrs tnrs_accepted ON ((tnrs_accepted."Name_submitted" = tnrs."Accepted_scientific_name"))) WHERE ((taxondetermination.iscurrent AND (taxondetermination.source_id <> COALESCE((SELECT source.source_id FROM source WHERE (source.shortname = 'TNRS'::text)), 2147483647))) AND (tnrs."Max_score" >= (0.8)::double precision)) ORDER BY taxondetermination.taxonoccurrence_id;
4558
    SELECT taxondetermination.taxonoccurrence_id, tnrs."Time_submitted", tnrs."Name_number", tnrs."Name_submitted", tnrs."Overall_score", tnrs."Name_matched", tnrs."Name_matched_rank", tnrs."Name_score", tnrs."Name_matched_author", tnrs."Name_matched_url", tnrs."Author_matched", tnrs."Author_score", tnrs."Family_matched", tnrs."Family_score", tnrs."Name_matched_accepted_family", tnrs."Genus_matched", tnrs."Genus_score", tnrs."Specific_epithet_matched", tnrs."Specific_epithet_score", tnrs."Infraspecific_rank", tnrs."Infraspecific_epithet_matched", tnrs."Infraspecific_epithet_score", tnrs."Infraspecific_rank_2", tnrs."Infraspecific_epithet_2_matched", tnrs."Infraspecific_epithet_2_score", tnrs."Annotations", tnrs."Unmatched_terms", tnrs."Taxonomic_status", tnrs."Accepted_name", tnrs."Accepted_name_author", tnrs."Accepted_name_rank", tnrs."Accepted_name_url", tnrs."Accepted_name_species", tnrs."Accepted_name_family", tnrs."Selected", tnrs."Source", tnrs."Warnings", tnrs."Accepted_name_lsid", tnrs."Accepted_scientific_name", tnrs."Max_score", tnrs_accepted."Time_submitted" AS "Accepted_name.Time_submitted", tnrs_accepted."Name_number" AS "Accepted_name.Name_number", tnrs_accepted."Name_submitted" AS "Accepted_name.Name_submitted", tnrs_accepted."Overall_score" AS "Accepted_name.Overall_score", tnrs_accepted."Name_matched" AS "Accepted_name.Name_matched", tnrs_accepted."Name_matched_rank" AS "Accepted_name.Name_matched_rank", tnrs_accepted."Name_score" AS "Accepted_name.Name_score", tnrs_accepted."Name_matched_author" AS "Accepted_name.Name_matched_author", tnrs_accepted."Name_matched_url" AS "Accepted_name.Name_matched_url", tnrs_accepted."Author_matched" AS "Accepted_name.Author_matched", tnrs_accepted."Author_score" AS "Accepted_name.Author_score", tnrs_accepted."Family_matched" AS "Accepted_name.Family_matched", tnrs_accepted."Family_score" AS "Accepted_name.Family_score", tnrs_accepted."Name_matched_accepted_family" AS "Accepted_name.Name_matched_accepted_family", tnrs_accepted."Genus_matched" AS "Accepted_name.Genus_matched", tnrs_accepted."Genus_score" AS "Accepted_name.Genus_score", tnrs_accepted."Specific_epithet_matched" AS "Accepted_name.Specific_epithet_matched", tnrs_accepted."Specific_epithet_score" AS "Accepted_name.Specific_epithet_score", tnrs_accepted."Infraspecific_rank" AS "Accepted_name.Infraspecific_rank", tnrs_accepted."Infraspecific_epithet_matched" AS "Accepted_name.Infraspecific_epithet_matched", tnrs_accepted."Infraspecific_epithet_score" AS "Accepted_name.Infraspecific_epithet_score", tnrs_accepted."Infraspecific_rank_2" AS "Accepted_name.Infraspecific_rank_2", tnrs_accepted."Infraspecific_epithet_2_matched" AS "Accepted_name.Infraspecific_epithet_2_matched", tnrs_accepted."Infraspecific_epithet_2_score" AS "Accepted_name.Infraspecific_epithet_2_score", tnrs_accepted."Annotations" AS "Accepted_name.Annotations", tnrs_accepted."Unmatched_terms" AS "Accepted_name.Unmatched_terms", tnrs_accepted."Taxonomic_status" AS "Accepted_name.Taxonomic_status", tnrs_accepted."Accepted_name" AS "Accepted_name.Accepted_name", tnrs_accepted."Accepted_name_author" AS "Accepted_name.Accepted_name_author", tnrs_accepted."Accepted_name_rank" AS "Accepted_name.Accepted_name_rank", tnrs_accepted."Accepted_name_url" AS "Accepted_name.Accepted_name_url", tnrs_accepted."Accepted_name_species" AS "Accepted_name.Accepted_name_species", tnrs_accepted."Accepted_name_family" AS "Accepted_name.Accepted_name_family", tnrs_accepted."Selected" AS "Accepted_name.Selected", tnrs_accepted."Source" AS "Accepted_name.Source", tnrs_accepted."Warnings" AS "Accepted_name.Warnings", tnrs_accepted."Accepted_name_lsid" AS "Accepted_name.Accepted_name_lsid", tnrs_accepted."Accepted_scientific_name" AS "Accepted_name.Accepted_scientific_name", tnrs_accepted."Max_score" AS "Accepted_name.Max_score" FROM ((((taxondetermination JOIN taxonverbatim USING (taxonverbatim_id)) JOIN taxonlabel USING (taxonlabel_id)) JOIN "TNRS".tnrs ON ((tnrs."Name_submitted" = taxonlabel.taxonomicname))) LEFT JOIN "TNRS".tnrs tnrs_accepted ON ((tnrs_accepted."Name_submitted" = tnrs."Accepted_scientific_name"))) WHERE ((taxondetermination.iscurrent AND (taxondetermination.source_id <> COALESCE((SELECT source.source_id FROM source WHERE (source.shortname = 'TNRS'::text)), 2147483647))) AND (tnrs."Max_score" >= (0.8)::double precision)) ORDER BY taxondetermination.taxonoccurrence_id;
4559 4559

  
4560 4560

  
4561 4561
--
4562 4562
-- Name: VIEW unscrubbed_taxondetermination_view; Type: COMMENT; Schema: public; Owner: -
4563 4563
--
4564 4564

  
4565
COMMENT ON VIEW unscrubbed_taxondetermination_view IS 'Note that sorting on taxonoccurrence_id does not create sort order ambiguity between taxondeterminations with the same taxonoccurrence_id, because there is only one current determination per taxonoccurrence.
4565
COMMENT ON VIEW unscrubbed_taxondetermination_view IS 'Note that sorting on taxonoccurrence_id does not create sort order ambiguity between taxondeterminations with the same taxonoccurrence_id, because there is only one current determination per taxonoccurrence.';
4566 4566

  
4567
Uses the most canonicalized name output by TNRS. This will be the accepted name if available, and the matched name otherwise. In either case, the match scores are always from the matched name, not the accepted name (whose match scores should always be close to 1).
4568
';
4569 4567

  
4570

  
4571 4568
--
4572 4569
-- Name: userdefined; Type: TABLE; Schema: public; Owner: -; Tablespace: 
4573 4570
--

Also available in: Unified diff