<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: explain.xml,v 1.1 2006/10/12 13:02:52 gertsp Exp $ -->

<!-- this file configures the SRU/SRW explain response -->
<!-- see: http://explain.z3950.org/dtd/commentary.html -->
<!-- validate this using zeerex-2.0.xsd -->
<!-- Extensions see: http://explain.z3950.org/dtd/extensions.html -->

<explain xmlns="http://explain.z3950.org/dtd/2.0/">

  <!-- try stylesheet url: http://./?stylesheet=docpath/sru.xsl -->

  <serverInfo protocol="SRW/SRU/Z39.50">

    <host>localhost</host>
    <port>9999</port>
    <database>Default</database>

    <!--<authentication>
      <user>azaroth</user>
      <group>agroup</group>
      <password>squirrelfish</password>
    </authentication>-->
    
  </serverInfo>

  <databaseInfo>

    <title lang="en" primary="true">FgsZebra SRU/SRW/Z39.50 server</title>

    <description lang="en" primary="true">
      Demo on Zebra
    </description>

    <author>Gert Schmeltz Pedersen,
            Technical University of Denmark, http://www.dtv.dk</author>

    <contact>Gert Schmeltz Pedersen, gsp(at)dtv(dot)dk</contact>

    <history>
      Implemented under the DEFXWS Project
      http://defxws2006.cvt.dk/fedoragsearch/,
      funded by DEFF, Denmark's Electronic Research Library
      http://www.deff.dk
    </history>

    <implementation  identifier="zebra" version="2.0">
      <title>Index Data YAZ/ZEBRA http://www.indexdata.dk/zebra</title>
    </implementation>
    
    <links> 
      <!--<link type="www">http://localhost:9999</link>-->
      <link type="z39.50">http://localhost:9999</link>
      <link type="srw">http://localhost:9999</link>
      <link type="sru">http://localhost:9999</link>
      <!--<link type="oai"></link>
      <link type="rss"></link>
      <link type="icon"></link> -->
    </links>
    
  </databaseInfo>

  <!--
  <metaInfo>
    <dateModified>2002-03-29 19:00:00</dateModified>
    <aggregatedFrom> z39.50r://gondolin.hist.liv.ac.uk:210/IR-Explain-1?
                   id=ghlau-1;esn=F;rs=XML </aggregatedFrom>
    <dateAggregated>2002-03-30 06:30:00</dateAggregated>
  </metaInfo>
  -->


  <indexInfo>
    <set name="cql" identifier="info:srw/cql-context-set/1/cql-v1.1">
      <title>CQL Standard Set</title>
    </set>
    <!-- <set name="rec" identifier="info:srw/cql-context-set/2/rec-1.0">
      <title>Record Standard Set</title>
    </set> -->
    <set name="fgs" identifier="http://defxws.dk/fgs/xslt/1">
      <title>Fedora Generic Search Set</title>
    </set>
    <set name="dc" identifier="info:srw/cql-context-set/1/dc-v1.1">
      <title>Dublin Core Set</title>
    </set>
    <set name="bib1" identifier="1.2.840.10003.3.1">
      <title>BIB-1 Z39.50 Standard Set</title>
    </set>


    <!-- CQL standard index -->
    <index search="true" scan="true" sort="false">
      <title lang="en">CQL Server Choice</title>
      <map><name set="cql">serverChoice</name></map>
      <map>
        <attr type="1" set="bib1">defaultFields</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">CQL All</title>
      <map><name set="cql">all</name></map>
      <map>
        <attr type="1" set="bib1">defaultFields</attr>
      </map>
    </index>

    <!-- Record ID index -->
    <!-- <index search="true" scan="true" sort="false">
      <title lang="en">Record ID</title>
      <map><name set="rec">id</name></map>
      <map>
        <attr type="1" set="bib1">rec:id</attr>
        <attr type="4" set="bib1">3</attr>
      </map>
    </index> -->

    <!-- Fgs indexes -->
    <index search="true" scan="true" sort="false">
      <title lang="en">Foxml Persistent Identifier</title>
      <map><name set="fgs">PID</name></map>
      <map>
        <attr type="1" set="bib1">fgs:PID</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">Foxml property contentModel</title>
      <map><name set="fgs">contentModel</name></map>
      <map>
        <attr type="1" set="bib1">fgs:contentModel</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">Foxml property createdDate</title>
      <map><name set="fgs">createdDate</name></map>
      <map>
        <attr type="1" set="bib1">fgs:createdDate</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">Foxml property label</title>
      <map><name set="fgs">label</name></map>
      <map>
        <attr type="1" set="bib1">fgs:label</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">Foxml property lastModifiedDate</title>
      <map><name set="fgs">lastModifiedDate</name></map>
      <map>
        <attr type="1" set="bib1">fgs:lastModifiedDate</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">Foxml property state</title>
      <map><name set="fgs">state</name></map>
      <map>
        <attr type="1" set="bib1">fgs:state</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">Foxml property type</title>
      <map><name set="fgs">type</name></map>
      <map>
        <attr type="1" set="bib1">fgs:type</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">Foxml property repositoryName</title>
      <map><name set="fgs">repositoryName</name></map>
      <map>
        <attr type="1" set="bib1">fgs:repositoryName</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">Foxml datastream DS1</title>
      <map><name set="fgs">DS1</name></map>
      <map>
        <attr type="1" set="bib1">fgs:DS1</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">Foxml datastream DS2</title>
      <map><name set="fgs">DS2</name></map>
      <map>
        <attr type="1" set="bib1">fgs:DS2</attr>
      </map>
    </index>

    <!-- Dublin Core Indexes -->
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Title</title>
      <map><name set="dc">title</name></map>
      <map>
        <attr type="1" set="bib1">dc:title</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Creator</title>
      <map><name set="dc">creator</name></map>
      <map>
        <attr type="1" set="bib1">dc:creator</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Subject</title>
      <map><name set="dc">subject</name></map>
      <map>
        <attr type="1" set="bib1">dc:subject</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Description</title>
      <map><name set="dc">description</name></map>
      <map>
        <attr type="1" set="bib1">dc:description</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Publisher</title>
      <map><name set="dc">publisher</name></map>
      <map>
        <attr type="1" set="bib1">dc:publisher</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Contributor</title>
      <map><name set="dc">contributor</name></map>
      <map>
        <attr type="1" set="bib1">dc:contributor</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Date</title>
      <map><name set="dc">date</name></map>
      <map>
        <attr type="1" set="bib1">dc:date</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Type</title>
      <map><name set="dc">type</name></map>
      <map>
        <attr type="1" set="bib1">dc:type</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Format</title>
      <map><name set="dc">format</name></map>
      <map>
        <attr type="1" set="bib1">dc:format</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Identifier</title>
      <map><name set="dc">identifier</name></map>
      <map>
        <attr type="1" set="bib1">dc:identifier</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Source</title>
      <map><name set="dc">source</name></map>
      <map>
        <attr type="1" set="bib1">dc:source</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Language</title>
      <map><name set="dc">language</name></map>
      <map>
        <attr type="1" set="bib1">dc:language</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Relation</title>
      <map><name set="dc">relation</name></map>
      <map>
        <attr type="1" set="bib1">dc:relation</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Coverage</title>
      <map><name set="dc">coverage</name></map>
      <map>
        <attr type="1" set="bib1">dc:coverage</attr>
      </map>
    </index>
    <index search="true" scan="true" sort="false">
      <title lang="en">DC Rights</title>
      <map><name set="dc">rights</name></map>
      <map>
        <attr type="1" set="bib1">dc:rights</attr>
      </map>
    </index>

  </indexInfo>

  <!-- Z39.50 stuff ... not allowed in one and the same explain together with 
       <schemaInfo>, sic ..
  <recordInfo>
    <recordSyntax identifier="1.2.840.10003.5.109.10">
      <elementSet name="F">
        <title lang="en" primary="true">Full XML Record</title>
      </elementSet>
    </recordSyntax>
  </recordInfo>
  -->

  <schemaInfo>

    <schema identifier="http://www.loc.gov/zing/srw/dcschema/v1.0/"
            location="http://www.loc.gov/zing/srw/dc.xsd" 
            name="dc"
            retrieve="true">
      <title lang="en">Dublin Core</title>
    </schema>

    <schema identifier="http://indexdata.dk/zebra/xslt/1"
            location="" 
            name="index"
            retrieve="true">
      <title lang="en">Zebra Indexing</title>
    </schema>

  </schemaInfo>

 
  <configInfo>

    <!-- searchRetrieve settings -->

    <!-- default context set -->
    <default type="contextSet">cql</default>

    <default type="index">all</default>

    <!-- default relation -->
    <default type="relation">=</default>

    <!-- relation supported by the server or index -->

    <supports type="relation">&lt;</supports> <!-- 2=1 OK -->
    <supports type="relation">&lt;=</supports> <!-- 2=2 OK -->
    <supports type="relation">=</supports> <!-- 2=3 OK -->
    <supports type="relation">&gt;=</supports> <!-- 2=4 OK -->
    <supports type="relation">&gt;</supports> <!-- 2=5 OK -->
    <!-- <supports type="relation">&lt;&gt;</supports> --><!-- 2=6 DEAD !!! -->
    <!-- <supports type="relation">all</supports> --><!-- 2=3 OK -->
    <!-- <supports type="relation">any</supports> --><!-- 2=3 OK -->

    <!-- <supports type="relationModifier">relevant</supports> --><!-- 2=102 OK, makes no difference .. sic -->
    <!-- <supports type="relationModifier">phonetic</supports> --> <!-- 2=100 DEAD -->
    <!-- <supports type="relationModifier">stem</supports> --> <!-- 2=101 DEAD !! -->

    <!-- support proximity (Empty) -->
    <!-- <supports type="proximity"></supports> --> <!-- DEAD,  title = (house prox/distance=1/unit=word  the) FAILS -->


    <!-- proximity modifier supported by the server or index 
         (relation, distance, unit, ordering) -->
    <!-- <supports type="proximityModifier"></supports> -->

    <!-- boolean modifier supported by the server or index -->
    <!-- <supports type="booleanModifier"></supports> -->

    <!-- masking character supported (* or ?) -->
    <supports type="maskingCharacter">*</supports>
    <supports type="maskingCharacter">?</supports>

    <!-- anchoring supported? (^ character) -->
    <!-- MARC: how do I express that I only support left anchoring in 
         the beginning of the field ( bib1 3=1 ), but no right anchoring ?? -->
    <!-- MIKE: You can't.  The ZeeRex documentation should be changed
	 to allow this, as <supports type="anchoring">left</supports> -->
    <!-- <supports type="anchoring"></supports> -->

    <!-- empty terms supported (Empty) -->
    <!-- MARC: what's the use case of this ?? -->
    <!-- MIKE: lots of uses!  For example, scanning from the very
	 start of the index with 'scan @attr 1=text ""'.  Or searching
	 for bibliographic records with no title, etc. -->
    <!-- MARC: I see, and we can if we always use '""' 
         (the empty string), as in 'scan @attr 1=text ""' -->
    <supports type="emptyTerm"></supports>


    <!-- sorting settings -->

    <!-- supported sortmodifier (ascending, missingValue, caseSensitive) -->
    <!-- <supports type="sortModifier"></supports> -->
    <!-- MIKE: this is for the new CQL "sortby" sorting, which Zebra
	 doesn't yet do at all, so you're right to omit this for now. -->

    <!-- presentation settings --> 

    <!-- default number of records that a server will return at once  -->
    <default type="numberOfRecords">0</default>

    <!-- default schema used for retrieved records -->
    <default type="retrieveSchema">index</default>

    <!-- default stylesheet URL, or if stylesheets are supported -->
    <setting type="stylesheet">docpath/sru.xsl</setting>

    <!-- default record packing returned (string or xml) -->
    <default type="recordPacking">xml</default>

    <!-- maximum number of records that a server will return at once -->
    <!-- <setting type="maximumRecords">1000</setting> -->

    <!-- support result sets (Empty) -->
    <!-- <supports type="resultSets"></supports>  --> 

    <!-- XPath retrieval supported -->
    <!-- <supports type="recordXPath"></supports> -->


    <!-- scan settings -->

    <!-- scan operation supported -->
    <supports type="scan"></supports>

    <!-- default number of terms to be returned in scan -->
    <default type="numberOfTerms">20</default>



    <!-- other server settings -->

    <!-- number of seconds that a result set will be maintained for -->
    <setting type="resultSetTTL">0</setting>

  </configInfo>
   
</explain>
