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="enumeratedName">5. Nothing But Javascript</displayItem>
|
---|
10 | <displayItem assigned="true" lang="en" name="name">Nothing But Javascript</displayItem>
|
---|
11 | <displayItem assigned="true" lang="en" name="description"></displayItem>
|
---|
12 | </displayItemList>
|
---|
13 | <!-- Global format statement -->
|
---|
14 | <format>
|
---|
15 | <gsf:template name="choose-title">
|
---|
16 |
|
---|
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="ex.ID3.Title"/>
|
---|
22 | <gsf:metadata name="ex.Title"/>
|
---|
23 | <gsf:metadata name="Title"/>
|
---|
24 | <gsf:default>Untitled</gsf:default>
|
---|
25 | </gsf:choose-metadata>
|
---|
26 |
|
---|
27 | <gsf:switch>
|
---|
28 | <gsf:metadata name='dc.Creator'/>
|
---|
29 | <gsf:when test='exists'>
|
---|
30 |
|
---|
31 | <gsf:switch>
|
---|
32 | <gsf:metadata name="dc.Creator"/>
|
---|
33 | <gsf:when test="notEquals" test-value="Unknown">
|
---|
34 |
|
---|
35 | by <i><gsf:metadata name='dc.Creator'/></i>
|
---|
36 | </gsf:when>
|
---|
37 | </gsf:switch>
|
---|
38 |
|
---|
39 | </gsf:when>
|
---|
40 | </gsf:switch>
|
---|
41 | </gsf:template>
|
---|
42 | </format>
|
---|
43 |
|
---|
44 | <search type="mgpp">
|
---|
45 | <level name="document">
|
---|
46 | <displayItem lang="en" name="name">document</displayItem>
|
---|
47 | </level>
|
---|
48 | <level name="section">
|
---|
49 | <displayItem lang="en" name="name">section</displayItem>
|
---|
50 | </level>
|
---|
51 | <defaultLevel name="document"/>
|
---|
52 | <!--
|
---|
53 | <index name="text">
|
---|
54 | <displayItem lang="en" name="name">text</displayItem>
|
---|
55 | </index>
|
---|
56 | -->
|
---|
57 | <index name="dc.Title,ex.dc.Title,ex.ID3.Title,Title">
|
---|
58 | <displayItem lang="en" name="name">titles</displayItem>
|
---|
59 | </index>
|
---|
60 | <index name="dc.Creator,ex.dc.Creator,ex.ID3.Artist,Artist">
|
---|
61 | <displayItem lang="en" name="name">artist</displayItem>
|
---|
62 | </index>
|
---|
63 | <index name="salami.overlayNote">
|
---|
64 | <displayItem lang="en" name="name">annotations</displayItem>
|
---|
65 | </index>
|
---|
66 |
|
---|
67 | <!--
|
---|
68 | <index name="Source">
|
---|
69 | <displayItem lang="en" name="name">filenames</displayItem>
|
---|
70 | </index>
|
---|
71 | -->
|
---|
72 | <defaultIndex name="dc.Title,ex.dc.Title,ex.ID3.Title,Title"/>
|
---|
73 | <searchType name="plain"/>
|
---|
74 | <searchType name="simpleform"/>
|
---|
75 | <searchType name="advancedform"/>
|
---|
76 |
|
---|
77 |
|
---|
78 | <!-- Search Format Statement -->
|
---|
79 | <format>
|
---|
80 | <gsf:template match="documentNode">
|
---|
81 |
|
---|
82 | <gsf:variable name="cgiargFrameLength">
|
---|
83 | <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.frameLength']/@value"/>
|
---|
84 | </gsf:variable>
|
---|
85 |
|
---|
86 | <xsl:variable name="cgiargYScaleSimImg"><xsl:choose>
|
---|
87 | <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>
|
---|
88 | <xsl:otherwise>0.5</xsl:otherwise>
|
---|
89 | </xsl:choose>
|
---|
90 | </xsl:variable>
|
---|
91 |
|
---|
92 | <td valign="top">
|
---|
93 | <gsf:icon type="document"/>
|
---|
94 | </td>
|
---|
95 | <td>
|
---|
96 | <xsl:choose>
|
---|
97 | <xsl:when test="@rank != 'NaN'">
|
---|
98 | <script>
|
---|
99 | if (gs.cgiParams.s == <gsf:quot/>AudioQuery<gsf:quot/>) {
|
---|
100 | var rank=<xsl:value-of select="@rank"/>;
|
---|
101 | var perc=(rank-0.9)*100*10;
|
---|
102 | document.write(<gsf:quot/>(<gsf:quot/>+perc.toFixed(1)+<gsf:quot/>%)<gsf:quot/>);
|
---|
103 | }
|
---|
104 | </script>
|
---|
105 | </xsl:when>
|
---|
106 | </xsl:choose>
|
---|
107 |
|
---|
108 | <xsl:choose>
|
---|
109 | <xsl:when test="/page/pageResponse/service[@name='AudioQuery']">
|
---|
110 | <a>
|
---|
111 | <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"/>&p.frameLength=<xsl:value-of select="/page/pageRequest/paramList/param[@name='s1.length']/@value"/>&p.a=q&p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&p.yScaleSimImg=<xsl:value-of select="$cgiargYScaleSimImg"/>
|
---|
112 |
|
---|
113 | </xsl:attribute>
|
---|
114 |
|
---|
115 | <xsl:call-template name="choose-title"/>
|
---|
116 | </a>
|
---|
117 | </xsl:when>
|
---|
118 | <xsl:otherwise>
|
---|
119 | <gsf:link>
|
---|
120 | <xsl:call-template name="choose-title"/>
|
---|
121 | </gsf:link>
|
---|
122 | </xsl:otherwise>
|
---|
123 | </xsl:choose>
|
---|
124 |
|
---|
125 | <gsf:switch>
|
---|
126 | <gsf:metadata name="artist"/>
|
---|
127 | <gsf:when test="exists">
|
---|
128 | by <gsf:metadata name="artist"/>
|
---|
129 | </gsf:when>
|
---|
130 | </gsf:switch>
|
---|
131 |
|
---|
132 | <gsf:switch>
|
---|
133 | <gsf:metadata name="js.LabelledStructure"/>
|
---|
134 | <gsf:when test="exists">
|
---|
135 | <br/><i style="font-size: 80%">(Labelled structure: <gsf:metadata name="js.LabelledStructure"/>)</i>
|
---|
136 | </gsf:when>
|
---|
137 | </gsf:switch>
|
---|
138 |
|
---|
139 | </td>
|
---|
140 | </gsf:template>
|
---|
141 | </format>
|
---|
142 |
|
---|
143 | </search>
|
---|
144 |
|
---|
145 | <!--
|
---|
146 | <search type="jenaTDB" orthogonal="true" />
|
---|
147 | -->
|
---|
148 |
|
---|
149 | <infodb type="jdbm"/>
|
---|
150 |
|
---|
151 | <import>
|
---|
152 | <pluginList>
|
---|
153 | <plugin name="ZIPPlugin"/>
|
---|
154 | <plugin name="GreenstoneXMLPlugin"/>
|
---|
155 | <!--
|
---|
156 | <plugin name="EmbeddedMetadataPlugin">
|
---|
157 | <option name="-process_exp" value="(?i)\.mp3$"/>
|
---|
158 | </plugin>
|
---|
159 | -->
|
---|
160 |
|
---|
161 | <!--
|
---|
162 | Or to extend the process_exp that is already in use ...
|
---|
163 | <option name="-process_exp" value="(?i)\.(jpe?g|gif|png|tiff|pdf|mp3|wav)$"/>
|
---|
164 | -->
|
---|
165 |
|
---|
166 | <!--
|
---|
167 | <plugin name="AudioPlugin">
|
---|
168 | <option name="-converttotype" value="wav"/>
|
---|
169 | <option name="-enable_streaming" value="mp3"/>
|
---|
170 | <option name="-enable_cache"/>
|
---|
171 | </plugin>
|
---|
172 | -->
|
---|
173 |
|
---|
174 | <plugin name="AudioDBPlugin">
|
---|
175 | <option name="-compute_fft_features" value="true"/>
|
---|
176 | <option name="-enable_streaming" value="mp3"/>
|
---|
177 | <option name="-compute_mir_features" value="true"/>
|
---|
178 | <option name="-retrieve_mir_metadata" value="true"/>
|
---|
179 | <option name="-enable_cache"/>
|
---|
180 | </plugin>
|
---|
181 |
|
---|
182 | <plugin name="TextPlugin"/>
|
---|
183 | <plugin name="HTMLPlugin"/>
|
---|
184 | <plugin name="EmailPlugin"/>
|
---|
185 | <plugin name="PDFPlugin"/>
|
---|
186 | <plugin name="RTFPlugin"/>
|
---|
187 | <plugin name="WordPlugin"/>
|
---|
188 | <plugin name="PostScriptPlugin"/>
|
---|
189 | <plugin name="PowerPointPlugin"/>
|
---|
190 | <plugin name="ExcelPlugin"/>
|
---|
191 | <plugin name="ImagePlugin"/>
|
---|
192 | <plugin name="ISISPlugin"/>
|
---|
193 | <plugin name="NulPlugin"/>
|
---|
194 | <plugin name="OAIPlugin"/>
|
---|
195 | <plugin name="MetadataXMLPlugin"/>
|
---|
196 | <plugin name="ArchivesInfPlugin"/>
|
---|
197 | <plugin name="DirectoryPlugin"/>
|
---|
198 | </pluginList>
|
---|
199 | </import>
|
---|
200 |
|
---|
201 | <importOptions>
|
---|
202 | <option name="OIDtype" value="hash_on_full_filename" />
|
---|
203 | </importOptions>
|
---|
204 |
|
---|
205 | <browse>
|
---|
206 | <classifier name="AZCompactList">
|
---|
207 | <option name="-metadata" value="dc.Title;ex.dc.Title;ex.ID3.Title;Title"/>
|
---|
208 | <option name="-mingroup" value="2"/>
|
---|
209 | <option name="-removeprefix" value="(?i)Le|La|Les|The|A\\s+"/>
|
---|
210 | </classifier>
|
---|
211 |
|
---|
212 | <classifier name="AZCompactList">
|
---|
213 | <option name="-metadata" value="dc.Creator;ex.dc.Creator;ex.ID3.Artist;Artist"/>
|
---|
214 | <option name="-buttonname" value="Artists"/>
|
---|
215 | <option name="-mingroup" value="1"/>
|
---|
216 | <option name="-minnesting" value="40"/>
|
---|
217 | </classifier>
|
---|
218 |
|
---|
219 | <classifier name="AZCompactList">
|
---|
220 | <option name="-metadata" value="dc.Title.albumtitle"/>
|
---|
221 | <option name="-buttonname" value="Albums"/>
|
---|
222 | <option name="-mingroup" value="1"/>
|
---|
223 | <option name="-minnesting" value="40"/>
|
---|
224 | </classifier>
|
---|
225 |
|
---|
226 |
|
---|
227 | <!--
|
---|
228 |
|
---|
229 | <classifier name="List">
|
---|
230 | <option name="-metadata" value="dc.Title;Title"/>
|
---|
231 | <option name="-partition_type_within_level" value="approximate_size"/>
|
---|
232 | </classifier>
|
---|
233 | <classifier name="List">
|
---|
234 | <option name="-metadata" value="dc.Creator"/>
|
---|
235 | <option name="-button_name" value="Artists"/>
|
---|
236 | <option name="-partition_type_within_level" value="approximate_size"/>
|
---|
237 | </classifier>
|
---|
238 |
|
---|
239 | -->
|
---|
240 |
|
---|
241 | <format>
|
---|
242 | <gsf:template match="documentNode">
|
---|
243 | <td valign="top">
|
---|
244 | <gsf:link type="document">
|
---|
245 | <gsf:icon type="document"/>
|
---|
246 | </gsf:link>
|
---|
247 | </td>
|
---|
248 | <td valign="top">
|
---|
249 | <gsf:link type="source">
|
---|
250 | <gsf:choose-metadata>
|
---|
251 | <gsf:metadata name="thumbicon"/>
|
---|
252 | <gsf:metadata name="srcicon"/>
|
---|
253 | </gsf:choose-metadata>
|
---|
254 | </gsf:link>
|
---|
255 | </td>
|
---|
256 | <td valign="top">
|
---|
257 | <gsf:link type="document">
|
---|
258 | <!-- Defined in the global format statement -->
|
---|
259 | <xsl:call-template name="choose-title"/>
|
---|
260 |
|
---|
261 | <gsf:switch>
|
---|
262 | <gsf:metadata name="dc.Title" />
|
---|
263 | <gsf:when test="equals" test-value="Unknown">
|
---|
264 | <br/><i>(<gsf:metadata name="Source"/>)</i>
|
---|
265 | </gsf:when>
|
---|
266 | </gsf:switch>
|
---|
267 |
|
---|
268 | </gsf:link>
|
---|
269 | </td>
|
---|
270 | </gsf:template>
|
---|
271 |
|
---|
272 | <gsf:template match="classifierNode[@classifierStyle = 'VList']">
|
---|
273 | <td valign="top">
|
---|
274 | <gsf:link type="classifier">
|
---|
275 | <gsf:icon type="classifier"/>
|
---|
276 | </gsf:link>
|
---|
277 | </td>
|
---|
278 | <td valign="top">
|
---|
279 | <gsf:link type="source">
|
---|
280 | <gsf:choose-metadata>
|
---|
281 | <gsf:metadata name="thumbicon"/>
|
---|
282 | <gsf:metadata name="srcicon"/>
|
---|
283 | </gsf:choose-metadata>
|
---|
284 | </gsf:link>
|
---|
285 | </td>
|
---|
286 | <td valign="top">
|
---|
287 | <!-- Defined in the global format statement -->
|
---|
288 | <xsl:call-template name="choose-title"/>
|
---|
289 | <gsf:switch>
|
---|
290 | <gsf:metadata name="Source"/>
|
---|
291 | <gsf:when test="exists"><br/><i>(<gsf:metadata name="Source"/>)</i></gsf:when>
|
---|
292 | </gsf:switch>
|
---|
293 | </td>
|
---|
294 | </gsf:template>
|
---|
295 | <gsf:template match="classifierNode[@classifierStyle = 'HList']">
|
---|
296 | <gsf:link type="classifier">
|
---|
297 | <gsf:metadata name="Title"/>
|
---|
298 | </gsf:link>
|
---|
299 | </gsf:template>
|
---|
300 | </format>
|
---|
301 | </browse>
|
---|
302 |
|
---|
303 | <display>
|
---|
304 | <format>
|
---|
305 | <gsf:option name="TOC" value="false"/>
|
---|
306 |
|
---|
307 | <!--
|
---|
308 | Overwriting this template allows you to change the heading of the document.
|
---|
309 | -->
|
---|
310 | <gsf:template name="documentHeading">
|
---|
311 |
|
---|
312 | <xsl:variable name="httpCollection">
|
---|
313 | <xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
|
---|
314 | </xsl:variable>
|
---|
315 |
|
---|
316 | <!-- Metadata derived from finger-printing -->
|
---|
317 |
|
---|
318 | <xsl:call-template name="discovery-block">
|
---|
319 | <xsl:with-param name="httpCollection" select="$httpCollection"/>
|
---|
320 | </xsl:call-template>
|
---|
321 |
|
---|
322 | </gsf:template>
|
---|
323 |
|
---|
324 |
|
---|
325 | <!--
|
---|
326 | Overwriting this template can be used to redefine the content of the whole document.
|
---|
327 | This is useful for simple documents, but not recommended for more complex documents
|
---|
328 | (e.g. hierachical and paged documents) as it can prevent any sub-sections from showing.
|
---|
329 | -->
|
---|
330 | <!--
|
---|
331 | <gsf:template name="documentContent">
|
---|
332 | <xsl:call-template name="wrappedSectionImage"/>
|
---|
333 | <xsl:call-template name="wrappedSectionText"/>
|
---|
334 | </gsf:template>
|
---|
335 | -->
|
---|
336 |
|
---|
337 | <!--
|
---|
338 | Overwriting this template can be used to change the content of section headings.
|
---|
339 | -->
|
---|
340 | <!--
|
---|
341 | <gsf:template name="sectionHeading">
|
---|
342 | <xsl:call-template name="choose-title"/>
|
---|
343 | </gsf:template>
|
---|
344 | -->
|
---|
345 |
|
---|
346 | <!--
|
---|
347 | Overwriting this template can be used to change the content of the top-level section.
|
---|
348 | -->
|
---|
349 | <!--
|
---|
350 | <gsf:template name="topLevelSectionContent">
|
---|
351 | <xsl:call-template name="wrappedSectionImage"/>
|
---|
352 | <xsl:call-template name="wrappedSectionText"/>
|
---|
353 | </gsf:template>
|
---|
354 | -->
|
---|
355 |
|
---|
356 | <!--
|
---|
357 | Overwriting this template can be used to change the content of sections.
|
---|
358 | -->
|
---|
359 |
|
---|
360 | <!--
|
---|
361 | <gsf:template name="sectionContent">
|
---|
362 | <xsl:call-template name="wrappedSectionImage"/>
|
---|
363 | <xsl:call-template name="wrappedSectionText"/>
|
---|
364 | </gsf:template>
|
---|
365 | -->
|
---|
366 |
|
---|
367 | <xsl:template name="additionalHeaderContent">
|
---|
368 | <xsl:variable name="httpCollection">
|
---|
369 | <xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
|
---|
370 | </xsl:variable>
|
---|
371 |
|
---|
372 |
|
---|
373 | <xsl:call-template name="soundmanager2-header"/>
|
---|
374 | <xsl:call-template name="js-mad-header"/>
|
---|
375 |
|
---|
376 | <!-- Bespoke jquery-ui extension for turnstyle open/close blocks -->
|
---|
377 | <gsf:style src="ext/jquery-ui-extra/turnstyle-block.css"/>
|
---|
378 | <gsf:script src="ext/jquery-ui-extra/turnstyle-block.js"/>
|
---|
379 |
|
---|
380 | <!-- The Javascript DSP files for computing chroma features in the browser -->
|
---|
381 | <xsl:call-template name="javascript-dsp-header"/>
|
---|
382 |
|
---|
383 |
|
---|
384 | <!-- Javascript support for running, sending input into, monitoring, and stopping Meandre flows -->
|
---|
385 |
|
---|
386 | <gsf:script src="ext/meandre/meandre-controller.js"/>
|
---|
387 |
|
---|
388 | <gsf:style src="ext/photo-notes/PhotoNotes-1.5.css"/>
|
---|
389 | <gsf:style src="ext/photo-notes/annotator.min.css"/>
|
---|
390 | <gsf:script src="ext/photo-notes/BrowserDetect.js"/>
|
---|
391 | <gsf:script src="ext/photo-notes/PhotoNotes-1.5.js"/>
|
---|
392 | <gsf:script src="ext/photo-notes/main-ingest.js"/>
|
---|
393 | <gsf:script src="ext/photo-notes/main-notes.js"/>
|
---|
394 | <gsf:script src="{$httpCollection}/script2/main-play-notes.js"/>
|
---|
395 |
|
---|
396 | <gsf:style>
|
---|
397 | .metadata-stripes td { padding: 4px; }
|
---|
398 | .metadata-stripes tr:nth-child(odd) {background: #CCC}
|
---|
399 | .metadata-stripes tr:nth-child(even) {background: #FFF}
|
---|
400 |
|
---|
401 | .vis-heading { font-style:italic; }
|
---|
402 |
|
---|
403 | #rightSidebar { display: none; }
|
---|
404 | </gsf:style>
|
---|
405 |
|
---|
406 | </xsl:template>
|
---|
407 |
|
---|
408 |
|
---|
409 | <xsl:template name="documentContent">
|
---|
410 |
|
---|
411 | <!--
|
---|
412 | <xsl:call-template name="init-document-xsl-vars"/>
|
---|
413 | -->
|
---|
414 |
|
---|
415 | <!-- declare $httpCollection = $httpPath (for better consistency with other places in Greenstone XSL files) -->
|
---|
416 | <xsl:variable name="httpCollection">
|
---|
417 | <xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
|
---|
418 | </xsl:variable>
|
---|
419 |
|
---|
420 | <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
|
---|
421 | <xsl:variable name="Source"><gsf:metadata name="Source" select="root"/></xsl:variable>
|
---|
422 |
|
---|
423 | <xsl:variable name="Audio">
|
---|
424 | <gsf:switch>
|
---|
425 | <gsf:metadata name='Audio' select="root"/>
|
---|
426 | <gsf:when test='exists'>
|
---|
427 | <gsf:metadata name="Audio" select="root"/>
|
---|
428 | </gsf:when>
|
---|
429 | <gsf:otherwise>doc.ogg</gsf:otherwise>
|
---|
430 | </gsf:switch>
|
---|
431 | </xsl:variable>
|
---|
432 |
|
---|
433 | <xsl:variable name="streamableaudio">
|
---|
434 | <gsf:switch>
|
---|
435 | <gsf:metadata name='streamableaudio' select="root"/>
|
---|
436 | <gsf:when test='exists'>
|
---|
437 | <gsf:metadata name="streamableaudio" select="root"/>
|
---|
438 | </gsf:when>
|
---|
439 | <gsf:otherwise>doc.mp3</gsf:otherwise>
|
---|
440 | </gsf:switch>
|
---|
441 | </xsl:variable>
|
---|
442 |
|
---|
443 | <gsf:variable name="cgiargFrameOffset">
|
---|
444 | <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.frameOffset']/@value"/>
|
---|
445 | </gsf:variable>
|
---|
446 |
|
---|
447 | <gsf:variable name="cgiargFrameLength">
|
---|
448 | <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.frameLength']/@value"/>
|
---|
449 | </gsf:variable>
|
---|
450 |
|
---|
451 | <xsl:variable name="cgiargYScaleSimImg"><xsl:choose>
|
---|
452 | <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>
|
---|
453 | <xsl:otherwise>0.5</xsl:otherwise>
|
---|
454 | </xsl:choose>
|
---|
455 | </xsl:variable>
|
---|
456 |
|
---|
457 | <!-- CAA = Content Analysis Algorithm -->
|
---|
458 | <xsl:variable name="cgiargCAAlgorithm">
|
---|
459 | <xsl:choose>
|
---|
460 | <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>
|
---|
461 | <xsl:otherwise>1</xsl:otherwise>
|
---|
462 | </xsl:choose>
|
---|
463 | </xsl:variable>
|
---|
464 |
|
---|
465 | <!-- *** -->
|
---|
466 | <!-- Main Audio Player -->
|
---|
467 | <!-- *** -->
|
---|
468 |
|
---|
469 | <div id="gs-document" class="documenttext">
|
---|
470 |
|
---|
471 | <xsl:call-template name="audio-icon-cache"/>
|
---|
472 |
|
---|
473 | <ul class="playlist">
|
---|
474 | <li class="rounded" >
|
---|
475 |
|
---|
476 | <gsf:script src="{$httpCollection}/script2/hybrid-audio-player.js"/>
|
---|
477 |
|
---|
478 |
|
---|
479 | <a id="mysong" style="padding-bottom: 2px;"
|
---|
480 | onclick="togglePlayVisual(document.getElementById('mainPlayButton'))"
|
---|
481 | href="{$httpCollection}/index/assoc/{$assocFilePath}/{$streamableaudio}">
|
---|
482 | <span>
|
---|
483 | <img id="mainPlayButton" src="ext/diy-audio-player/images/play32.png"
|
---|
484 | width="32"
|
---|
485 | height="32"
|
---|
486 | onmouseover="playHighlightOn(this)"
|
---|
487 | onmouseout="playHighlightOff(this)"
|
---|
488 | onclick="var event = arguments[0] || window.event; togglePlay(event,this)"
|
---|
489 | style="vertical-align: middle;"/>
|
---|
490 | Play/Pause
|
---|
491 | <span id="extraPlayText"></span>
|
---|
492 | </span>
|
---|
493 | </a>
|
---|
494 |
|
---|
495 | <gsf:script src="ext/diy-audio-player/script/audioDB-play.js"/>
|
---|
496 |
|
---|
497 | <xsl:choose>
|
---|
498 | <xsl:when test="($cgiargFrameOffset != '-1') and ($cgiargFrameOffset != '')">
|
---|
499 |
|
---|
500 | <div style="background-color: rgb(40%,40%,20%)">
|
---|
501 | <script type="text/javascript">
|
---|
502 | <xsl:text disable-output-escaping="yes">
|
---|
503 |
|
---|
504 | var frameOffsetStr=gs.variables.cgiargFrameOffset;
|
---|
505 | var frameLength=gs.variables.cgiargFrameLength;
|
---|
506 |
|
---|
507 | </xsl:text>
|
---|
508 | </script>
|
---|
509 |
|
---|
510 |
|
---|
511 | <svg xmlns="http://www.w3.org/2000/svg"
|
---|
512 | version="1.1"
|
---|
513 | id="svgAudioDBSegments"
|
---|
514 | width="100%" height="24"
|
---|
515 | onLoadXX="svgAudioDBInit()">
|
---|
516 | </svg>
|
---|
517 | </div>
|
---|
518 | </xsl:when>
|
---|
519 | </xsl:choose>
|
---|
520 |
|
---|
521 | <xsl:call-template name="structuredAudioPlayerBlock"/>
|
---|
522 |
|
---|
523 | <xsl:call-template name="processingPopup"/>
|
---|
524 |
|
---|
525 |
|
---|
526 | <div style="width: 100%; display: none;" id="doublePlay">
|
---|
527 |
|
---|
528 | <script type="text/javascript">
|
---|
529 | <xsl:text disable-output-escaping="yes">
|
---|
530 |
|
---|
531 | // At time of writing this code, this needs to be an OGG file to work in Firefox
|
---|
532 | var source = "</xsl:text><gsf:metadata name="Audio" select="root"/><xsl:text disable-output-escaping="yes">";
|
---|
533 |
|
---|
534 | var self_sim_png = source.replace(/\.(ogg|mp3|wav)$/,".png");
|
---|
535 | var collect = "</xsl:text><xsl:value-of select="/page/pageResponse/collection/@name"/><xsl:text disable-output-escaping="yes">";
|
---|
536 | var site = "</xsl:text><xsl:value-of select="$site_name"/><xsl:text disable-output-escaping="yes">";
|
---|
537 |
|
---|
538 | </xsl:text>
|
---|
539 | </script>
|
---|
540 |
|
---|
541 | <gsf:script src="ext/diy-audio-player/script/similarity-matrix-play.js"/>
|
---|
542 |
|
---|
543 | <audio style="width: 49%;" id="leftsong" controls="controls" >
|
---|
544 | <!--
|
---|
545 | <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.ogg" />
|
---|
546 | -->
|
---|
547 | <source src="{$httpCollection}/index/assoc/{$assocFilePath}/{$streamableaudio}" />
|
---|
548 | <source src="{$httpCollection}/index/assoc/{$assocFilePath}/{$Audio}" />
|
---|
549 | <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.wav" />
|
---|
550 | </audio>
|
---|
551 | <audio style="width: 49%;" id="rightsong" controls="controls" >
|
---|
552 | <!--
|
---|
553 | <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.ogg" />
|
---|
554 | -->
|
---|
555 | <source src="{$httpCollection}/index/assoc/{$assocFilePath}/{$streamableaudio}" />
|
---|
556 | <source src="{$httpCollection}/index/assoc/{$assocFilePath}/{$Audio}" />
|
---|
557 | <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.wav" />
|
---|
558 | </audio>
|
---|
559 | </div>
|
---|
560 |
|
---|
561 |
|
---|
562 | <!-- Real Time Analysis (RTA) audio -->
|
---|
563 | <div style="width: 100%;">
|
---|
564 | <audio id="rta-audio-element" style="width: 100%;">
|
---|
565 | <!--
|
---|
566 | <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.ogg"/>
|
---|
567 | -->
|
---|
568 | <source src="{$httpCollection}/index/assoc/{$assocFilePath}/{$streamableaudio}"/>
|
---|
569 | <source src="{$httpCollection}/index/assoc/{$assocFilePath}/{$Audio}"/>
|
---|
570 | <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.wav"/>
|
---|
571 | </audio>
|
---|
572 | </div>
|
---|
573 |
|
---|
574 | <!--
|
---|
575 | <xsl:call-template name="workflow-block"/>
|
---|
576 | -->
|
---|
577 | <div id="controlMarker"><xsl:comment> filler </xsl:comment></div>
|
---|
578 |
|
---|
579 | <span id="overlayNewNotes" class="ui-state-default ui-corner-top"
|
---|
580 | style="font-size:90%; padding: 3px; cursor:pointer;">
|
---|
581 | New Annotation
|
---|
582 | </span>
|
---|
583 | <div id="svg-canvas-overlay" style="position: relative">
|
---|
584 |
|
---|
585 | <!-- drawing canvas -->
|
---|
586 | <div style="width: 100%; position: absolute; left: 0px; top: 0px;">
|
---|
587 | <div style="position: relative">
|
---|
588 | <div>
|
---|
589 | <!-- **** better if 100% width, but issue with JS reading these values ??? -->
|
---|
590 | <canvas id="freq-plot"
|
---|
591 | width="941" height="494" style="background-color: #cccccc;"></canvas>
|
---|
592 | </div>
|
---|
593 | </div>
|
---|
594 | </div>
|
---|
595 |
|
---|
596 | <div style="width: 100%; position: absolute; left: 0px; top: 0px;">
|
---|
597 | <div style="position: relative">
|
---|
598 | <div>
|
---|
599 | <!-- **** better if 100% width, but issue with JS reading these values ??? -->
|
---|
600 | <canvas id="freq-plot-labels"
|
---|
601 | width="941" height="494" style="background-color: transparent"></canvas>
|
---|
602 | </div>
|
---|
603 | </div>
|
---|
604 | </div>
|
---|
605 |
|
---|
606 |
|
---|
607 | <div style="width: 100%; position: absolute; left: 0px; top: 0px; display: none;">
|
---|
608 | <div style="position: relative">
|
---|
609 | <div>
|
---|
610 | <!-- **** better if 100% width, but issue with JS reading these values ??? -->
|
---|
611 | <canvas id="selfsim-plot"
|
---|
612 | width="941" height="494" style="background-color: #0000cc;"></canvas>
|
---|
613 | </div>
|
---|
614 | </div>
|
---|
615 | </div>
|
---|
616 |
|
---|
617 |
|
---|
618 |
|
---|
619 | <!-- left/right-mix circle cursor -->
|
---|
620 | <div style="background-color: transparent; position: relative; left: 0px; top: 0px;">
|
---|
621 | <svg xmlns="http://www.w3.org/2000/svg"
|
---|
622 | xmlns:xlink="http://www.w3.org/1999/xlink"
|
---|
623 | version="1.1"
|
---|
624 | id="svgSimilarityPlay"
|
---|
625 | width="100%"
|
---|
626 | onLoad="svgInitSimilarityPlay()">
|
---|
627 | <g id="simPlayLineGroup" transform="scale(1.0,{$cgiargYScaleSimImg})">
|
---|
628 | <!-- image loaded here, with yScaleSimImg applied to group -->
|
---|
629 | </g>
|
---|
630 | <g id="playtracker" transform="translate(0,0)"
|
---|
631 | onclick="dualPlay(evt)"
|
---|
632 | onmousemove="playTrackerMove(evt)"
|
---|
633 | onmouseout="playTrackerOff(evt)"
|
---|
634 | style="visibility: hidden">
|
---|
635 | <circle cx="0" cy="0" r="20"
|
---|
636 | stroke="black" stroke-width="1" fill="rgba(100%,100%,50%,0.7)" />
|
---|
637 | <circle cx="0" cy="0" r="1"
|
---|
638 | stroke="black" stroke-width="1" fill="black" />
|
---|
639 | <g transform="translate(-15,-15)" style="visibility: hidden;">
|
---|
640 | <image id="playtrackerBusy"
|
---|
641 | width="30" height="30"
|
---|
642 | xlink:href="ext/diy-audio-player/images/wait30trans.gif" />
|
---|
643 | </g>
|
---|
644 |
|
---|
645 | <g>
|
---|
646 | <g transform="rotate(-90)">
|
---|
647 | <g transform="translate(-20,-25)">
|
---|
648 | <text id="rightTime" style="font-size: 80%;">L: secs</text>
|
---|
649 | </g>
|
---|
650 | </g>
|
---|
651 | <g transform="translate(-20,30)">
|
---|
652 | <text id="leftTime" style="font-size: 80%;">R: secs</text>
|
---|
653 | </g>
|
---|
654 | </g>
|
---|
655 |
|
---|
656 | </g>
|
---|
657 | </svg>
|
---|
658 | </div>
|
---|
659 |
|
---|
660 |
|
---|
661 |
|
---|
662 | <gsf:variable-array name="salami.overlayNote">
|
---|
663 | <gsf:metadata multiple="true" name="salami.overlayNote" separator=", "/>
|
---|
664 | </gsf:variable-array>
|
---|
665 |
|
---|
666 | <!--
|
---|
667 | onclick="var event = arguments[0] || window.event; dualPlay(event)"
|
---|
668 | onmousemove="var event = arguments[0] || window.event; playTrackerMove(event)"
|
---|
669 | onmouseout="var event = arguments[0] || window.event; playTrackerOff(event)"
|
---|
670 | -->
|
---|
671 |
|
---|
672 |
|
---|
673 | <div id="noteOverlay"
|
---|
674 | style="width: 100%; height: 494px; position: absolute; left: 0px; top: 0px; background-color: transparent;">
|
---|
675 | </div>
|
---|
676 |
|
---|
677 | <gsf:script>
|
---|
678 | $(window).load(function(){
|
---|
679 | var overlayNotes = new OverlayNotes("noteOverlay","salami.overlayNote");
|
---|
680 | $('#overlayNewNotes').click(function() {overlayNotes.AddNote()});
|
---|
681 | addStatusBar();
|
---|
682 | });
|
---|
683 | </gsf:script>
|
---|
684 |
|
---|
685 |
|
---|
686 | </div><!-- end of svg-canvas-overly-->
|
---|
687 |
|
---|
688 | <xsl:call-template name="visualization-mode-block"/>
|
---|
689 |
|
---|
690 | </li>
|
---|
691 | </ul>
|
---|
692 |
|
---|
693 | <hr/>
|
---|
694 |
|
---|
695 | <xsl:call-template name="settings-form">
|
---|
696 | <xsl:with-param name="cgiargYScaleSimImg" select="$cgiargYScaleSimImg"/>
|
---|
697 | </xsl:call-template>
|
---|
698 |
|
---|
699 | <!--
|
---|
700 | <xsl:call-template name="computed-data">
|
---|
701 | <xsl:with-param name="httpCollection" select="$httpCollection"/>
|
---|
702 | <xsl:with-param name="assocFilePath" select="$assocFilePath"/>
|
---|
703 | </xsl:call-template>
|
---|
704 | -->
|
---|
705 |
|
---|
706 | <!--
|
---|
707 | <xsl:call-template name="original-audio">
|
---|
708 | <xsl:with-param name="httpCollection" select="$httpCollection"/>
|
---|
709 | <xsl:with-param name="assocFilePath" select="$assocFilePath"/>
|
---|
710 | <xsl:with-param name="Audio" select="$Audio"/>
|
---|
711 | <xsl:with-param name="streamableaudio" select="$streamableaudio"/>
|
---|
712 | </xsl:call-template>
|
---|
713 |
|
---|
714 | <hr/>
|
---|
715 | -->
|
---|
716 |
|
---|
717 | <hr/>
|
---|
718 |
|
---|
719 | <script>
|
---|
720 | <xsl:text disable-output-escaping="yes">
|
---|
721 | useFancyPlayer = 1;
|
---|
722 |
|
---|
723 | /* if (window.location.toString().match(/fancyplayer/i)) { */
|
---|
724 | if (useFancyPlayer) {
|
---|
725 | PP_CONFIG.usePeakData = true;
|
---|
726 | PP_CONFIG.useEQData = true;
|
---|
727 | // PP_CONFIG.useFavIcon = true;
|
---|
728 | }
|
---|
729 |
|
---|
730 | function onFinishSP()
|
---|
731 | {
|
---|
732 | soundManager._onfinish();
|
---|
733 | togglePlayVisual(mainPlayButton);
|
---|
734 | }
|
---|
735 |
|
---|
736 | var mySoundObj;
|
---|
737 |
|
---|
738 | function playFromOffset(id,frameOffset)
|
---|
739 | {
|
---|
740 | var msecOffset = 250 * frameOffset;
|
---|
741 | idElem = document.getElementById(id);
|
---|
742 | pagePlayer.handleClick({target:idElem}); /* fake a click */
|
---|
743 | soundManager.stopAll();
|
---|
744 |
|
---|
745 | var options = {};
|
---|
746 | options.position = msecOffset;
|
---|
747 |
|
---|
748 | soundManager.play(id,options);
|
---|
749 |
|
---|
750 | var secOffset = msecOffset/1000.0;
|
---|
751 | console.log("playFromOffset: " + secOffset + " secs -> SoundManager2");
|
---|
752 |
|
---|
753 | togglePlayMode = "pause";
|
---|
754 | playHighlightOff(document.getElementById("mainPlayButton"),32);
|
---|
755 | }
|
---|
756 |
|
---|
757 | function preSubmit(form)
|
---|
758 | {
|
---|
759 | var currentPosElem = document.getElementById("mysongCurrentPos");
|
---|
760 | var offsetInMSecs = currentPosElem.getAttribute("offsetInMSecs");
|
---|
761 | var frameOffset = Math.round(offsetInMSecs/250.0);
|
---|
762 | form.elements["s1.offset"].value = frameOffset;
|
---|
763 |
|
---|
764 | //var lengthInSecs = document.getElementById("mysongWindowDuration").innerHTML;
|
---|
765 | var lengthInSecs = form.elements["mysongWindowDuration"].value;
|
---|
766 |
|
---|
767 | var frameLength = Math.round(lengthInSecs*1000/250.0);
|
---|
768 | form.elements["s1.length"].value = frameLength;
|
---|
769 |
|
---|
770 | return true;
|
---|
771 | }
|
---|
772 |
|
---|
773 | function searchSubmit(frameOffset)
|
---|
774 | {
|
---|
775 | var form = document.getElementById("QueryForm");
|
---|
776 |
|
---|
777 | form.elements["s1.offset"].value = frameOffset;
|
---|
778 |
|
---|
779 | //var lengthInSecs = document.getElementById("mysongWindowDuration").innerHTML;
|
---|
780 | var lengthInSecs = form.elements["mysongWindowDuration"].value;
|
---|
781 |
|
---|
782 | var frameLength = Math.round(lengthInSecs*1000/250.0);
|
---|
783 | form.elements["s1.length"].value = frameLength;
|
---|
784 |
|
---|
785 | form.submit();
|
---|
786 | }
|
---|
787 |
|
---|
788 |
|
---|
789 |
|
---|
790 | function rescaleImage()
|
---|
791 | {
|
---|
792 | var form = document.getElementById("RescaleForm");
|
---|
793 |
|
---|
794 | var rescaleSize = form.elements["ResizeScale"].value;
|
---|
795 |
|
---|
796 | var currentURL = document.location.toString();
|
---|
797 | var newURL;
|
---|
798 | if (currentURL.match(/p.yScaleSimImg=(\d+(?:\.\d+))/)) {
|
---|
799 | newURL = currentURL.replace(/p.yScaleSimImg=(\d+(?:\.\d+))/,"p.yScaleSimImg="+rescaleSize);
|
---|
800 | }
|
---|
801 | else {
|
---|
802 | var urlParts = currentURL.split("#");
|
---|
803 | newURL = urlParts.shift();
|
---|
804 | newURL += "&p.yScaleSimImg="+rescaleSize;
|
---|
805 | newURL += "#" + urlParts.join("#");
|
---|
806 | }
|
---|
807 |
|
---|
808 | document.location = newURL;
|
---|
809 | }
|
---|
810 |
|
---|
811 | function updateCAAlgorithm()
|
---|
812 | {
|
---|
813 |
|
---|
814 | var form = document.getElementById("UpdateCAForm");
|
---|
815 |
|
---|
816 | var caaMenu = form.elements["caAlgorithm"];
|
---|
817 |
|
---|
818 | var caIndexPos = caaMenu.options[caaMenu.selectedIndex].value
|
---|
819 |
|
---|
820 | var currentURL = document.location.toString();
|
---|
821 | var newURL;
|
---|
822 | if (currentURL.match(/p.caAlgorithm=(\d+)/)) {
|
---|
823 | newURL = currentURL.replace(/p.caAlgorithm=(\d+)/,"p.caAlgorithm="+caIndexPos);
|
---|
824 | }
|
---|
825 | else {
|
---|
826 | var urlParts = currentURL.split("#");
|
---|
827 | newURL = urlParts.shift();
|
---|
828 | newURL += "&p.caAlgorithm="+caIndexPos;
|
---|
829 | newURL += "#" + urlParts.join("#");
|
---|
830 | }
|
---|
831 |
|
---|
832 | document.location = newURL;
|
---|
833 |
|
---|
834 | }
|
---|
835 |
|
---|
836 |
|
---|
837 |
|
---|
838 | </xsl:text>
|
---|
839 |
|
---|
840 | </script>
|
---|
841 |
|
---|
842 |
|
---|
843 | </div>
|
---|
844 | </xsl:template>
|
---|
845 |
|
---|
846 |
|
---|
847 |
|
---|
848 |
|
---|
849 | </format>
|
---|
850 | </display>
|
---|
851 |
|
---|
852 | <replaceListRef id="gs2-standard"/>
|
---|
853 | <replaceListRef id="gs2-image" />
|
---|
854 | <serviceRackList>
|
---|
855 | <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
|
---|
856 | <serviceRack name="OAIPMH">
|
---|
857 | <ListMetadataFormats>
|
---|
858 | <!--What metadata sets to support is collection specific. To support other metadata schema, simply add a metadataFormat element here.
|
---|
859 | The support of unqualified Dublin Core metadata set is mandatory in the oai specification.
|
---|
860 | -->
|
---|
861 | <metadataFormat metadataPrefix="oai_dc">
|
---|
862 | <metadataPrefix>oai_dc</metadataPrefix>
|
---|
863 | <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
|
---|
864 | <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>
|
---|
865 | <!--<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>-->
|
---|
866 | <mappingList>
|
---|
867 | <!--
|
---|
868 | The mapping is in the form: <publicly supported metadata name>,<mapped metadata name>, short as <A>,<B>
|
---|
869 | The first metadata name is medatory; if there is no mapped name followed, then the first name must be used by the records and
|
---|
870 | searchable in the database, otherwise it is the mapped name stored in the database. The number of mapping elements matches the
|
---|
871 | number of external metadata of the records. If only one name is present, the returned metadata will use this name plus the retrieved value;
|
---|
872 | if both <A>,<B> are present, the returned metadata will use <A>'s name plus <B>'s value retrieved from database.
|
---|
873 |
|
---|
874 | **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.
|
---|
875 |
|
---|
876 | **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.
|
---|
877 | -->
|
---|
878 | <mapping>dc:title,Title</mapping>
|
---|
879 | <!-- 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. -->
|
---|
880 | </mappingList>
|
---|
881 | </metadataFormat>
|
---|
882 | </ListMetadataFormats>
|
---|
883 | </serviceRack>
|
---|
884 | </serviceRackList>
|
---|
885 | </CollectionConfig>
|
---|