Project

General

Profile

« Previous | Next » 

Revision 5225

schemas/vegbien.sql: Renamed taxonpath -> taxonconcept as part of taxonomic schema refactoring at <https://projects.nceas.ucsb.edu/nceas/projects/bien/wiki/2012-10-03_conference_call#Taxonomic-schema-refactoring>

View differences:

inputs/CTFS/TaxonOccurrence/VegBIEN.csv
9 9
CensusID,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists",
10 10
PlotID,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists",
11 11
SpeciesInvID,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/1,
12
SubSpeciesName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=subspecies]/taxonname",
13
SpeciesName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
14
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
15
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",
16
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",
17
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
18
SpeciesName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
19
SubSpeciesName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/4",
20
Family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/family,
21
Genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/genus,
22
SpeciesName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/species,
23
SubSpeciesName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/1,
12
SubSpeciesName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=subspecies]/taxonname",
13
SpeciesName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
14
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
15
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",
16
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",
17
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
18
SpeciesName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
19
SubSpeciesName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/4",
20
Family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/family,
21
Genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/genus,
22
SpeciesName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/species,
23
SubSpeciesName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/1,
24 24
Description,,** No join mapping for *Description ** 
25 25
FamilyID,,** No join mapping for *FamilyID ** 
26 26
FieldFamily,,** No join mapping for *FieldFamily ** 
inputs/FIA/Organism/VegBIEN.csv
14 14
TreeTag,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/tag,
15 15
PlotCD,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/cond/_exists",
16 16
TreeTag,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/1/_first/2",
17
SpecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
18
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
19
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
20
SpecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
21
Genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/genus,
22
SpecificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/species,
17
SpecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
18
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
19
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
20
SpecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
21
Genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/genus,
22
SpecificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/species,
23 23
County,/location/locationplace/*_id/placepath/county,
24 24
StateProvince,/location/locationplace/*_id/placepath/stateprovince,
25 25
HOM,,** No join mapping for *HOM ** 
inputs/SALVIAS/plotObservations/VegBIEN.csv
57 57
tag1,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/1/_first/2/_alt/2","The second tag supercedes the first. Brad: Another type of code, typically a number, used by the original data provider to indicate an individual tree. These are numbers on physical tags attached to the tree. Tag2 Is the same thing, only used if the first tag was lost. Obviously not a good system as it's possible a tree tag could be lost and changed more than once."
58 58
Habit,"/location/locationevent/taxonoccurrence/growthform/_map:[./{T,Arbol,palm}=tree,./{H,""Hemiepífito""}=hemiepiphyte,./{L,l,""L?"",Liana}=liana,E=epiphyte,S=shrub,Hb=herb,""vine-herbaceous""=vine,graminoid=grass,rosette=forb,*=*]/value","Brad: This is growth form (tree, shrub, herb, etc.). It is an observation of a trait.; According to <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data.habit>, <https://projects.nceas.ucsb.edu/nceas/projects/bien/wiki/SALVIAS#Habit>"
59 59
PlotObsID,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/else","Brad: Neither is correct; this is just an internal ID for table plotObservations. However, it has the important property of uniquely identifying an ""observation"", which is an individual tree, in the case of an individual observation, or a records of a species with an associated count of individuals or measurement of percent cover, in the case of aggregate observations. Not sure where to store this. Main point is that it is not part of the original data, but an auto_increment added later."
60
infra_ep_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/taxonname",
61
infra_ep_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/cond",
62
infra_rank_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/then",
63
auth,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/author_id/party/surname",Brad: This is the author of the scientificName.
64
Species,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
65
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
66
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",
67
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",
68
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
69
Species,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
70
infra_ep_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
71
infra_rank_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
72
infra_ep_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2",
73
auth,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/2",Brad: This is the author of the scientificName.
74
auth,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/author,Brad: This is the author of the scientificName.
75
Family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/family,
76
Genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/genus,
77
Species,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/species,
78
infra_ep_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
79
infra_rank_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
80
infra_ep_1,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/2/_join_words/2,
60
infra_ep_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/taxonname",
61
infra_ep_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/cond",
62
infra_rank_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/then",
63
auth,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/author_id/party/surname",Brad: This is the author of the scientificName.
64
Species,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
65
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
66
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",
67
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",
68
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
69
Species,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
70
infra_ep_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
71
infra_rank_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
72
infra_ep_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2",
73
auth,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/2",Brad: This is the author of the scientificName.
74
auth,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/author,Brad: This is the author of the scientificName.
75
Family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/family,
76
Genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/genus,
77
Species,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/species,
78
infra_ep_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
79
infra_rank_1,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
80
infra_ep_1,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/2/_join_words/2,
81 81
cfaff,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/taxonfit,"Brad: Not sure where this goes. Indicator of identification uncertainty. 'cf.'=similar to the species listed, 'aff.'=related to the species list, but not the same. You'll need to check with Bob and with Nick where these go in VegX and VegBank."
82
OrigFamily,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonpath/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1,Brad: OMIT
83
OrigGenus,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonpath/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2,
84
OrigSpecies,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonpath/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3,Brad: OMIT
85
OrigFamily,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonpath/family,Brad: OMIT
86
OrigGenus,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonpath/genus,
87
OrigSpecies,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonpath/species,Brad: OMIT
82
OrigFamily,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonconcept/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1,Brad: OMIT
83
OrigGenus,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonconcept/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2,
84
OrigSpecies,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonconcept/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3,Brad: OMIT
85
OrigFamily,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonconcept/family,Brad: OMIT
86
OrigGenus,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonconcept/genus,
87
OrigSpecies,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonconcept/species,Brad: OMIT
88 88
coll_firstname,/location/locationevent/taxonoccurrence/verbatimcollectorname/_join_words/1,Brad: See comment above
89 89
coll_lastname,/location/locationevent/taxonoccurrence/verbatimcollectorname/_join_words/2,"Brad: This is the collector of a separate specimen which vouchers this tree or species. I worry that vouchers are not properly accommodated in VegX. Again, we need to check with Nick."
90 90
DetType,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/cond/_eq:[right=indirect]/left","Brad: A SALVIAS value referring to the relationship between the voucher specimen and the observation. Affect how the identification of the specimen(latin name) is transferred to the observation. 'direct'=voucher specimen was collected from this same tree; they are one and the same individual. 'indirect'=voucher specimen was collected for a different individual, but the original data provider confirmed that this is the same species. 'default'=basically same as 'indirect'. 'uncollected'=no voucher specimen, data provider  asserted that this was the name but was unable to collect. The main different is that with 'direct', 'indirect', and 'default', the scientific name can be updated automatically based on the name attached to the specimen voucher (assuming you have a link to that data, presumably from a herbarium database. Whereas, if det_type='uncollected', the name can never change because there is no specimen."
inputs/.TNRS/tnrs/VegBIEN.csv
1 1
TNRS,VegBIEN:/_simplifyPath:[next=parent_id]/path,Comments
2 2
Name_submitted,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/2",
3 3
Name_matched,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/3",
4
Accepted_name,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/cond/_exists",
5
Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/taxonname",
6
Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/cond",
7
Name_matched_rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/then",
8
Name_matched_author,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/author_id/party/surname",Contains author based on matched name
9
Specific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
10
Genus_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
11
Name_matched_accepted_family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",Contains family based on matched name
12
Name_submitted,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/1",
13
Name_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1",
14
Name_matched_accepted_family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",Contains family based on matched name
15
Genus_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
16
Specific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
17
Unmatched_terms,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/2",
18
Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
19
Name_matched_rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
20
Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2",
21
Name_matched_author,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/2",Contains author based on matched name
22
Accepted_name_author,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_set_canon_taxonpath/canon_taxonpath_id/taxonpath/author,
23
Accepted_name_family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_set_canon_taxonpath/canon_taxonpath_id/taxonpath/family,
24
Accepted_name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_set_canon_taxonpath/canon_taxonpath_id/taxonpath/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1,
25
Accepted_name_family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_set_canon_taxonpath/canon_taxonpath_id/taxonpath/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1,
26
Accepted_name_rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_set_canon_taxonpath/canon_taxonpath_id/taxonpath/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
27
Accepted_name_author,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_set_canon_taxonpath/canon_taxonpath_id/taxonpath/identifyingtaxonomicname/_alt/2/_join_words/2,
28
Accepted_name_rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_set_canon_taxonpath/canon_taxonpath_id/taxonpath/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
29
Accepted_name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_set_canon_taxonpath/canon_taxonpath_id/taxonpath/taxonomicname,
30
Name_matched_author,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/author,Contains author based on matched name
31
Name_matched_accepted_family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/family,Contains family based on matched name
32
Genus_matched,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/genus,
33
Unmatched_terms,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/morphospecies,
34
Specific_epithet_matched,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/species,
35
Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
36
Name_matched_rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
37
Infraspecific_epithet_matched,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/2/_join_words/2,
38
Name_matched,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/taxonomicname,
39
Name_submitted,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/taxonomicnamewithauthor,
4
Accepted_name,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/cond/_exists",
5
Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/taxonname",
6
Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/cond",
7
Name_matched_rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/then",
8
Name_matched_author,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/author_id/party/surname",Contains author based on matched name
9
Specific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
10
Genus_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
11
Name_matched_accepted_family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",Contains family based on matched name
12
Name_submitted,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/1",
13
Name_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1",
14
Name_matched_accepted_family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",Contains family based on matched name
15
Genus_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
16
Specific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
17
Unmatched_terms,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/2",
18
Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
19
Name_matched_rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
20
Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2",
21
Name_matched_author,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/2",Contains author based on matched name
22
Accepted_name_author,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_set_canon_taxonconcept/canon_taxonconcept_id/taxonconcept/author,
23
Accepted_name_family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_set_canon_taxonconcept/canon_taxonconcept_id/taxonconcept/family,
24
Accepted_name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_set_canon_taxonconcept/canon_taxonconcept_id/taxonconcept/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1,
25
Accepted_name_family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_set_canon_taxonconcept/canon_taxonconcept_id/taxonconcept/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1,
26
Accepted_name_rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_set_canon_taxonconcept/canon_taxonconcept_id/taxonconcept/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
27
Accepted_name_author,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_set_canon_taxonconcept/canon_taxonconcept_id/taxonconcept/identifyingtaxonomicname/_alt/2/_join_words/2,
28
Accepted_name_rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_set_canon_taxonconcept/canon_taxonconcept_id/taxonconcept/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
29
Accepted_name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_set_canon_taxonconcept/canon_taxonconcept_id/taxonconcept/taxonomicname,
30
Name_matched_author,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/author,Contains author based on matched name
31
Name_matched_accepted_family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/family,Contains family based on matched name
32
Genus_matched,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/genus,
33
Unmatched_terms,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/morphospecies,
34
Specific_epithet_matched,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/species,
35
Infraspecific_epithet_matched,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
36
Name_matched_rank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
37
Infraspecific_epithet_matched,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/2/_join_words/2,
38
Name_matched,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/taxonomicname,
39
Name_submitted,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/taxonomicnamewithauthor,
40 40
Accepted_name_lsid,,** No non-empty join mapping for OMIT ** 
41 41
Accepted_name_species,,** No non-empty join mapping for OMIT ** Also contains genus. Omitted because Accepted_name contains more info.
42 42
Accepted_name_url,,** No non-empty join mapping for OMIT ** 
inputs/U/Specimen/VegBIEN.csv
16 16
Detby,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/givenname/_namePart/first,
17 17
Detby,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/middlename/_namePart/middle,
18 18
Detby,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/surname/_namePart/last,
19
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
20
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",
21
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",
22
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
23
Family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/family,
24
Genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/genus,
19
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
20
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",
21
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",
22
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
23
Family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/family,
24
Genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/genus,
25 25
Detyy,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/determinationdate/_alt/2/_date/year/_nullIf:[null=0,type=float]/value",
26 26
cf,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/taxonfit,
27 27
Collector,/location/locationevent/taxonoccurrence/verbatimcollectorname/_join/1,
inputs/ARIZ/Specimen/test.xml.ref
113 113
                                    <surname><_namePart><last>$IdentifiedBy</last></_namePart></surname>
114 114
                                </party>
115 115
                            </party_id>
116
                            <taxonpath_id>
117
                                <taxonpath>
118
                                    <canon_taxonpath_id>
119
                                        <taxonpath>
116
                            <taxonconcept_id>
117
                                <taxonconcept>
118
                                    <canon_taxonconcept_id>
119
                                        <taxonconcept>
120 120
                                            <datasource_id><party><organizationname>TNRS</organizationname></party></datasource_id>
121 121
                                            <identifyingtaxonomicname>
122 122
                                                <_alt>
......
136 136
                                                    </2>
137 137
                                                </_alt>
138 138
                                            </identifyingtaxonomicname>
139
                                        </taxonpath>
140
                                    </canon_taxonpath_id>
139
                                        </taxonconcept>
140
                                    </canon_taxonconcept_id>
141 141
                                    <class>$Class</class>
142 142
                                    <family>$Family</family>
143 143
                                    <genus>$Genus</genus>
......
148 148
                                    <subspecies>$Subspecies</subspecies>
149 149
                                    <taxonomicname>$ScientificName</taxonomicname>
150 150
                                    <taxonomicnamewithauthor>$ScientificNameAuthor</taxonomicnamewithauthor>
151
                                </taxonpath>
152
                            </taxonpath_id>
151
                                </taxonconcept>
152
                            </taxonconcept_id>
153 153
                            <determinationdate>
154 154
                                <_date>
155 155
                                    <day>
inputs/NCU-NCSC/Specimen/VegBIEN.csv
14 14
Full Taxon Name,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/2/_first/3",
15 15
Cultivated?,/location/locationevent/taxonoccurrence/iscultivated/_alt/1,
16 16
Accession Number,/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/3,
17
Full Taxon Name,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1",
18
Full Taxon Name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/taxonomicname,
17
Full Taxon Name,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1",
18
Full Taxon Name,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/taxonomicname,
19 19
Barcode,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/then",
20 20
Country,/location/locationplace/*_id/placepath/country,
21 21
County,/location/locationplace/*_id/placepath/county,
inputs/U/Specimen/test.xml.ref
72 72
                                    <surname><_namePart><last>$Detby</last></_namePart></surname>
73 73
                                </party>
74 74
                            </party_id>
75
                            <taxonpath_id>
76
                                <taxonpath>
77
                                    <canon_taxonpath_id>
78
                                        <taxonpath>
75
                            <taxonconcept_id>
76
                                <taxonconcept>
77
                                    <canon_taxonconcept_id>
78
                                        <taxonconcept>
79 79
                                            <datasource_id><party><organizationname>TNRS</organizationname></party></datasource_id>
80 80
                                            <identifyingtaxonomicname>
81 81
                                                <_join_words>
......
83 83
                                                    <2>$Genus</2>
84 84
                                                </_join_words>
85 85
                                            </identifyingtaxonomicname>
86
                                        </taxonpath>
87
                                    </canon_taxonpath_id>
86
                                        </taxonconcept>
87
                                    </canon_taxonconcept_id>
88 88
                                    <family>$Family</family>
89 89
                                    <genus>$Genus</genus>
90
                                </taxonpath>
91
                            </taxonpath_id>
90
                                </taxonconcept>
91
                            </taxonconcept_id>
92 92
                            <determinationdate>
93 93
                                <_date>
94 94
                                    <year>
inputs/GBIF/Specimen/VegBIEN.csv
16 16
IdentifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/givenname/_namePart/first,
17 17
IdentifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/middlename/_namePart/middle,
18 18
IdentifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/surname/_namePart/last,
19
InfraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/taxonname",
20
InfraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/cond",
21
AuthorOfScientificName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/author_id/party/surname",
22
SpecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
23
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
24
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",
25
ScientificName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1",
26
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",
27
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
28
SpecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
29
InfraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
30
InfraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2",
31
AuthorOfScientificName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/2",
32
AuthorOfScientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/author,
33
Family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/family,
34
Genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/genus,
35
SpecificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/species,
36
InfraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
37
InfraspecificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/2/_join_words/2,
38
ScientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/taxonomicname,
39
ScientificNameOriginal,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonpath/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1,
40
GBIFFamilyOriginal,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonpath/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1,
41
GBIFGenusOriginal,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonpath/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2,
42
GBIFFamilyOriginal,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonpath/family,
43
GBIFGenusOriginal,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonpath/genus,
44
ScientificNameOriginal,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonpath/taxonomicname,
19
InfraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/taxonname",
20
InfraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/cond",
21
AuthorOfScientificName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/author_id/party/surname",
22
SpecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
23
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
24
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",
25
ScientificName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1",
26
Family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",
27
Genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
28
SpecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
29
InfraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
30
InfraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2",
31
AuthorOfScientificName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/2",
32
AuthorOfScientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/author,
33
Family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/family,
34
Genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/genus,
35
SpecificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/species,
36
InfraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
37
InfraspecificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/2/_join_words/2,
38
ScientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/taxonomicname,
39
ScientificNameOriginal,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonconcept/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1,
40
GBIFFamilyOriginal,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonconcept/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1,
41
GBIFGenusOriginal,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonconcept/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2,
42
GBIFFamilyOriginal,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonconcept/family,
43
GBIFGenusOriginal,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonconcept/genus,
44
ScientificNameOriginal,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonconcept/taxonomicname,
45 45
Collector,/location/locationevent/taxonoccurrence/verbatimcollectorname,
46 46
CatalogNO,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/then",
47 47
Locality,/location/locationnarrative/_merge/1,
inputs/NCU-NCSC/Specimen/test.xml.ref
64 64
                        <iscultivated>$Cultivated?</iscultivated>
65 65
                        <sourceaccessioncode>$Accession Number</sourceaccessioncode>
66 66
                        <taxondetermination>
67
                            <taxonpath_id>
68
                                <taxonpath>
69
                                    <canon_taxonpath_id>
70
                                        <taxonpath>
67
                            <taxonconcept_id>
68
                                <taxonconcept>
69
                                    <canon_taxonconcept_id>
70
                                        <taxonconcept>
71 71
                                            <datasource_id><party><organizationname>TNRS</organizationname></party></datasource_id>
72 72
                                            <identifyingtaxonomicname>$Full Taxon Name</identifyingtaxonomicname>
73
                                        </taxonpath>
74
                                    </canon_taxonpath_id>
73
                                        </taxonconcept>
74
                                    </canon_taxonconcept_id>
75 75
                                    <taxonomicname>$Full Taxon Name</taxonomicname>
76
                                </taxonpath>
77
                            </taxonpath_id>
76
                                </taxonconcept>
77
                            </taxonconcept_id>
78 78
                        </taxondetermination>
79 79
                    </taxonoccurrence>
80 80
                </locationevent>
inputs/MO/Specimen/VegBIEN.csv
22 22
IdentifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/givenname/_namePart/first,
23 23
IdentifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/middlename/_namePart/middle,
24 24
IdentifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/surname/_namePart/last,
25
Subspecies,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=subspecies]/taxonname",
26
ScientificNameAuthor,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/author_id/party/surname",
27
species,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
28
genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
29
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",
30
Kingdom,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,family,order,class,phylum,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=kingdom]/taxonname",
31
ScientificName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1",
32
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",
33
genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
34
species,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
35
Subspecies,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/4",
36
ScientificNameAuthor,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/2",
37
ScientificNameAuthor,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/author,
38
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/family,
39
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/genus,
40
Kingdom,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/kingdom,
41
species,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/species,
42
Subspecies,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/1,
43
ScientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/taxonomicname,
25
Subspecies,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=subspecies]/taxonname",
26
ScientificNameAuthor,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/author_id/party/surname",
27
species,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
28
genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
29
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",
30
Kingdom,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,family,order,class,phylum,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=kingdom]/taxonname",
31
ScientificName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1",
32
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",
33
genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
34
species,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
35
Subspecies,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/4",
36
ScientificNameAuthor,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/2",
37
ScientificNameAuthor,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/author,
38
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/family,
39
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/genus,
40
Kingdom,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/kingdom,
41
species,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/species,
42
Subspecies,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/1,
43
ScientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/taxonomicname,
44 44
Collector,/location/locationevent/taxonoccurrence/verbatimcollectorname,
45 45
CatalogNumber,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/then",
46 46
Locality,/location/locationnarrative/_merge/1,
inputs/QMOR/Specimen/VegBIEN.csv
29 29
identifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/givenname/_namePart/first,
30 30
identifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/middlename/_namePart/middle,
31 31
identifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/surname/_namePart/last,
32
infraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/taxonname",
33
infraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/cond",
34
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/then",
35
scientificNameAuthorship,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/author_id/party/surname",
36
specificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
37
genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
38
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",
39
order,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,family,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=order]/taxonname",
40
class,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,family,order,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=class]/taxonname",
41
phylum,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,family,order,class,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=phylum]/taxonname",
42
kingdom,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,family,order,class,phylum,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=kingdom]/taxonname",
43
scientificName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1",
44
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",
45
genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
46
specificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
47
infraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
48
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
49
infraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2",
50
scientificNameAuthorship,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonpath_id/taxonpath:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/2",
51
scientificNameAuthorship,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/author,
52
class,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/class,
53
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/family,
54
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/genus,
55
kingdom,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/kingdom,
56
order,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/order,
57
phylum,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/phylum,
58
specificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/species,
59
infraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
60
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
61
infraspecificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/subspecies/_alt/2/_join_words/2,
62
scientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonpath/taxonomicname,
32
infraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/taxonname",
33
infraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/cond",
34
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=infraspecies]/verbatimrank/_if[@name=""if has infraspecificEpithet""]/then",
35
scientificNameAuthorship,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/author_id/party/surname",
36
specificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=species]/taxonname",
37
genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=genus]/taxonname",
38
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=family]/taxonname",
39
order,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,family,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=order]/taxonname",
40
class,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,family,order,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=class]/taxonname",
41
phylum,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,family,order,class,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=phylum]/taxonname",
42
kingdom,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/then/taxon_id/_forEach:[in:[cultivar,forma,variety,infraspecies,subspecies,species,genus,family,order,class,phylum,],do=""taxon[rank=_val]/parent_id""]/taxon[rank=kingdom]/taxonname",
43
scientificName,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/1",
44
family,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/1",
45
genus,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/2",
46
specificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/3/_join_words/1",
47
infraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
48
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
49
infraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/1/_alt/2/_join_words/5/_join_words/2",
50
scientificNameAuthorship,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/_if[@name=""if has accepted name""]/{then/.,else/canon_taxonconcept_id/taxonconcept:[datasource_id/party/organizationname=TNRS]}/identifyingtaxonomicname/_alt/2/_join_words/2",
51
scientificNameAuthorship,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/author,
52
class,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/class,
53
family,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/family,
54
genus,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/genus,
55
kingdom,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/kingdom,
56
order,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/order,
57
phylum,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/phylum,
58
specificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/species,
59
infraspecificEpithet,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/cond",
60
taxonRank,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/2/_join_words/1/_if[@name=""if has infraspecificEpithet""]/then",
61
infraspecificEpithet,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/subspecies/_alt/2/_join_words/2,
62
scientificName,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonconcept/taxonomicname,
63 63
dateIdentified,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/determinationdate/_alt/1/_*/date/_dateRangeStart/value,
64 64
identificationQualifier,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/taxonfit,
65 65
recordedBy,/location/locationevent/taxonoccurrence/verbatimcollectorname,
inputs/SpeciesLink/Specimen/test.xml.ref
252 252
                                    </surname>
