source: main/trunk/model-cols/niupepa/etc/collectionConfig.xml@ 26319

Last change on this file since 26319 was 26319, checked in by kjdon, 12 years ago

more changes to get it working like gs2 version

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