Changeset 8696
- Timestamp:
- 2004-11-30T10:46:56+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/docs/manual/manual.tex
r8472 r8696 388 388 \subsubsection{Creating a collection from scratch} 389 389 390 To create the director 390 391 Building native \gsiii\ collections is done using the \gst{gs3-build.sh} script, with the \gst{collectionConfig.xml} file controlling how the building is done. There are a number of considerations in building a collection: what documents appear in the collection, how they are indexed for searching, which classifications are used for browsing, etc. 391 392 … … 667 668 Inside the \gst{<search>} and \gst{<browse>} elements, \gst{<displayItem>} elements are used to provide titles for the indexes or classifiers, while \gst{<format>} elements provide formatting instructions, typically for a document or classifier node in a list of results. Placing the \gst{<format>} instructions at the top level in the search or browse element will apply the format to all the indexes or classifiers, while placing it inside an individual index or classifier element will restrict that formatting instruction to that item. 668 669 669 The \gst{<display>} element contains optional formatting information for the display of documents. Templates that can be specified here include \gst{documentHeading}, \gst{DocumentContent} , and other information that could be specified (in a yet to be decided format) are things such as whether or not to display the cover image, table of contents etc.670 The \gst{<display>} element contains optional formatting information for the display of documents. Templates that can be specified here include \gst{documentHeading}, \gst{DocumentContent}. Other formatting options may also be specified here, such as whether to display a table of contents and/or cover image for the documents. 670 671 671 672 Format elements are described in Section~\ref{sec:formatstmt}. 673 674 An optional \gst{<replaceList>} element can be included at the top level. This contains a list of strings and their replacements. This is particularly useful for Greenstone 2 collections that use macros. 675 676 The format is like the following: 677 \begin{gsc}\begin{verbatim} 678 <replaceList> 679 <replace scope='text' macro="xxx" text="yyy"/> 680 <replace scope='metadata' macro="xxx" bundle="yyy" key="zzz"/> 681 <replace scope='all' macro='xxx' metadata='yyy'/> 682 </replaceList> 683 \end{verbatim}\end{gsc} 684 685 Scope determines on what text the replacements are carried out: text, metadata, or both (all). An empty scope attribute is equivalent to scope=all. Each replace type can be used with all scope values. Replacing uses Java's 'String.replaceAll' functionality, so macro and replacement text are actually regular expressions. The first example is a straight is a straight textual replacement. The second example uses dictionary lookups. xxx will be replaced with the (language-dependent) value for key zzz in resource bundle yyy. The thrid example uses metadata: xxx will be replaced by the value of the yyy metadata for that document. 686 687 Some examples that have been used for existing Greenstone 2 collections are: 688 \begin{gsc}\begin{verbatim} 689 <replaceList> 690 <replace scope='text' macro="\backslash\backslash?\backslash\backslash\backslash/" text="\backslash("/> 691 <replace scope='metadata' macro="_magazines_" bundle="NZDLMacros" key="Magazines"/> 692 <replace scope='all' macro='_thisOID_' metadata='archivedir'/> 693 <replace macro="_httpcollimg_" text="sites/localsite/collect/folktale/index/assoc"/> 694 <replace macro="_httpextlink_&rl=1&href=" text="?a=d&c=folktale&s0.ext=1&d="/> 695 <replace macro="_httpextlink_&rl=0&href=" text="?a=p&sa=html&c=folktale&url="/> 696 </replaceList> 697 \end{verbatim}\end{gsc} 698 699 The last two examples show how to deal with Greenstone 2's external link macros. The first one is for a 'relative' external link. In this case, the links are like URL's but they actually refer to Greenstone internal documents. So the Greensotne 3 link is to the document, but with parameter s0.ext signifying that the d argument will need translating before retrieving the content. 700 The second example is a truly external link. This is translated into a html type page action, where the url is presented as a frame along with the collection header in a separate frame. 672 701 673 702 \subsection{buildConfig.xml}\label{sec:buildconfig} … … 796 825 \gst{<gsf:metadata name='Title'/>} & The value of a metadata element for the current document or section, in this case, Title\\ 797 826 \gst{<gsf:metadata name='Title' select='select-type' [separator='y' multiple='true']/>} & A more extended selection of metadata values. The select field can be one of those shown in Table~\ref{tab:gsf-select-types}. There are two optional attributes: separator gives a String that will be used to separate the fields, default is ``, ``, and if multiple is set to true, looks for multiple values at each section.\\ 827 \gst{<gsf:metadata name='Date' format='formatDate'/>} & The value of a metadata element for the current document, formatted in some way. Current formatting options available are formatDate: turns '20040201' into '01 February 2004', and formatLanguage: turns 'en' into 'English', both in a language dependent manner. \\ 798 828 \hline 799 829 \gst{<gsf:choose-metadata> … … 856 886 \begin{verbatim} 857 887 <gsf:choose-metadata> 858 <gsf: optionname='dc.Title'/>859 <gsf: optionname='dls.Title'/>860 <gsf: optionname='Title'/>888 <gsf:metadata name='dc.Title'/> 889 <gsf:metadata name='dls.Title'/> 890 <gsf:metadata name='Title'/> 861 891 </gsf:choose-metadata> 862 892 \end{verbatim} … … 869 899 \begin{gsc} 870 900 \begin{verbatim} 871 <gsf:switch metadata='Organization' preprocess='toLower;stripSpace'> 901 <gsf:switch preprocess='toLower;stripSpace'> 902 <gsf:metadata name='Organization'/> 872 903 <gsf:when test='equals' test-value='bostid'> 873 904 <!-- output BOSTID image --></gsf:when> … … 2261 2292 Tomcat uses a Manager to handle HTTP session information. This may be stored between restarts if possible. To use a persistent session handling manager, uncomment the \gst{<Manager>} element in \\ 2262 2293 \gst{\$GSDL3HOME/comms/jakarta/tomcat/conf/server.xml}. For the default manager, session information is stored in the work directory:\\ 2263 \gst{\$GSDL3HOME/comms/jakarta/tomcat/work/Standalone/localhost/gsdl3/SESSIONS.ser}. Delete this file to clear the cached session info. 2294 \gst{\$GSDL3HOME/comms/jakarta/tomcat/work/Standalone/localhost/gsdl3/SESSIONS.ser}. Delete this file to clear the cached session info. Note that Tomcat needs to be shutdown to delete this file. 2264 2295 2265 2296 \subsection{Proxying Tomcat with apache}
Note:
See TracChangeset
for help on using the changeset viewer.