253 253
                                </party>
254 254
                            </party_id>
255
                            <taxonpath_id>
256
                                <taxonpath>
257
                                    <canon_taxonpath_id>
258
                                        <taxonpath>
255
                            <taxonconcept_id>
256
                                <taxonconcept>
257
                                    <canon_taxonconcept_id>
258
                                        <taxonconcept>
259 259
                                            <datasource_id><party><organizationname>TNRS</organizationname></party></datasource_id>
260 260
                                            <identifyingtaxonomicname>
261 261
                                                <_join_words>
......
311 311
                                                    </2>
312 312
                                                </_join_words>
313 313
                                            </identifyingtaxonomicname>
314
                                        </taxonpath>
315
                                    </canon_taxonpath_id>
314
                                        </taxonconcept>
315
                                    </canon_taxonconcept_id>
316 316
                                    <author>
317 317
                                        <_alt>
318 318
                                            <1>$dwc_terms_scientificNameAuthorship</1>
......
387 387
                                            <2>$dwc_terms_scientificName</2>
388 388
                                        </_alt>
389 389
                                    </taxonomicname>
390
                                </taxonpath>
391
                            </taxonpath_id>
390
                                </taxonconcept>
391
                            </taxonconcept_id>
392 392
                            <determinationdate>
393 393
                                <_alt>
