source: main/trunk/greenstone2/collect/modelcol/etc/collectionConfig.xml@ 34319

Last change on this file since 34319 was 34319, checked in by ak19, 4 years ago

Removed a recently introduced custom format statement for the titles classifier (CL1 VList) with Kathy's permission and instruction. She said that what made it different from the general browse format statement would only make the custom format statement necessary if the title's classifier option was set to allvalues rather than firstvalue as it is at present, and said leaving the breadcrumb in the form of a comment (dictation from her) would allow reconstituting the special, different behaviour if the option ever needed to be set to allvalues. With the custom format statement gone again, the tutorials are no longer almost uniformly affected and in need of updating to accomodate the second existing browse format statement.

  • Property svn:keywords set to Author Date Id Revision
File size: 12.1 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">**creator**</metadata>
5 <metadata name="maintainer">**maintainer**</metadata>
6 <metadata name="public">**public**</metadata>
7 </metadataList>
8 <displayItemList>
9 <displayItem assigned="true" lang="en" name="name">**title**</displayItem>
10 <displayItem assigned="true" lang="en" name="description">**about**</displayItem>
11 <!-- shortDescription is used as a tooltip for collection icon on home page-->
12 <displayItem assigned="true" lang="en" name="shortDescription">**title**</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="Source">
49 <displayItem lang="en" name="name">filenames</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="TextPlugin"/>
84 <plugin name="HTMLPlugin"/>
85 <plugin name="EmailPlugin"/>
86 <plugin name="PDFv2Plugin"/>
87 <!-- Configuring an UnknownConverterPlugin for docx processing with Tika -->
88 <plugin name="UnknownConverterPlugin">
89 <option name="-exec_cmd" value="java -jar $GSDLHOME/ext/tika/tika-app-*.jar --html --pretty-print --encoding=UTF-8 %%INPUT_FILE &gt; %%OUTPUT"/>
90 <option name="-convert_to" value="html"/>
91 <option name="-mime_type" value="application/vnd.openxmlformats-officedocument.wordprocessingml.document"/>
92 <option name="-srcicon" value="icondocx"/>
93 <option name="-process_extension" value="docx"/>
94 </plugin>
95 <!-- If you have Tesseract installed (for linux 64 bit machines, there's a tesseract tarball available
96 for download from http://trac.greenstone.org/browser/gs2-extensions/tesseract/trunk/tesseract-linux-x64.tar.gz
97 Untested: for windows, you can try installing Tesseract from Win binaries at https://github.com/UB-Mannheim/tesseract/wiki
98 For Windows and Mac, be sure to add tesseract's bin folder to your PATH and also set the TESSDATA_PREFIX environment variable to
99 the folder "tessdata" wherein you also need to have the "<3-letter-langcode>.traineddata" files for the languages you want
100 to OCR.) The Linux 64 bit tesseract extension tarball already does all this for you.
101 Once you have Tesseract installed, you can activate the following UnknownConverterPlugin to use Tika with Tesseract to OCR PDFs
102 that contain images by removing the XML comment symbols.
103 -->
104 <!--
105 <plugin name="UnknownConverterPlugin">
106 <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"/>
107 <option name="-convert_to" value="html"/>
108 <option name="-mime_type" value="application/pdf"/>
109 <option name="-srcicon" value="iconpdf"/>
110 <option name="-process_extension" value="pdf"/>
111 </plugin>
112 -->
113 <plugin name="RTFPlugin"/>
114 <plugin name="WordPlugin"/>
115 <plugin name="PostScriptPlugin"/>
116 <plugin name="PowerPointPlugin"/>
117 <plugin name="ExcelPlugin"/>
118 <plugin name="ImagePlugin"/>
119 <plugin name="ISISPlugin"/>
120 <plugin name="NulPlugin"/>
121 <plugin name="OAIPlugin"/>
122 <plugin name="MetadataXMLPlugin"/>
123 <plugin name="ArchivesInfPlugin"/>
124 <plugin name="DirectoryPlugin"/>
125 </pluginList>
126 </import>
127 <browse>
128 <classifier name="List">
129 <option name="-metadata" value="dc.Title,Title"/>
130 <option name="-partition_type_within_level" value="approximate_size"/>
131 <option name="-numeric_partition_type_within_level" value="approximate_size"/>
132 <!-- only use one dc.Title/Title value. change to allvalues to use all of them.-->
133 <option name="-metadata_selection_mode_within_level" value="firstvalue"/>
134 <!--
135 If you are classifying by multiple title values for each document, then
136 (1) edit above line to: <option name="-metadata_selection_mode_within_level" value="allvalues"/>
137 (2) create a custom <format> statement immediately below this <option> element,
138 and copy the existing browse <format>'s <gsf:template match="documentNode"> into it
139 (3) then change its choose-title line (<xsl:call-template name="choose-title"/>)
140 to the following (note pos=classifiedBy) preceded by the XML comment:
141 Instead of using choose-title here, we want to display the title that the document was classified on
142 <gsf:metadata name="dc.Title,Title" pos="classifiedBy"/>
143 -->
144 <!--<format>
145 <gsf:template match="documentNode">
146 <td valign="top">
147 <gsf:link type="document">
148 <gsf:icon type="document"/>
149 </gsf:link>
150 </td>
151 <td valign="top">
152 <gsf:link type="source">
153 <gsf:choose-metadata>
154 <gsf:metadata name="thumbicon"/>
155 <gsf:metadata name="srcicon"/>
156 </gsf:choose-metadata>
157 </gsf:link>
158 </td>
159 <td valign="top">
160 <gsf:link type="document">
161 Instead of using choose-title here, we want to display the title that the document was classified on
162 <gsf:metadata name="dc.Title,Title" pos="classifiedBy"/>
163 <gsf:switch>
164 <gsf:metadata name="Source"/>
165 <gsf:when test="exists"><br/><i>(<gsf:metadata name="Source"/>)</i></gsf:when>
166 </gsf:switch>
167 </gsf:link>
168 </td>
169 </gsf:template>
170 </format>
171 -->
172 </classifier>
173 <classifier name="List">
174 <option name="-metadata" value="Source"/>
175 <option name="-partition_type_within_level" value="approximate_size"/>
176 <option name="-numeric_partition_type_within_level" value="approximate_size"/>
177 </classifier>
178 <format>
179 <gsf:template match="documentNode">
180 <td valign="top">
181 <gsf:link type="document">
182 <gsf:icon type="document"/>
183 </gsf:link>
184 </td>
185 <td valign="top">
186 <gsf:link type="source">
187 <gsf:choose-metadata>
188 <gsf:metadata name="thumbicon"/>
189 <gsf:metadata name="srcicon"/>
190 </gsf:choose-metadata>
191 </gsf:link>
192 </td>
193 <td valign="top">
194 <gsf:link type="document">
195 <!-- Defined in the global format statement -->
196 <xsl:call-template name="choose-title"/>
197 <gsf:switch>
198 <gsf:metadata name="Source"/>
199 <gsf:when test="exists"><br/><i>(<gsf:metadata name="Source"/>)</i></gsf:when>
200 </gsf:switch>
201 </gsf:link>
202 </td>
203 </gsf:template>
204 <gsf:template match="classifierNode[@classifierStyle = 'VList']">
205 <td valign="top">
206 <gsf:link type="classifier" style="static">
207 <gsf:icon type="classifier"/>
208 </gsf:link>
209 </td>
210 <td valign="top">
211 <gsf:link type="classifier">
212 <gsf:metadata name="Title"/>
213 </gsf:link>
214 </td>
215 </gsf:template>
216 <gsf:template match="classifierNode[@classifierStyle = 'HList']">
217 <gsf:link type="classifier" style="static">
218 <gsf:metadata name="Title"/>
219 </gsf:link>
220 </gsf:template>
221 </format>
222 </browse>
223 <display>
224 <format>
225 <gsf:option name="TOC" value="true"/>
226 <gsf:option name="allowUserComments" value="false"/>
227 <gsf:option name="allowDocumentEditing" value="true"/>
228 <gsf:option name="allowMapGPSEditing" value="true"/>
229 <!--
230 Overwriting this template allows you to change the heading of the document.
231 -->
232 <!--
233 <gsf:template name="documentHeading">
234 <span style="font-weight:bold; font-size: 120%;">
235 <xsl:call-template name="choose-title"/>
236 </span>
237 </gsf:template>
238 -->
239
240 <!--
241 Overwriting this template can be used to redefine the content of the whole document.
242 This is useful for simple documents, but not recommended for more complex documents
243 (e.g. hierachical and paged documents) as it can prevent any sub-sections from showing.
244 -->
245 <!--
246 <gsf:template name="documentContent">
247 <div id="gs-document">
248 <xsl:call-template name="documentPre"/>
249 <xsl:call-template name="wrappedSectionImage"/>
250 <div id="gs-document-text">
251 <xsl:call-template name="documentNodeText"/>
252 </div>
253 </div>
254 </gsf:template>
255 -->
256
257 <!--
258 Overwriting this template can be used to change the content of section headings.
259 -->
260 <!--
261 <gsf:template name="sectionHeading">
262 <xsl:call-template name="choose-title"/>
263 </gsf:template>
264 -->
265
266 <!--
267 Overwriting this template can be used to change the content of the top-level section.
268 -->
269 <!--
270 <gsf:template name="topLevelSectionContent">
271 <xsl:call-template name="wrappedSectionImage"/>
272 <xsl:call-template name="wrappedSectionText"/>
273 </gsf:template>
274 -->
275
276 <!--
277 Overwriting this template can be used to change the content of sections.
278 -->
279 <!--
280 <gsf:template name="sectionContent">
281 <xsl:call-template name="wrappedSectionImage"/>
282 <xsl:call-template name="wrappedSectionText"/>
283 </gsf:template>
284 -->
285 </format>
286 </display>
287 <replaceListRef id="gs2-standard"/>
288 <replaceListRef id="gs2-image" />
289 <serviceRackList>
290 <!-- comment out the following serviceRack if you want to disable RSS for this collection -->
291 <serviceRack name="RSSRetrieve"/>
292 <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
293 <serviceRack name="OAIPMH">
294 <setName>**title**</setName>
295 <setDescription>**about**</setDescription>
296 <!-- uncomment the following and set the name attribute if
297 you want this collection to be part of a super set. -->
298 <!--<oaiSuperSet name="xxx"/>-->
299 <ListMetadataFormats>
300 <!--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:
301 <metadataFormat metadataPrefix="prefix"/> -->
302
303 <metadataFormat metadataPrefix="oai_dc">
304 <!-- you can customize the mappings by adding elements in here. See resources/oai/OAIConfig.xml for the format-->
305 </metadataFormat>
306 </ListMetadataFormats>
307 </serviceRack>
308 </serviceRackList>
309</CollectionConfig>
Note: See TracBrowser for help on using the repository browser.