<?xml version="1.0" encoding="UTF-8"?>
<CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:gslib="http://www.greenstone.org/skinning" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <!-- By default, all documents are private-->
  <security default_access="private" scope="document">
    <!-- except for users in the demo group -->
    <exception>
      <group name="demo"/>
    </exception>
    <!-- also, except for documents in the always-public set-->
    <exception>
      <documentSet name="always-public"/>
      <group name=""/>
    </exception>
    <!-- define which documents are in the always-public set -->
    <documentSet name="always-public">
      <match>fb33fe</match>
      <match>fb34fe</match>
    </documentSet>
  </security>
  <metadataList>
    <metadata lang="en" name="creator">greenstone @ waikato.ac.nz</metadata>
    <metadata lang="en" name="maintainer"/>
    <metadata lang="en" name="public">true</metadata>
  </metadataList>
  <displayItemList>
    <!-- some text strings for the collection. These are defined in a dictionary file called
	 collectionConfig.properties, in the resources folder of the collection -->
    <displayItem assigned="true" dictionary="collectionConfig" key="name" name="name"/>
    <displayItem assigned="true" dictionary="collectionConfig" key="shortDescription" name="shortDescription"/>
    <displayItem assigned="true" dictionary="collectionConfig" key="description1" name="description1"/>
    <displayItem assigned="true" dictionary="collectionConfig" key="description2" name="description2"/>
    <displayItem assigned="true" dictionary="collectionConfig" key="description3" name="description3"/>
    <displayItem assigned="true" dictionary="collectionConfig" key="description4" name="description4"/>
    <displayItem assigned="true" dictionary="collectionConfig" key="description5" name="description5"/>
    <displayItem assigned="true" dictionary="collectionConfig" key="description6" name="description6"/>
    <displayItem assigned="true" dictionary="collectionConfig" key="description7" name="description7"/>
    <displayItem assigned="true" dictionary="collectionConfig" key="textsource" name="textsource"/>
    <displayItem assigned="true" dictionary="collectionConfig" key="textnumpages" name="textnumpages"/>
    <displayItem assigned="true" dictionary="collectionConfig" key="textdate" name="textdate"/>
  </displayItemList>
  <format/>
  <search type="lucene">
    <level name="section">
      <displayItem assigned="true" dictionary="collectionConfig" key="section_chapter" name="name"/>
    </level>
    <level name="document">
      <displayItem assigned="true" dictionary="collectionConfig" key="document_book" name="name"/>
    </level>
    <defaultLevel name="section"/>
    <index name="dls.Organization">
      <displayItem dictionary="collectionConfig" key="dls.Organization" name="name"/>
    </index>
    <index name="dls.Keyword">
      <displayItem dictionary="collectionConfig" key="dls.Keyword" name="name"/>
    </index>
    <index name="dls.Title,Title">
      <displayItem dictionary="collectionConfig" key="dls.Titles" name="name"/>
    </index>
    <index name="text">
      <displayItem dictionary="collectionConfig" key="index_text" name="name"/>
    </index>
    <index name="dls.Subject">
      <displayItem dictionary="collectionConfig" key="dls.Subject" name="name"/>
    </index>
    <defaultIndex name="text"/>
    <indexOption name="casefold"/>
    <indexOption name="stem"/>
    <searchType name="plain"/>
    <searchType name="simpleform"/>
    <searchType name="advancedform"/>
    <format>
      <gsf:template match="documentNode">
	<td valign="top">
	  <gsf:link type="document"><gsf:icon type="document"/></gsf:link>
	</td>
	<td>
	  <gsf:if-metadata-exists>
	    <gsf:metadata name="Title" select="ancestors"/>
	    <gsf:if><gsf:metadata name="Title" select="ancestors" separator=": "/>: </gsf:if>
	  </gsf:if-metadata-exists>
	  <gsf:link type="document">
	    <gsf:metadata name="Title"/>
	  </gsf:link>
	</td>
      </gsf:template>
    </format>
  </search>
  <infodb type="gdbm"/>
  <import>
    <pluginList>
      <plugin name="GreenstoneXMLPlugin"/>
      <plugin name="HTMLPlugin">
	<option name="-description_tags"/>
	<option name="-OIDtype" value="dirname"/>
      </plugin>
      <plugin name="MetadataXMLPlugin"/>
      <plugin name="ArchivesInfPlugin"/>
      <plugin name="DirectoryPlugin"/>
    </pluginList>
  </import>
  <browse>
    <classifier name="List">
      <option name="-metadata" value="dls.Title"/>
      <option name="-partition_type_within_level" value="constant_size"/>
    </classifier>
    <classifier name="Hierarchy">
      <option name="-metadata" value="dls.Subject"/>
      <option name="-sort" value="dls.Title"/>
    </classifier>
    <classifier name="List">
      <option name="-metadata" value="dls.Organization"/>
      <option name="-sort_leaf_nodes_using" value="dls.Title"/>
      <option name="-partition_type_within_level" value="constant_size"/>
      <option name="-bookshelf_type" value="always"/>
    </classifier>
    <classifier name="List">
      <option name="-metadata" value="dls.Keyword"/>
      <option name="-buttonname" value="Howto"/>
      <option name="-partition_type_within_level" value="constant_size"/>
      <!-- custom documentNode format specific to this classifier -->
      <format>
	<gsf:template match="documentNode">
	  <td>
	    <gsf:link type="document"><gsf:icon type="document"/></gsf:link>
	  </td>
	  <td>
	    <gsf:link type="document"><gsf:metadata name="dls.Keyword"/></gsf:link>
	  </td>
	</gsf:template>
      </format>
    </classifier>
    <format>
      <gsf:template match="documentNode">
	<td valign="top">
	  <gsf:link type="document"><gsf:icon type="document"/></gsf:link>
	</td>
	<td valign="top">
	    <gsf:choose-metadata>
	      <gsf:metadata name="dls.Title"/>
	      <gsf:metadata name="Title"/>
	      <gsf:default>Untitled</gsf:default>
	    </gsf:choose-metadata>
	    <br/>
	    <small><i><gsf:displayItem name="textsource"/><gsf:metadata name="Source"/></i></small>
	</td>
      </gsf:template>
    </format>
  </browse>
  <display>
    <format>
      <gsf:option name="TOC" value="true"/>
      <gsf:option name="AllowUserComments" value="false"/>
    </format>
  </display>
  <replaceListRef id="gs2-standard"/>
  <serviceRackList>
    <serviceRack name="OAIPMH">
      <setName>Authentication demo</setName>
      <setDescription>A collection demonstrating document level security.</setDescription>
      <!-- uncomment the following and set the name attribute if you want this
	   collection to be part of a super set. -->
      <!--<oaiSuperSet name="xxx"/>-->
      <ListMetadataFormats>
	<!--What metadata sets to support for this collection. You can select any set that is specified in OAIConfig.xml. To use a new set, you need to add a set definition in OAIConfig.xml, then reference it here, like:
	    <metadataFormat metadataPrefix="prefix"/> -->
	<metadataFormat metadataPrefix="oai_dc">
	  <!--   custom mappings as this collection doesn't has dc metadata - it has dls metadata -->
	  <element name="dc:publisher">
	    <mapping elements="dls.Organization"/>
	  </element>
	  <element name="dc:subject">
	    <mapping elements="dls.Subject"/>
	  </element>
	  <element name="dc:title">
	    <mapping elements="dls.Title"/>
	  </element>
	</metadataFormat>
      </ListMetadataFormats>
    </serviceRack>
  </serviceRackList>
</CollectionConfig>