394 394
                                    <1><_date><date><_dateRangeStart><value>$dwc_terms_dateIdentified</value></_dateRangeStart></date></_date></1>
inputs/VegBank/taxonobservation_/test.xml.ref
16 16
                        <authortaxoncode>$authorplantname</authortaxoncode>
17 17
                        <sourceaccessioncode>$taxonobservation_id</sourceaccessioncode>
18 18
                        <taxondetermination>
19
                            <taxonpath_id>
20
                                <taxonpath>
21
                                    <canon_taxonpath_id>
22
                                        <taxonpath>
19
                            <taxonconcept_id>
20
                                <taxonconcept>
21
                                    <canon_taxonconcept_id>
22
                                        <taxonconcept>
23 23
                                            <datasource_id><party><organizationname>TNRS</organizationname></party></datasource_id>
24 24
                                            <identifyingtaxonomicname>
25 25
                                                <_join_words>
......
41 41
                                                    </7>
42 42
                                                </_join_words>
43 43
                                            </identifyingtaxonomicname>
44
                                        </taxonpath>
45
                                    </canon_taxonpath_id>
44
                                        </taxonconcept>
45
                                    </canon_taxonconcept_id>
46 46
                                    <class>$Class</class>
47 47
                                    <family>$Family</family>
48 48
                                    <forma>$Forma</forma>
......
52 52
                                    <species>$Species</species>
53 53
                                    <subspecies>$Subspecies</subspecies>
54 54
                                    <variety>$Variety</variety>
55
                                </taxonpath>
56
                            </taxonpath_id>
55
                                </taxonconcept>
56
                            </taxonconcept_id>
57 57
                            <determinationdate><_date><date><_dateRangeStart><value>$interpretationdate</value></_dateRangeStart></date></_date></determinationdate>
58 58
                            <taxonfit>$taxonfit</taxonfit>
59 59
                        </taxondetermination>
60 60
                        <taxondetermination>
61 61
                            <isoriginal>true</isoriginal>
62
                            <taxonpath_id>
63
                                <taxonpath>
64
                                    <canon_taxonpath_id>
65
                                        <taxonpath>
62
                            <taxonconcept_id>
63
                                <taxonconcept>
64
                                    <canon_taxonconcept_id>
65
                                        <taxonconcept>
66 66
                                            <datasource_id><party><organizationname>TNRS</organizationname></party></datasource_id>
67 67
                                            <identifyingtaxonomicname>$authorplantname</identifyingtaxonomicname>
68
                                        </taxonpath>
69
                                    </canon_taxonpath_id>
68
                                        </taxonconcept>
69
                                    </canon_taxonconcept_id>
70 70
                                    <taxonomicname>$authorplantname</taxonomicname>
71
                                </taxonpath>
72
                            </taxonpath_id>
71
                                </taxonconcept>
72
                            </taxonconcept_id>
73 73
                        </taxondetermination>
74 74
                    </taxonoccurrence>
75 75
                </locationevent>
inputs/MO/Specimen/test.xml.ref
85 85
                                    <surname><_namePart><last>$IdentifiedBy</last></_namePart></surname>
86 86
                                </party>
87 87
                            </party_id>
88
                            <taxonpath_id>
89
                                <taxonpath>
90
                                    <canon_taxonpath_id>
91
                                        <taxonpath>
88
                            <taxonconcept_id>
89
                                <taxonconcept>
90
                                    <canon_taxonconcept_id>
91
                                        <taxonconcept>
92 92
                                            <datasource_id><party><organizationname>TNRS</organizationname></party></datasource_id>
93 93
                                            <identifyingtaxonomicname>
94 94
                                                <_join_words>
......
108 108
                                                    <2>$ScientificNameAuthor</2>
109 109
                                                </_join_words>
110 110
                                            </identifyingtaxonomicname>
111
                                        </taxonpath>
112
                                    </canon_taxonpath_id>
111
                                        </taxonconcept>
112
                                    </canon_taxonconcept_id>
113 113
                                    <author>$ScientificNameAuthor</author>
114 114
                                    <family>$family</family>
115 115
                                    <genus>$genus</genus>
......
117 117
                                    <species>$species</species>
118 118
                                    <subspecies>$Subspecies</subspecies>
119 119
                                    <taxonomicname>$ScientificName</taxonomicname>
120
                                </taxonpath>
121
                            </taxonpath_id>
120
                                </taxonconcept>
121
                            </taxonconcept_id>
122 122
                        </taxondetermination>
