<?xml version='1.0' encoding='utf-8'?>
<!--
********************************
  CONFIGURATION HELP
********************************
MAPPING DIRECTIVES:

A single mapping contains one to many literals (fixed strings) or database attributes which will be concatenated in the final result.
Valid datatypes for the dbAttribute type are: text, date, integer, float

<dataElement>  OR  <attribute>
	<mapping>
	  <literal value="The value taken from the database is: "/>
	  <dbAttribute attribute='COLUMN_NAME' tablealias='TABLEALIAS' type='text'/>
	</mapping>

********************************
CONDITIONAL MAPPING:

A single mapping can be set up as a conditional mapping. 
Only if a certain condition is true (depending on the source data), the mapping takes place.

Currently only the following filters are allowed:
	
<equals attribute='ext_cat_fk' tablealias='extension' type='integer'>3</equals>
<notEquals attribute='ext_cat_fk' tablealias='extension' type='integer'>3</notEquals>
<in attribute='ext_cat_fk' tablealias='extension' type='integer'>
	<value>13</value>
	<value>14</value>
	<value>23</value>
	<value>24</value>
	...
</in>

Example:	
<dataElement>  OR  <attribute>
	<mapping>
		<literal value="The value taken from the database is: "/>
		<if>
		   <notEquals attribute='status' tablealias='Taxon' type='unicode'>accepted</notEquals>
		</if>
	</mapping>


GLOBAL FILTER:
A global filter filters the source data before it is passed on to the mappings and all subelements
of the element. A global filter therefore affects all child nodes.

Example:	
<dataElement>  OR  <attribute>
   <filterRecords>
	   <notEquals attribute='status' tablealias='Taxon' type='unicode'>accepted</notEquals>
   </filterRecords>

********************************
MAPPING VOCABULARIES:

A controlled vocabulary might be assigned to an element or attribute.
You can map the controlled value items of the schema to the ones used in the database if they are different.

<vocabulary>
  <term schemaTerm='accepted'>
	<dbTerm>1</dbTerm>
  </term>
  
