root/main/trunk/model-sites-dev/multimodal-mdl/collect/trad-my-ipod/etc/collectionConfig.xml @ 28432

Revision 28432, 18.6 KB (checked in by davidb, 6 years ago)

Initial cut at a set of music DLs that focus on multi-modal processing and linked data

  • Property svn:mime-type set to application/xml
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 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">Traditional MDL</displayItem>
10    <displayItem assigned="true" lang="en" name="description"></displayItem>
11  </displayItemList>
12  <!-- Global format statement -->
13  <format>
14    <gsf:template name="choose-title">
15     
16      <gsf:choose-metadata>
17    <gsf:metadata name="dc.Title"/>
18    <gsf:metadata name="exp.Title"/>
19    <gsf:metadata name="ex.dc.Title"/>
20    <gsf:metadata name="ex.ID3.Title"/>
21    <gsf:metadata name="ex.Title"/>
22    <gsf:metadata name="Title"/>
23    <gsf:default>Untitled</gsf:default>
24      </gsf:choose-metadata>
25     
26      <gsf:switch>
27    <gsf:metadata name='dc.Creator'/>
28    <gsf:when test='exists'>
29     
30      <gsf:switch>
31        <gsf:metadata name="dc.Creator"/>
32        <gsf:when test="notEquals" test-value="Unknown">
33         
34          by <i><gsf:metadata name='dc.Creator'/></i>
35        </gsf:when>
36      </gsf:switch>
37     
38    </gsf:when>
39      </gsf:switch>         
40    </gsf:template>   
41  </format>
42
43  <search type="lucene">
44    <level name="document">
45      <displayItem lang="en" name="name">document</displayItem>
46    </level>
47    <level name="section">
48      <displayItem lang="en" name="name">section</displayItem>
49    </level>
50    <defaultLevel name="document"/>
51    <index name="text">
52      <displayItem lang="en" name="name">text</displayItem>
53    </index>
54    <index name="dc.Title,ex.dc.Title,ex.ID3.Title,Title">
55      <displayItem lang="en" name="name">titles</displayItem>
56    </index>
57    <index name="Source">
58      <displayItem lang="en" name="name">filenames</displayItem>
59    </index>
60    <defaultIndex name="text"/>
61    <searchType name="plain"/>
62    <searchType name="simpleform"/>
63    <searchType name="advancedform"/>
64
65   
66    <!-- Search Format Statement -->
67    <format>
68      <gsf:template match="documentNode">
69
70    <gsf:variable name="cgiargFrameLength">
71      <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.frameLength']/@value"/>
72    </gsf:variable>
73
74    <xsl:variable name="cgiargYScaleSimImg"><xsl:choose>
75      <xsl:when test="/page/pageRequest/paramList/param[@name='p.yScaleSimImg']/@value != ''"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.yScaleSimImg']/@value"/></xsl:when>
76      <xsl:otherwise>0.5</xsl:otherwise>
77    </xsl:choose>
78    </xsl:variable>
79
80    <td valign="top">
81      <gsf:icon type="document"/>
82    </td>
83    <td>
84      <xsl:choose>
85        <xsl:when test="@rank != 'NaN'">
86          (<script>
87            var rank=<xsl:value-of select="@rank"/>;
88            var perc=(rank-0.9)*100*10;
89            document.write(perc.toFixed(1));
90           </script>%)
91        </xsl:when>
92      </xsl:choose>
93     
94      <xsl:choose>
95        <xsl:when test="/page/pageResponse/service[@name='AudioQuery']">
96          <a>
97            <xsl:attribute name="href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection/@name"/>/document/<xsl:value-of select="@nodeID"/>?p.frameOffset=<xsl:value-of select="@frameOffset"/>&amp;p.frameLength=<xsl:value-of select="/page/pageRequest/paramList/param[@name='s1.length']/@value"/>&amp;p.a=q&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;p.yScaleSimImg=<xsl:value-of select="$cgiargYScaleSimImg"/>
98
99            </xsl:attribute>
100       
101                <xsl:call-template name="choose-title"/>
102          </a>
103        </xsl:when>
104        <xsl:otherwise>
105          <gsf:link>
106                <xsl:call-template name="choose-title"/>
107          </gsf:link>
108        </xsl:otherwise>
109      </xsl:choose>
110     
111      <gsf:switch>
112        <gsf:metadata name="artist"/>
113        <gsf:when test="exists">
114          by <gsf:metadata name="artist"/>
115        </gsf:when>
116      </gsf:switch>
117
118      <gsf:switch>
119        <gsf:metadata name="js.LabelledStructure"/>
120        <gsf:when test="exists">
121          <br/><i style="font-size: 80%">(Labelled structure: <gsf:metadata name="js.LabelledStructure"/>)</i>
122        </gsf:when>
123      </gsf:switch>
124     
125    </td>
126      </gsf:template>
127    </format>
128
129  </search>
130
131  <search type="jenaTDB" orthogonal="true" />
132
133 
134  <infodb type="jdbm"/>
135
136  <import>
137    <pluginList>
138      <plugin name="ZIPPlugin"/>
139      <plugin name="GreenstoneXMLPlugin"/>
140
141      <plugin name="EmbeddedMetadataPlugin">
142    <option name="-process_exp" value="(?i)\.mp3$"/>
143      </plugin>
144
145      <plugin name="AudioDBPlugin">
146    <option name="-enable_streaming" value="mp3"/>
147    <option name="-enable_cache"/>
148      </plugin>
149     
150      <plugin name="TextPlugin"/>
151      <plugin name="HTMLPlugin"/>
152      <plugin name="EmailPlugin"/>
153      <plugin name="PDFPlugin"/>
154      <plugin name="RTFPlugin"/>
155      <plugin name="WordPlugin"/>
156      <plugin name="PostScriptPlugin"/>
157      <plugin name="PowerPointPlugin"/>
158      <plugin name="ExcelPlugin"/>
159      <plugin name="ImagePlugin"/>
160      <plugin name="ISISPlugin"/>
161      <plugin name="NulPlugin"/>
162      <plugin name="OAIPlugin"/>
163      <plugin name="MetadataXMLPlugin"/>
164      <plugin name="ArchivesInfPlugin"/>
165      <plugin name="DirectoryPlugin"/>
166    </pluginList>
167  </import>
168
169  <browse>
170    <classifier name="AZCompactList">
171      <option name="-metadata" value="dc.Title;ex.dc.Title;ex.ID3.Title;Title"/>
172      <option name="-mingroup" value="2"/>
173      <option name="-removeprefix" value="(?i)Le|La|Les|The|A\\s+"/>
174    </classifier>
175
176    <classifier name="AZCompactList">
177      <option name="-metadata" value="dc.Creator;ex.ID3.Artist"/>
178      <option name="-buttonname" value="Artists"/>
179      <option name="-mingroup" value="1"/>
180      <option name="-minnesting" value="40"/>
181    </classifier>
182
183    <classifier name="AZCompactList">
184      <option name="-metadata" value="dc.Title.albumtitle;ex.ID3.Album"/>
185      <option name="-buttonname" value="Albums"/>
186      <option name="-mingroup" value="1"/>
187      <option name="-minnesting" value="40"/>
188    </classifier>
189
190
191    <!--
192
193    <classifier name="List">
194      <option name="-metadata" value="dc.Title;Title"/>
195      <option name="-partition_type_within_level" value="approximate_size"/>
196    </classifier>
197    <classifier name="List">
198      <option name="-metadata" value="dc.Creator"/>
199      <option name="-button_name" value="Artists"/>
200      <option name="-partition_type_within_level" value="approximate_size"/>
201    </classifier>
202       
203    -->
204
205    <format>
206      <gsf:template match="documentNode">
207    <td valign="top">
208      <gsf:link type="document">
209        <gsf:icon type="document"/>
210      </gsf:link>
211    </td>
212    <td valign="top">
213      <gsf:link type="source">
214        <gsf:choose-metadata>
215          <gsf:metadata name="thumbicon"/>
216          <gsf:metadata name="srcicon"/>
217        </gsf:choose-metadata>
218      </gsf:link>
219    </td>
220    <td valign="top">
221      <gsf:link type="document">
222        <!-- Defined in the global format statement -->
223        <xsl:call-template name="choose-title"/>
224       
225        <gsf:switch>
226          <gsf:metadata name="dc.Title" />
227          <gsf:when test="equals" test-value="Unknown">
228        <br/><i>(<gsf:metadata name="Source"/>)</i>
229          </gsf:when>
230        </gsf:switch>
231       
232      </gsf:link>
233    </td>
234      </gsf:template>
235     
236      <gsf:template match="classifierNode[@classifierStyle = 'VList']">
237    <td valign="top">
238      <gsf:link type="classifier">
239        <gsf:icon type="classifier"/>
240      </gsf:link>
241    </td>
242    <td valign="top">
243      <gsf:link type="source">
244        <gsf:choose-metadata>
245          <gsf:metadata name="thumbicon"/>
246          <gsf:metadata name="srcicon"/>
247        </gsf:choose-metadata>
248      </gsf:link>
249    </td>
250    <td valign="top">
251      <!-- Defined in the global format statement -->
252      <xsl:call-template name="choose-title"/>
253      <gsf:switch>
254        <gsf:metadata name="Source"/>
255        <gsf:when test="exists"><br/><i>(<gsf:metadata name="Source"/>)</i></gsf:when>
256      </gsf:switch>
257    </td>
258      </gsf:template>
259      <gsf:template match="classifierNode[@classifierStyle = 'HList']">
260    <gsf:link type="classifier">
261      <gsf:metadata name="Title"/>
262    </gsf:link>
263      </gsf:template>
264    </format>
265  </browse>
266
267  <display>
268    <format>
269      <gsf:option name="TOC" value="false"/>
270
271      <!--
272       Overwriting this template allows you to change the heading of the document.
273      -->
274      <gsf:template name="documentHeading">
275   
276    <xsl:variable name="httpCollection">
277      <xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
278    </xsl:variable>
279
280    <!-- Metadata derived from finger-printing -->
281   
282    <xsl:call-template name="metadata-block">
283      <xsl:with-param name="httpCollection" select="$httpCollection"/>
284    </xsl:call-template>
285
286      </gsf:template>
287
288     
289      <!--
290       Overwriting this template can be used to redefine the content of the whole document.
291       This is useful for simple documents, but not recommended for more complex documents
292       (e.g. hierachical and paged documents) as it can prevent any sub-sections from showing.
293      -->
294      <!--
295       <gsf:template name="documentContent">
296       <xsl:call-template name="wrappedSectionImage"/>
297       <xsl:call-template name="wrappedSectionText"/>
298       </gsf:template>
299      -->
300
301      <!--
302      Overwriting this template can be used to change the content of section headings.
303      -->
304      <!--
305      <gsf:template name="sectionHeading">
306      <xsl:call-template name="choose-title"/>
307      </gsf:template>
308      -->
309     
310      <!--
311      Overwriting this template can be used to change the content of the top-level section.
312      -->
313      <!--
314      <gsf:template name="topLevelSectionContent">
315      <xsl:call-template name="wrappedSectionImage"/>
316      <xsl:call-template name="wrappedSectionText"/>
317      </gsf:template>
318      -->
319     
320      <!--
321      Overwriting this template can be used to change the content of sections.
322      -->
323
324      <!--
325      <gsf:template name="sectionContent">
326      <xsl:call-template name="wrappedSectionImage"/>
327      <xsl:call-template name="wrappedSectionText"/>
328      </gsf:template>
329      -->
330       
331      <xsl:template name="additionalHeaderContent">
332   
333
334    <xsl:call-template name="soundmanager2-header"/>
335    <xsl:call-template name="js-mad-header"/>
336   
337    <!-- Bespoke jquery-ui extension for turnstyle open/close blocks -->
338    <gsf:style  src="ext/jquery-ui-extra/turnstyle-block.css"/>
339    <gsf:script src="ext/jquery-ui-extra/turnstyle-block.js"/>
340   
341    <!-- The Javascript DSP files for computing chroma features in the browser -->
342    <xsl:call-template name="javascript-dsp-header"/>
343   
344
345    <!-- Javascript support for running, sending input into, monitoring, and stopping Meandre flows -->
346    <gsf:script src="ext/meandre/meandre-controller.js"/>
347
348    <gsf:style>
349      .metadata-stripes td { padding: 4px; }
350      .metadata-stripes tr:nth-child(odd)  {background: #CCC}
351      .metadata-stripes tr:nth-child(even) {background: #FFF}     
352     
353      .vis-heading  { font-style:italic; }
354
355      #rightSidebar { display: none; }
356    </gsf:style>
357   
358      </xsl:template>
359
360
361      <xsl:template name="documentContent">
362   
363<!--
364    <xsl:call-template name="init-document-xsl-vars"/>
365-->
366
367    <!-- declare $httpCollection = $httpPath (for better consistency with other places in Greenstone XSL files) -->
368    <xsl:variable name="httpCollection">
369      <xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
370    </xsl:variable>
371
372    <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
373    <xsl:variable name="Source"><gsf:metadata name="Source" select="root"/></xsl:variable>
374
375    <gsf:variable name="cgiargFrameOffset">
376      <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.frameOffset']/@value"/>
377    </gsf:variable>
378
379    <gsf:variable name="cgiargFrameLength">
380      <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.frameLength']/@value"/>
381    </gsf:variable>
382
383    <xsl:variable name="cgiargYScaleSimImg"><xsl:choose>
384      <xsl:when test="/page/pageRequest/paramList/param[@name='p.yScaleSimImg']/@value != ''"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.yScaleSimImg']/@value"/></xsl:when>
385      <xsl:otherwise>0.5</xsl:otherwise>
386    </xsl:choose>
387    </xsl:variable>
388   
389    <!-- CAA = Content Analysis Algorithm -->
390    <xsl:variable name="cgiargCAAlgorithm">
391      <xsl:choose>
392        <xsl:when test="/page/pageRequest/paramList/param[@name='p.caAlgorithm']/@value != ''"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.caAlgorithm']/@value"/></xsl:when>
393        <xsl:otherwise>1</xsl:otherwise>
394      </xsl:choose>
395    </xsl:variable>
396
397    <!-- *** -->
398    <!-- Main Audio Player -->
399    <!-- *** -->
400
401    <div class="documenttext">
402
403<!--
404      <xsl:call-template name="audio-icon-cache"/>
405-->
406     
407      <xsl:call-template name="original-audio">
408        <xsl:with-param name="httpCollection" select="$httpCollection"/>
409        <xsl:with-param name="assocFilePath" select="$assocFilePath"/>
410      </xsl:call-template>
411
412
413      <hr/>
414
415<script>
416  <xsl:text disable-output-escaping="yes">
417    useFancyPlayer = 1;
418
419    /* if (window.location.toString().match(/fancyplayer/i)) { */
420    if (useFancyPlayer) {
421      PP_CONFIG.usePeakData = true;
422      PP_CONFIG.useEQData = true;
423      // PP_CONFIG.useFavIcon = true;
424    }
425
426    function onFinishSP()
427    {   
428      soundManager._onfinish();
429      togglePlayVisual(mainPlayButton);
430    }
431
432      var mySoundObj;
433
434    function playFromOffset(id,frameOffset)
435    {
436      var msecOffset = 250 * frameOffset;
437      idElem = document.getElementById(id);
438      pagePlayer.handleClick({target:idElem}); /* fake a click */
439      soundManager.stopAll();
440
441      var options = {};
442      options.position = msecOffset;
443
444      soundManager.play(id,options);
445
446      togglePlayMode = "pause";
447      playHighlightOff(document.getElementById("mainPlayButton"),32);
448    }
449
450    function preSubmit(form)
451    {
452      var currentPosElem = document.getElementById("mysongCurrentPos");
453      var offsetInMSecs = currentPosElem.getAttribute("offsetInMSecs");
454      var frameOffset = Math.round(offsetInMSecs/250.0);
455      form.elements["s1.offset"].value = frameOffset;
456
457      //var lengthInSecs = document.getElementById("mysongWindowDuration").innerHTML;
458      var lengthInSecs = form.elements["mysongWindowDuration"].value;
459
460      var frameLength = Math.round(lengthInSecs*1000/250.0);
461      form.elements["s1.length"].value = frameLength;
462
463      return true;
464    }
465
466    function searchSubmit(frameOffset)
467    {
468      var form = document.getElementById("QueryForm");
469
470      form.elements["s1.offset"].value = frameOffset;
471
472      //var lengthInSecs = document.getElementById("mysongWindowDuration").innerHTML;
473      var lengthInSecs = form.elements["mysongWindowDuration"].value;
474
475      var frameLength = Math.round(lengthInSecs*1000/250.0);
476      form.elements["s1.length"].value = frameLength;
477
478      form.submit();
479    }
480
481
482
483    function rescaleImage()
484    {
485      var form = document.getElementById("RescaleForm");
486
487      var rescaleSize = form.elements["ResizeScale"].value;
488
489      var currentURL = document.location.toString();
490      var newURL;
491      if (currentURL.match(/p.yScaleSimImg=(\d+(?:\.\d+))/)) {
492        newURL = currentURL.replace(/p.yScaleSimImg=(\d+(?:\.\d+))/,"p.yScaleSimImg="+rescaleSize);
493      }
494      else {
495        var urlParts = currentURL.split("#");
496    newURL = urlParts.shift();
497        newURL += "&amp;p.yScaleSimImg="+rescaleSize;
498    newURL += "#" + urlParts.join("#");
499      }
500
501      document.location = newURL;
502    }
503
504    function updateCAAlgorithm()
505    {
506
507      var form = document.getElementById("UpdateCAForm");
508
509      var caaMenu = form.elements["caAlgorithm"];
510
511      var caIndexPos = caaMenu.options[caaMenu.selectedIndex].value
512
513      var currentURL = document.location.toString();
514      var newURL;
515      if (currentURL.match(/p.caAlgorithm=(\d+)/)) {
516        newURL = currentURL.replace(/p.caAlgorithm=(\d+)/,"p.caAlgorithm="+caIndexPos);
517      }
518      else {
519        var urlParts = currentURL.split("#");
520    newURL = urlParts.shift();
521        newURL += "&amp;p.caAlgorithm="+caIndexPos;
522    newURL += "#" + urlParts.join("#");
523      }
524
525      document.location = newURL;
526
527    }
528
529
530
531  </xsl:text>
532
533</script>
534
535
536    </div>
537  </xsl:template>
538
539
540
541
542    </format>
543  </display>
544
545  <replaceListRef id="gs2-standard"/>
546  <replaceListRef id="gs2-image" />
547  <serviceRackList>
548    <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
549    <serviceRack name="OAIPMH">
550      <ListMetadataFormats>
551    <!--What metadata sets to support is collection specific. To support other metadata schema, simply add a metadataFormat element here.
552        The support of unqualified Dublin Core metadata set is mandatory in the oai specification.
553    -->
554    <metadataFormat metadataPrefix="oai_dc">
555      <metadataPrefix>oai_dc</metadataPrefix>
556      <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
557      <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>
558      <!--<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>-->
559      <mappingList>
560        <!--
561         The mapping is in the form: <publicly supported metadata name>,<mapped metadata name>, short as <A>,<B>
562         The first metadata name is medatory; if there is no mapped name followed, then the first name must be used by the records and
563         searchable in the database, otherwise it is the mapped name stored in the database. The number of mapping elements matches the
564         number of external metadata of the records. If only one name is present, the returned metadata will use this name plus the retrieved value;
565         if both <A>,<B> are present, the returned metadata will use <A>'s name plus <B>'s value retrieved from database.
566         
567         **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.
568         
569         **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.
570        -->
571        <mapping>dc:title,Title</mapping>
572        <!-- 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. -->
573      </mappingList>
574    </metadataFormat>
575      </ListMetadataFormats>
576    </serviceRack>
577  </serviceRackList>
578</CollectionConfig>
Note: See TracBrowser for help on using the browser.