====== Browsing classifiers ====== Greenstone allows you to create multiple browsing indexes for users to interact with your collection. **Browsing classifiers** are used to create a collection's browsing indexes. The come in many different types and can be based on any metadata field(s) you select. By default, a collection's navigation bar will include a button for each classifier that you define. Most of the classifier types are list-based and have very similar configuration options. The remaining three—**HTML**, **Collage**, and **Phind**—are more unique. Descriptions of all of the classifiers are provided in the table below. ^Browsing Classifier^Description^ ^//List-based classifiers//^^ |[[en:classifier:AZCompactList]]|Classifier plugin for sorting alphabetically (on a-z, A-Z, 0-9). Produces a horizontal A-Z list, then a vertical list containing documents, or bookshelves for documents with common metadata.| |[[en:classifier:AZCompactSectionList]]|Variation on AZCompactList that classifies sections rather than documents. Entries are sorted by section-level metadata.| |[[en:classifier:AZList]]|Classifier plugin for sorting alphabetically (on a-z, A-Z, 0-9). Produces a horizontal A-Z list, with documents listed underneath.| |[[en:classifier:AZSectionList]]|Variation on AZList that classifies sections rather that documents. Entries are sorted by section-level metadata.| |[[en:classifier:DateList]]|Classifier plugin for sorting by date. By default, sorts by 'Date' metadata. Dates are assumed to be in the form yyyymmdd or yyyy-mm-dd.| |[[en:classifier:Hierarchy]]|Classifier plugin for generating a hierarchical classification. This may be based on structured metadata, or may use a supplementary structure file (use the -hfile option).| |[[en:classifier:List]]|A general and flexible list classifier with most of the abilities of AZCompactList, but with better Unicode, metadata and sorting capabilities.| |[[en:classifier:RecentDocumentsList]]|Classifier that gives a list of newly added or modified documents.| |[[en:classifier:SectionList]]|Same as List classifier but includes all sections of document (excluding top level) rather than just top level document itself.| |[[en:classifier:SimpleList]]|Simple list classifier plugin.| ^//Other classifiers//^^ |[[en:classifier:Collage]]|An applet is used to display a collage of images found in the collection.| |[[en:classifier:html_classifier|HTML]]|Creates an empty classification that's simply a link to a web page.| |[[en:classifier:Phind]]|Produces a hierarchy of phrases found in the text, which is browsable via an applet.| A simpler classifier, called //List//, creates a sorted list of a given metadata element and displays it without any alphabetic subsections. Another general-purpose list classifier is //DateList//, which generates a selection list of date ranges. (The //DateList// classifier is used in the [[http://www.nzdl.org/gsdlmod?a=p&p=about&c=gsarch|Greenstone Archives collection]].) Other classifiers generate browsing structures that are explicitly hierarchical. Hierarchical classifications are useful for subject classifications and subclassifications, and organisational hierarchies. All classifiers generate a hierarchical structure that is used to display a browsing index. The lowest levels (i.e. leaves) of the hierarchy are usually documents, but in some classifiers they are sections. The internal nodes of the hierarchy are either //Vlist//, //Hlist//, or //Datelist//. * A //Vlist// is a list of items displayed vertically down the page, like the “how to” index in the Demo collection (see Figure ). * An //Hlist// is displayed horizontally. For example, the //AZList// display in Figure is a two-level hierarchy of internal nodes consisting of an //Hlist//(giving the A-Z selector) whose children are //Vlists// —and their children, in turn, are documents. * A //Datelist// (Figure ) is a special kind of //Vlist// that allows selection by year and month. All classifiers accept the argument //buttonname//, which defines what is written on the Greenstone navigation button that invokes the classifier (it defaults to the name of the metadata argument). Buttons are provided for each Dublin Core metadata type, and for some other types of metadata. Each classifier receives an implicit name from its position in the configuration file. For example, the third classifier specified in the file is called CL3. This is used to name the collection information database fields that define the classifier hierarchy. ===== List classifiers ===== The various flavours of list classifier are shown below. * //SectionList//—like //List// but the leaves are sections rather than documents. All document sections are included except the top level. This is used to create lists of sections (articles, chapters or whatever) such as in the Computists' Weekly collection (available through // nzdl.org //), where each issue is a single document and comprises several independent news items, each in its own section. * //AZList//—generates a two-level hierarchy comprising an //HList// whose children are //VLists//, whose children are documents. The //HList// is an A-Z selector that divides the documents into alphabetic ranges. Documents are sorted alphabetically by metadata, and the resulting list is split into ranges. * //AZSectionList//—like //AZList// but the leaves are sections rather than documents. * //DateList//—like //AZList// except that the top-level //HList// allows selection by year and its children are //DateLists// rather than //VLists//. The metadata argument defaults to //Date//. ===== The hierarchy classifier ===== All classifiers are hierarchical. However, the list classifiers described above have a fixed number of levels, whereas the “hierarchy” classifiers described in this section have an arbitrary number of levels. Hierarchy classifiers are more complex to specify than list classifiers. The hierarchy is predefined in a file such as this sub.txt: 1 1 "General reference" 1.2 1.2 "Dictionaries, glossaries, language courses, terminology 2 2 "Sustainable Development, International cooperation, Pro 2.1 2.1 "Development policy and theory, international cooperatio 2.2 2.2 "Development, national planning, national plans" 2.3 2.3 "Project planning and evaluation (incl. project managem 2.4 2.4 "Regional development and planning incl. regional profil 2.5 2.5 "Nongovernmental organisations (NGOs) in general, self- 2.6 2.6 "Organisations, institutions, United Nations (general, d 2.6.1 2.6.1 "United Nations" 2.6.2 2.6.2 "International organisations" 2.6.3 2.6.3 "Regional organisations" 2.6.5 2.6.5 "European Community - European Union" 2.7 2.7 "Sustainable Development, Development models and example 2.8 2.8 "Basic Human Needs" 2.9 2.9 "Hunger and Poverty Alleviation" The //hfile// argument gives the name of a file, like sub.txt, which defines the metadata hierarchy. Each line describes one classification, and the descriptions have three parts: * Identifier, which matches the value of the metadata (given by the //metadata// argument) to the classification. * Position-in-hierarchy marker, in multi-part numeric form, e.g. 2, 2.12, 2.12.6. * The name of the classification. (If this contains spaces, it should be placed in quotation marks.) The file contents above are part of the //sub.txt// file used to create the subject hierarchy in the Development Library (and the Demo collection). This example is a slightly confusing one because the number representing the hierarchy appears twice on each line. The metadata type //Hierarchy// is represented in documents with values in hierarchical numeric form, which accounts for the first occurrence. It is the second occurrence that is used to determine the hierarchy that the hierarchy browser implements. The //hierarchy// classifier has an optional argument, //sort//, which determines how the documents at the leaves are ordered. Any metadata can be specified as the sort key. The default is to produce the list in the order in which the building process encounters the documents. Ordering at internal nodes is determined by the order in which things are specified in the //hfile// argument. ===== Browsing classifier numbering ===== ===== Additional resources ===== * View the full [[en:classifier:index|list of browsing classifiers]] * [[en:user_advanced:classifiers| Advanced User Guide classifiers page]] provides more information on how they work * You can also view some [[en:user_advanced:classifiers|information related to browsing classifiers]]: * [[en:user_advanced:more_about_classifiers_gs2#Translating navigation bar labels for new classifiers]] * [[en:user_advanced:more_about_classifiers_gs2#dynamic_classifiers]] * [[en:user_advanced:more_about_classifiers_gs2#Preserving the original directory structure of your collection for browsing]] * [[en:user_advanced:more_about_classifiers_gs2#Doing Unicode collation for a classifier]]