-->
<conceptMapping xmlns='http://www.biocase.org/schemas/conceptmapping/2.1'>
  <metadata>
    <generated when='2005-04-04T13:35:10' by='Java Schema Processor'/>
    <name>
    </name>
  </metadata>
  <settings>
    <rootTableAlias>herbariumsheets</rootTableAlias>
  </settings>
  <recordIdentifier>/RecordSet/Record</recordIdentifier>
  <dataElement path='/RecordSet' max='1' namespace='http://www.namespaceTBD.org/darwin2' name='RecordSet' min='1'>
    <childElements>
      <dataElement path='/RecordSet/Record' max='-1' namespace='http://www.namespaceTBD.org/darwin2' name='Record' min='1'>
        <childElements>
          <dataElement name='DateLastModified' min='1' max='1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='dateTime' path='/RecordSet/Record/DateLastModified'>
            <mapping>
              <dbAttribute attribute='date_modified' tablealias='metadata' type='date' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='InstitutionCode' min='1' max='1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/InstitutionCode'>
            <mapping>
              <dbAttribute attribute='owner_organization_abbrev' tablealias='metadata' type='text' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='CollectionCode' min='1' max='1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/CollectionCode'>
            <mapping>
              <dbAttribute attribute='dataset_title' tablealias='metadata' type='text' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='catalog_number' min='1' max='1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/CatalogNumber'>
            <mapping>
              <dbAttribute attribute='unit_id' tablealias='herbariumsheets' type='int' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='ScientificName' min='1' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/ScientificName'>
            <mapping>
              <dbAttribute attribute='name_author_year_string' tablealias='identifications' type='text' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='BasisOfRecord' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/BasisOfRecord'>
            <mapping>
              <dbAttribute attribute='record_basis' tablealias='metadata' type='text' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='Kingdom' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Kingdom'/>
          <dataElement name='Phylum' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Phylum'/>
          <dataElement name='Class' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Class'/>
          <dataElement name='Order' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Order'/>
          <dataElement name='Family' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Family'/>
          <dataElement name='Genus' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Genus'>
            <mapping>
              <dbAttribute attribute='genus' tablealias='identifications' type='text' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='Species' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Species'/>
          <dataElement name='Subspecies' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Subspecies'/>
          <dataElement name='ScientificNameAuthor' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/ScientificNameAuthor'/>
          <dataElement name='IdentifiedBy' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/IdentifiedBy'>
            <mapping>
              <dbAttribute attribute='identification_author' tablealias='identifications' type='text' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='YearIdentified' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='gYear' path='/RecordSet/Record/YearIdentified'/>
          <dataElement name='MonthIdentified' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='nonNegativeInteger' path='/RecordSet/Record/MonthIdentified'/>
          <dataElement name='DayIdentified' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='nonNegativeInteger' path='/RecordSet/Record/DayIdentified'/>
          <dataElement name='TypeStatus' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/TypeStatus'>
            <mapping>
              <dbAttribute attribute='type_status' tablealias='herbariumsheets' type='text' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='CollectorNumber' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/CollectorNumber'/>
          <dataElement name='FieldNumber' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/FieldNumber'/>
          <dataElement name='Collector' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Collector'>
            <mapping>
              <dbAttribute attribute='agent_text' tablealias='collectors' type='text' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='YearCollected' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='gYear' path='/RecordSet/Record/YearCollected'/>
          <dataElement name='MonthCollected' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='nonNegativeInteger' path='/RecordSet/Record/MonthCollected'/>
          <dataElement name='DayCollected' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='nonNegativeInteger' path='/RecordSet/Record/DayCollected'/>
          <dataElement name='JulianDay' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/JulianDay'/>
          <dataElement name='TimeOfDay' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='decimal' path='/RecordSet/Record/TimeOfDay'/>
          <dataElement name='ContinentOcean' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/ContinentOcean'/>
          <dataElement name='Country' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Country'/>
          <dataElement name='StateProvince' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/StateProvince'/>
          <dataElement name='County' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/County'/>
          <dataElement name='Locality' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Locality'>
            <mapping>
              <dbAttribute attribute='locality_text' tablealias='herbariumsheets' type='text' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='Longitude' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='decimal' path='/RecordSet/Record/Longitude'>
            <mapping>
              <dbAttribute attribute='longitude_decimal' tablealias='herbariumsheets' type='int' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='Latitude' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='decimal' path='/RecordSet/Record/Latitude'>
            <mapping>
              <dbAttribute attribute='latitude_decimal' tablealias='herbariumsheets' type='int' nosearch='0'/>
            </mapping>
          </dataElement>
          <dataElement name='CoordinatePrecision' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='decimal' path='/RecordSet/Record/CoordinatePrecision'/>
          <dataElement name='BoundingBox' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/BoundingBox'/>
          <dataElement name='MinimumElevation' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='decimal' path='/RecordSet/Record/MinimumElevation'/>
          <dataElement name='MaximumElevation' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='decimal' path='/RecordSet/Record/MaximumElevation'/>
          <dataElement name='MinimumDepth' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='decimal' path='/RecordSet/Record/MinimumDepth'/>
          <dataElement name='MaximumDepth' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='decimal' path='/RecordSet/Record/MaximumDepth'/>
          <dataElement name='Sex' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Sex'/>
          <dataElement name='PreparationType' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/PreparationType'/>
          <dataElement name='IndividualCount' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='nonNegativeInteger' path='/RecordSet/Record/IndividualCount'/>
          <dataElement name='PreviousCatalogNumber' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/PreviousCatalogNumber'/>
          <dataElement name='RelationshipType' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/RelationshipType'/>
          <dataElement name='RelatedCatalogItem' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/RelatedCatalogItem'/>
          <dataElement name='Notes' min='0' max='-1' namespace='http://www.namespaceTBD.org/darwin2' w3cType='string' path='/RecordSet/Record/Notes'>
            <mapping>
              <dbAttribute attribute='notes' tablealias='herbariumsheets' type='text' nosearch='0'/>
            </mapping>
          </dataElement>
        </childElements>
      </dataElement>
    </childElements>
  </dataElement>
</conceptMapping>