123 123
                        <verbatimcollectorname>$Collector</verbatimcollectorname>
124 124
                    </taxonoccurrence>
inputs/QMOR/Specimen/test.xml.ref
97 97
                                    <surname><_namePart><last>$identifiedBy</last></_namePart></surname>
98 98
                                </party>
99 99
                            </party_id>
100
                            <taxonpath_id>
101
                                <taxonpath>
102
                                    <canon_taxonpath_id>
103
                                        <taxonpath>
100
                            <taxonconcept_id>
101
                                <taxonconcept>
102
                                    <canon_taxonconcept_id>
103
                                        <taxonconcept>
104 104
                                            <datasource_id><party><organizationname>TNRS</organizationname></party></datasource_id>
105 105
                                            <identifyingtaxonomicname>
106 106
                                                <_join_words>
......
130 130
                                                    <2>$scientificNameAuthorship</2>
131 131
                                                </_join_words>
132 132
                                            </identifyingtaxonomicname>
133
                                        </taxonpath>
134
                                    </canon_taxonpath_id>
133
                                        </taxonconcept>
134
                                    </canon_taxonconcept_id>
135 135
                                    <author>$scientificNameAuthorship</author>
136 136
                                    <class>$class</class>
137 137
                                    <family>$family</family>
......
152 152
                                        </_join_words>
153 153
                                    </subspecies>
154 154
                                    <taxonomicname>$scientificName</taxonomicname>
155
                                </taxonpath>
156
                            </taxonpath_id>
155
                                </taxonconcept>
156
                            </taxonconcept_id>
157 157
                            <determinationdate><_date><date><_dateRangeStart><value>$dateIdentified</value></_dateRangeStart></date></_date></determinationdate>
158 158
                            <taxonfit>$identificationQualifier</taxonfit>
159 159
                        </taxondetermination>
schemas/filter_ERD.csv
1 1
"PostgreSQL","MySQL","Comments"
2 2
,,"fkeys to heavily-linked tables"
3 3
"^ALTER TABLE (?:commclass|taxonscope)\b[^;]*\bFOREIGN KEY\b[^;]*\bREFERENCES \b[^;]*;",,outward
4
"^ALTER TABLE (?:taxon|plant\w+)\b[^;]*\bFOREIGN KEY\b[^;]*\bREFERENCES taxonpath\b[^;]*;",,inward
4
"^ALTER TABLE (?:taxon|plant\w+)\b[^;]*\bFOREIGN KEY\b[^;]*\bREFERENCES taxonconcept\b[^;]*;",,inward
5 5
"^ALTER TABLE \b[^;]*\bFOREIGN KEY\b[^;]*\bREFERENCES coverindex\b[^;]*;",,inward
6 6
"^ALTER TABLE (?!method)\b[^;]*\bFOREIGN KEY\b[^;]*\bREFERENCES method\b[^;]*;",,inward
7 7
"^ALTER TABLE (?!party|address|telephone)\b[^;]*\bFOREIGN KEY\b[^;]*\bREFERENCES party\b[^;]*;",,inward
schemas/vegbien.sql
249 249

  
250 250

  
251 251
--
252
-- Name: _set_canon_taxonpath(integer, integer); Type: FUNCTION; Schema: public; Owner: -
252
-- Name: _set_canon_taxonconcept(integer, integer); Type: FUNCTION; Schema: public; Owner: -
253 253
--
254 254

  
255
CREATE FUNCTION _set_canon_taxonpath(taxonpath_id integer, canon_taxonpath_id integer) RETURNS integer
255
CREATE FUNCTION _set_canon_taxonconcept(taxonconcept_id integer, canon_taxonconcept_id integer) RETURNS integer
256 256
    LANGUAGE sql
257 257
    AS $_$
258
UPDATE taxonpath SET canon_taxonpath_id = $2 WHERE taxonpath_id = $1
259
RETURNING taxonpath_id
258
UPDATE taxonconcept SET canon_taxonconcept_id = $2 WHERE taxonconcept_id = $1
259
RETURNING taxonconcept_id
260 260
$_$;
261 261

  
262 262

  
......
408 408

  
409 409

  
410 410
--
411
-- Name: taxonpath_canon_taxonpath_id_self_ref(); Type: FUNCTION; Schema: public; Owner: -
411
-- Name: taxonconcept_canon_taxonconcept_id_self_ref(); Type: FUNCTION; Schema: public; Owner: -
412 412
--
413 413

  
414
CREATE FUNCTION taxonpath_canon_taxonpath_id_self_ref() RETURNS trigger
414
CREATE FUNCTION taxonconcept_canon_taxonconcept_id_self_ref() RETURNS trigger
415 415
    LANGUAGE plpgsql
416 416
    AS $$
417 417
BEGIN
418
    IF new.taxonpath_id IS NULL THEN -- prepopulate taxonpath_id
419
        new.taxonpath_id = nextval('taxonpath_taxonpath_id_seq'::regclass);
418
    IF new.taxonconcept_id IS NULL THEN -- prepopulate taxonconcept_id
419
        new.taxonconcept_id = nextval('taxonconcept_taxonconcept_id_seq'::regclass);
420 420
    END IF;
421
    IF new.canon_taxonpath_id = 0 THEN -- make self-reference
422
        new.canon_taxonpath_id = new.taxonpath_id;
421
    IF new.canon_taxonconcept_id = 0 THEN -- make self-reference
422
        new.canon_taxonconcept_id = new.taxonconcept_id;
423 423
    END IF;
424 424
    RETURN new;
