creator greenstone@cs.waikato.ac.nz public true buildtype mgpp plugin ImagePlugin -OIDtype incremental plugin GreenstoneXMLPlugin plugin MetadataXMLPlugin plugin ArchivesInfPlugin plugin DirectoryPlugin classify List -metadata Image -buttonname Browse format VList "[link][thumbicon][/link] _ImageName_: [Image]
_Width_: [ImageWidth]
_Height_: [ImageHeight]
_Size_: [ImageSize]" format DocumentText "

_ImageName_: [Image]
_Width_: [ImageWidth]
_Height_: [ImageHeight]
_Size_: [ImageSize]
" format DocumentHeading "" format DocumentButtons "" format HList "[link][highlight][ex.Title][/highlight][/link]" # strings that don't need translating collectionmeta sampleoid [l=en] "D2" # -- English strings ---------------- collectionmeta collectionname [l=en] "Simple image collection" collectionmeta ImageName [l=en] "Image Name" collectionmeta Width [l=en] "Width" collectionmeta Height [l=en] "Height" collectionmeta Size [l=en] "Size" # -- French strings ---------------- collectionmeta collectionname [l=fr] "Collection d\'images simple" collectionmeta ImageName [l=fr] "Nom d\'image" collectionmeta Width [l=fr] "Largeur" collectionmeta Height [l=fr] "Hauteur" collectionmeta Size [l=fr] "Taille" # -- Spanish strings ---------------- collectionmeta collectionname [l=es] "Colección de imágenes sencillas" collectionmeta ImageName [l=es] "Título de la imagen" collectionmeta Width [l=es] "Ancho" collectionmeta Height [l=es] "Altura" collectionmeta Size [l=es] "Tamaño" # -- Russian strings ---------------- collectionmeta collectionname [l=ru] "Простая коллекция изображений" collectionmeta ImageName [l=ru] "Имя изображения" collectionmeta Width [l=ru] "Ширина" collectionmeta Height [l=ru] "Высота" collectionmeta Size [l=ru] "Размер" # -- Simplified Chinese strings ---------------- collectionmeta collectionname [l=zh] "简单图片馆藏" collectionmeta ImageName [l=zh] "图片名" collectionmeta Width [l=zh] "宽度" collectionmeta Height [l=zh] "高度" collectionmeta Size [l=zh] "大小" # -- English text ---------------- collectionmeta collectionextra [l=en] "This is a basic image collection that contains no text and no explicit metadata. Several JPEG files are placed in the import directory prior to importing and building the collection, that\'s all.

The images in this collection have been produced by members of the Department of Computer Science, University of Waikato. The University of Waikato holds copyright. They may be distributed freely, without any restrictions.

How the collection works

\n

Here is a sample document in the collection. The configuration file specifies no indexes, so the search button is suppressed.\n

