root/main/trunk/model-sites-dev/pei-jones/collect/gallery/etc/collectionConfig.xml @ 31796

Revision 31796, 15.2 KB (checked in by kjdon, 3 years ago)

adding the collections' frameworks

  • 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 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">
10
11      &lt;p&gt;
12      The Pei Jones Gallery provides a snapshot to Pei Te Hurinui Jones&apos;
13      life. It includes a small collection of personal photographs, sporting
14      photographs, Pei&apos;s artwork, images of the taonga and kākahu collection,
15      recent book launches and other activities.
16
17      &lt;p&gt;
18      Use the Titles tab above to browse the gallery, or else type a query into the
19      search box in the upper-righthand corner.
20
21    </displayItem>
22    <displayItem assigned="true" lang="en" name="name">Gallery</displayItem>
23    <displayItem assigned="true" lang="en" name="text">text</displayItem>
24    <displayItem assigned="true" lang="en" name="dc.Title,ex.dc.Title,Title">titles</displayItem>
25    <displayItem assigned="true" lang="en" name="Source">filenames</displayItem>
26    <displayItem assigned="true" lang="en" name="gsimg.Annotation">image annotations</displayItem>
27    <displayItem assigned="true" lang="en" name="document:text">text</displayItem>
28    <displayItem assigned="true" lang="en" name="document:ex.Title">Title</displayItem>
29    <displayItem assigned="true" lang="en" name="document:ex.Source">Source</displayItem>
30    <displayItem assigned="true" lang="en" name="document">document</displayItem>
31    <displayItem assigned="true" lang="en" name="section">section</displayItem>
32    <displayItem assigned="true" lang="en" name="shortDescription">
33      Images from the Pei Jones collection
34    </displayItem>
35  </displayItemList>
36  <format>
37    <gsf:template name="choose-title">
38      <gsf:choose-metadata>
39    <gsf:metadata name="pj.Title"/>
40    <gsf:metadata name="Title"/>
41    <gsf:default>Untitled</gsf:default>
42      </gsf:choose-metadata>
43    </gsf:template>
44  </format>
45  <search type="lucene">
46    <level name="document">
47      <displayItem lang="en" name="name">document</displayItem>
48    </level>
49    <defaultLevel name="document"/>
50    <index name="allfields"/>
51    <index name="pj.Title,Title">
52      <displayItem lang="en" name="name">title</displayItem>
53    </index>
54    <index name="pj.Catalogue-Number,pj.Catalogue-Short">
55      <displayItem lang="en" name="name">catalogue number</displayItem>
56    </index>
57    <index name="pj.Description">
58      <displayItem lang="en" name="name">description</displayItem>
59    </index>
60    <index name="pj.Date">
61      <displayItem lang="en" name="name">date</displayItem>
62    </index>
63    <index name="pj.Subject">
64      <displayItem lang="en" name="name">subject</displayItem>
65    </index>
66    <index name="pj.Physical-Location">
67      <displayItem lang="en" name="name">physical location</displayItem>
68    </index>
69    <index name="pj.Provenance">
70      <displayItem lang="en" name="name">provenance</displayItem>
71    </index>
72    <index name="pj.Tags">
73      <displayItem lang="en" name="name">tags</displayItem>
74    </index>
75    <index name="pj.Document-Type">
76      <displayItem lang="en" name="name">document type</displayItem>
77    </index>
78    <index name="pj.MSHeading">
79      <displayItem lang="en" name="name">maori subject heading</displayItem>
80    </index>
81    <index name="text">
82      <displayItem lang="en" name="name">text</displayItem>
83    </index>
84    <index name="gsimg.Annotation">
85      <displayItem lang="en" name="name">image annotations</displayItem>
86    </index>
87    <defaultIndex name="text"/>
88    <indexOption name="casefold"/>
89    <indexOption name="stem"/>
90    <searchType name="plain"/>
91    <format>
92      <gsf:template match="documentNode">
93    <td align="center" valign="top" width="104">
94      <gsf:link type="document">
95        <gsf:choose-metadata>
96          <gsf:metadata name="thumbicon"/>
97          <gsf:metadata name="srcicon"/>
98        </gsf:choose-metadata>
99      </gsf:link>
100    </td>
101    <td valign="top">
102      <gsf:link type="document">
103        <!--
104        Defined in the global format statement
105        -->
106        <xsl:call-template name="choose-title"/>
107        <!--
108        <gsf:switch>
109        <gsf:metadata name="Source"/>
110        <gsf:when test="exists">
111        <br/>
112        <i>(<gsf:metadata name="Source"/>)</i>
113        </gsf:when>
114        </gsf:switch>
115        -->
116      </gsf:link>
117    </td>
118      </gsf:template>
119    </format>
120  </search>
121  <infodb type="jdbm"/>
122  <import>
123    <pluginList>
124      <plugin name="GreenstoneXMLPlugin"/>
125      <plugin name="TextPlugin"/>
126      <plugin name="ImagePlugin">
127    <option name="-enable_cache"/>
128    <option name="-OIDtype" value="filename"/>
129      </plugin>
130      <plugin name="MetadataXMLPlugin"/>
131      <plugin name="ArchivesInfPlugin"/>
132      <plugin name="DirectoryPlugin"/>
133    </pluginList>
134  </import>
135  <importOption name="OIDtype" value="hash_on_full_filename"/>
136  <browse>
137    <classifier name="List">
138      <option name="-metadata" value="pj.Title;Title"/>
139      <option name="-partition_type_within_level" value="approximate_size"/>
140    </classifier>
141    <!--        <classifier name="List">
142    <option name="-metadata" value="pj.Provenance"/>
143    <option name="-hfile" value="Provenance.txt"/>
144    <option name="-buttonname" value="Provenance"/>
145    </classifier>
146    <classifier name="Hierarchy">
147    <option name="-metadata" value="pj.Document-Type"/>
148    <option name="-hfile" value="DocumentType.txt"/>
149    <option name="-buttonname" value="DocType"/>
150    </classifier>
151    <classifier name="Hierarchy">
152    <option name="-metadata" value="pj.MSHeading"/>
153    <option name="-hfile" value="MaoriSubjectHeading.txt"/>
154    <option name="-buttonname" value="MSH"/>
155    </classifier>-->
156    <format>
157      <gsf:template match="documentNode">
158    <td align="center" valign="top" width="104">
159      <gsf:link type="document">
160        <gsf:choose-metadata>
161          <gsf:metadata name="thumbicon"/>
162          <gsf:metadata name="srcicon"/>
163        </gsf:choose-metadata>
164      </gsf:link>
165    </td>
166    <td valign="top">
167      <gsf:link type="document">
168        <!--
169        Defined in the global format statement
170        -->
171        <xsl:call-template name="choose-title"/>
172        <!--
173        <gsf:switch>
174        <gsf:metadata name="Source"/>
175        <gsf:when test="exists">
176        <br/>
177        <i>(<gsf:metadata name="Source"/>)</i>
178        </gsf:when>
179        </gsf:switch>
180        -->
181      </gsf:link>
182    </td>
183      </gsf:template>
184    </format>
185  </browse>
186  <display>
187    <format>
188      <gsf:option name="disableZoom" value="true"/>
189      <gsf:option name="disableSearchTermHighlighting" value="true"/>
190      <!--
191      Overwriting this template allows you to change the heading of the document.
192      -->
193      <gsf:template name="documentHeading">
194    <span rect="norect" style="display: inline-block; width: 110px; font-weight: bold; font-size: 120%;">
195      <xsl:call-template name="choose-title"/>
196    </span>
197      </gsf:template>
198
199      <!--
200      <gsf:template name="documentHeading">
201      <span style="font-weight:bold; font-size: 120%;">
202      <xsl:call-template name="choose-title"/>
203      </span>
204      </gsf:template>
205      -->
206      <!--
207      Overwriting 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.
208      -->
209
210      <!-- copied from taonga-->
211      <gsf:template name="documentContent">
212    <div rect="norect" style="float: left; margin: 15px;">
213      <gsf:link type="source">
214        <gsf:image type="screen" style="border: 1px solid #000;"/>
215      </gsf:link>
216    </div>
217    <xsl:call-template name="pjMetadataDisplayTable"/>
218    <div style="clear:left;">
219      <gsf:if-metadata-exists><gsf:metadata name="NoText"/><gsf:else><gsf:text/></gsf:else></gsf:if-metadata-exists>
220    </div>
221    <br clear="all"/>
222      </gsf:template>
223
224      <gsf:template name="documentContentOld">
225    <!--
226        Checks the format of the current GSDL document - in this case, either "Photographs", "Books" or "Scanned Documents".
227    -->
228    <xsl:variable name="format">
229      <gsf:metadata name="pj.Format"/>
230      <gsf:default>""</gsf:default>
231    </xsl:variable>
232    <xsl:choose>
233      <!--
234          If the current document is in the format of a (Realistic) Book, then link the image on the page to the matching realistic book for people to view/read.
235      -->
236      <xsl:when test="contains($format,'Books')">
237        <xsl:variable name="BookName">
238          <gsf:choose-metadata>
239        <gsf:metadata name="Title"/>
240        <gsf:default>""</gsf:default>
241          </gsf:choose-metadata>
242        </xsl:variable>
243        <xsl:variable name="NewBookName">
244          <xsl:call-template name="replace-function">
245        <xsl:with-param name="stringIn" select="string($BookName)"/>
246        <xsl:with-param name="charsIn" select="' '"/>
247        <xsl:with-param name="charsOut" select="'_'"/>
248          </xsl:call-template>
249        </xsl:variable>
250        <xsl:variable name="url">
251          <xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name= 'httpPath']"/>
252          <xsl:text>/books/</xsl:text>
253          <xsl:value-of select="$NewBookName"/>
254          <xsl:text>/index.html</xsl:text>
255        </xsl:variable>
256        <a href="{$url}" target="_blank">
257          <xsl:call-template name="wrappedSectionImage"/>
258        </a>
259        <br/>
260        <br/>
261        <p>Click on the image above to view/read the book.</p>
262      </xsl:when>
263      <xsl:otherwise>
264        <!--                        <xsl:if test="contains($format,'Photographs')">
265        <script text="text/javascript">
266        <xsl:text disable-output-escaping="yes">$(window).load(function(){
267
268var found = $(".zoomImage").find("img");
269var imageJson;
270var matches;
271var existing_notes;
272var img;
273
274if(found.length != 0){
275img = found[0];
276}else{
277
278var imageDivName = "#image" + gs.cgiParams.d;
279
280found = $(imageDivName).find("img");
281
282if(found.length != 0)
283img = found[0];
284}
285
286if(img !== null &amp;&amp; img !== undefined){
287
288imageJson = '</xsl:text>
289<gsf:metadata name="gsimg.Annotation"/>
290<xsl:text disable-output-escaping="yes">';
291
292matches = getImageNoteMatches(imageJson);
293existing_notes = getExistingImageNotes(matches, 0);
294
295$(img).attr('id','toAnnotate');
296
297$('#toAnnotate').annotateImage({</xsl:text>
298<xsl:choose>
299<xsl:when test="/page/pageRequest/userInformation/@username and /page/pageRequest/userInformation/@editEnabled = 'true'">
300<xsl:text disable-output-escaping="yes">editable: true,</xsl:text>
301</xsl:when>
302<xsl:otherwise>
303<xsl:text disable-output-escaping="yes">editable: false,</xsl:text>
304</xsl:otherwise>
305</xsl:choose>
306<xsl:text disable-output-escaping="yes">useAjax: true,
307notes: existing_notes
308});
309}else{
310console.log("ERROR: Image could not be found for annotating");
311}
312
313});</xsl:text>
314</script>
315</xsl:if>-->
316        <xsl:call-template name="wrappedSectionImage"/>
317        <br/>
318        <br/>
319        <xsl:call-template name="wrappedSectionText"/>
320      </xsl:otherwise>
321    </xsl:choose>
322      </gsf:template>
323      <!--
324      This is a template for replacing characters in a string, e.g. replacing spaces with underscore characters.
325      -->
326      <xsl:template name="replace-function">
327    <xsl:param name="stringIn"/>
328    <xsl:param name="charsIn"/>
329    <xsl:param name="charsOut"/>
330    <xsl:choose>
331      <xsl:when test="contains($stringIn,$charsIn)">
332        <xsl:value-of select="concat(substring-before($stringIn,$charsIn),$charsOut)"/>
333        <xsl:call-template name="replace-function">
334          <xsl:with-param name="stringIn" select="substring-after($stringIn,$charsIn)"/>
335          <xsl:with-param name="charsIn" select="$charsIn"/>
336          <xsl:with-param name="charsOut" select="$charsOut"/>
337        </xsl:call-template>
338      </xsl:when>
339      <xsl:otherwise>
340        <xsl:value-of select="$stringIn"/>
341      </xsl:otherwise>
342    </xsl:choose>
343      </xsl:template>
344      <!--
345      Overwriting this template can be used to change the content of section headings.
346      -->
347      <!--
348      <gsf:template name="sectionHeading">
349      <xsl:call-template name="choose-title"/>
350      </gsf:template>
351      -->
352      <!--
353      This template is called when displaying the paged scanned documents in the library collection. Controls the display of the area where the user collapses/expands pages.
354      -->
355      <gsf:template name="topLevelSectionContent">
356    <!--
357        Create a variable to store numpages.
358    -->
359    <xsl:variable name="NumPages">
360      <gsf:choose-metadata>
361        <gsf:metadata name="NumPages"/>
362        <gsf:default>0</gsf:default>
363      </gsf:choose-metadata>
364    </xsl:variable>
365    <!--
366        Check if $NumPages == 1
367    -->
368    <xsl:if test="$NumPages=1">
369      <!--
370          Write functionality so that we don't have to collapse the page - it should be instantly viewable.
371      -->
372      <script>
373      <xsl:text disable-output-escaping="yes">                      </xsl:text>                 </script>
374    </xsl:if>
375    <xsl:call-template name="wrappedSectionImage"/>
376    <xsl:call-template name="wrappedSectionText"/>
377      </gsf:template>
378      <!--
379      Overwriting this template can be used to change the content of each section - useful for paged documents.
380      -->
381      <gsf:template name="sectionContent">
382    <!--
383        <p>
384        <gsf:metadata name="assocfilepath" select="root"/>
385        </p>
386    -->
387    <!--
388        Check if pj.format == "Scanned Documents"
389    -->
390    <xsl:variable name="FileFormat">
391      <gsf:choose-metadata>
392        <gsf:metadata name="pj.Format" select="root"/>
393        <gsf:default>""</gsf:default>
394      </gsf:choose-metadata>
395    </xsl:variable>
396    <xsl:if test="contains($FileFormat,'Scanned Documents')">
397      <script type="text/javascript">
398        <xsl:text disable-output-escaping="yes">var docID = gs.cgiParams.d;
399        var num = '</xsl:text>
400        <gsf:metadata name="Title"/>
401        <xsl:text disable-output-escaping="yes">';
402        var divId = "#small" + docID + "_" + num;
403        var found = $(divId).find("img");
404       
405        //Load up existing image annotations
406        var imageJson = '</xsl:text>
407        <gsf:metadata name="gsimg.Annotation" select="root"/>
408        <xsl:text disable-output-escaping="yes">';
409       
410        var matches = getImageNoteMatches(imageJson);
411        var existing_notes = getExistingImageNotes(matches,num);
412        console.log(existing_notes);
413       
414        if(found.length != 0){
415        var img = found[0];
416       
417        var img_width = img.width;
418        var img_height = img.height;
419       
420        var imgId = 'img_annotate'+docID+'_'+num;
421       
422        $(img).attr('id',imgId);
423        $('#'+imgId).annotateImage({
424        editable: true,
425        useAjax: true,
426        notes: existing_notes,
427        width: img_width,
428        height: img_height,
429        page: num 
430        });
431       
432        //enable text annotating - assumes that only one pre element exists on the page...
433        /*var preAnnotator = $("pre").annotator();
434       
435        preAnnotator.annotator('addPlugin','Store',{
436       
437        prefix: 'cgi-bin/metadata-server.pl',
438       
439        //Attach uri of the current page to all annotations to allow search
440        annotationData: {
441        'uri': 'http://localhost:8787/greenstone3/library/colection/pjpaged/document/HASH012777c0ef1cbbe239b1cc66'
442        },
443       
444        loadFromSearch: {
445        'limit': 20,
446        'uri': 'http://localhost:8787/greenstone3/library/colection/pjpaged/document/HASH012777c0ef1cbbe239b1cc66'
447        },
448       
449        urls: {
450        create: 'createurl',
451        read: 'readurl',
452        update: 'updateurl',
453        destroy: 'destroyurl',
454        search: 'searchurl'
455        }
456       
457        });*/
458       
459       
460        }</xsl:text>
461      </script>
462    </xsl:if>
463    <xsl:call-template name="wrappedSectionImage"/>
464    <br/>
465    <br/>
466    <xsl:call-template name="wrappedSectionText"/>
467      </gsf:template>
468    </format>
469  </display>
470  <replaceListRef id="gs2-standard"/>
471  <replaceListRef id="gs2-image"/>
472  <serviceRackList/>
473</CollectionConfig>
Note: See TracBrowser for help on using the browser.