source: documentation/trunk/tutorial_sample_files/images/image3/etc/collectionConfig.bak@ 27793

Last change on this file since 27793 was 27793, checked in by jlwhisler, 11 years ago

Including the Simple Image example collection (for both GS2 & GS3) for the image tutorial

File size: 13.8 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">
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">&lt;p&gt;This is a basic image collection that contains no text and no
10explicit metadata. Several JPEG files are placed in the import directory prior to importing
11and building the collection, that&apos;s all.&lt;/p&gt;
12&lt;p&gt;The images in this collection have been produced by members of the Department of Computer Science, University of Waikato.
13The University of Waikato holds copyright. They may be distributed freely, without any restrictions.&lt;/p&gt;
14
15&lt;h3&gt;How the collection works&lt;/h3&gt;
16
17&lt;p&gt;&lt;a href=&quot;library/collection/imagee3/document/HASHe65e0fdf1b460cd4f85899&quot;&gt;Here&lt;/a&gt; is a sample document in the collection.
18The &lt;a href=&quot;_httpcollection_/etc/collectionConfig.xml&quot; target=collectionConfig.xml&gt;
19configuration file&lt;/a&gt; specifies no indexes, so the search box is suppressed.&lt;/p&gt;
20
21&lt;p&gt;
22There is only one plugin, &lt;i&gt;ImagePlugin&lt;/i&gt;, aside from the four that are
23always present—&lt;i&gt;GreenstoneXMLPlugin&lt;/i&gt;, &lt;i&gt;MetadataXMLPlugin&lt;/i&gt;, &lt;i&gt;ArchivesInfPlugin&lt;/i&gt;, &lt;i&gt;DirectoryPlugin&lt;/i&gt;
24 (the latter three are only visible in the GLI if &apos;Expert&apos; mode is selected).
25&lt;i&gt;ImagePlugin&lt;/i&gt; relies on the existence of two programs from the ImageMagick suite
26(&lt;a href=&quot;http://www.imagemagick.org&quot;&gt;http://www.imagemagick.org&lt;/a&gt;): &lt;i&gt;convert&lt;/i&gt; and
27&lt;i&gt;identify&lt;/i&gt;. Greenstone will not be able to build the collection correctly unless
28ImageMagick is installed on your computer.&lt;/p&gt;
29
30&lt;p&gt; &lt;i&gt;ImagePlugin&lt;/i&gt; automatically creates a thumbnail and generates the following
31metadata for each image in the collection:&lt;/p&gt;
32
33&lt;table border=0 cellspacing=0&gt;
34&lt;tr&gt;&lt;td width=125 valign=top&gt;&lt;i&gt;Image&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Name of file containing the image &lt;tr&gt;
35&lt;tr&gt;&lt;td valign=top&gt;&lt;i&gt;ImageWidth&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Width of image (in pixels) &lt;tr&gt;
36&lt;tr&gt;&lt;td valign=top&gt;&lt;i&gt;ImageHeight&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Height of image (in pixels) &lt;tr&gt;
37&lt;tr&gt;&lt;td valign=top&gt;&lt;i&gt;Thumb&lt;/i&gt;&lt;/td&gt;&lt;td&gt; Name of gif file containing thumbnail of image &lt;tr&gt;
38&lt;tr&gt;&lt;td valign=top&gt;&lt;i&gt;ThumbWidth&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Width of thumbnail image (in pixels) &lt;tr&gt;
39&lt;tr&gt;&lt;td valign=top&gt;&lt;i&gt;ThumbHeight&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Height of thumbnail image (in pixels) &lt;tr&gt;
40&lt;tr&gt;&lt;td valign=top&gt;&lt;i&gt;thumbicon&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Full pathname specification of thumbnail image &lt;tr&gt;
41&lt;tr&gt;&lt;td valign=top&gt;&lt;i&gt;assocfilepath&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Pathname of image directory in the collection&apos;s &lt;i&gt;assoc&lt;/i&gt; directory &lt;tr&gt;
42&lt;/table&gt;&lt;br/&gt;
43
44&lt;p&gt;
45The image is stored as an &quot;associated file&quot; in the &lt;i&gt;assoc&lt;/i&gt; subdirectory
46of the collection&apos;s &lt;i&gt;index&lt;/i&gt; directory. (&lt;i&gt;Index&lt;/i&gt; is where all files
47necessary to serve the collection are placed, to make it self-contained.) The
48pathname &amp;#095;&lt;i&gt;httpassocdir&lt;/i&gt;&amp;#095;, which is the same as
49&amp;#095;&lt;i&gt;httpcollection&lt;/i&gt;&amp;#095;&lt;i&gt;/index/assoc&lt;/i&gt;, refers to this directory. For any
50document, its thumbnail and image are both in a subdirectory whose filename is
51given by &lt;i&gt;assocfilepath&lt;/i&gt;. The metadata element &lt;i&gt;thumbicon&lt;/i&gt; is set to
52the full pathname specification of the thumbnail image, and can be used in the
53same way as &lt;i&gt;srcicon&lt;/i&gt; (see the MSWord and PDF demonstration collection).&lt;/p&gt;
54
55&lt;p&gt;
56The &lt;i&gt;&amp;lt;display&amp;gt;&lt;/i&gt; section in the
57&lt;a href=&quot;_httpcollection_/etc/collectionConfig.xml&quot; target=collectionConfig.xml&gt;configuration file&lt;/a&gt;,
58dictates how the document will appear, and
59&lt;a href=&quot;library/collection/imagee3/document/HASH015484508b3a74f07194ade4&quot;&gt;this&lt;/a&gt; is the
60result. There is no document text (if there were, it would be producible by
61&lt;i&gt;&amp;lt;xsl:call-template name=&quot;wrappedSectionText&quot;/&amp;gt;&lt;/i&gt;). What is shown is the image itself (produced by
62the &lt;i&gt;&amp;lt;xsl:call-template name=&quot;wrappedSectionImage&quot;/&amp;gt;&lt;/i&gt;), along with some metadata extracted
63from it.&lt;/p&gt;
64
65&lt;p&gt;
66The configuration file
67specifies one classifier in the &lt;i&gt;&amp;lt;browse&amp;gt;&lt;/i&gt; section, a &lt;i&gt;List&lt;/i&gt; based on &lt;i&gt;Image&lt;/i&gt; metadata, shown
68&lt;a href=&quot;library/collection/imagee3/browse/CL1&quot;&gt;here&lt;/a&gt;. The format statement shows the thumbnail image along with
69some metadata. (Any other classifiers would have the same format, since this
70statement does not name the classifier.) &lt;/p&gt;
71
72&lt;p&gt;
73You may wonder why the thumbnail image is generated and stored explicitly, when
74the same effect would be obtained by using the original image and scaling it. The reason is to save communication bandwidth by not sending large images when
75small ones would do.&lt;/p&gt;
76
77&lt;p&gt;For a more comprehensive image collection, see the
78&lt;a href=&quot;http://www.nzdl.org/cgi-bin/library?a=p&amp;p=about&amp;c=aircraft&quot;&gt;kiwi aircraft images&lt;/a&gt;
79in the New Zealand Digital Library. The structure of this collection is
80quite different, however: it is a collection of web pages that include many
81images along with the text. The HTML plugin &lt;i&gt;HTMLPlugin&lt;/i&gt; also processes image
82files, but it does so in a different way from ImagePlugin (for example, it
83does not produce the metadata described above).&lt;/p&gt;</displayItem>
84 <displayItem assigned="true" lang="en" name="name">Simple image collection</displayItem>
85 <displayItem assigned="true" lang="en" name="document:text">text</displayItem>
86 <displayItem assigned="true" lang="en" name="document:ex.Title">Title</displayItem>
87 <displayItem assigned="true" lang="en" name="document:ex.Source">Source</displayItem>
88 <displayItem assigned="true" lang="en" name="text">text</displayItem>
89 <displayItem assigned="true" lang="en" name="dc.Title,ex.dc.Title,Title">titles</displayItem>
90 <displayItem assigned="true" lang="en" name="Source">filenames</displayItem>
91 <displayItem assigned="true" lang="en" name="document">document</displayItem>
92 <displayItem assigned="true" lang="en" name="section">section</displayItem>
93 <displayItem assigned="true" lang="en" name="shortDescription">imagee3</displayItem>
94 </displayItemList>
95 <format> <gsf:template name="choose-title">
96 <gsf:choose-metadata>
97 <gsf:metadata name="dc.Title"/>
98 <gsf:metadata name="exp.Title"/>
99 <gsf:metadata name="ex.dc.Title"/>
100 <gsf:metadata name="Title"/>
101 <gsf:default>Untitled</gsf:default>
102 </gsf:choose-metadata>
103 </gsf:template>
104
105</format>
106 <search type="mgpp">
107 <searchType name="plain"/>
108 <searchType name="simpleform"/>
109 <searchType name="advancedform"/>
110 <format> <gsf:template match="documentNode">
111 <td valign="top">
112 <gsf:link type="document">
113 <gsf:icon type="document"/>
114 </gsf:link>
115 </td>
116 <td>
117 <gsf:link type="document">
118 <xsl:call-template name="choose-title"/>
119 </gsf:link>
120 </td>
121 </gsf:template>
122
123</format>
124 </search>
125 <infodb type="gdbm"/>
126 <import>
127 <pluginList>
128 <plugin name="ImagePlugin"/>
129 <plugin name="GreenstoneXMLPlugin"/>
130 <plugin name="MetadataXMLPlugin"/>
131 <plugin name="ArchivesInfPlugin"/>
132 <plugin name="DirectoryPlugin"/>
133 </pluginList>
134 </import>
135 <browse>
136 <classifier name="List">
137 <option name="-metadata" value="Image"/>
138 <option name="-partition_type_within_level" value="approximate_size"/>
139 <option name="-buttonname" value="Browse"/>
140 </classifier>
141 <format> <gsf:template match="documentNode">
142 <td valign="center">
143 <gsf:link type="document">
144 <gsf:choose-metadata>
145 <gsf:metadata name="thumbicon"/>
146 <gsf:metadata name="srcicon"/>
147 </gsf:choose-metadata>
148 </gsf:link>
149 </td>
150 <td style="padding-left:10px;" valign="center">
151 <table>
152 <tr>
153 <td style="padding-right:10px;" valign="top">
154 <b>Image Name:</b>
155 </td>
156 <td>
157 <gsf:metadata name="Image"/>
158 </td>
159 </tr>
160 <tr>
161 <td>
162 <b>Width:</b>
163 </td>
164 <td>
165 <gsf:metadata name="ImageWidth"/>
166 </td>
167 </tr>
168 <tr>
169 <td>
170 <b>Height:</b>
171 </td>
172 <td>
173 <gsf:metadata name="ImageHeight"/>
174 </td>
175 </tr>
176 <tr>
177 <td>
178 <b>Size:</b>
179 </td>
180 <td>
181 <gsf:metadata name="ImageSize"/>
182 </td>
183 </tr>
184 </table>
185 </td>
186 </gsf:template>
187 <gsf:template match="classifierNode[@classifierStyle = 'VList']">
188 <td valign="top">
189 <gsf:link type="classifier">
190 <gsf:icon type="classifier"/>
191 </gsf:link>
192 </td>
193 <td valign="top">
194 <gsf:metadata name="Title"/>
195 </td>
196 </gsf:template>
197 <gsf:template match="classifierNode[@classifierStyle = 'HList']">
198 <gsf:link type="classifier">
199 <gsf:metadata name="Title"/>
200 </gsf:link>
201 </gsf:template>
202
203</format>
204 </browse>
205 <display>
206 <format> <gsf:option name="TOC" value="true"/>
207<!--
208Overwriting this template allows you to change the heading of the document.
209-->
210 <gsf:template name="documentHeading"/>
211<!--
212Overwriting 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.
213-->
214 <gsf:template name="documentContent">
215 <xsl:call-template name="wrappedSectionImage"/>
216 <xsl:call-template name="wrappedSectionText"/>
217 <table>
218 <tr>
219 <td style="padding-right:10px;" valign="top">
220 <b>Image Name:</b>
221 </td>
222 <td>
223 <gsf:metadata name="Image"/>
224 </td>
225 </tr>
226 <tr>
227 <td>
228 <b>Width:</b>
229 </td>
230 <td>
231 <gsf:metadata name="ImageWidth"/>
232 </td>
233 </tr>
234 <tr>
235 <td>
236 <b>Height:</b>
237 </td>
238 <td>
239 <gsf:metadata name="ImageHeight"/>
240 </td>
241 </tr>
242 <tr>
243 <td>
244 <b>Size:</b>
245 </td>
246 <td>
247 <gsf:metadata name="ImageSize"/>
248 </td>
249 </tr>
250 </table>
251 </gsf:template>
252<!--
253Overwriting this template can be used to change the content of section headings.
254-->
255<!--
256<gsf:template name="sectionHeading">
257<xsl:call-template name="choose-title"/>
258</gsf:template>
259-->
260<!--
261Overwriting this template can be used to change the content of the top-level section.
262-->
263<!--
264<gsf:template name="topLevelSectionContent">
265<xsl:call-template name="wrappedSectionImage"/>
266<xsl:call-template name="wrappedSectionText"/>
267</gsf:template>
268-->
269<!--
270Overwriting this template can be used to change the content of sections.
271-->
272<!--
273<gsf:template name="sectionContent">
274<xsl:call-template name="wrappedSectionImage"/>
275<xsl:call-template name="wrappedSectionText"/>
276</gsf:template>
277-->
278
279</format>
280 </display>
281 <replaceListRef id="gs2-standard"/>
282 <replaceListRef id="gs2-image"/>
283 <serviceRackList><!-- comment out the following serviceRack if you want to disable OAI for this collection -->
284 <serviceRack name="OAIPMH">
285 <ListMetadataFormats><!--What metadata sets to support is collection specific. To support other metadata schema, simply add a metadataFormat element here.
286 The support of unqualified Dublin Core metadata set is mandatory in the oai specification.
287 -->
288 <metadataFormat metadataPrefix="oai_dc">
289 <metadataPrefix>oai_dc</metadataPrefix>
290 <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
291 <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace><!--<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>-->
292 <mappingList><!--
293 The mapping is in the form: <publicly supported metadata name>,<mapped metadata name>, short as <A>,<B>
294 The first metadata name is medatory; if there is no mapped name followed, then the first name must be used by the records and
295 searchable in the database, otherwise it is the mapped name stored in the database. The number of mapping elements matches the
296 number of external metadata of the records. If only one name is present, the returned metadata will use this name plus the retrieved value;
297 if both <A>,<B> are present, the returned metadata will use <A>'s name plus <B>'s value retrieved from database.
298
299 **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.
300
301 **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.
302 -->
303 <mapping>dc:title,Title</mapping><!-- 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. -->
304 </mappingList>
305 </metadataFormat>
306 </ListMetadataFormats>
307 </serviceRack>
308 </serviceRackList>
309</CollectionConfig>
Note: See TracBrowser for help on using the repository browser.