425 425
END;
......
1081 1081

  
1082 1082

  
1083 1083
--
1084
-- Name: taxondetermination; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1084
-- Name: taxonconcept; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1085 1085
--
1086 1086

  
1087
CREATE TABLE taxondetermination (
1088
    taxondetermination_id integer NOT NULL,
1089
    taxonoccurrence_id integer NOT NULL,
1090
    taxonpath_id integer NOT NULL,
1091
    party_id integer,
1092
    role role DEFAULT 'unknown'::role NOT NULL,
1093
    determinationtype text,
1094
    reference_id integer,
1095
    isoriginal boolean DEFAULT false NOT NULL,
1096
    iscurrent boolean DEFAULT false NOT NULL,
1097
    taxonfit text,
1098
    taxonconfidence text,
1099
    grouptype text,
1100
    notes text,
1101
    notespublic boolean,
1102
    notesmgt boolean,
1103
    revisions boolean,
1104
    determinationdate timestamp with time zone,
1105
    accessioncode text
1087
CREATE TABLE taxonconcept (
1088
    taxonconcept_id integer NOT NULL,
1089
    datasource_id integer NOT NULL,
1090
    identifyingtaxonomicname text,
1091
    canon_taxonconcept_id integer,
1092
    taxon_id integer,
1093
    taxonomicname text,
1094
    author text,
1095
    taxonomicnamewithauthor text,
1096
    domain text,
1097
    kingdom text,
1098
    phylum text,
1099
    class text,
1100
    "order" text,
1101
    family text,
1102
    genus text,
1103
    species text,
1104
    subspecies text,
1105
    variety text,
1106
    forma text,
1107
    cultivar text,
1108
    morphospecies text,
1109
    otherranks rankedtaxonname[],
1110
    scope_id integer,
1111
    accessioncode text,
1112
    CONSTRAINT taxonconcept_required_key CHECK (((((((identifyingtaxonomicname IS NOT NULL) OR (taxonomicname IS NOT NULL)) OR (taxonomicnamewithauthor IS NOT NULL)) OR (family IS NOT NULL)) OR (genus IS NOT NULL)) OR (otherranks IS NOT NULL)))
1106 1113
);
1107 1114

  
1108 1115

  
1109 1116
--
1110
-- Name: TABLE taxondetermination; Type: COMMENT; Schema: public; Owner: -
1117
-- Name: TABLE taxonconcept; Type: COMMENT; Schema: public; Owner: -
1111 1118
--
1112 1119

  
1113
COMMENT ON TABLE taxondetermination IS 'Equivalent to VegBank''s taxoninterpretation table.';
1120
COMMENT ON TABLE taxonconcept IS 'The full path to a taxon, including all components of the taxonomic name. Can be either verbatim or accepted. For accepted names, points to the identified taxon in the tree of life.
1114 1121

  
1122
To include a taxon name at a rank with no explicit column, add it to the otherranks array.';
1115 1123

  
1124

  
1116 1125
--
1117
-- Name: taxonoccurrence; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1126
-- Name: COLUMN taxonconcept.identifyingtaxonomicname; Type: COMMENT; Schema: public; Owner: -
1118 1127
--
1119 1128

  
1120
CREATE TABLE taxonoccurrence (
1121
    taxonoccurrence_id integer NOT NULL,
1122
    datasource_id integer NOT NULL,
1123
    sourceaccessioncode text,
1124
    locationevent_id integer,
1125
    authortaxoncode text,
1126
    verbatimcollectorname text,
1127
    growthform growthform,
1128
    iscultivated boolean,
1129
    cultivatedbasis text,
1130
    isnative boolean,
1131
    accessioncode text
1132
);
1129
COMMENT ON COLUMN taxonconcept.identifyingtaxonomicname IS 'The taxonomic name that uniquely identifies this taxonconcept. If set, the other fields will not be used in duplicate elimination.';
1133 1130

  
1134 1131

  
1135 1132
--
1136
-- Name: TABLE taxonoccurrence; Type: COMMENT; Schema: public; Owner: -
1133
-- Name: COLUMN taxonconcept.canon_taxonconcept_id; Type: COMMENT; Schema: public; Owner: -
1137 1134
--
1138 1135

  
1139
COMMENT ON TABLE taxonoccurrence IS 'Equivalent to VegBank''s taxonobservation table.';
1136
COMMENT ON COLUMN taxonconcept.canon_taxonconcept_id IS 'The taxonconcept containing the accepted name of this verbatim taxonomic name. taxonconcepts should be linked in a three-level hierarchy of datasource name -> concatenated name -> accepted name.
1140 1137

  
1138
An accepted name should point to itself in this field. This will happen automatically by setting it to the special value 0.';
1141 1139

  
1140

  
1142 1141
--
1143
-- Name: COLUMN taxonoccurrence.iscultivated; Type: COMMENT; Schema: public; Owner: -
1142
-- Name: COLUMN taxonconcept.taxon_id; Type: COMMENT; Schema: public; Owner: -
1144 1143
--
1145 1144

  
1146
COMMENT ON COLUMN taxonoccurrence.iscultivated IS 'cultivated or wild';
1145
COMMENT ON COLUMN taxonconcept.taxon_id IS 'The corresponding taxon in the tree of life. Only used for parsed names.';
1147 1146

  
1148 1147

  
1149 1148
--
1150
-- Name: COLUMN taxonoccurrence.cultivatedbasis; Type: COMMENT; Schema: public; Owner: -
1149
-- Name: COLUMN taxonconcept.taxonomicname; Type: COMMENT; Schema: public; Owner: -
1151 1150
--
1152 1151

  
1153
COMMENT ON COLUMN taxonoccurrence.cultivatedbasis IS 'The reason why a taxonoccurrence was marked as cultivated (or not).';
1152
COMMENT ON COLUMN taxonconcept.taxonomicname IS 'The concatenated taxonomic name which uniquely identifies this taxon. Does not include the author of the name.
1154 1153

  
1154
Equivalent to Darwin Core''s scientificName.';
1155 1155

  
1156

  
1156 1157
--
1157
-- Name: COLUMN taxonoccurrence.isnative; Type: COMMENT; Schema: public; Owner: -
1158
-- Name: COLUMN taxonconcept.author; Type: COMMENT; Schema: public; Owner: -
1158 1159
--
1159 1160

  
1160
COMMENT ON COLUMN taxonoccurrence.isnative IS 'native or exotic';
1161
COMMENT ON COLUMN taxonconcept.author IS 'The author of the taxonomic name.
1161 1162

  
1163
Equivalent to Darwin Core''s scientificNameAuthorship.';
1162 1164

  
1165

  
1163 1166
--
1164
-- Name: taxonpath; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1167
-- Name: COLUMN taxonconcept.taxonomicnamewithauthor; Type: COMMENT; Schema: public; Owner: -
1165 1168
--
1166 1169

  
1167
CREATE TABLE taxonpath (
1168
    taxonpath_id integer NOT NULL,
1169
    datasource_id integer NOT NULL,
1170
    identifyingtaxonomicname text,
1171
    canon_taxonpath_id integer,
1172
    taxon_id integer,
1173
    taxonomicname text,
1174
    author text,
1175
    taxonomicnamewithauthor text,
1176
    domain text,
1177
    kingdom text,
1178
    phylum text,
1179
    class text,
1180
    "order" text,
1181
    family text,
1182
    genus text,
1183
    species text,
1184
    subspecies text,
1185
    variety text,
1186
    forma text,
1187
    cultivar text,
1188
    morphospecies text,
1189
    otherranks rankedtaxonname[],
1190
    scope_id integer,
1191
    accessioncode text,
1192
    CONSTRAINT taxonpath_required_key CHECK (((((((identifyingtaxonomicname IS NOT NULL) OR (taxonomicname IS NOT NULL)) OR (taxonomicnamewithauthor IS NOT NULL)) OR (family IS NOT NULL)) OR (genus IS NOT NULL)) OR (otherranks IS NOT NULL)))
1193
);
1170
COMMENT ON COLUMN taxonconcept.taxonomicnamewithauthor IS 'The concatenated taxonomic name which uniquely identifies this taxon, plus the author of that name.
1194 1171

  
1172
Equivalent to Darwin Core''s scientificName + scientificNameAuthorship.
1173
Equivalent to "Name sec. x".';
1195 1174

  
1175

  
1196 1176
--
1197
-- Name: TABLE taxonpath; Type: COMMENT; Schema: public; Owner: -
1177
-- Name: COLUMN taxonconcept.domain; Type: COMMENT; Schema: public; Owner: -
1198 1178
--
1199 1179

  
1200
COMMENT ON TABLE taxonpath IS 'The full path to a taxon, including all components of the taxonomic name. Can be either verbatim or accepted. For accepted names, points to the identified taxon in the tree of life.
1180
COMMENT ON COLUMN taxonconcept.domain IS 'The domain portion of the taxonomic name.';
1201 1181

  
1202
To include a taxon name at a rank with no explicit column, add it to the otherranks array.';
1203 1182

  
1204

  
1205 1183
--
1206
-- Name: COLUMN taxonpath.identifyingtaxonomicname; Type: COMMENT; Schema: public; Owner: -
1184
-- Name: COLUMN taxonconcept.kingdom; Type: COMMENT; Schema: public; Owner: -
1207 1185
--
1208 1186

  
1209
COMMENT ON COLUMN taxonpath.identifyingtaxonomicname IS 'The taxonomic name that uniquely identifies this taxonpath. If set, the other fields will not be used in duplicate elimination.';
1187
COMMENT ON COLUMN taxonconcept.kingdom IS 'The kingdom portion of the taxonomic name.';
1210 1188

  
1211 1189

  
1212 1190
--
1213
-- Name: COLUMN taxonpath.canon_taxonpath_id; Type: COMMENT; Schema: public; Owner: -
1191
-- Name: COLUMN taxonconcept.phylum; Type: COMMENT; Schema: public; Owner: -
1214 1192
--
1215 1193

  
1216
COMMENT ON COLUMN taxonpath.canon_taxonpath_id IS 'The taxonpath containing the accepted name of this verbatim taxonomic name. taxonpaths should be linked in a three-level hierarchy of datasource name -> concatenated name -> accepted name.
1194
COMMENT ON COLUMN taxonconcept.phylum IS 'The phylum portion of the taxonomic name.';
1217 1195

  
1218
An accepted name should point to itself in this field. This will happen automatically by setting it to the special value 0.';
1219 1196

  
1220

  
1221 1197
--
1222
-- Name: COLUMN taxonpath.taxon_id; Type: COMMENT; Schema: public; Owner: -
1198
-- Name: COLUMN taxonconcept.class; Type: COMMENT; Schema: public; Owner: -
1223 1199
--
1224 1200

  
1225
COMMENT ON COLUMN taxonpath.taxon_id IS 'The corresponding taxon in the tree of life. Only used for parsed names.';
1201
COMMENT ON COLUMN taxonconcept.class IS 'The class portion of the taxonomic name.';
1226 1202

  
1227 1203

  
1228 1204
--
1229
-- Name: COLUMN taxonpath.taxonomicname; Type: COMMENT; Schema: public; Owner: -
1205
-- Name: COLUMN taxonconcept."order"; Type: COMMENT; Schema: public; Owner: -
1230 1206
--
1231 1207

  
1232
COMMENT ON COLUMN taxonpath.taxonomicname IS 'The concatenated taxonomic name which uniquely identifies this taxon. Does not include the author of the name.
1208
COMMENT ON COLUMN taxonconcept."order" IS 'The order portion of the taxonomic name.';
1233 1209

  
1234
Equivalent to Darwin Core''s scientificName.';
1235 1210

  
1236

  
1237 1211
--
1238
-- Name: COLUMN taxonpath.author; Type: COMMENT; Schema: public; Owner: -
1212
-- Name: COLUMN taxonconcept.family; Type: COMMENT; Schema: public; Owner: -
1239 1213
--
1240 1214

  
1241
COMMENT ON COLUMN taxonpath.author IS 'The author of the taxonomic name.
1215
COMMENT ON COLUMN taxonconcept.family IS 'The family portion of the taxonomic name.';
1242 1216

  
1243
Equivalent to Darwin Core''s scientificNameAuthorship.';
1244 1217

  
1245

  
1246 1218
--
1247
-- Name: COLUMN taxonpath.taxonomicnamewithauthor; Type: COMMENT; Schema: public; Owner: -
1219
-- Name: COLUMN taxonconcept.genus; Type: COMMENT; Schema: public; Owner: -
1248 1220
--
1249 1221

  
1250
COMMENT ON COLUMN taxonpath.taxonomicnamewithauthor IS 'The concatenated taxonomic name which uniquely identifies this taxon, plus the author of that name.
1222
COMMENT ON COLUMN taxonconcept.genus IS 'The genus portion of the taxonomic name.';
1251 1223

  
1252
Equivalent to Darwin Core''s scientificName + scientificNameAuthorship.
1253
Equivalent to "Name sec. x".';
1254 1224

  
1255

  
1256 1225
--
1257
-- Name: COLUMN taxonpath.domain; Type: COMMENT; Schema: public; Owner: -
1226
-- Name: COLUMN taxonconcept.species; Type: COMMENT; Schema: public; Owner: -
1258 1227
--
1259 1228

  
1260
COMMENT ON COLUMN taxonpath.domain IS 'The domain portion of the taxonomic name.';
1229
COMMENT ON COLUMN taxonconcept.species IS 'The species portion of the taxonomic name.';
1261 1230

  
1262 1231

  
1263 1232
--
1264
-- Name: COLUMN taxonpath.kingdom; Type: COMMENT; Schema: public; Owner: -
1233
-- Name: COLUMN taxonconcept.subspecies; Type: COMMENT; Schema: public; Owner: -
1265 1234
--
1266 1235

  
1267
COMMENT ON COLUMN taxonpath.kingdom IS 'The kingdom portion of the taxonomic name.';
1236
COMMENT ON COLUMN taxonconcept.subspecies IS 'The subspecies portion of the taxonomic name.';
1268 1237

  
1269 1238

  
1270 1239
--
1271
-- Name: COLUMN taxonpath.phylum; Type: COMMENT; Schema: public; Owner: -
1240
-- Name: COLUMN taxonconcept.variety; Type: COMMENT; Schema: public; Owner: -
1272 1241
--
1273 1242

  
1274
COMMENT ON COLUMN taxonpath.phylum IS 'The phylum portion of the taxonomic name.';
1243
COMMENT ON COLUMN taxonconcept.variety IS 'The variety portion of the taxonomic name.';
1275 1244

  
1276 1245

  
1277 1246
--
1278
-- Name: COLUMN taxonpath.class; Type: COMMENT; Schema: public; Owner: -
1247
-- Name: COLUMN taxonconcept.forma; Type: COMMENT; Schema: public; Owner: -
1279 1248
--
1280 1249

  
1281
COMMENT ON COLUMN taxonpath.class IS 'The class portion of the taxonomic name.';
1250
COMMENT ON COLUMN taxonconcept.forma IS 'The forma portion of the taxonomic name.';
1282 1251

  
1283 1252

  
1284 1253
--
1285
-- Name: COLUMN taxonpath."order"; Type: COMMENT; Schema: public; Owner: -
1254
-- Name: COLUMN taxonconcept.cultivar; Type: COMMENT; Schema: public; Owner: -
1286 1255
--
1287 1256

  
1288
COMMENT ON COLUMN taxonpath."order" IS 'The order portion of the taxonomic name.';
1257
COMMENT ON COLUMN taxonconcept.cultivar IS 'The cultivar portion of the taxonomic name.';
1289 1258

  
1290 1259

  
1291 1260
--
1292
-- Name: COLUMN taxonpath.family; Type: COMMENT; Schema: public; Owner: -
1261
-- Name: COLUMN taxonconcept.morphospecies; Type: COMMENT; Schema: public; Owner: -
1293 1262
--
1294 1263

  
1295
COMMENT ON COLUMN taxonpath.family IS 'The family portion of the taxonomic name.';
1264
COMMENT ON COLUMN taxonconcept.morphospecies IS 'The morphospecies portion of the taxonomic name.';
1296 1265

  
1297 1266

  
1298 1267
--
1299
-- Name: COLUMN taxonpath.genus; Type: COMMENT; Schema: public; Owner: -
1268
-- Name: COLUMN taxonconcept.otherranks; Type: COMMENT; Schema: public; Owner: -
1300 1269
--
1301 1270

  
1302
COMMENT ON COLUMN taxonpath.genus IS 'The genus portion of the taxonomic name.';
1271
COMMENT ON COLUMN taxonconcept.otherranks IS 'Additional ranks which do not have a named column. Put ranks in path order, so that lower-level taxa come after higher-level taxa.';
1303 1272

  
1304 1273

  
1305 1274
--
1306
-- Name: COLUMN taxonpath.species; Type: COMMENT; Schema: public; Owner: -
1275
-- Name: COLUMN taxonconcept.scope_id; Type: COMMENT; Schema: public; Owner: -
1307 1276
--
1308 1277

  
1309
COMMENT ON COLUMN taxonpath.species IS 'The species portion of the taxonomic name.';
1278
COMMENT ON COLUMN taxonconcept.scope_id IS 'The morphospecies scope.';
1310 1279

  
1311 1280

  
1312 1281
--
1313
-- Name: COLUMN taxonpath.subspecies; Type: COMMENT; Schema: public; Owner: -
1282
-- Name: taxondetermination; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1314 1283
--
1315 1284

  
1316
COMMENT ON COLUMN taxonpath.subspecies IS 'The subspecies portion of the taxonomic name.';
1285
CREATE TABLE taxondetermination (
1286
    taxondetermination_id integer NOT NULL,
1287
    taxonoccurrence_id integer NOT NULL,
1288
    taxonconcept_id integer NOT NULL,
1289
    party_id integer,
1290
    role role DEFAULT 'unknown'::role NOT NULL,
1291
    determinationtype text,
1292
    reference_id integer,
1293
    isoriginal boolean DEFAULT false NOT NULL,
1294
    iscurrent boolean DEFAULT false NOT NULL,
1295
    taxonfit text,
1296
    taxonconfidence text,
1297
    grouptype text,
1298
    notes text,
1299
    notespublic boolean,
1300
    notesmgt boolean,
1301
    revisions boolean,
1302
    determinationdate timestamp with time zone,
1303
    accessioncode text
1304
);
1317 1305

  
1318 1306

  
1319 1307
--
1320
-- Name: COLUMN taxonpath.variety; Type: COMMENT; Schema: public; Owner: -
1308
-- Name: TABLE taxondetermination; Type: COMMENT; Schema: public; Owner: -
1321 1309
--
1322 1310

  
1323
COMMENT ON COLUMN taxonpath.variety IS 'The variety portion of the taxonomic name.';
1311
COMMENT ON TABLE taxondetermination IS 'Equivalent to VegBank''s taxoninterpretation table.';
1324 1312

  
1325 1313

  
1326 1314
--
1327
-- Name: COLUMN taxonpath.forma; Type: COMMENT; Schema: public; Owner: -
1315
-- Name: taxonoccurrence; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1328 1316
--
1329 1317

  
1330
COMMENT ON COLUMN taxonpath.forma IS 'The forma portion of the taxonomic name.';
1318
CREATE TABLE taxonoccurrence (
1319
    taxonoccurrence_id integer NOT NULL,
1320
    datasource_id integer NOT NULL,
1321
    sourceaccessioncode text,
1322
    locationevent_id integer,
1323
    authortaxoncode text,
1324
    verbatimcollectorname text,
1325
    growthform growthform,
1326
    iscultivated boolean,
1327
    cultivatedbasis text,
1328
    isnative boolean,
1329
    accessioncode text
1330
);
1331 1331

  
1332 1332

  
1333 1333
--
1334
-- Name: COLUMN taxonpath.cultivar; Type: COMMENT; Schema: public; Owner: -
1334
-- Name: TABLE taxonoccurrence; Type: COMMENT; Schema: public; Owner: -
1335 1335
--
1336 1336

  
1337
COMMENT ON COLUMN taxonpath.cultivar IS 'The cultivar portion of the taxonomic name.';
1337
COMMENT ON TABLE taxonoccurrence IS 'Equivalent to VegBank''s taxonobservation table.';
1338 1338

  
1339 1339

  
1340 1340
--
1341
-- Name: COLUMN taxonpath.morphospecies; Type: COMMENT; Schema: public; Owner: -
1341
-- Name: COLUMN taxonoccurrence.iscultivated; Type: COMMENT; Schema: public; Owner: -
1342 1342
--
1343 1343

  
1344
COMMENT ON COLUMN taxonpath.morphospecies IS 'The morphospecies portion of the taxonomic name.';
1344
COMMENT ON COLUMN taxonoccurrence.iscultivated IS 'cultivated or wild';
1345 1345

  
1346 1346

  
1347 1347
--
1348
-- Name: COLUMN taxonpath.otherranks; Type: COMMENT; Schema: public; Owner: -
1348
-- Name: COLUMN taxonoccurrence.cultivatedbasis; Type: COMMENT; Schema: public; Owner: -
1349 1349
--
1350 1350

  
1351
COMMENT ON COLUMN taxonpath.otherranks IS 'Additional ranks which do not have a named column. Put ranks in path order, so that lower-level taxa come after higher-level taxa.';
1351
COMMENT ON COLUMN taxonoccurrence.cultivatedbasis IS 'The reason why a taxonoccurrence was marked as cultivated (or not).';
1352 1352

  
1353 1353

  
1354 1354
--
1355
-- Name: COLUMN taxonpath.scope_id; Type: COMMENT; Schema: public; Owner: -
1355
-- Name: COLUMN taxonoccurrence.isnative; Type: COMMENT; Schema: public; Owner: -
1356 1356
--
1357 1357

  
1358
COMMENT ON COLUMN taxonpath.scope_id IS 'The morphospecies scope.';
1358
COMMENT ON COLUMN taxonoccurrence.isnative IS 'native or exotic';
1359 1359

  
1360 1360

  
1361 1361
--
......
1363 1363
--
1364 1364

  
1365 1365
CREATE VIEW analytical_db_view AS
1366
    SELECT datasource.organizationname AS "dataSourceName", taxonpath.family, taxonpath.genus, taxonpath.species, COALESCE(taxonpath.taxonomicnamewithauthor, taxonpath.taxonomicname) AS taxon, taxonpath.author AS "taxonAuthor", taxonpath.variety AS "taxonMorphospecies", placepath.country, placepath.stateprovince AS "stateProvince", placepath.county AS "countyParish", taxonoccurrence.verbatimcollectorname AS collector, plantobservation.collectionnumber AS "collectionNumber", array_to_string(ARRAY[identifiedby.givenname, identifiedby.middlename, identifiedby.surname], ' '::text) AS "identifiedBy", aggregateoccurrence.collectiondate AS "observationDate", location.authorlocationcode AS "plotCode", functions._m2_to_ha(location.area_m2) AS "plotAreaHa", method.name AS "plotMethod", locationcoords.latitude_deg AS latitude, locationcoords.longitude_deg AS longitude, location.elevation_m, taxonoccurrence.iscultivated AS "isCultivated", taxonoccurrence.cultivatedbasis AS "isCultivatedReason", functions._fraction_to_percent(aggregateoccurrence.cover_fraction) AS "pctCover" FROM (((((((((((((location JOIN party datasource ON (((datasource.party_id = location.datasource_id) AND (datasource.organizationname IS NOT NULL)))) LEFT JOIN locationcoords USING (location_id)) LEFT JOIN locationplace USING (location_id)) LEFT JOIN placepath USING (placepath_id)) JOIN locationevent USING (location_id)) LEFT JOIN method USING (method_id)) JOIN taxonoccurrence USING (locationevent_id)) JOIN taxondetermination USING (taxonoccurrence_id)) LEFT JOIN party identifiedby ON ((identifiedby.party_id = taxondetermination.party_id))) JOIN taxonpath USING (taxonpath_id)) LEFT JOIN aggregateoccurrence USING (taxonoccurrence_id)) LEFT JOIN plantobservation USING (aggregateoccurrence_id)) LEFT JOIN specimenreplicate USING (plantobservation_id));
1366
    SELECT datasource.organizationname AS "dataSourceName", taxonconcept.family, taxonconcept.genus, taxonconcept.species, COALESCE(taxonconcept.taxonomicnamewithauthor, taxonconcept.taxonomicname) AS taxon, taxonconcept.author AS "taxonAuthor", taxonconcept.variety AS "taxonMorphospecies", placepath.country, placepath.stateprovince AS "stateProvince", placepath.county AS "countyParish", taxonoccurrence.verbatimcollectorname AS collector, plantobservation.collectionnumber AS "collectionNumber", array_to_string(ARRAY[identifiedby.givenname, identifiedby.middlename, identifiedby.surname], ' '::text) AS "identifiedBy", aggregateoccurrence.collectiondate AS "observationDate", location.authorlocationcode AS "plotCode", functions._m2_to_ha(location.area_m2) AS "plotAreaHa", method.name AS "plotMethod", locationcoords.latitude_deg AS latitude, locationcoords.longitude_deg AS longitude, location.elevation_m, taxonoccurrence.iscultivated AS "isCultivated", taxonoccurrence.cultivatedbasis AS "isCultivatedReason", functions._fraction_to_percent(aggregateoccurrence.cover_fraction) AS "pctCover" FROM (((((((((((((location JOIN party datasource ON (((datasource.party_id = location.datasource_id) AND (datasource.organizationname IS NOT NULL)))) LEFT JOIN locationcoords USING (location_id)) LEFT JOIN locationplace USING (location_id)) LEFT JOIN placepath USING (placepath_id)) JOIN locationevent USING (location_id)) LEFT JOIN method USING (method_id)) JOIN taxonoccurrence USING (locationevent_id)) JOIN taxondetermination USING (taxonoccurrence_id)) LEFT JOIN party identifiedby ON ((identifiedby.party_id = taxondetermination.party_id))) JOIN taxonconcept USING (taxonconcept_id)) LEFT JOIN aggregateoccurrence USING (taxonoccurrence_id)) LEFT JOIN plantobservation USING (aggregateoccurrence_id)) LEFT JOIN specimenreplicate USING (plantobservation_id));
1367 1367

  
1368 1368

  
1369 1369
--
......
2030 2030
CREATE TABLE methodtaxonclass (
2031 2031
    methodtaxonclass_id integer NOT NULL,
2032 2032
    method_id integer NOT NULL,
2033
    taxonpath_id integer,
2033
    taxonconcept_id integer,
2034 2034
    included boolean NOT NULL,
2035 2035
    submethod_id integer,
2036 2036
    taxonclass taxonclass,
2037
    CONSTRAINT methodtaxonclass_key_required CHECK (((taxonpath_id IS NOT NULL) OR (taxonclass IS NOT NULL)))
2037
    CONSTRAINT methodtaxonclass_key_required CHECK (((taxonconcept_id IS NOT NULL) OR (taxonclass IS NOT NULL)))
2038 2038
);
2039 2039

  
2040 2040

  
......
2334 2334
CREATE TABLE plantcorrelation (
2335 2335
    plantcorrelation_id integer NOT NULL,
2336 2336
    plantstatus_id integer NOT NULL,
2337
    taxonpath_id integer NOT NULL,
2337
    taxonconcept_id integer NOT NULL,
2338 2338
    plantconvergence text NOT NULL,
2339 2339
    correlationstart timestamp with time zone NOT NULL,
2340 2340
    correlationstop timestamp with time zone
......
2415 2415

  
2416 2416
CREATE TABLE plantstatus (
2417 2417
    plantstatus_id integer NOT NULL,
2418
    taxonpath_id integer NOT NULL,
2418
    taxonconcept_id integer NOT NULL,
2419 2419
    party_id integer,
2420
    taxonpathstatus text DEFAULT 'undetermined'::text NOT NULL,
2420
    taxonconceptstatus text DEFAULT 'undetermined'::text NOT NULL,
2421 2421
    reference_id integer,
2422 2422
    plantpartycomments text,
2423 2423
    startdate timestamp with time zone,
......
2452 2452
CREATE TABLE plantusage (
2453 2453
    plantusage_id integer NOT NULL,
2454 2454
    taxon_id integer NOT NULL,
2455
    taxonpath_id integer,
2455
    taxonconcept_id integer,
2456 2456
    taxonstatus text,
2457 2457
    taxon text,
2458 2458
    classsystem text,
......
3120 3120
CREATE TABLE taxonalt (
3121 3121
    taxonalt_id integer NOT NULL,
3122 3122
    taxondetermination_id integer NOT NULL,
3123
    taxonpath_id integer NOT NULL,
3123
    taxonconcept_id integer NOT NULL,
3124 3124
    taxonaltfit text,
3125 3125
    taxonaltconfidence text,
3126 3126
    taxonaltnotes text
......
3147 3147

  
3148 3148

  
3149 3149
--
3150
-- Name: taxondetermination_taxondetermination_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3150
-- Name: taxonconcept_taxonconcept_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3151 3151
--
3152 3152

  
3153
CREATE SEQUENCE taxondetermination_taxondetermination_id_seq
3153
CREATE SEQUENCE taxonconcept_taxonconcept_id_seq
3154 3154
    START WITH 1
3155 3155
    INCREMENT BY 1
3156 3156
    NO MINVALUE
......
3159 3159

  
3160 3160

  
3161 3161
--
3162
-- Name: taxondetermination_taxondetermination_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3162
-- Name: taxonconcept_taxonconcept_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3163 3163
--
3164 3164

  
3165
ALTER SEQUENCE taxondetermination_taxondetermination_id_seq OWNED BY taxondetermination.taxondetermination_id;
3165
ALTER SEQUENCE taxonconcept_taxonconcept_id_seq OWNED BY taxonconcept.taxonconcept_id;
3166 3166

  
3167 3167

  
3168 3168
--
3169
-- Name: taxonoccurrence_taxonoccurrence_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3169
-- Name: taxondetermination_taxondetermination_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3170 3170
--
3171 3171

  
3172
CREATE SEQUENCE taxonoccurrence_taxonoccurrence_id_seq
3172
CREATE SEQUENCE taxondetermination_taxondetermination_id_seq
3173 3173
    START WITH 1
3174 3174
    INCREMENT BY 1
3175 3175
    NO MINVALUE
......
3178 3178

  
3179 3179

  
3180 3180
--
3181
-- Name: taxonoccurrence_taxonoccurrence_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3181
-- Name: taxondetermination_taxondetermination_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3182 3182
--
3183 3183

  
3184
ALTER SEQUENCE taxonoccurrence_taxonoccurrence_id_seq OWNED BY taxonoccurrence.taxonoccurrence_id;
3184
ALTER SEQUENCE taxondetermination_taxondetermination_id_seq OWNED BY taxondetermination.taxondetermination_id;
3185 3185

  
3186 3186

  
3187 3187
--
3188
-- Name: taxonpath_taxonpath_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3188
-- Name: taxonoccurrence_taxonoccurrence_id_seq; Type: SEQUENCE; Schema: public; Owner: -
3189 3189
--
3190 3190

  
3191
CREATE SEQUENCE taxonpath_taxonpath_id_seq
3191
CREATE SEQUENCE taxonoccurrence_taxonoccurrence_id_seq
3192 3192
    START WITH 1
3193 3193
    INCREMENT BY 1
3194 3194
    NO MINVALUE
......
3197 3197

  
3198 3198

  
3199 3199
--
3200
-- Name: taxonpath_taxonpath_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3200
-- Name: taxonoccurrence_taxonoccurrence_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
3201 3201
--
3202 3202

  
3203
ALTER SEQUENCE taxonpath_taxonpath_id_seq OWNED BY taxonpath.taxonpath_id;
3203
ALTER SEQUENCE taxonoccurrence_taxonoccurrence_id_seq OWNED BY taxonoccurrence.taxonoccurrence_id;
3204 3204

  
3205 3205

  
3206 3206
--
......
3741 3741

  
3742 3742

  
3743 3743
--
3744
-- Name: taxondetermination_id; Type: DEFAULT; Schema: public; Owner: -
3744
-- Name: taxonconcept_id; Type: DEFAULT; Schema: public; Owner: -
3745 3745
--
3746 3746

  
3747
ALTER TABLE taxondetermination ALTER COLUMN taxondetermination_id SET DEFAULT nextval('taxondetermination_taxondetermination_id_seq'::regclass);
3747
ALTER TABLE taxonconcept ALTER COLUMN taxonconcept_id SET DEFAULT nextval('taxonconcept_taxonconcept_id_seq'::regclass);
3748 3748

  
3749 3749

  
3750 3750
--
3751
-- Name: taxonoccurrence_id; Type: DEFAULT; Schema: public; Owner: -
3751
-- Name: taxondetermination_id; Type: DEFAULT; Schema: public; Owner: -
3752 3752
--
3753 3753

  
3754
ALTER TABLE taxonoccurrence ALTER COLUMN taxonoccurrence_id SET DEFAULT nextval('taxonoccurrence_taxonoccurrence_id_seq'::regclass);
3754
ALTER TABLE taxondetermination ALTER COLUMN taxondetermination_id SET DEFAULT nextval('taxondetermination_taxondetermination_id_seq'::regclass);
3755 3755

  
3756 3756

  
3757 3757
--
3758
-- Name: taxonpath_id; Type: DEFAULT; Schema: public; Owner: -
3758
-- Name: taxonoccurrence_id; Type: DEFAULT; Schema: public; Owner: -
3759 3759
--
3760 3760

  
3761
ALTER TABLE taxonpath ALTER COLUMN taxonpath_id SET DEFAULT nextval('taxonpath_taxonpath_id_seq'::regclass);
3761
ALTER TABLE taxonoccurrence ALTER COLUMN taxonoccurrence_id SET DEFAULT nextval('taxonoccurrence_taxonoccurrence_id_seq'::regclass);
3762 3762

  
3763 3763

  
3764 3764
--
......
4029 4029

  
4030 4030

  
4031 4031
--
4032
-- Name: methodtaxonclass_unique_taxonpath_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4032
-- Name: methodtaxonclass_unique_taxonconcept_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4033 4033
--
4034 4034

  
4035 4035
ALTER TABLE ONLY methodtaxonclass
4036
    ADD CONSTRAINT methodtaxonclass_unique_taxonpath_id UNIQUE (method_id, taxonpath_id);
4036
    ADD CONSTRAINT methodtaxonclass_unique_taxonconcept_id UNIQUE (method_id, taxonconcept_id);
4037 4037

  
4038 4038

  
4039 4039
--
......
4145 4145
--
4146 4146

  
4147 4147
ALTER TABLE ONLY plantstatus
4148
    ADD CONSTRAINT plantstatus_unique UNIQUE (taxonpath_id, party_id);
4148
    ADD CONSTRAINT plantstatus_unique UNIQUE (taxonconcept_id, party_id);
4149 4149

  
4150 4150

  
4151 4151
--
......
4309 4309

  
4310 4310

  
4311 4311
--
4312
-- Name: taxonconcept_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4313
--
4314

  
4315
ALTER TABLE ONLY taxonconcept
4316
    ADD CONSTRAINT taxonconcept_pkey PRIMARY KEY (taxonconcept_id);
4317

  
4318

  
4319
--
4312 4320
-- Name: taxondetermination_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4313 4321
--
4314 4322

  
......
4325 4333

  
4326 4334

  
4327 4335
--
4328
-- Name: taxonpath_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4329
--
4330

  
4331
ALTER TABLE ONLY taxonpath
4332
    ADD CONSTRAINT taxonpath_pkey PRIMARY KEY (taxonpath_id);
4333

  
4334

  
4335
--
4336 4336
-- Name: taxonscope_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4337 4337
--
4338 4338

  
......
4739 4739

  
4740 4740

  
4741 4741
--
4742
-- Name: taxondetermination_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4742
-- Name: taxonconcept_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4743 4743
--
4744 4744

  
4745
CREATE UNIQUE INDEX taxondetermination_accessioncode_index ON taxondetermination USING btree (accessioncode);
4745
CREATE UNIQUE INDEX taxonconcept_accessioncode_index ON taxonconcept USING btree (accessioncode);
4746 4746

  
4747 4747

  
4748 4748
--
4749
-- Name: taxondetermination_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4749
-- Name: taxonconcept_unique_within_datasource_by_identifying_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4750 4750
--
4751 4751

  
4752
CREATE UNIQUE INDEX taxondetermination_unique ON taxondetermination USING btree (taxonoccurrence_id, isoriginal, role, (COALESCE(party_id, 2147483647)), taxonpath_id);
4752
CREATE UNIQUE INDEX taxonconcept_unique_within_datasource_by_identifying_name ON taxonconcept USING btree (datasource_id, (COALESCE(identifyingtaxonomicname, '\\N'::text))) WHERE (identifyingtaxonomicname IS NOT NULL);
4753 4753

  
4754 4754

  
4755 4755
--
4756
-- Name: taxonoccurrence_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4756
-- Name: taxonconcept_unique_within_datasource_by_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4757 4757
--
4758 4758

  
4759
CREATE UNIQUE INDEX taxonoccurrence_accessioncode_index ON taxonoccurrence USING btree (accessioncode);
4759
CREATE UNIQUE INDEX taxonconcept_unique_within_datasource_by_name ON taxonconcept USING btree (datasource_id, (COALESCE(taxonomicname, '\\N'::text)), (COALESCE(author, '\\N'::text)), (COALESCE(taxonomicnamewithauthor, '\\N'::text)), (COALESCE(domain, '\\N'::text)), (COALESCE(kingdom, '\\N'::text)), (COALESCE(phylum, '\\N'::text)), (COALESCE(class, '\\N'::text)), (COALESCE("order", '\\N'::text)), (COALESCE(family, '\\N'::text)), (COALESCE(genus, '\\N'::text)), (COALESCE(species, '\\N'::text)), (COALESCE(subspecies, '\\N'::text)), (COALESCE(variety, '\\N'::text)), (COALESCE(forma, '\\N'::text)), (COALESCE(cultivar, '\\N'::text)), (COALESCE(morphospecies, '\\N'::text)), (COALESCE(otherranks, ARRAY[]::rankedtaxonname[])), (COALESCE(scope_id, 2147483647))) WHERE (identifyingtaxonomicname IS NULL);
4760 4760

  
4761 4761

  
4762 4762
--
4763
-- Name: taxonoccurrence_locationevent; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4763
-- Name: taxondetermination_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4764 4764
--
4765 4765

  
4766
CREATE INDEX taxonoccurrence_locationevent ON taxonoccurrence USING btree (locationevent_id);
4766
CREATE UNIQUE INDEX taxondetermination_accessioncode_index ON taxondetermination USING btree (accessioncode);
4767 4767

  
4768 4768

  
4769 4769
--
4770
-- Name: taxonoccurrence_unique_within_datasource; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4770
-- Name: taxondetermination_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4771 4771
--
4772 4772

  
4773
CREATE UNIQUE INDEX taxonoccurrence_unique_within_datasource ON taxonoccurrence USING btree (datasource_id, (COALESCE(sourceaccessioncode, '\\N'::text))) WHERE (sourceaccessioncode IS NOT NULL);
4773
CREATE UNIQUE INDEX taxondetermination_unique ON taxondetermination USING btree (taxonoccurrence_id, isoriginal, role, (COALESCE(party_id, 2147483647)), taxonconcept_id);
4774 4774

  
4775 4775

  
4776 4776
--
4777
-- Name: taxonoccurrence_unique_within_locationevent; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4777
-- Name: taxonoccurrence_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4778 4778
--
4779 4779

  
4780
CREATE UNIQUE INDEX taxonoccurrence_unique_within_locationevent ON taxonoccurrence USING btree ((COALESCE(locationevent_id, 2147483647)), (COALESCE(authortaxoncode, '\\N'::text))) WHERE (sourceaccessioncode IS NULL);
4780
CREATE UNIQUE INDEX taxonoccurrence_accessioncode_index ON taxonoccurrence USING btree (accessioncode);
4781 4781

  
4782 4782

  
4783 4783
--
4784
-- Name: taxonpath_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4784
-- Name: taxonoccurrence_locationevent; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4785 4785
--
4786 4786

  
4787
CREATE UNIQUE INDEX taxonpath_accessioncode_index ON taxonpath USING btree (accessioncode);
4787
CREATE INDEX taxonoccurrence_locationevent ON taxonoccurrence USING btree (locationevent_id);
4788 4788

  
4789 4789

  
4790 4790
--
4791
-- Name: taxonpath_unique_within_datasource_by_identifying_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4791
-- Name: taxonoccurrence_unique_within_datasource; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4792 4792
--
4793 4793

  
4794
CREATE UNIQUE INDEX taxonpath_unique_within_datasource_by_identifying_name ON taxonpath USING btree (datasource_id, (COALESCE(identifyingtaxonomicname, '\\N'::text))) WHERE (identifyingtaxonomicname IS NOT NULL);
4794
CREATE UNIQUE INDEX taxonoccurrence_unique_within_datasource ON taxonoccurrence USING btree (datasource_id, (COALESCE(sourceaccessioncode, '\\N'::text))) WHERE (sourceaccessioncode IS NOT NULL);
4795 4795

  
4796 4796

  
4797 4797
--
4798
-- Name: taxonpath_unique_within_datasource_by_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4798
-- Name: taxonoccurrence_unique_within_locationevent; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4799 4799
--
4800 4800

  
4801
CREATE UNIQUE INDEX taxonpath_unique_within_datasource_by_name ON taxonpath USING btree (datasource_id, (COALESCE(taxonomicname, '\\N'::text)), (COALESCE(author, '\\N'::text)), (COALESCE(taxonomicnamewithauthor, '\\N'::text)), (COALESCE(domain, '\\N'::text)), (COALESCE(kingdom, '\\N'::text)), (COALESCE(phylum, '\\N'::text)), (COALESCE(class, '\\N'::text)), (COALESCE("order", '\\N'::text)), (COALESCE(family, '\\N'::text)), (COALESCE(genus, '\\N'::text)), (COALESCE(species, '\\N'::text)), (COALESCE(subspecies, '\\N'::text)), (COALESCE(variety, '\\N'::text)), (COALESCE(forma, '\\N'::text)), (COALESCE(cultivar, '\\N'::text)), (COALESCE(morphospecies, '\\N'::text)), (COALESCE(otherranks, ARRAY[]::rankedtaxonname[])), (COALESCE(scope_id, 2147483647))) WHERE (identifyingtaxonomicname IS NULL);
4801
CREATE UNIQUE INDEX taxonoccurrence_unique_within_locationevent ON taxonoccurrence USING btree ((COALESCE(locationevent_id, 2147483647)), (COALESCE(authortaxoncode, '\\N'::text))) WHERE (sourceaccessioncode IS NULL);
4802 4802

  
4803 4803

  
4804 4804
--
......
4844 4844

  
4845 4845

  
4846 4846
--
4847
-- Name: taxonpath_canon_taxonpath_id_self_ref; Type: TRIGGER; Schema: public; Owner: -
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff