root/main/trunk/model-cols/niupepa/etc/collectionConfig.xml @ 26389

Revision 26389, 14.2 KB (checked in by kjdon, 7 years ago)

abstract and commentary links on doc page now dependent on whether there actually are abstracts and commentaries

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  >
3    <metadataList>
4        <metadata lang="en" name="creator"/>
5        <metadata lang="en" name="maintainer"/>
6        <metadata lang="en" name="public">true</metadata>
7    </metadataList>
8    <displayItemList>
9        <displayItem assigned="true" lang="en" name="description">A sample of niupepa papers</displayItem>
10        <displayItem assigned="true" lang="en" name="name">niupepa: māori newspapers</displayItem>
11    </displayItemList>
12    <format>
13        <gsf:template name="choose-icon">
14            <gsf:switch>
15                <gsf:metadata name="DocType"/>
16                <gsf:when test="equals" test-value="Commentary">
17                    <gsf:icon file="icomm.gif" select="collection"/>
18                </gsf:when>
19                <gsf:when test="equals" test-value="Abstract">
20                    <gsf:icon file="iabstr.gif" select="collection"/>
21                </gsf:when>
22                <gsf:when test="equals" test-value="Niupepa">
23                    <gsf:icon file="np.gif" select="collection"/>
24                </gsf:when>
25                <gsf:otherwise>
26      <gsf:switch>
27        <gsf:metadata name="DocType" select="root"/>
28        <gsf:when test="equals" test-value="Niupepa">
29          <gsf:icon file="np.gif" select="collection"/>
30        </gsf:when>
31        <gsf:otherwise>
32          <gsf:icon type="document"/>
33        </gsf:otherwise>
34        </gsf:switch>
35      </gsf:otherwise>
36            </gsf:switch>
37        </gsf:template>
38        <gsf:template name="title-plain">
39            <gsf:choose-metadata>
40                <gsf:metadata name="Series" select="root"/>
41                <gsf:metadata name="Series"/>
42            </gsf:choose-metadata>
43            <xsl:text>: </xsl:text>
44            <gsf:switch>
45                <gsf:metadata name="Title" select="ancestors"/>
46                <gsf:when test="exists">
47                    <gsf:metadata name="Title" select="ancestors"/><xsl:text>: </xsl:text>
48                </gsf:when>
49            </gsf:switch>
50            <gsf:metadata name="Title"/>
51        </gsf:template>
52    </format>
53    <search type="mgpp">
54        <level name="section">
55            <displayItem lang="en" name="name">section</displayItem>
56        </level>
57        <defaultLevel name="section"/>
58        <index name="text">
59            <displayItem lang="en" name="name">text</displayItem>
60        </index>
61        <defaultIndex name="text"/>
62                <indexOption name="accentfold" default="on"/>
63        <indexOption name="casefold" default="on"/>
64        <indexOption name="stem" default="off"/>
65        <indexSubcollection name="abstract,commentary,niupepa">
66            <displayItem lang="en" name="name">papers, commentaries and abstracts</displayItem>
67            <displayItem lang="mi" name="name">ngā niupepa, kupu whakataki, me ngā rāpopoto</displayItem>
68        </indexSubcollection>
69        <indexSubcollection name="niupepa">
70            <displayItem lang="en" name="name">newspapers</displayItem>
71            <displayItem lang="mi" name="name">ngā niupepa anake</displayItem>
72        </indexSubcollection>
73        <indexSubcollection name="commentary">
74            <displayItem lang="en" name="name">bibliographic commentaries</displayItem>
75            <displayItem lang="mi" name="name">ngā kupu whakataki anake</displayItem>0
76        </indexSubcollection>
77        <indexSubcollection name="abstract">
78            <displayItem lang="en" name="name">english abstracts</displayItem>
79            <displayItem lang="mi" name="name">ngā rāpopoto reo Pākehā anake</displayItem>
80        </indexSubcollection>
81        <subcollection filter="DocType/Commentary/" name="commentary"/>
82        <subcollection filter="DocType/Abstract/" name="abstract"/>
83        <subcollection filter="DocType/Niupepa/" name="niupepa"/>
84        <searchType name="plain"/>
85        <format>
86            <gsf:template name="title-with-link">
87                <gsf:choose-metadata>
88                    <gsf:metadata name="Series" select="root"/>
89                    <gsf:metadata name="Series"/>
90                </gsf:choose-metadata>
91                <xsl:text>: </xsl:text>
92                <gsf:switch>
93                    <gsf:metadata name="Title" select="ancestors"/>
94                    <gsf:when test="exists">
95                        <gsf:metadata name="Title" select="ancestors"/><xsl:text>: </xsl:text>
96                    </gsf:when>
97                </gsf:switch>
98                <gsf:link type="document">
99                    <gsf:metadata name="Title"/>
100                </gsf:link>
101            </gsf:template>
102            <gsf:template match="documentNode">
103                <td valign="top">
104                    <gsf:link type="document">
105                        <xsl:call-template name="choose-icon"/>
106                    </gsf:link>
107                </td>
108                <td>
109                    <xsl:call-template name="title-with-link"/>
110                </td>
111            </gsf:template>
112        </format>
113    </search>
114    <infodb type="gdbm"/>
115    <import>
116        <pluginList>
117            <plugin name="ZIPPlugin"/>
118            <plugin name="GreenstoneXMLPlugin"/>
119            <plugin name="CommentaryPlugin"/>
120            <plugin name="NiupepaPlugin">
121                <option name="-enable_cache"/>
122                <option name="-OIDtype" value="filename"/>
123                <option name="-process_exp" value="\.item$"/>
124                <option name="-create_thumbnail" value="true"/>
125                <option name="-create_screenview" value="true"/>
126            </plugin>
127            <plugin name="AbstractPlugin"/>
128            <plugin name="MetadataXMLPlugin"/>
129            <plugin name="ArchivesInfPlugin"/>
130            <plugin name="DirectoryPlugin"/>
131        </pluginList>
132    </import>
133    <browse>
134        <classifier name="List">
135            <option name="-metadata" value="Series"/>
136            <option name="-sort_leaf_nodes_using" value="ex.Date"/>
137            <option name="-bookshelf_type" value="always"/>
138            <option name="-partition_type_within_level" value="none"/>
139            <option name="-filter_metadata" value="DocType"/>
140            <option name="-filter_regex" value="(?i)(niupepa|commentary)"/>
141            <format>
142                <gsf:template match="documentNode">
143                    <td valign="top">
144                        <gsf:switch>
145                            <gsf:metadata name="abstract"/>
146                            <gsf:when test="exists">
147                                <gsf:link OIDmetadata="abstract" type="document">
148                                    <gsf:icon file="iabstr.gif" select="collection"/>
149                                </gsf:link>
150                            </gsf:when>
151                        </gsf:switch>
152                    </td>
153                    <td valign="top">
154                        <gsf:link type="document">
155                            <xsl:call-template name="choose-icon"/>
156                        </gsf:link>
157                    </td>
158                    <td valign="top">
159                        <gsf:metadata name="Title"/>
160                        <xsl:text>                  </xsl:text>                 <i><gsf:metadata format="formatDate" name="Date"/></i>
161                    </td>
162                </gsf:template>
163                <gsf:template match="classifierNode[@classifierStyle = 'VList']">
164                    <td valign="top">
165                        <gsf:link type="classifier">
166                            <gsf:icon type="classifier"/>
167                        </gsf:link>
168                    </td>
169                    <td valign="top">
170                        <gsf:metadata name="Title"/>
171                        <xsl:text>                  </xsl:text>                 <i>(<gsf:switch><gsf:metadata name="numleafdocs"/><gsf:when test="equals" test-value="1"><gsf:collectionText name="oneissue"/></gsf:when><gsf:otherwise><xsl:variable name="args"><gsf:metadata name="numleafdocs"/></xsl:variable><xsl:value-of disable-output-escaping="yes" select="util:getCollectionText($collName, $site_name, /page/@lang, 'numissues', $args)"/></gsf:otherwise></gsf:switch>)</i>
172                    </td>
173                </gsf:template>
174            </format>
175        </classifier>
176        <classifier name="DateList">
177            <option name="-metadata" value="Date"/>
178            <option name="-nogroup"/>
179        </classifier>
180        <format>
181            <gsf:template match="documentNode">
182                <td valign="top">
183                    <gsf:switch>
184                        <gsf:metadata name="abstract"/>
185                        <gsf:when test="exists">
186                            <gsf:link OIDmetadata="abstract" type="document">
187                                <gsf:icon file="iabstr.gif" select="collection"/>
188                            </gsf:link>
189                        </gsf:when>
190                    </gsf:switch>
191                </td>
192                <td valign="top">
193                    <gsf:link type="document">
194                        <xsl:call-template name="choose-icon"/>
195                    </gsf:link>
196                </td>
197                <td valign="top">
198                        <!--
199                        Defined in the global format statement
200                        -->
201                        <xsl:call-template name="title-plain"/>
202                </td>
203            </gsf:template>
204            <gsf:template match="classifierNode[@classifierStyle = 'VList']">
205                <td valign="top">
206                    <gsf:link type="classifier">
207                        <gsf:icon type="classifier"/>
208                    </gsf:link>
209                </td>
210                <td valign="top">
211                               <gsf:metadata name="Title"/>
212                </td>
213            </gsf:template>
214            <gsf:template match="classifierNode[@classifierStyle = 'HList']">
215                <gsf:link type="classifier">
216                    <gsf:metadata name="Title"/>
217                </gsf:link>
218            </gsf:template>
219        </format>
220    </browse>
221    <display>
222        <format>
223            <gsf:option name="TOC" value="true"/>
224            <xsl:template name="additionalHeaderContent">
225<!--
226this javascript is needed to get the #Biblio etc links in the commentaries to work
227-->
228                <script type="text/javascript">
229                    <xsl:text disable-output-escaping="yes">$(window).load(function()
230{
231    var links = $("a");
232    for(var i = 0; i &lt; links.length; i++)
233    {
234        if($(links[i]).attr("href") &amp;&amp; $(links[i]).attr("href").match("^#"))
235        {
236            $(links[i]).attr("href", document.URL + $(links[i]).attr("href"));
237        }
238    }
239});</xsl:text>
240                </script>
241               
242                <link rel="stylesheet" href="sites/{$site_name}/collect/{$collName}/style/style.css"/>
243            </xsl:template>
244<!--
245Overwriting this template allows you to change the heading of the document.
246-->
247
248            <gsf:template name="documentHeading">
249                <span style="font-weight:bold; font-size: 120%;">
250                    <xsl:call-template name="title-plain"/>
251    <gsf:switch>
252                    <gsf:metadata name="DocType"/>
253                    <gsf:when test="equals" test-value="Abstract">
254                        <xsl:text>: </xsl:text><gsf:collectionText name="abstract"/>
255                    </gsf:when>
256                </gsf:switch>
257                </span>
258            <gsf:switch>
259                    <gsf:metadata name="DocType"/>
260                    <gsf:when test="equals" test-value="Abstract">
261        <div style="text-align:right;"><gsf:link type="page" page="abexpl" titlekey="abexpl.linktitle"><gsf:collectionText name="abexpl"/></gsf:link></div>
262</gsf:when>
263                </gsf:switch>
264            </gsf:template>
265<!--
266Overwriting this template can be used to redefine the content of the whole document. This is useful for simple documents, but not recommended for more complex documents (e.g. hierachical and paged documents) as it can prevent any sub-sections from showing.
267-->
268<!--
269<gsf:template name="documentContent">
270<xsl:call-template name="wrappedSectionImage"/>
271<xsl:call-template name="wrappedSectionText"/>
272</gsf:template>
273-->
274<!--
275Overwriting this template can be used to change the content of section headings.
276-->
277            <gsf:template name="sectionHeading">
278    <gsf:switch><gsf:metadata name="Series"/><gsf:when test="exists">
279                <xsl:call-template name="title-plain"/><xsl:text>. </xsl:text><gsf:metadata name="Date" format="formatDate"/>
280</gsf:when>
281<gsf:otherwise>
282          <gsf:metadata name="Title"/>
283</gsf:otherwise>
284</gsf:switch>
285            </gsf:template>
286
287            <gsf:template name="pageTitle">
288                <xsl:for-each select="/page/pageResponse/document/documentNode">
289                    <xsl:call-template name="title-plain"/><xsl:text>. </xsl:text>
290                    <gsf:metadata name="Date" format="formatDate"/>
291                </xsl:for-each>
292            </gsf:template>
293<!--
294Overwriting this template can be used to change the content of the top-level section.
295-->
296
297<gsf:template name="topLevelSectionContent">
298<div style="text-align:right;"><gsf:if-metadata-exists><gsf:metadata name="abstract"/><gsf:if><gsf:link type="document" OIDmetadata="abstract" titlekey="abstract.linktitle"><gsf:icon file="iabstr.gif" select="collection"/><gsf:collectionText name="abstract"/></gsf:link></gsf:if></gsf:if-metadata-exists><gsf:if-metadata-exists><gsf:metadata name="commentary"/><gsf:if><gsf:link type="document" OIDmetadata="commentary" titlekey="commentary.linktitle"><gsf:icon file="icomm.gif" select="collection"/><gsf:collectionText name="commentary"/></gsf:link></gsf:if></gsf:if-metadata-exists></div>
299</gsf:template>
300
301<!--
302Overwriting this template can be used to change the content of sections.
303-->
304<!--
305<gsf:template name="sectionContent">
306<xsl:call-template name="wrappedSectionImage"/>
307<xsl:call-template name="wrappedSectionText"/>
308</gsf:template>
309-->
310        </format>
311    </display>
312    <replaceListRef id="gs2-standard"/>
313    <replaceListRef id="gs2-image"/>
314    <replaceList>
315        <replace bundle="niupepa" key="vol" macro="_vol_" resolve="false" scope="metadata"/>
316        <replace bundle="niupepa" key="num" macro="_num_" resolve="false" scope="metadata"/>
317        <replace bundle="niupepa" key="commentary" macro="_commentary_" resolve="false" scope="metadata"/>
318        <replace bundle="niupepa" key="textbiblio" macro="_textbiblio_" resolve="false" scope="text"/>
319        <replace bundle="niupepa" key="textbackground" macro="_textbackground_" resolve="false" scope="text"/>
320        <replace bundle="niupepa" key="textsubmat" macro="_textsubmat_" resolve="false" scope="text"/>
321        <replace bundle="niupepa" key="textavail" macro="_textavail_" resolve="false" scope="text"/>
322    <replace macro="_httpdocument_&amp;cl=_cgiargcl_&amp;gg=prev&amp;d=" scope="text" text="_libraryname_/collection/_clustername_/document/" resolve="true"/>
323    </replaceList>
324    <serviceRackList><!-- comment out the following serviceRack if you want to disable OAI for this collection -->
325        <serviceRack name="OAIPMH">
326            <ListMetadataFormats><!--What metadata sets to support is collection specific. To support other metadata schema, simply add a metadataFormat element here.
327                    The support of unqualified Dublin Core metadata set is mandatory in the oai specification.
328                -->
329                <metadataFormat metadataPrefix="oai_dc">
330                    <metadataPrefix>oai_dc</metadataPrefix>
331                    <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
332                    <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace><!--<metadataElements>dc.Title,dc.Creator,dc.Subject,dc.Description,dc.Publisher,dc.Contributor,dc.Date,dc.Type,dc.Format,dc.Identifier,dc.Source,dc.Language,dc.Relation,dc.Coverage,dc.Rights</metadataElements>-->
333                    <mappingList><!--
334                            The mapping is in the form: <publicly supported metadata name>,<mapped metadata name>, short as <A>,<B>
335                            The first metadata name is medatory; if there is no mapped name followed, then the first name must be used by the records and
336                            searchable in the database, otherwise it is the mapped name stored in the database. The number of mapping elements matches the
337                            number of external metadata of the records. If only one name is present, the returned metadata will use this name plus the retrieved value;
338                            if both <A>,<B> are present, the returned metadata will use <A>'s name plus <B>'s value retrieved from database.
339                   
340                            **Bear in mind: if this mapping list is not present, the standard dc. metadata names (15 in total) will be used to retrieve metadata in the database.
341                   
342                            **The only case when this mapping is not present is that: 1. this metadata format is oai_dc; 2. the metadata is also stored in the database by Dublin Core's names.
343                        -->
344                        <mapping>dc:title,Title</mapping><!-- This mapping example means that the dc.Title is requested and the value of the metadata Title, which is used in this repository, is returned as response. -->
345                    </mappingList>
346                </metadataFormat>
347            </ListMetadataFormats>
348        </serviceRack>
349    </serviceRackList>
350</CollectionConfig>
Note: See TracBrowser for help on using the browser.