source: main/trunk/model-sites-dev/atea/collect/he-herenga-korero-mp3s/etc/collectionConfig.xml@ 34081

Last change on this file since 34081 was 34081, checked in by davidb, 4 years ago

Collection desc text improvements; single doc security example added to Global Digital Heritage col

File size: 14.8 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" xmlns:gslib="http://www.greenstone.org/skinning">
3 <metadataList>
4 <metadata name="creator"></metadata>
5 <metadata name="maintainer"></metadata>
6 <metadata name="public">true</metadata>
7 </metadataList>
8 <displayItemList>
9 <displayItem assigned="true" lang="en" name="name">He Herenga Kōrero (MP3s)</displayItem>
10 <displayItem assigned="true" lang="en" name="description">A range of language resources in Māori in spoken form.</displayItem>
11 <!-- shortDescription is used as a tooltip for collection icon on home page-->
12 <displayItem assigned="true" lang="en" name="shortDescription">He Herenga Kōrero (MP3): Private collection, atea group login required</displayItem>
13 </displayItemList>
14 <!-- Global format statement -->
15 <format>
16 <gsf:template name="choose-title">
17 <gsf:choose-metadata>
18 <gsf:metadata name="dc.Title"/>
19 <gsf:metadata name="exp.Title"/>
20 <gsf:metadata name="ex.dc.Title"/>
21 <gsf:metadata name="Title"/>
22 <gsf:default>Untitled</gsf:default>
23 </gsf:choose-metadata>
24 </gsf:template>
25
26 <gsf:template name="display-rich-title">
27
28 <xsl:choose>
29 <xsl:when test="@nodeType='leaf' and @docType='hierarchy'">
30
31 <gsf:switch>
32 <gsf:metadata name="dc.Title" select="root"/>
33 <gsf:when test="exists">
34 <gsf:metadata name="dc.Title" select="root"/><xsl:text>: </xsl:text>
35 </gsf:when>
36 </gsf:switch>
37
38 <gsf:metadata name="Title"/>
39 </xsl:when>
40 <xsl:otherwise>
41 <xsl:call-template name="choose-title"/>
42 </xsl:otherwise>
43 </xsl:choose>
44
45 <gsf:switch>
46 <gsf:metadata name="text.Volume" select="root"/>
47 <gsf:when test="exists">
48 <xsl:text>, Volume </xsl:text><gsf:metadata name="text.Volume" select="root"/>
49 </gsf:when>
50 </gsf:switch>
51 <gsf:switch>
52 <gsf:metadata name="text.Issue" select="root"/>
53 <gsf:when test="exists">
54 <xsl:text>, Issue </xsl:text>
55 <gsf:variable name="rootIssue">
56 <gsf:metadata name="text.Issue" select="root"/>
57 </gsf:variable>
58 <gsf:variable name="nodeID">
59 <xsl:value-of select="@nodeID"/>
60 </gsf:variable>
61 <gsf:span id="{@nodeID}-issue"/>
62 <gsf:script>
63 var nodeID = gs.variables.nodeID;
64 var rootIssue = gs.variables.rootIssue;
65 $('#'+nodeID+'-issue').html(rootIssue.replace(/^[0]+/,""));
66 </gsf:script>
67 </gsf:when>
68 </gsf:switch>
69
70 <gsf:switch>
71 <gsf:metadata name="audio.CDNum"/>
72 <gsf:when test="exists">
73 <xsl:text>, Disc </xsl:text>
74 <gsf:variable name="CDNum">
75 <gsf:metadata name="audio.CDNum"/>
76 </gsf:variable>
77 <gsf:variable name="nodeID">
78 <xsl:value-of select="@nodeID"/>
79 </gsf:variable>
80 <gsf:span id="{@nodeID}-CDNum"/>
81 <gsf:script>
82 var nodeID = gs.variables.nodeID;
83 var CDNum = gs.variables.CDNum;
84 $('#'+nodeID+'-CDNum').html(CDNum.replace(/^[0]+/,""));
85 </gsf:script>
86 </gsf:when>
87 </gsf:switch>
88 <gsf:switch>
89 <gsf:metadata name="audio.Track"/>
90 <gsf:when test="exists">
91 <xsl:text>, Track </xsl:text>
92 <gsf:variable name="Track">
93 <gsf:metadata name="audio.Track"/>
94 </gsf:variable>
95 <gsf:variable name="nodeID">
96 <xsl:value-of select="@nodeID"/>
97 </gsf:variable>
98 <gsf:span id="{@nodeID}-Track"/>
99 <gsf:script>
100 var nodeID = gs.variables.nodeID;
101 var Track = gs.variables.Track;
102 $('#'+nodeID+'-Track').html(Track.replace(/^[0]+/,""));
103 </gsf:script>
104 </gsf:when>
105 </gsf:switch>
106
107 </gsf:template>
108
109 </format>
110 <search type="lucene">
111 <level name="document">
112 <displayItem lang="en" name="name">document</displayItem>
113 </level>
114 <level name="section">
115 <displayItem lang="en" name="name">page</displayItem>
116 </level>
117 <defaultLevel name="document"/>
118 <index name="text">
119 <displayItem lang="en" name="name">text</displayItem>
120 </index>
121 <index name="dc.Title,ex.dc.Title,Title">
122 <displayItem lang="en" name="name">titles</displayItem>
123 </index>
124 <index name="Source">
125 <displayItem lang="en" name="name">filenames</displayItem>
126 </index>
127 <defaultIndex name="text"/>
128 <sort name="rank">
129 <displayItem lang="en" name="name">rank</displayItem>
130 </sort>
131 <sort name="none">
132 <displayItem lang="en" name="name">natural (build) order</displayItem>
133 </sort>
134 <searchType name="plain"/>
135 <searchType name="simpleform"/>
136 <searchType name="advancedform"/>
137
138 <format>
139 <gsf:template match="documentNode">
140 <td valign="top">
141 <gsf:link type="document">
142 <gsf:icon type="document"/>
143 </gsf:link>
144 </td>
145 <td>
146 <gsf:link type="document">
147 <xsl:call-template name="display-rich-title"/>
148 </gsf:link>
149 </td>
150 </gsf:template>
151 </format>
152 </search>
153
154 <infodb type="jdbm"/>
155
156 <import>
157 <pluginList>
158 <plugin name="ZIPPlugin"/>
159 <plugin name="GreenstoneXMLPlugin"/>
160 <plugin name="TextPlugin"/>
161 <plugin name="HTMLPlugin"/>
162 <plugin name="EmailPlugin"/>
163 <plugin name="PDFv2Plugin">
164 <option name="enable_cache" />
165 </plugin>
166 <plugin name="RTFPlugin"/>
167 <plugin name="WordPlugin"/>
168 <plugin name="PostScriptPlugin"/>
169 <plugin name="PowerPointPlugin"/>
170 <plugin name="ExcelPlugin"/>
171 <plugin name="ImagePlugin"/>
172 <plugin name="MP3Plugin"/>
173 <plugin name="ISISPlugin"/>
174 <plugin name="NulPlugin"/>
175 <plugin name="OAIPlugin"/>
176 <plugin name="MetadataXMLPlugin"/>
177 <plugin name="EmbeddedMetadataPlugin"/>
178 <plugin name="ArchivesInfPlugin"/>
179 <plugin name="DirectoryPlugin"/>
180 </pluginList>
181 <importOption name="OIDtype" value="assigned"/>
182 <importOption name="OIDmetadata" value="FilenameRoot"/>
183 </import>
184 <browse>
185 <classifier name="AZCompactList">
186 <option name="-metadata" value="dc.Title;Title"/>
187 <!--
188 <option name="-partition_type_within_level" value="approximate_size"/>
189 -->
190 <option name="-mingroup" value="2"/>
191 <option name="-removeprefix" value="(\d+\s*(\-\s*)?)|(Te\s*)"/>
192 </classifier>
193
194 <classifier name="Hierarchy">
195 <option name="-buttonname" value="Audio"/>
196 <option name="-metadata" value="audio.CDNumTrack"/>
197 <option name="-hfile" value="hierarchy-cdnum-track.txt"/>
198 <option name="-sort" value="audio.Track"/>
199 </classifier>
200<!--
201 <classifier name="AZCompactList">
202 <option name="-metadata" value="bib.Audio"/>
203 <option name="-buttonname" value="Audio"/>
204 <option name="-mingroup" value="200"/>
205 <option name="-sort" value="dc.Title"/>
206 </classifier>
207-->
208 <format>
209 <gsf:template match="documentNode">
210 <td valign="top">
211 <gsf:link type="document">
212 <gsf:icon type="document"/>
213 </gsf:link>
214 </td>
215 <td valign="top">
216 <gsf:link type="source">
217 <gsf:choose-metadata>
218 <gsf:metadata name="thumbicon"/>
219 <gsf:metadata name="srcicon"/>
220 </gsf:choose-metadata>
221 </gsf:link>
222 </td>
223 <td valign="top">
224 <gsf:link type="document">
225 <!-- Defined in the global format statement -->
226 <xsl:call-template name="display-rich-title"/>
227 </gsf:link>
228 </td>
229 </gsf:template>
230
231 <gsf:template match="classifierNode[@classifierStyle = 'VList']">
232 <td valign="top">
233 <gsf:link type="classifier" style="static">
234 <gsf:icon type="classifier"/>
235 </gsf:link>
236 </td>
237 <td valign="top">
238 <gsf:link type="classifier">
239 <gsf:metadata name="Title"/>
240 </gsf:link>
241 </td>
242 </gsf:template>
243
244 <gsf:template match="classifierNode[@classifierStyle = 'HList']">
245 <gsf:link type="classifier" style="static">
246 <gsf:metadata name="Title"/>
247 </gsf:link>
248 </gsf:template>
249 </format>
250 </browse>
251 <display>
252 <format>
253 <gsf:option name="TOC" value="true"/>
254 <gsf:option name="AllowUserComments" value="false"/>
255 <!--
256 Overwriting this template allows you to change the heading of the document.
257 -->
258
259 <gsf:template name="documentHeading">
260 <gsf:switch>
261 <gsf:metadata name="srcicon"/>
262 <gsf:when test="exists">
263 <gsf:link type="source">
264 <gsf:metadata name="srcicon"/>
265 </gsf:link>
266 </gsf:when>
267 </gsf:switch>
268
269 <span style="font-weight:bold; font-size: 120%;">
270 <xsl:call-template name="choose-title"/>
271 </span>
272 </gsf:template>
273
274
275 <!--
276 Overwriting this template can be used to redefine the content of the whole document.
277 This is useful for simple documents, but not recommended for more complex documents
278 (e.g. hierachical and paged documents) as it can prevent any sub-sections from showing.
279 -->
280
281 <gsf:template name="documentContent">
282 <!-- Rule that matches a simple document -->
283 <div id="gs-document">
284 <xsl:call-template name="documentPre"/>
285
286
287 <gsf:switch>
288 <gsf:metadata name="bib.Audio"/>
289 <gsf:when test="exists">
290 <div id="viewer" style="heightXXX: 300px; overflow: auto; text-align: center; width: 100%">
291 <div style="padding: 20px;">
292
293 <!--
294 <audio controls="controls" widthXXX="300">
295 <source>
296 <xsl:attribute name="src"><xsl:value-of select="$httpPath"/>/index/assoc/<gsf:metadata name="assocfilepath" pos="1"/>/<gsf:metadata name="srclink_file"/></xsl:attribute>
297 </source>
298 Your web browser does not support the this form of audio.
299 </audio>
300 -->
301
302 <!-- WaveSurfer (self-contained) splice starts here -->
303
304 <!-- Bootstrap -->
305 <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet" />
306
307 <link rel="stylesheet" href="ext/audio/css/style.css" />
308 <link rel="stylesheet" href="ext/audio/css/ribbon.css" />
309 <!-- wavesurfer.js -->
310 <!-- <script src="//unpkg.com/wavesurfer.js"> -->
311 <script src="ext/audio/ws/wavesurfer.js"><xsl:text> </xsl:text></script>
312 <script src="ext/audio/ws/plugin/wavesurfer.cursor.js"><xsl:text> </xsl:text></script>
313 <script src="ext/audio/ws/plugin/wavesurfer.timeline.js"><xsl:text> </xsl:text></script>
314
315
316 <style>
317 .btn-primary {
318 color: #fff;
319 background-color: #376f26;
320 border-color: #204116;
321 outline: none;
322 }
323
324 .btn-primary:focus {
325 color: #fff ;
326 background-color: #407530;
327 border-color: #254620;
328 outline: none ;
329 }
330
331 .btn-primary:active {
332 color: #fff !important;
333 background-color: #275f20 !important;
334 border-color: #1C3114 !important;
335 outline: none !important;
336 }
337
338 .btn-primary:hover {
339 color: #fff;
340 background-color: #407530;
341 border-color: #254620;
342 outline: none;
343 }
344 </style>
345
346
347 <div id="waveform-container">
348 <div id="waveform">
349 <!-- Here be the waveform -->
350 <xsl:text> </xsl:text>
351 </div>
352 <div id="wave-timeline"><xsl:text> </xsl:text></div>
353
354 <div>
355 <div class="controls">
356 <button class="btn btn-primary" data-action="play">
357 <i class="glyphicon glyphicon-play"><xsl:text> </xsl:text></i>
358 Play /
359 <i class="glyphicon glyphicon-pause"><xsl:text> </xsl:text></i>
360 Pause
361 </button>
362 </div>
363 </div>
364 </div>
365
366
367 <xsl:variable name="httpCollection">library/sites/<xsl:value-of select="$site_name"/>/collect/<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:variable>
368
369 <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
370
371 <gsf:variable name="mp3url"><xsl:value-of select="$httpCollection"/>/index/assoc/<xsl:value-of select="$assocFilePath"/>/<gsf:metadata name="SourceFile"/></gsf:variable>
372
373 <script src="ext/audio/wavesurfer-player.js">
374 <xsl:text> </xsl:text>
375 </script>
376
377 <gsf:script>
378 document.addEventListener('DOMContentLoaded', function() {
379 // Load audio from URL
380 wavesurfer.load(gs.variables.mp3url);
381 });
382 </gsf:script>
383
384 <!-- WaveSurfer (self-contained) splice end here -->
385
386
387 </div>
388 </div>
389 </gsf:when>
390 <gsf:otherwise>
391 <xsl:call-template name="wrappedSectionImage"/>
392 <div id="gs-document-text">
393 <xsl:call-template name="documentNodeText"/>
394 </div>
395 </gsf:otherwise>
396 </gsf:switch>
397
398 </div>
399 </gsf:template>
400
401 <!--
402 Overwriting this template can be used to change the content of section headings.
403 -->
404 <!--
405 <gsf:template name="sectionHeading">
406 <xsl:call-template name="choose-title"/>
407 </gsf:template>
408 -->
409
410 <!--
411 Overwriting this template can be used to change the content of the top-level section.
412 -->
413
414 <gsf:template name="topLevelSectionContent">
415 <gsf:switch>
416 <gsf:metadata name="srcicon"/>
417 <gsf:when test="exists">
418 <gsf:link type="source">
419 <gsf:metadata name="srcicon"/>
420 </gsf:link>
421 </gsf:when>
422 </gsf:switch>
423
424 <xsl:call-template name="wrappedSectionImage"/>
425 <xsl:call-template name="wrappedSectionText"/>
426 </gsf:template>
427
428
429 <!--
430 Overwriting this template can be used to change the content of sections.
431 -->
432 <!--
433 <gsf:template name="sectionContent">
434 <xsl:call-template name="wrappedSectionImage"/>
435 <xsl:call-template name="wrappedSectionText"/>
436 </gsf:template>
437 -->
438 </format>
439 </display>
440 <replaceListRef id="gs2-standard"/>
441 <replaceListRef id="gs2-image" />
442 <serviceRackList>
443 <!-- comment out the following serviceRack if you want to disable RSS for this collection -->
444 <serviceRack name="RSSRetrieve"/>
445 <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
446 <serviceRack name="OAIPMH">
447 <setName>He Herenga Kōrero (MP3s)</setName>
448 <setDescription>A range of language resources in Māori in spoken form.</setDescription>
449 <!-- uncomment the following and set the name attribute if
450 you want this collection to be part of a super set. -->
451 <!--<oaiSuperSet name="xxx"/>-->
452 <ListMetadataFormats>
453 <!--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:
454 <metadataFormat metadataPrefix="prefix"/> -->
455
456 <metadataFormat metadataPrefix="oai_dc">
457 <!-- you can customize the mappings by adding elements in here. See resources/oai/OAIConfig.xml for the format-->
458 </metadataFormat>
459 </ListMetadataFormats>
460 </serviceRack>
461 </serviceRackList>
462 <security scope="collection" default_access="private">
463 <exception>
464 <group name="atea"/>
465 </exception>
466 </security>
467</CollectionConfig>
Note: See TracBrowser for help on using the repository browser.