Changeset 8696


Ignore:
Timestamp:
2004-11-30T10:46:56+13:00 (19 years ago)
Author:
kjdon
Message:

more stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/docs/manual/manual.tex

    r8472 r8696  
    388388\subsubsection{Creating a collection from scratch}
    389389
     390To create the director
    390391Building 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.
    391392
     
    667668Inside 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.
    668669
    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.
     670The \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.
    670671
    671672Format elements are described in Section~\ref{sec:formatstmt}.
     673
     674An 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
     676The 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
     685Scope 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
     687Some 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_&amp;rl=1&amp;href=" text="?a=d&amp;c=folktale&amp;s0.ext=1&amp;d="/>
     695<replace macro="_httpextlink_&amp;rl=0&amp;href=" text="?a=p&amp;sa=html&amp;c=folktale&amp;url="/>
     696</replaceList>
     697\end{verbatim}\end{gsc}
     698
     699The 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.
     700The 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.
    672701
    673702\subsection{buildConfig.xml}\label{sec:buildconfig}
     
    796825\gst{<gsf:metadata name='Title'/>} & The value of a metadata element for the current document or section, in this case, Title\\
    797826\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. \\
    798828\hline
    799829\gst{<gsf:choose-metadata>
     
    856886\begin{verbatim}
    857887<gsf:choose-metadata>
    858   <gsf:option name='dc.Title'/>
    859   <gsf:option name='dls.Title'/>
    860   <gsf:option name='Title'/>
     888  <gsf:metadata name='dc.Title'/>
     889  <gsf:metadata name='dls.Title'/>
     890  <gsf:metadata name='Title'/>
    861891</gsf:choose-metadata>
    862892\end{verbatim}
     
    869899\begin{gsc}
    870900\begin{verbatim}
    871 <gsf:switch metadata='Organization' preprocess='toLower;stripSpace'>
     901<gsf:switch  preprocess='toLower;stripSpace'>
     902  <gsf:metadata name='Organization'/>
    872903  <gsf:when test='equals' test-value='bostid'>
    873904     <!-- output BOSTID image --></gsf:when>
     
    22612292Tomcat 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 \\
    22622293\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.
    22642295
    22652296\subsection{Proxying Tomcat with apache}
Note: See TracChangeset for help on using the changeset viewer.