Ignore:
Timestamp:
2020-06-12T23:23:04+12:00 (4 years ago)
Author:
ak19
Message:

Useful debugging statement. Would have helped me solve a bug sooner by detecting the real issue sooner (wrong site name was in use, because the library that was invoked on the actual site was incorrect)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/sites/localsite/collect/lucene-jdbm-demo/etc/collectionConfig.xml

    r33955 r34154  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<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">
    3   <security scope="document" default_access="private" disabled="true">
    4     <!-- a sample security configuration. enable it by removing the 'disabled'
    5      attribute above -->
    6     <!-- Document level security. All documents are private -->
    7     <exception>
    8       <!-- except if you are in demo group -->
    9       <group name="demo"/>
    10     </exception>
    11     <exception>
    12       <!-- except for the publicset list of documents which are fully public -->
    13       <documentSet name="publicset"/>
    14       <group name=""/>
    15     </exception>
    16     <documentSet name="publicset">
    17       <match>b17mie</match>
    18       <match>b18ase</match>
    19       <match>b20cre</match>
    20       <match>b21wae</match>
    21     </documentSet>
    22   </security>
    23   <metadataList>
    24     <metadata lang="en" name="creator">Greenstone Project</metadata>
    25     <metadata lang="en" name="maintainer">Greenstone Project</metadata>
    26     <metadata lang="en" name="public">true</metadata>
    27   </metadataList>
    28   <displayItemList>
    29     <displayItem assigned="true" name="name" key="name" dictionary="collectionConfig"/>
    30     <displayItem assigned="true" lang="en" name="name">Demo Collection</displayItem>
    31     <displayItem assigned="true" name="description" key="description" dictionary="collectionConfig"/>
    32     <displayItem assigned="true" name="shortDescription" key="shortDescription" dictionary="collectionConfig"/>
    33  </displayItemList>
    34   <format>
    35     <!-- Define any global format statements here -->
    36 
    37     <!-- Setting the RSS option to true here will display a link to the collection's RSS feed on all
     3    <security default_access="private" disabled="true" scope="document"><!-- a sample security configuration. enable it by removing the 'disabled'
     4     attribute above --><!-- Document level security. All documents are private -->
     5        <exception><!-- except if you are in demo group -->
     6            <group name="demo"/>
     7        </exception>
     8        <exception><!-- except for the publicset list of documents which are fully public -->
     9            <documentSet name="publicset"/>
     10            <group name=""/>
     11        </exception>
     12        <documentSet name="publicset">
     13            <match>b17mie</match>
     14            <match>b18ase</match>
     15            <match>b20cre</match>
     16            <match>b21wae</match>
     17        </documentSet>
     18    </security>
     19    <metadataList>
     20        <metadata lang="en" name="creator">Greenstone Project</metadata>
     21        <metadata lang="en" name="maintainer">Greenstone Project</metadata>
     22        <metadata lang="en" name="public">true</metadata>
     23    </metadataList>
     24    <displayItemList>
     25        <displayItem assigned="true" dictionary="collectionConfig" key="description" name="description"/>
     26        <displayItem assigned="true" dictionary="collectionConfig" key="name" name="name"/>
     27        <displayItem assigned="true" lang="en" name="name">Demo Collection</displayItem>
     28        <displayItem assigned="true" lang="en" name="document:text">text</displayItem>
     29        <displayItem assigned="true" lang="en" name="document:ex.Title">Title</displayItem>
     30        <displayItem assigned="true" lang="en" name="document:ex.Source">Source</displayItem>
     31        <displayItem assigned="true" key="level.chapter" name="section"/>
     32        <displayItem assigned="true" key="level.book" name="document"/>
     33        <displayItem assigned="true" dictionary="collectionConfig" key="shortDescription" name="shortDescription"/>
     34    </displayItemList>
     35    <format>
     36<!--
     37Define any global format statements here
     38-->
     39<!--
     40Setting the RSS option to true here will display a link to the collection's RSS feed on all
    3841     pages of the collection. Can include the RSS feed link in section specific format statements
    39      too, such as search, if wishing to display the link only in particular sections.-->
    40     <gsf:option name="RSS" value="true"/>
    41     <!-- modify the collection description template to output the "this collection contains X documents and was last built Y days ago" message -->
    42     <xsl:template name="coll-description">
    43       <p><gslib:collectionDescriptionTextAndServicesLinks/></p>
    44       <xsl:variable name="raw_date"><gslib:collectionMeta name="buildDate"/></xsl:variable>
    45       <xsl:variable name="formatted_date"><xsl:value-of select="util:formatTimeStamp($raw_date, 0, 3, /page/@lang)"/></xsl:variable>
    46       <xsl:variable name="numdocs"><gslib:collectionMeta name="numDocs"/></xsl:variable>
    47       <p><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.standarddescriptiondays', concat($numdocs, ';', $formatted_date))"/></p>
    48     </xsl:template>
    49   </format>
    50   <search type="lucene">
    51     <level name="section">
    52       <displayItem name="name" key="level.chapter"/>
    53     </level>
    54     <level name="document">
    55       <displayItem name="name" key="level.book"/>
    56     </level>
    57     <defaultLevel name="section"/>
    58     <index name="allfields"/>
    59     <index name="text"/>
    60     <index name="dc.Title,Title"/>
    61     <index name="dc.Subject"/>
    62     <index name="dls.Organization"/>
    63     <sort name="rank"/>
    64     <sort name="dls.Organization">
    65       <displayItem name="name" key="Organisation.buttonname"/>
    66     </sort>
    67     <sort name="none"/>
    68     <defaultSort name="rank"/>
    69     <searchType name="plain"/>
    70     <searchType name="simpleform"/>
    71     <searchType name="advancedform"/>
    72     <format>
    73       <gsf:template match="documentNode">
    74     <td valign="top">
    75       <gsf:link type="document">
    76         <gsf:icon type="document"/>
    77       </gsf:link>
    78     </td>
    79     <td>
    80       <gsf:choose-metadata>
    81         <gsf:metadata name="dc.Title"/>
    82         <gsf:metadata name="Title"/>
    83         <gsf:default>Untitled</gsf:default>
    84       </gsf:choose-metadata>
    85     </td>
    86     </gsf:template>
    87     </format>
    88   </search>
    89   <infodb type="jdbm"/>
    90   <import>
    91     <pluginList>
    92       <plugin name="GreenstoneXMLPlugin"/>
    93       <plugin name="HTMLPlugin">
    94     <option name="-description_tags"/>
    95       </plugin>
    96       <plugin name="MetadataXMLPlugin"/>
    97       <plugin name="ArchivesInfPlugin"/>
    98       <plugin name="DirectoryPlugin"/>
    99     </pluginList>
    100   </import>
    101   <importOption name="OIDtype" value="dirname"/>
    102   <buildOption name="sections_sort_on_document_metadata" value="unless_section_metadata_exists"/>
    103   <browse>
    104     <classifier name="List">
    105       <option name="-metadata" value="dc.Title"/>
    106       <option name="-partition_type_within_level" value="per_letter"/>
    107     </classifier>
    108     <classifier name="Hierarchy">
    109       <option name="-metadata" value="dc.Subject"/>
    110       <option name="-sort" value="dc.Title"/>
    111     </classifier>
    112     <classifier name="List">
    113       <option name="-metadata" value="dls.Organization"/>
    114       <option name="-sort_leaf_nodes_using" value="dc.Title"/>
    115       <option name="-partition_type_within_level" value="constant_size"/>
    116       <option name="-bookshelf_type" value="always"/>
    117       <option name="-buttonname" value="Organization"/>
    118     </classifier>
    119     <classifier name="List">
    120       <option name="-metadata" value="dls.Keyword"/>
    121       <option name="-buttonname" value="Howto"/>
    122       <option name="-partition_type_within_level" value="none"/>
    123       <format> <!-- format statement specific to this classifier -->
    124     <gsf:template match="documentNode">
    125       <td>
    126         <gsf:link type="document">
    127           <gsf:metadata name="dls.Keyword"/>
    128         </gsf:link>
    129       </td>
    130     </gsf:template>
    131       </format>
    132     </classifier>
    133     <format> <!-- general format statements for all classifiers that don't have their own versions -->
    134       <gsf:template match="documentNode">
    135     <td valign="top">
    136       <gsf:link type="document">
    137         <gsf:icon type="document"/>
    138       </gsf:link>
    139     </td>
    140     <td valign="top">
    141       <gsf:choose-metadata>
    142         <gsf:metadata name="dc.Title"/>
    143         <gsf:metadata name="Title"/>
    144         <gsf:default>Untitled</gsf:default>
    145       </gsf:choose-metadata>
    146     </td>
    147       </gsf:template>
    148       <gsf:template match="classifierNode[@classifierStyle = 'VList']">
    149     <td valign="top">
    150       <gsf:link type="classifier" style="static">
    151         <gsf:icon type="classifier"/>
    152       </gsf:link>
    153     </td>
    154     <td valign="top">
    155       <gsf:link type="classifier">
    156         <gsf:metadata name="Title"/>
    157       </gsf:link>
    158     </td>
    159       </gsf:template>
    160       <gsf:template match="classifierNode[@classifierStyle = 'HList']">
    161     <gsf:link type="classifier">
    162       <gsf:metadata name="Title"/>
    163     </gsf:link>
    164        </gsf:template>
    165     <gsf:option name="turnstyleClassifiers" value="true"/>
    166     </format>
    167   </browse>
    168   <display>
    169     <format>
    170       <gsf:option name="TOC" value="true"/>     
    171       <gsf:headMetaTags>
    172     <gsf:metadata name="dc.Title"/>
    173     <gsf:metadata name="dc.Subject"/>
    174     <gsf:metadata name="dls.Organization"/>
    175       </gsf:headMetaTags>
    176     </format>
    177   </display>
    178   <replaceListRef id="gs2-standard"/>
    179   <serviceRackList>
    180     <serviceRack name="RSSRetrieve"/>
    181     <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
    182     <serviceRack name="OAIPMH">
    183       <setName>Lucene demo collection</setName>
    184       <setDescription>A demo collection for greenstone, using Lucene and JDBM.</setDescription>
    185       <!-- uncomment the following and set the name attribute if you want this
    186        collection to be part of a super set. -->
    187       <!--<oaiSuperSet name="xxx"/>-->
    188       <ListMetadataFormats>
    189     <!--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:
     42     too, such as search, if wishing to display the link only in particular sections.
     43-->
     44            <gsf:option name="RSS" value="true"/>
     45<!--
     46modify the collection description template to output the "this collection contains X documents and was last built Y days ago" message
     47-->
     48            <xsl:template name="coll-description">
     49                <p>
     50                    <gslib:collectionDescriptionTextAndServicesLinks/>
     51                </p>
     52                <xsl:variable name="raw_date">
     53                    <gslib:collectionMeta name="buildDate"/>
     54                </xsl:variable>
     55                <xsl:variable name="formatted_date">
     56                    <xsl:value-of select="util:formatTimeStamp($raw_date, 0, 3, /page/@lang)"/>
     57                </xsl:variable>
     58                <xsl:variable name="numdocs">
     59                    <gslib:collectionMeta name="numDocs"/>
     60                </xsl:variable>
     61                <p>
     62                    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.standarddescriptiondays', concat($numdocs, ';', $formatted_date))"/>
     63                </p>
     64            </xsl:template>
     65        </format>
     66    <search type="lucene">
     67        <level name="section">
     68            <displayItem key="level.chapter" name="name"/>
     69        </level>
     70        <level name="document">
     71            <displayItem key="level.book" name="name"/>
     72        </level>
     73        <defaultLevel name="section"/>
     74        <index name="allfields"/>
     75        <index name="text"/>
     76        <index name="dc.Title,Title"/>
     77        <index name="dc.Subject"/>
     78        <index name="dls.Organization"/>
     79        <sort name="rank"/>
     80        <sort name="dls.Organization">
     81            <displayItem key="Organisation.buttonname" name="name"/>
     82        </sort>
     83        <sort name="none"/>
     84        <defaultSort name="rank"/>
     85        <searchType name="plain"/>
     86        <searchType name="simpleform"/>
     87        <searchType name="advancedform"/>
     88        <format>
     89            <gsf:template match="documentNode">
     90                <td valign="top">
     91                    <gsf:link type="document">
     92                        <gsf:icon type="document"/>
     93                    </gsf:link>
     94                </td>
     95                <td>
     96                    <gsf:choose-metadata>
     97                        <gsf:metadata name="dc.Title"/>
     98                        <gsf:metadata name="Title"/>
     99                        <gsf:default>Untitled</gsf:default>
     100                    </gsf:choose-metadata>
     101                </td>
     102            </gsf:template>
     103        </format>
     104    </search>
     105    <infodb type="jdbm"/>
     106    <import>
     107        <pluginList>
     108            <plugin name="GreenstoneXMLPlugin"/>
     109            <plugin name="HTMLPlugin">
     110                <option name="-description_tags"/>
     111            </plugin>
     112            <plugin name="MetadataXMLPlugin"/>
     113            <plugin name="ArchivesInfPlugin"/>
     114            <plugin name="DirectoryPlugin"/>
     115        </pluginList>
     116    </import>
     117    <browse>
     118        <classifier name="List">
     119            <option name="-metadata" value="dc.Title"/>
     120            <option name="-partition_type_within_level" value="per_letter"/>
     121        </classifier>
     122        <classifier name="Hierarchy">
     123            <option name="-metadata" value="dc.Subject"/>
     124            <option name="-sort" value="dc.Title"/>
     125        </classifier>
     126        <classifier name="List">
     127            <option name="-metadata" value="dls.Organization"/>
     128            <option name="-sort_leaf_nodes_using" value="dc.Title"/>
     129            <option name="-partition_type_within_level" value="constant_size"/>
     130            <option name="-bookshelf_type" value="always"/>
     131            <option name="-buttonname" value="Organization"/>
     132        </classifier>
     133        <classifier name="List">
     134            <option name="-metadata" value="dls.Keyword"/>
     135            <option name="-buttonname" value="Howto"/>
     136            <option name="-partition_type_within_level" value="none"/>
     137            <format>
     138<!--
     139format statement specific to this classifier
     140-->
     141            <gsf:template match="documentNode">
     142                <td>
     143                    <gsf:link type="document">
     144                        <gsf:metadata name="dls.Keyword"/>
     145                    </gsf:link>
     146                </td>
     147            </gsf:template>
     148        </format>
     149        </classifier>
     150        <format>
     151<!--
     152general format statements for all classifiers that don't have their own versions
     153-->
     154            <gsf:template match="documentNode">
     155                <td valign="top">
     156                    <gsf:link type="document">
     157                        <gsf:icon type="document"/>
     158                    </gsf:link>
     159                </td>
     160                <td valign="top">
     161                    <gsf:choose-metadata>
     162                        <gsf:metadata name="dc.Title"/>
     163                        <gsf:metadata name="Title"/>
     164                        <gsf:default>Untitled</gsf:default>
     165                    </gsf:choose-metadata>
     166                </td>
     167            </gsf:template>
     168            <gsf:template match="classifierNode[@classifierStyle = 'VList']">
     169                <td valign="top">
     170                    <gsf:link style="static" type="classifier">
     171                        <gsf:icon type="classifier"/>
     172                    </gsf:link>
     173                </td>
     174                <td valign="top">
     175                    <gsf:link type="classifier">
     176                        <gsf:metadata name="Title"/>
     177                    </gsf:link>
     178                </td>
     179            </gsf:template>
     180            <gsf:template match="classifierNode[@classifierStyle = 'HList']">
     181                <gsf:link type="classifier">
     182                    <gsf:metadata name="Title"/>
     183                </gsf:link>
     184            </gsf:template>
     185            <gsf:option name="turnstyleClassifiers" value="true"/>
     186        </format>
     187    </browse>
     188    <display>
     189        <format>
     190            <gsf:option name="TOC" value="true"/>
     191            <gsf:headMetaTags>
     192                <gsf:metadata name="dc.Title"/>
     193                <gsf:metadata name="dc.Subject"/>
     194                <gsf:metadata name="dls.Organization"/>
     195            </gsf:headMetaTags>
     196        </format>
     197    </display>
     198    <replaceListRef id="gs2-standard"/>
     199    <serviceRackList>
     200        <serviceRack name="RSSRetrieve"/><!-- comment out the following serviceRack if you want to disable OAI for this collection -->
     201        <serviceRack name="OAIPMH">
     202            <setName>Lucene demo collection</setName>
     203            <setDescription>A demo collection for greenstone, using Lucene and JDBM.</setDescription><!-- uncomment the following and set the name attribute if you want this
     204       collection to be part of a super set. --><!--<oaiSuperSet name="xxx"/>-->
     205            <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:
    190206        <metadataFormat metadataPrefix="prefix"/> -->
    191     <metadataFormat metadataPrefix="oai_dc"><!--   a custom mapping as this collection doesn't have exclusive dc metadata --><!-- this will replace the dc:publisher element from the main set -->
    192       <element name="dc:publisher">
    193         <mapping elements="dls.Organization"/>
    194       </element>
    195     </metadataFormat>
    196       </ListMetadataFormats>
    197     </serviceRack>
    198   </serviceRackList>
     207                <metadataFormat metadataPrefix="oai_dc"><!--   a custom mapping as this collection doesn't have exclusive dc metadata --><!-- this will replace the dc:publisher element from the main set -->
     208                    <element name="dc:publisher">
     209                        <mapping elements="dls.Organization"/>
     210                    </element>
     211                </metadataFormat>
     212            </ListMetadataFormats>
     213        </serviceRack>
     214    </serviceRackList>
     215    <importOption name="OIDtype" value="dirname"/>
     216    <buildOption name="sections_sort_on_document_metadata" value="unless_section_metadata_exists"/>
    199217</CollectionConfig>
Note: See TracChangeset for help on using the changeset viewer.