#########################################################################
#
#  	This indexMapping file contains a set of key/value mappings that map for each 
#	term that we're interested in harvesting, the POJO attributes name 
#	(used during synchronisation and as the column header in the outputted harvested.txt file) 
#	to their corresponding DwC (revision 2009-09-23) term URI's label. 
#	
#	This file is used to sweep over the DwC-Archive's core file picking 
#	out only those columns that are actually of interest.
#
#	In theory the list of DwC terms will not change following DwC's ratification. 
#	Nonetheless, we still have to support those DwC term URIs that were used 
#	(for example by the Integrated Publishing Toolkit (IPT)) prior to ratification.
#	
#	Important note #1: the construction of the key follows a set of rules
#	outlined here: 
#		
#		1. The key is derived from the POJO attribute name
#		2. The key can have a numbered extension (i.e. '.1', '.2', etc), that 
#		designates its priority with 1 being the most important.
#		
#		For example: 	latitude.1=decimalLatitude
#						latitude.2=verbatimLatitude
#
#		Here, 'latitude' is the POJO attribute name we use. Furthermore, 
#		should values be harvested for both decimalLatitude and verbatimLatitude, 
#		decimalLatitude takes precedence. Therefore, during synchronisation with 
#		the database it is the decimalLatitude value that is used.
#
#	Important note #2: The value is derived from the last part of the DwC term URI, 
#	otherwise known as the term label.
#
#		For example: The URI for verbatimLatitude is: 
#		
#		http://rs.tdwg.org/dwc/terms/verbatimLatitude 
#
#		and as the term label, which becomes the value, is verbatimLatitude
# 	
#########################################################################

#DATE.LAST.MODIFIED
# The most recent date-time on which the resource was changed. For Darwin Core, recommended best practice is to use an encoding scheme, such as ISO 8601:2004(E).
dateLastModified=modified

#############################################
#relating to raw_occurrence_record table
#############################################
#INSTITUTION.CODE
institutionCode=institutionCode

#COLLECTION.CODE
collectionCode.1=collectionCode
collectionCode.2=collectionID
collectionCode.3=datasetID

# For backwards compatibility - no longer in DwC
collectionCode.4=sourceID

#CATALOGUE.NUMBER
catalogueNumber.1=catalogNumber
catalogueNumber.2=occurrenceID

#TAXONOMY
scientificName=scientificName
author=scientificNameAuthorship
kingdom=kingdom
phylum=phylum
klass=class
order=order
family=family
genus=genus
species=specificEpithet
subspecies=infraspecificEpithet
rank=taxonRank

#GEOSPATIAL
latitude.1=decimalLatitude
latitude.2=verbatimLatitude
longitude.1=decimalLongitude
longitude.2=verbatimLongitude
latLongPrecision.1=coordinateUncertaintyInMeters
latLongPrecision.2=coordinatePrecision

minAltitude=minimumElevationInMeters
maxAltitude=maximumElevationInMeters
minDepth=minimumDepthInMeters
maxDepth=maximumDepthInMeters
continentOrOcean.1=continent
continentOrOcean.2=waterBody
country.1=countryCode
country.2=country
stateOrProvince=stateProvince
county=county
locality.1=locality
locality.2=verbatimLocality

#COLLECTOR
collectorName.1=recordedBy
# For backwards compatibility - no longer in DwC
collectorName.2=collector

#IDENTIFIER
identifierName=identifiedBy

#TEMPORAL
dateCollected.1=eventDate
# The collection date can also come in individual parts
year=year
month=month
day=day

# For backwards compatibility - no longer in DwC
dateCollected.2=earliestDateCollected
dateCollected.3=latestDateCollected

#IDENTIFICATION
dateIdentified=dateIdentified

#BASIS.OF.RECORD
basisOfRecord=basisOfRecord

#############################################
#relating to identifier_record table
#############################################
# An identifier given to the event in the field. Often serves as a link between field notes and the Event.
identifierType2=fieldNumber

# might be a GUID but it is always a SOURCE_ID. Since 99% of the time the id index = occurrenceID, this is commented out
# To ensure the Source ID is always written, the id index is written to the harvested.txt file with name identifierType7
# identifierType7=occurrenceID

# A list (concatenated and separated) of sequence identifiers, like GenBank IDs
identifierType5=associatedSequences

# A list (concatenated and separated) of previous or alternate fully qualified catalog numbers
identifierType6=otherCatalogNumbers

# For backwards compatibility - no longer in DwC
identifierType3=collectorNumber

#############################################
#relating to typification_record table
#############################################
typification=typeStatus

#############################################
#relating to image_record table
#############################################
# A list (concatenated and separated) of identifiers (publication, global unique identifier, URI) of media associated
# with the Occurrence. In the Portal, it maps to image_record.type=0 (IMAGETYPE_UNKNOWN)
imageType0=associatedMedia

#############################################
#relating to link_record table
#############################################
# A list (concatenated and separated) of identifiers (publication, bibliographic reference, global unique identifier, URI)
# of literature associated with the Occurrence. The Portal doesn't have a link record type 2, and gets converted to 1
# during synchronization. Due to a bug in the Data Portal, only type 1 gets displayed anyway at the moment.
linkType2=associatedReferences
# A related resource that is referenced, cited, or otherwise pointed to by the described resource. We interpret this
# as representing an occurrence page referring to the occurrence record.
linkType1=references
# For backwards compatibility - no longer in DwC
linkType0=source