<?xml version='1.0' encoding='utf-8'?>
<!--

CONFIGURATION HELP 
  for every db attribute that matches an element below, please insert a line as the example below right after the <dataElement> tag. 
 
  in general: 
	<mapDB attribute="ATTRIBUTE NAME IN YOUR DB" tablealias="TABLE-ALIAS" type="DBTYPE" nosearch="0"/>
	possible types are:
	unicode, string, integer, float, date 
 
 
  examples:
	<mapDB attribute="DateCollected" tablealias="Belege" type="date"/>
	<mapDB attribute="Altitude" tablealias="Belege" type="int"/>
	<mapDB attribute='source_code' tablealias='unit' type='unicode' nosearch='0'/>

  if you ommit the type attribute, it is assumed it is a unicode value:
	<mapDB attribute="TaxonName" tablealias="Belege"/>
 
 
  if you get unwanted repetitions in your XML, you can tell a repeatable node not to repeat by inserting an additional attribute to the <dataElement> element:
  <dataElement name='DatasetDerivation' min='1' max='-1' dontRepeat='1' path='...>

-->
<conceptMapping xmlns='http://www.biocase.org/schemas/conceptmapping/2.0'>
  <rootTableAlias>pot_keyword</rootTableAlias>
  <recordIdentifier>/termlist/body/term</recordIdentifier>
  <dataElement path='/termlist' max='1' namespace='http://www.biocase.org/schemas/keywords/1.2' name='termlist' min='1'>
    <childElements>
      <dataElement path='/termlist/body' max='-1' namespace='http://www.biocase.org/schemas/keywords/1.2' name='body' min='0'>
        <attributes>
          <attribute path='/termlist/body[@documentType]' name='documentType' w3cType='string' min='0'/>
          <attribute path='/termlist/body[@nodeID]' name='nodeID' w3cType='string' min='0'/>
          <attribute path='/termlist/body[@sourceID]' name='sourceID' w3cType='string' min='0'>
            <mapDB attribute='body_id' tablealias='body' type='int' nosearch='0'/>
          </attribute>
          <attribute path='/termlist/body[@ID]' name='ID' w3cType='byte' min='0'/>
        </attributes>
        <childElements>
          <dataElement path='/termlist/body/term' max='-1' namespace='http://www.biocase.org/schemas/keywords/1.2' name='term' min='1'>
            <attributes>
              <attribute path='/termlist/body/term[@isInThesaurus]' name='isInThesaurus' w3cType='boolean' min='0'/>
              <attribute path='/termlist/body/term[@status]' name='status' w3cType='NMTOKENS' min='1'>
                <vocabulary>
                  <term schemaTerm='to be validated'>
                    <dbTerm>to be validated</dbTerm>
                  </term>
                  <term schemaTerm='accepted'>
                    <dbTerm>accepted</dbTerm>
                  </term>
                  <term schemaTerm='rejected'>
                    <dbTerm>rejected</dbTerm>
                  </term>
                  <term schemaTerm='stop word'>
                    <dbTerm>stop word</dbTerm>
                  </term>
                </vocabulary>
                <mapDB attribute='keyword_status' tablealias='pot_keyword' type='unicode' nosearch='0'/>
              </attribute>
              <attribute path='/termlist/body/term[@source]' name='source' w3cType='NMTOKEN' min='0'>
                <vocabulary>
                  <term schemaTerm='corm_description'>
                    <dbTerm>CormDescription</dbTerm>
                  </term>
                  <term schemaTerm='meta_keywords'>
                    <dbTerm>MetaKeywords</dbTerm>
                  </term>
                  <term schemaTerm='web_page_content'>
                    <dbTerm>WebPageContent</dbTerm>
                  </term>
                  <term schemaTerm='thesaurus_list'>
                    <dbTerm>ThesaurusList</dbTerm>
                  </term>
                </vocabulary>
                <mapDB attribute='source' tablealias='pot_keyword' type='unicode' nosearch='0'/>
              </attribute>
              <attribute path='/termlist/body/term[@relevancy]' name='relevancy' w3cType='float' min='0'>
                <mapDB attribute='relevancy' tablealias='pot_keyword' type='unicode' nosearch='0'/>
              </attribute>
              <attribute path='/termlist/body/term[@class]' name='class' w3cType='NMTOKENS' min='0'>
                <vocabulary>
                  <term schemaTerm='organisation class'>
                    <dbTerm>OrganisationClass</dbTerm>
                  </term>
                  <term schemaTerm='object class'>
                    <dbTerm>ObjectClass</dbTerm>
                  </term>
                  <term schemaTerm='collection class'>
                    <dbTerm>CollectionClass</dbTerm>
                  </term>
                  <term schemaTerm='preservation method'>
                    <dbTerm>PreservationMethod</dbTerm>
                  </term>
                  <term schemaTerm='taxon'>
                    <dbTerm>Taxon</dbTerm>
                  </term>
                  <term schemaTerm='common name'>
                    <dbTerm>CommonName</dbTerm>
                  </term>
                  <term schemaTerm='geography'>
                    <dbTerm>GeospatialCoverage</dbTerm>
                  </term>
                  <term schemaTerm='time'>
                    <dbTerm>Time</dbTerm>
                  </term>
                  <term schemaTerm='living time'>
                    <dbTerm>LivingTime</dbTerm>
                  </term>
                  <term schemaTerm='collecting time'>
                    <dbTerm>CollectingTime</dbTerm>
                  </term>
                  <term schemaTerm='assembling time'>
                    <dbTerm>AssemblingTime</dbTerm>
                  </term>
                  <term schemaTerm='unknown'>
                    <dbTerm>Unknown</dbTerm>
                  </term>
                </vocabulary>
                <mapDB attribute='class' tablealias='pot_keyword' type='unicode' nosearch='0'/>
              </attribute>
              <attribute path='/termlist/body/term[@name]' name='name' w3cType='string' min='1'>
                <mapDB attribute='potential_keyword' tablealias='pot_keyword' type='unicode' nosearch='0'/>
              </attribute>
            </attributes>
          </dataElement>
        </childElements>
      </dataElement>
    </childElements>
  </dataElement>
</conceptMapping>
