<?xml version="1.0" encoding="UTF-8" ?>
<!--
Simple test configuration for flat representation of DarwinCore V1 dataset
-->
<configuration>
	<!-- 
	<datasource> defines the database connection.
	Type = "SQL" | "Z39.50".  
	If type = "SQL"
	  constr = ADODB connection string
	  uid = User ID
	  pwd = password
	  database = name of database (for engines that support multiple databases)
	  dbtype = name of the ADODB driver
	-->
    <datasource 
       type="SQL"
       constr="Provider=Microsoft.JET.OLEDB.4.0;Data Source=c:\digirprov\database\test.mdb"
       uid=""
       pwd=""
       database=""
       dbtype="ado_access"
       encoding="utf-8" >
    </datasource>
    <!--
    <table> identifies which table(s) to draw data from. 
    Attributes:
      name = name of the table
      key = column in database that provides a unique ID
    -->
    <table name="digir_test" key="int_val">
    </table>
    <!--
    <defaultFormats> Identifies the default schemas to use for search and scan results.
    -->
    <defaultFormats>
    	<!--
    	<format> provides a reference to a schema.
    	Attributes:
    	  type = "search" | "scan"
    	  location = URL of XML schema document
    	-->
        <format type="search" location="http://digir.sourceforge.net/schema/conceptual/darwin/brief/2003/1.0/darwin2brief.xsd" />
    </defaultFormats>
    <!--
    <concepts> is a list of concepts supported by this database.  The namespace of the concept
    name attribute must match a namespace defined in the <concepts> element.
    -->
    <concepts xmlns:darwin="http://digir.net/schema/conceptual/darwin/2003/1.0" >
        <!--
        Each <concept> element identifies a concept (basically equivalent to a database column) that
        is available for search and/or retrieval.
        Attributes:
          searchable = "1" | "0", indicating whether the concept is available in searches or not respectively.
          returnable = "1" | "0", indicating if the concept data can be returned in response records.
          type = meta-type for data stored in the database.  Can be one of the following:
            DATETIME = Date Time database type
            TEXT = string, varchar, text
            NUMERIC = integer, floating point, fixed
          table = name of the table from which the data is to be drawn.  The case of the table name MUST
            match the case of the name attribute given in the <table> element above.
        -->
        <concept searchable="1" returnable="1" name="darwin:DateLastModified" type="DATETIME" table="specdata" zid="25" field="DateLastModified" />
        <concept searchable="1" returnable="1" name="darwin:ScientificName" type="text" table="specdata" zid="1" field="scientificname" />
        <concept searchable="1" returnable="1" name="darwin:Kingdom" type="text" table="specdata" zid="2" field="kingdom" />
        <concept searchable="1" returnable="1" name="darwin:Phylum" type="text" table="specdata" zid="3" field="phylum" />
        <concept searchable="1" returnable="1" name="darwin:Class" type="text" table="specdata" zid="4" field="class" />
        <concept searchable="1" returnable="1" name="darwin:Order" type="text" table="specdata" zid="5" field="torder" />
        <concept searchable="1" returnable="1" name="darwin:Family" type="text" table="specdata" zid="6" field="family" />
        <concept searchable="1" returnable="1" name="darwin:Genus" type="text" table="specdata" zid="7" field="genus" />
        <concept searchable="1" returnable="1" name="darwin:Species" type="text" table="specdata" zid="8" field="species" />
        <concept searchable="1" returnable="1" name="darwin:Subspecies" type="text" table="specdata" zid="9" field="subspecies" />
        <concept searchable="1" returnable="1" name="darwin:InstitutionCode" type="text" table="specdata" zid="10" field="institutioncode" />
        <concept searchable="1" returnable="1" name="darwin:CollectionCode" type="text" table="specdata" zid="11" field="collectioncode" />
        <concept searchable="1" returnable="1" name="darwin:CatalogNumber" type="numeric" table="specdata" zid="12" field="catalognumber" defaultOrder="ASC" />
        <concept searchable="1" returnable="1" name="darwin:Collector" type="text" table="specdata" zid="13" field="collector" />
        <concept searchable="1" returnable="1" name="darwin:Year" type="numeric" table="specdata" zid="14" field="yearcoll" />
        <concept searchable="1" returnable="1" name="darwin:Month" type="numeric" table="specdata" zid="15" field="monthcoll" />
        <concept searchable="1" returnable="1" name="darwin:Day" type="numeric" table="specdata" zid="16" field="daycoll" />
        <concept searchable="1" returnable="1" name="darwin:Country" type="text" table="specdata" zid="17" field="country" />
        <concept searchable="1" returnable="1" name="darwin:StateProvince" type="text" table="specdata" zid="18" field="stateprovince" />
        <concept searchable="1" returnable="1" name="darwin:County" type="text" table="specdata" zid="19" field="county" />
        <concept searchable="1" returnable="1" name="darwin:Locality" type="text" table="specdata" zid="20" field="locality" />
        <concept searchable="1" returnable="1" name="darwin:Longitude" type="numeric" table="specdata" zid="21" field="longitude" />
        <concept searchable="1" returnable="1" name="darwin:Latitude" type="numeric" table="specdata" zid="22" field="latitude" />
        <concept searchable="1" returnable="0" name="darwin:BoundingBox" type="BBOUNDING" table="specdata" zid="23" field="longitude,latitude" />
        <concept searchable="1" returnable="0" name="darwin:DayOfYear" type="JULIAN" table="specdata" zid="24" field="day,month" />
    </concepts>

	<!--
	The <metadata> element provides metadata for this resource.
	-->    
    <metadata>
      <name>Digir test database (source forge distribution)</name>
      <code>! set by application (value in resources.xml) !</code>
      <relatedInformation>URL that provides more information about this resource</relatedInformation>
      <contact type="technical">
          <name>Name of contact.  You can have multiple contacts of type technical and/or administrative</name>
          <title>Title of contact</title>
          <emailAddress>NOSPAM</emailAddress>
          <phone>full phone number - including country code</phone>
      </contact>
      <contact type="administrative">
          <name>Name of contact.  You can have multiple contacts of type technical and/or administrative</name>
          <title>Title of contact</title>
          <emailAddress>NOSPAM</emailAddress>
          <phone>full phone number - including country code</phone>
      </contact>
      <abstract>
        Description of the contents of this resource.
      </abstract>
      <keywords>Some key words (comma delimited)</keywords>
      <citation>How you want your data cited</citation>
      <useRestrictions>
        Restrictions on use of the data retrieved from this resource.
      </useRestrictions>
      <!--
      schemaLocation is the physical location of the federation schema that this resource supports.  The 
      value of the element is the name space of the schema.
      -->
      <conceptualSchema schemaLocation="http://digir.sourceforge.net/schema/conceptual/darwin/2003/1.0/darwin2.xsd">
        http://digir.net/schema/conceptual/darwin/2003/1.0
      </conceptualSchema>
      <recordIdentifier>Unique identifier for this resource (within the institution)</recordIdentifier>
      <recordBasis>voucher - can be voucher or observation - applies to *all* records in resource</recordBasis>
      <numberOfRecords>! set by application !</numberOfRecords>
      <dateLastUpdated>! set by application !</dateLastUpdated>

	  <!--
	  integer, specifies the minimum number of characters that can appear in a query term. 
	  -->
      <minQueryTermLength>0</minQueryTermLength>
      
      <!--
      integer, specifies the maximum number of records that can be returned in a search 
      response.  Effectively sets the maximum page size of a response
      -->
      <maxSearchResponseRecords>1000</maxSearchResponseRecords>
      
      <!--
      integer, specifies the maximum number of records that can be returned in an 
      inventory (scan) response.  Effectively sets the maximum page size of a response
      -->
      <maxInventoryResponseRecords>10000</maxInventoryResponseRecords>

      <!--
      URL, points to the default record format that will be used when the request contains a 
      blank record structure
      -->
      <defaultRecordFormat>http://digir.sourceforge.net/schema/conceptual/darwin/brief/2003/1.0/darwin2brief.xsd</defaultRecordFormat>"

      <!--
      namespace + concept, identifies the concept that will be used by default is the inventory 
      request contains a blank record structure
      -->
      <defaultInventoryConcept>darwin:ScientificName</defaultInventoryConcept>
    </metadata>
</configuration>
