source: gs3-installations/whakatohea-dl/trunk/sites/wmtb/collect/tipple-waiata/etc/collectionConfig.xml@ 37180

Last change on this file since 37180 was 37180, checked in by davidb, 15 months ago

First cut at files to provide a DL version of the Tipple Waiato app

File size: 14.0 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">tipple-waiata</displayItem>
10 <displayItem assigned="true" lang="en" name="description"></displayItem>
11 <!-- shortDescription is used as a tooltip for collection icon on home page-->
12 <displayItem assigned="true" lang="en" name="shortDescription">tipple-waiata</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 <!-- modify the collection description template to output the "this collection contains X documents and was last built Y days ago" message -->
26 <xsl:template name="coll-description">
27 <p><gslib:collectionDescriptionTextAndServicesLinks/></p>
28 <xsl:variable name="raw_date"><gslib:collectionMeta name="buildDate"/></xsl:variable>
29 <xsl:variable name="formatted_date"><xsl:value-of select="util:formatTimeStamp($raw_date, 0, 3, /page/@lang)"/></xsl:variable>
30 <xsl:variable name="numdocs"><gslib:collectionMeta name="numDocs"/></xsl:variable>
31 <p><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.standarddescriptiondays', concat($numdocs, ';', $formatted_date))"/></p>
32 </xsl:template>
33 </format>
34 <search type="lucene">
35 <level name="document">
36 <displayItem lang="en" name="name">document</displayItem>
37 </level>
38 <level name="section">
39 <displayItem lang="en" name="name">section</displayItem>
40 </level>
41 <defaultLevel name="document"/>
42 <index name="text">
43 <displayItem lang="en" name="name">text</displayItem>
44 </index>
45 <index name="dc.Title,ex.dc.Title,Title">
46 <displayItem lang="en" name="name">titles</displayItem>
47 </index>
48 <index name="Type">
49 <displayItem lang="en" name="name">types</displayItem>
50 </index>
51 <defaultIndex name="text"/>
52 <sort name="rank">
53 <displayItem lang="en" name="name">rank</displayItem>
54 </sort>
55 <sort name="none">
56 <displayItem lang="en" name="name">natural (build) order</displayItem>
57 </sort>
58 <searchType name="plain"/>
59 <searchType name="simpleform"/>
60 <searchType name="advancedform"/>
61 <format>
62 <gsf:template match="documentNode">
63 <td valign="top">
64 <gsf:link type="document">
65 <gsf:icon type="document"/>
66 </gsf:link>
67 </td>
68 <td>
69 <gsf:link type="document">
70 <xsl:call-template name="choose-title"/>
71 </gsf:link>
72 </td>
73 </gsf:template>
74 </format>
75 </search>
76
77 <infodb type="jdbm"/>
78
79 <import>
80 <pluginList>
81 <plugin name="ZIPPlugin"/>
82 <plugin name="GreenstoneXMLPlugin"/>
83 <plugin name="TippleExportJSONPlugin"/>
84 <plugin name="TextPlugin"/>
85 <plugin name="HTMLPlugin"/>
86 <plugin name="EmailPlugin"/>
87 <plugin name="PDFv2Plugin"/>
88 <!-- Configuring an UnknownConverterPlugin for docx processing with Tika -->
89 <plugin name="UnknownConverterPlugin">
90 <option name="-exec_cmd" value="java -jar %%GSDLHOME/ext/tika/tika-app.jar --html --pretty-print --encoding=UTF-8 %%INPUT_FILE &gt; %%OUTPUT"/>
91 <option name="-convert_to" value="html"/>
92 <option name="-mime_type" value="application/vnd.openxmlformats-officedocument.wordprocessingml.document"/>
93 <option name="-srcicon" value="icondocx"/>
94 <option name="-process_extension" value="docx"/>
95 </plugin>
96 <!-- If you have Tesseract installed (for linux 64 bit machines, there's a tesseract tarball available
97 for download from http://trac.greenstone.org/browser/gs2-extensions/tesseract/trunk/tesseract-linux-x64.tar.gz
98 Untested: for windows, you can try installing Tesseract from Win binaries at https://github.com/UB-Mannheim/tesseract/wiki
99 For Windows and Mac, be sure to add tesseract's bin folder to your PATH and also set the TESSDATA_PREFIX environment variable to
100 the folder "tessdata" wherein you also need to have the "<3-letter-langcode>.traineddata" files for the languages you want
101 to OCR.) The Linux 64 bit tesseract extension tarball already does all this for you.
102 Once you have Tesseract installed, you can activate the following UnknownConverterPlugin to use Tika with Tesseract to OCR PDFs
103 that contain images by removing the XML comment symbols.
104 -->
105 <!--
106 <plugin name="UnknownConverterPlugin">
107 <option name="-exec_cmd" value="java -jar $GSDLHOME/ext/tika/tika-app-*.jar &#45;&#45;config=$GSDLHOME/ext/tika/ocr-pdfs-config.xml &#45;&#45;html %%INPUT_FILE > %%OUTPUT"/>
108 <option name="-convert_to" value="html"/>
109 <option name="-mime_type" value="application/pdf"/>
110 <option name="-srcicon" value="iconpdf"/>
111 <option name="-process_extension" value="pdf"/>
112 </plugin>
113 -->
114 <plugin name="RTFPlugin"/>
115 <plugin name="WordPlugin"/>
116 <plugin name="PostScriptPlugin"/>
117 <plugin name="PowerPointPlugin"/>
118 <plugin name="ExcelPlugin"/>
119 <plugin name="ImagePlugin"/>
120 <plugin name="ISISPlugin"/>
121 <plugin name="NulPlugin"/>
122 <plugin name="OAIPlugin"/>
123 <plugin name="MetadataXMLPlugin"/>
124 <plugin name="ArchivesInfPlugin"/>
125 <plugin name="DirectoryPlugin"/>
126 </pluginList>
127 </import>
128 <browse>
129 <classifier name="List">
130 <option name="-metadata" value="dc.Title,Title"/>
131 <option name="-buttonname" value="Titles"/>
132 <option name="-partition_type_within_level" value="approximate_size"/>
133 <option name="-numeric_partition_type_within_level" value="approximate_size"/>
134 <!-- only use one dc.Title/Title value. change to allvalues to use all of them.-->
135 <option name="-metadata_selection_mode_within_level" value="firstvalue"/>
136 <option name="-bookshelf_type" value="duplicate_only"/>
137 <!--
138 If you are classifying by multiple title values for each document, then
139 (1) edit above line to: <option name="-metadata_selection_mode_within_level" value="allvalues"/>
140 (2) create a custom <format> statement immediately below this <option> element,
141 and copy the existing browse <format>'s <gsf:template match="documentNode"> into it
142 (3) then change its choose-title line (<xsl:call-template name="choose-title"/>)
143 to the following (note pos=classifiedBy) preceded by the XML comment:
144 Instead of using choose-title here, we want to display the title that the document was classified on
145 <gsf:metadata name="dc.Title,Title" pos="classifiedBy"/>
146 -->
147 <!--<format>
148 <gsf:template match="documentNode">
149 <td valign="top">
150 <gsf:link type="document">
151 <gsf:icon type="document"/>
152 </gsf:link>
153 </td>
154 <td valign="top">
155 <gsf:link type="source">
156 <gsf:choose-metadata>
157 <gsf:metadata name="thumbicon"/>
158 <gsf:metadata name="srcicon"/>
159 </gsf:choose-metadata>
160 </gsf:link>
161 </td>
162 <td valign="top">
163 <gsf:link type="document">
164 Instead of using choose-title here, we want to display the title that the document was classified on
165 <gsf:metadata name="dc.Title,Title" pos="classifiedBy"/>
166 <gsf:switch>
167 <gsf:metadata name="Source"/>
168 <gsf:when test="exists"><br/><i>(<gsf:metadata name="Source"/>)</i></gsf:when>
169 </gsf:switch>
170 </gsf:link>
171 </td>
172 </gsf:template>
173 </format>
174 -->
175 </classifier>
176 <classifier name="List">
177 <option name="-metadata" value="Type"/>
178 <option name="-buttonname" value="Types"/>
179 <option name="-partition_type_within_level" value="approximate_size"/>
180 <option name="-numeric_partition_type_within_level" value="approximate_size"/>
181 <option name="-bookshelf_type" value="always"/>
182
183 <format>
184 <gsf:template match="documentNode">
185 <td valign="top">
186 <gsf:link type="document">
187 <gsf:icon type="document"/>
188 </gsf:link>
189 </td>
190 <td valign="top">
191 <gsf:link type="source">
192 <gsf:choose-metadata>
193 <gsf:metadata name="thumbicon"/>
194 <gsf:metadata name="srcicon"/>
195 </gsf:choose-metadata>
196 </gsf:link>
197 </td>
198 <td valign="top">
199 <gsf:link type="document">
200 <!-- Defined in the global format statement -->
201 <xsl:call-template name="choose-title"/>
202 </gsf:link>
203 </td>
204 </gsf:template>
205 </format>
206 </classifier>
207 <format>
208 <gsf:template match="documentNode">
209 <td valign="top">
210 <gsf:link type="document">
211 <gsf:icon type="document"/>
212 </gsf:link>
213 </td>
214 <td valign="top">
215 <gsf:link type="source">
216 <gsf:choose-metadata>
217 <gsf:metadata name="thumbicon"/>
218 <gsf:metadata name="srcicon"/>
219 </gsf:choose-metadata>
220 </gsf:link>
221 </td>
222 <td valign="top">
223 <gsf:link type="document">
224 <!-- Defined in the global format statement -->
225 <xsl:call-template name="choose-title"/>
226 <gsf:switch>
227 <gsf:metadata name="Type"/>
228 <gsf:when test="exists"> <i>(<gsf:metadata name="Type"/>)</i></gsf:when>
229 </gsf:switch>
230 </gsf:link>
231 </td>
232 </gsf:template>
233 <gsf:template match="classifierNode[@classifierStyle = 'VList']">
234 <td valign="top">
235 <gsf:link type="classifier" style="static">
236 <gsf:icon type="classifier"/>
237 </gsf:link>
238 </td>
239 <td valign="top">
240 <gsf:link type="classifier">
241 <gsf:metadata name="Title"/>
242 </gsf:link>
243 </td>
244 </gsf:template>
245 <gsf:template match="classifierNode[@classifierStyle = 'HList']">
246 <gsf:link type="classifier" style="static">
247 <gsf:metadata name="Title"/>
248 </gsf:link>
249 </gsf:template>
250 </format>
251 </browse>
252 <display>
253 <format>
254 <gsf:option name="TOC" value="true"/>
255 <gsf:option name="allowUserComments" value="false"/>
256 <gsf:option name="allowDocumentEditing" value="true"/>
257 <gsf:option name="allowMapGPSEditing" value="true"/>
258 <!--
259 Overwriting this template allows you to change the heading of the document.
260 -->
261 <!--
262 <gsf:template name="documentHeading">
263 <span style="font-weight:bold; font-size: 120%;">
264 <xsl:call-template name="choose-title"/>
265 </span>
266 </gsf:template>
267 -->
268
269 <!--
270 Overwriting this template can be used to redefine the content of the whole document.
271 This is useful for simple documents, but not recommended for more complex documents
272 (e.g. hierachical and paged documents) as it can prevent any sub-sections from showing.
273 -->
274
275 <gsf:template name="documentContent">
276 <div id="gs-document">
277 <xsl:call-template name="documentPre"/>
278
279 <gsf:switch>
280 <gsf:when name="Type" test="equals">
281 <gsf:div>Type: <gsf:metadata name="Type"/></gsf:div>
282 <gsf:div>Lang: <xsl:value-of select="$lang"/></gsf:div>
283
284 <xsl:choose>
285 <xsl:when test="$lang = 'mi'">
286 <gsf:div> <gsf:metadata name="mi_NZ_TEASER_caption"/></gsf:div>
287 <gsf:div> <gsf:metadata name="mi_NZ_TEASER_content"/></gsf:div>
288 <hr />
289 <gsf:div> <gsf:metadata name="mi_NZ_DESCRIPTION_caption" separator="; "/></gsf:div>
290 <gsf:div> <gsf:metadata name="mi_NZ_DESCRIPTION_content" separator="; "/></gsf:div>
291 </xsl:when>
292 <xsl:otherwise>
293 <gsf:div> <gsf:metadata name="en_TEASER_caption"/></gsf:div>
294 <gsf:div> <gsf:metadata name="en_TEASER_content"/></gsf:div>
295 <hr />
296 <gsf:div> <gsf:metadata name="en_DESCRIPTION_caption" separator="; "/></gsf:div>
297 <gsf:div> <gsf:metadata name="en_DESCRIPTION_content" separator="; "/></gsf:div>
298 </xsl:otherwise>
299 </xsl:choose>
300
301 </gsf:when>
302 </gsf:switch>
303
304 <!--
305 <xsl:call-template name="wrappedSectionImage"/>
306 -->
307 <div id="gs-document-text" style="font-size: 65%; line-height: 140%">
308 <xsl:call-template name="documentNodeText"/>
309 </div>
310 </div>
311 <xsl:call-template name="documentPost"/>
312
313 </gsf:template>
314
315
316 <!--
317 Overwriting this template can be used to change the content of section headings.
318 -->
319 <!--
320 <gsf:template name="sectionHeading">
321 <xsl:call-template name="choose-title"/>
322 </gsf:template>
323 -->
324
325 <!--
326 Overwriting this template can be used to change the content of the top-level section.
327 -->
328 <!--
329 <gsf:template name="topLevelSectionContent">
330 <xsl:call-template name="wrappedSectionImage"/>
331 <xsl:call-template name="wrappedSectionText"/>
332 </gsf:template>
333 -->
334
335 <!--
336 Overwriting this template can be used to change the content of sections.
337 -->
338 <!--
339 <gsf:template name="sectionContent">
340 <xsl:call-template name="wrappedSectionImage"/>
341 <xsl:call-template name="wrappedSectionText"/>
342 </gsf:template>
343 -->
344 </format>
345 </display>
346 <replaceListRef id="gs2-standard"/>
347 <replaceListRef id="gs2-image" />
348 <serviceRackList>
349 <!-- comment out the following serviceRack if you want to disable RSS for this collection -->
350 <serviceRack name="RSSRetrieve"/>
351 <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
352 <serviceRack name="OAIPMH">
353 <setName>tipple-waiata</setName>
354 <setDescription></setDescription>
355 <!-- uncomment the following and set the name attribute if
356 you want this collection to be part of a super set. -->
357 <!--<oaiSuperSet name="xxx"/>-->
358 <ListMetadataFormats>
359 <!--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:
360 <metadataFormat metadataPrefix="prefix"/> -->
361
362 <metadataFormat metadataPrefix="oai_dc">
363 <!-- you can customize the mappings by adding elements in here. See resources/oai/OAIConfig.xml for the format-->
364 </metadataFormat>
365 </ListMetadataFormats>
366 </serviceRack>
367 </serviceRackList>
368</CollectionConfig>
Note: See TracBrowser for help on using the repository browser.