There is only one plugin, ImagePlugin, aside from the four that are always present (GreenstoneXMLPlugin, MetadataXMLPlugin, ArchivesInfPlugin, DirectoryPlugin). ImagePlugin relies on the existence of two programs from the ImageMagick suite (http://www.imagemagick.org): convert and identify. Greenstone will not be able to build the collection correctly unless ImageMagick is installed on your computer.\n

ImagePlugin automatically creates a thumbnail and generates the following metadata for each image in the collection:\n

\n \n \n \n \n \n \n \n
ImageName of file containing the image
ImageWidthWidth of image (in pixels)
ImageHeightHeight of image (in pixels)
Thumb Name of gif file containing thumbnail of image
ThumbWidthWidth of thumbnail image (in pixels)
ThumbHeightHeight of thumbnail image (in pixels)
thumbiconFull pathname specification of thumbnail image
assocfilepathPathname of image directory in the collection\'s assoc directory
\n

The image is stored as an \"associated file\" in the assoc subdirectory of the collection\'s index directory. (Index is where all files necessary to serve the collection are placed, to make it self-contained.) The pathname _httpassocdir_, which is the same as _httpcollection_/index/assoc, refers to this directory. For any document, its thumbnail and image are both in a subdirectory whose filename is given by assocfilepath. The metadata element thumbicon is set to the full pathname specification of the thumbnail image, and can be used in the same way as srcicon (see the MSWord and PDF demonstration collection).\n

The second format statement in the configuration file, DocumentText, dictates how the document will appear, and this is the result. There is no document text (if there were, it would be producible by [Text]). What is shown is the image itself, along with some metadata extracted from it.\n

The configuration file specifies one classifier, a List based on Image metadata, shown here. The format statement shows the thumbnail image along with some metadata. (Any other classifiers would have the same format, since this statement does not name the classifier.) \n

You may wonder why the thumbnail image is generated and stored explicitly, when the same effect would be obtained by using the original image and scaling it:\n

<td>[link]<img src=\'_httpassocdir_/[assocfilepath]\n
/[Image]\' width=[ThumbWidth] height=[ThumbHeight]>\n
[/link]<\/td><td valign=middle><i>[Title]<\/i><\/td>
\n

The reason is to save communication bandwidth by not sending large images when small ones would do.\n

For a more comprehensive image collection, see the kiwi aircraft images in the New Zealand Digital Library. The structure of this collection is quite different, however: it is a collection of web pages that include many images along with the text. The HTML plugin HTMLPlugin also processes image files, but it does so in a different way from ImagePlugin (for example, it does not produce the metadata described above).\n " # -- French text ---------------- collectionmeta collectionextra [l=fr] " C\'est une collection d\'images de base qui ne contient ni texte ni méta-donnée explicite. Plusieurs fichiers JPEG sont placés dans dans le répertoire \"import\" avant toute importation et toute création de la collection. C\'est tout.

Les images de cette collection ont été produites par des membres du Department of Computer Science, de l'Université de Waikato. L'Université de Waikato en détient le copyright. Elles peuvent être distribuées librement, sans aucune restriction.

Comment fonctionne cette collection ?

Voici un document test dans la collection. Le fichier de configuration ne spécifie aucun index, ainsi le bouton de recherche est supprimé.

Il n\'y a qu\'un seul plugin, ImagePlugin, à côté des quatre qui sont toujours présents (GreenstoneXMLPlugin, MetadataXMLPlugin, ArchivesInfPlugin, DirectoryPlugin). ImagePlugin dépend de deux programmes de la suite ImageMagick (http://www.imagemagick.org): convert et identify. Greenstone ne sera pas en mesure de créer la collection sans l\'installation de ImageMagick sur votre ordinateur.

ImagePlugin crée automatiquement une vignette d\'image et génère les méta-données suivantes pour chaque image dans la collection :

ImageNom de fichier contenant l\'image
ImageWidthLargeur de l\'image(en pixels)
ImageHeightHauteur de l\'image(en pixels)
ThumbNom de fichier gif contenant la vignette de l\'image
ThumbWidthLargeur de la vignette d\'image (en pixels)
ThumbHeightHauteur de la vignette d\'image (en pixels)
ThumbiconSpécification entière du chemin de la vignette d\'image
assocfilepathChemin du répertoire de l\'image dans le dossier assoc de la collection

L\'image est stockée en tant que \"associated file\" (fichier associé) du sous-répertoire assoc du répertoire index de la collection. (Index est le lieu de stockage de tous les fichiers nécessaires à la collection pour en assurer la consistance. Le chemin _httpassocdir_ qui est le même que _httpcollection_/index/assoc fait référence à ce répertoire. Pour tout document, la vignette et l\'image sont tous les deux dans un sous répertoire dont le nom de fichier est donné par assocfilepath. L\'élément de méta-donnée thumbicon est prend la valeur de du chemin complet de la vignette de l\'image et peut être utilisé de la même façon que srcicon (voir la collection de démonstration MSWord et PDF).

La seconde déclaration de format dans le fichier de configuration, DocumentText, impose la manière dont le document est affiché; voici le résultat. Il n\'existe aucun texte de document (si tel était le cas, il serait produit par [Text]). Ce qui est affiché est l\'image elle-même, avec quelques méta-données qui en sont extraites.

Le fichier de configuration spécifie un classificateur, une List basée sur la méta-donnée image, comme indiqué ici. La déclaration de format montre la vignette d\'image avec quelques méta-données (Tous les autres classificateurs auraient le même format, dès lors que la déclaration ne fait mention d\'aucun classificateur).

On peut se demander pourquoi la vignette d\'image est produite et stockée explicitement alors que le même effet serait obtenu en utilisant l\'image originale et en la dessinant à l\'échelle:

<td>[link]<img src=\'_httpassocdir_/[assocfilepath]\n
/[Image]\' width=[ThumbWidth] height=[ThumbHeight]>\n
[/link]<\/td><td valign=middle><i>[Title]<\/i><\/td>
\n

La raison est que pour économiser de la bande passante, il est préférable d\'envoyer des images de petite taille.

Pour une collection d\'images plus complète, consulter Kiwi aircraft images dans la bibliothèque numérique de Nouvelle Zélande. La structure de cette collection est cependant tout à fait différente : c\'est une collection de pages web qui comprennent beaucoup d\'images avec du texte. Le plugin HTML, HTMLPlugin traite aussi des fichiers d\'images mais de manière différente que ImagePlugin (par exemple, il ne produit pas la méta-donnée décrite ci-dessus). " # -- Spanish text ---------------- collectionmeta collectionextra [l=es] " Esta es una colección de imágenes básicas sin texto ni ningún metadato explícito. Varios archivos JPEG se colocan en un directorio específico antes de importar y construir la colección. Eso es todo.

Las imágenes en esta colección han sido producidas por miembros del Departamento de Ciencias de la Computación, de la Universidad de Waikato. La Universidad de Waikato tiene el copyright. Ellas pueden distribuirse libremente, sin ninguna restricción.

Cómo trabaja esta colección

He aquí un documento muestra de la colección. El archivo de configuración no especifica ningún índice, por lo que el botón de búsqueda se suprime.

Sólo hay un plugin, ImagePlugin, además de los cuatro que siempre están presentes (GreenstoneXMLPlugin, MetadataXMLPlugin, ArchivesInfPlugin, DirectoryPlugin). ImagePlugin se basa en la existencia de dos programas de la suite ImageMagick (http://www.imagemagick.org): convertir e identificar. Greenstone no podrá construir correctamente la colección a menos que ImageMagick esté instalada en su computadora.

ImagePlugin crea automáticamente una reducción de cuadro y genera los siguientes metadatos para cada imagen de la colección:

\n \n \n \n \n \n \n \n
Image Nombre del archivo que contiene la imagen.
ImageWidth Ancho de la imagen (en pixeles).
ImageHeight Altura de la imagen (en pixeles).
Thumb Nombre del archivo gif que contiene la reducción de cuadro de la imagen.
ThumbWidth Ancho de la imagen reducida (en pixeles).
ThumbHeight Altura de la imagen reducida (en pixeles).
thumbicon Especificación del nombre de la ruta de acceso completo de la imagen reducida.
assocfilepath Nombre de la ruta de acceso del directorio de imágenes en el directorio asociado de la colección.
\n

La imagen se guarda como \"archivo asociado\" en el subdirectorio asociado del directorio índice de la colección. (Índice es el lugar donde todos los archivos necesarios para la colección se colocan con el fin de hacerlo independiente.) El nombre de la ruta de acceso _httpassocdir_ es el mismo que _httpcollection_/index/assoc y remite a este directorio. Para cualquier documento tanto la reducción de cuadro como la imagen están en un subdirectorio cuyo nombre de archivo es dado por assocfilepath. El elemento de metadato thumbicon se pone en la especificación del nombre de la ruta de acceso completo de la imagen reducida y puede usarse de la misma manera que srcicon (véase la colección de muestra en MSWord y PDF).

El segundo enunciado de formato en el archivo de configuración, DocumentText, dicta la forma en que aparecerá el documento. Éste es el resultado. No hay texto (en caso de que hubiera, se podría producir por medio de [Text]). Lo que se muestra es la pura imagen junto con algunos metadatos extraídos de ella.

El archivo de configuración especifica un clasificador, List, basado en el metadatos Imágenes, tal como se muestra aquí. El enunciado de formato muestra la imagen reducida junto con algunos metadatos. (Cualquier otro clasificador tendría el mismo formato, ya que este enunciado no nombra al clasificador.)

Tal vez se preguntará por qué se genera y guarda la imagen reducida de manera explícita, cuando se podría obtener el mismo efecto usando la imagen original y escalándola:

<td>[link]<img src=\'_httpassocdir_/[assocfilepath]\n
/[Image]\' width=[ThumbWidth] height=[ThumbHeight]>\n
[/link]<\/td><td valign=middle><i>[Title]<\/i><\/td>
\n

La razón es que de esta manera se ahorra ancho de banda en la comunicación al no enviar imágenes de gran tamaño cuando se pueden enviar pequeñas.

Para conocer una colección de imágenes más completa, consulte la kiwi aircraft images de la Biblioteca Digital de Nueva Zelanda. Sin embargo, la estructura de esta colección es muy diferente. Se trata de una colección de páginas Web que incluye muchas imágenes junto con el texto. El plugin HTMLPlugin también procesa archivos de imágenes, pero lo hace de manera diferente a ImagePlugin (por ejemplo, no produce los metadatos descritos arriba).

" # -- Russian text ---------------- collectionmeta collectionextra [l=ru] " Это основная коллекция изображений, которая не содержит никакого текста и никаких явных метаданных. Несколько JPEG-файлов помещены в директорию импорта до импортирования и построения коллекции. И это все.

The images in this collection have been produced by members of the Department of Computer Science, University of Waikato. The University of Waikato holds copyright. They may be distributed freely, without any restrictions.

Как работает коллекция

Здесь представлен типовой документ коллекции. Конфигурационный файл не определяет никаких индексов, так что кнопка поиска подавлена.

Имеется только один плагин ImagePlugin, помимо 4, которые присутствуют всегда (GreenstoneXMLPlugin, MetadataXMLPlugin, ArchivesInfPlugin, DirectoryPlugin). ImagePlugin полагается на существование двух программ из набора ImageMagick (http://www.imagemagick.org) - convert и identify. Greenstone не сможет строить коллекции правильно, если ImageMagick не установлен на вашем компьютере.

ImagePlugin автоматически генерирует следующие метаданные для каждого изображения в коллекции:

Image Имя файла, содержащего изображение
ImageWidth Ширина изображения (в пикселах)
ImageHeight Высота изображения (в пикселах)
Thumb Имя файла формата обмена графическим данными, содержащего уменьшенное изображение
ThumbWidth Ширина уменьшенного изображения (в пикселах)
ThumbHeight Высота уменьшенного изображения (в пикселах)
Thumbicon Полное описание пути к уменьшенному изображению
assocfilepath Имя пути к поддиректории изображений в директории коллекции assoc

Изображение сохранится как «связанный файл» в поддиректории assoc директории коллекции index. Index -- это директория, куда все файлы, необходимые для обслуживания коллекции, помещены, чтобы она была автономной. Директория httpassocdir, которая является той же самой, что и _httpcollection_/index/assoc, обращается к этой директории. Для любого документа уменьшенное и полное изображение находятся в поддиректории, имя которой определяется assocfilepath. Метаданные элемента thumbicon дают полное описание пути к уменьшенному изображению и могут использоваться тем же самым образом, что и srcicon (см. демонстрационные коллекции MS Word и PDF).

Второй оператор формата в конфигурационном файле, DocumentText, определяет, как элемент появляется, и этот пример является результатом. Текст документа отсутствует (если бы он был, то он бы производился [Текстом] [Text]. То, что показано, является непосредственно изображением вместе с некоторыми метаданными, извлеченными из него.

Конфигурационный файл определяет один классификатор -- List, основанный на метаданных Image, который показан здесь. Оператор формата показывает уменьшенное изображение вместе с некоторыми метаданными (любые другие классификаторы имели бы тот же самый формат, так как этот оператор не называет классификатор).

Вы можете спросить, почему уменьшенное изображение генерируется и сохраняется явно, когда тот же самый эффект мог бы быть получен при использовании оригинального изображения и масштабировании его:

<td>[link]<img src=\'_httpassocdir_/[assocfilepath]\n
/[Image]\' width=[ThumbWidth] height=[ThumbHeight]>\n
[/link]<\/td><td valign=middle><i>[Title]<\/i><\/td>
\n Причина состоит в том, чтобы сохранить полосу пропускания связи, не посылая большие изображения, когда маленькие делают то же.

Более исчерпывающую коллекцию изображений смотрите в kiwi aircraft images в Новозеландской Цифровой Библиотеке. Структура этой коллекции весьма отличается, поскольку это и коллекция Web-страниц, которая включает много изображений наряду с текстом. Плагин HTMLPlugin также обрабатывает файлы изображений, но делает это так другим способом, чем ImagePlugin (нпример, он не генерирует метаданные, описанные выше).

" # -- Simplified Chinese text ---------------- collectionmeta collectionextra [l=zh] " 这是一个基本的图片馆藏,不包含任何文本以及附属元数据。在导入构建馆藏之前,在import目录中存在几个JPEG文件,就这些。

本馆藏中的图片由怀卡托大学计算机系的成员拍摄提供。怀卡托大学拥有这些文件的版权。这些文件可自由发布,没有任何限制。

本馆藏如何工作

\n

这里是本馆藏中的一个文档示范。配置文件中没有指定索引,因此没有搜索按钮。\n

本馆藏只有一个插件,ImagePlugin,以及永远配置好的四个标准插件(GreenstoneXMLPluginMetadataXMLPluginArchivesInfPluginDirectoryPlugin)。ImagePlugin依赖于两个源自ImageMagick的外部软件(http://www.imagemagick.org):convertidentify。如果ImageMagick没有被正常安装,Greenstone将不能正常构建馆藏。\n

ImagePlugin自动创建一个缩图并为每个图片创建以下元数据:\n

\n \n \n \n \n \n \n \n
Image包含图片的文件名
ImageWidth图片宽度(以像素为单位)
ImageHeight图片高度(以像素为单位)
Thumb包含图片缩图的gif文件名
ThumbWidth缩图宽度(以像素为单位)
ThumbHeight缩图宽度(以像素为单位)
thumbicon缩图的完整路径
assocfilepath馆藏中assoc目录的中的image目录路径
\n

这个图片将以\"associated file\"(附属文件)的形式存储在index目录的assoc子目录中。(Index目录包含了馆藏所有的所有文件,以便让其包含完整的信息。)路径名_httpassocdir_,等同于_httpcollection_/index/assoc,都指向这个目录。对于任一文档,其缩图与图片都将保存在一个子目录中,该子目录的文件名由assocfilepath指定。元数据元素thumbicon被设为缩图图片的完整路径名,并可按用srcicon的方式使用(参见微软Word与PDF演示馆藏)。\n

配置文件中的第二个格式化参数,DocumentText,指定如何显示文档,如这里所示。这里没有任何文本(如果有的话,文本将由[Text]提供)。这里显示的只是图片本身,以及一些从中抽取出的元数据。\n

配置文件指定了一个分类器,一个基于图片元数据的List,如这里所示。格式化参数显示缩图以及一些元数据。(所有分类器的格式都是相同的,因为这个格式参数并没有指定分类器名。)\n

你可能想问通过缩放原图即可得到效果的情况下,为什么还要特别的生成和存储缩图:\n

 
<td>[link]<img src=\'_httpassocdir_/[assocfilepath]\n 
/[Image]\' width=[ThumbWidth] height=[ThumbHeight]>\n 
[/link]<\/td><td valign=middle><i>[Title]<\/i><\/td> 
\n

原因是为了节省带宽,即在可以发送小图片的情况小,不发送大的图片。\n

更复杂的图片馆藏可参见新西兰数字图书馆中的kiwi aircraft images馆藏。然而,这个馆藏的结构有很大差别:它包含了许多附带文本的图片。HTML插件HTMLPlugin也可处理图片文件,但是其处理方式有别于ImagePlugin(比如它不会生成上述这些元数据)。\n "